// use php to create the javascript based on number of products available
// definded by page 30 to max_pages and then general parameter variable number of products
// as to how many to output

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(5)
text_one = new StringArray(5)
text_two = new StringArray(5)

image[0] = '<li><img src="images/dt_collage_small.jpg" alt="David Trump" title="David Trump" width="138" height="184" class="image_border" /><br><h1>David Trump</h1></a><br>'
text_one[0] = 'Pollution Control'
text_two[0] = 'Project Management</li>'
image[1] = '<li><a href="overseas-projects.html" title="Overseas Projects"><img src="images/overseas_projects1.jpg" alt="Overseas Projects" title="Overseas Projects" width="138" height="184" class="image_border" /></a><br><a href="overseas-projects.html" title="Overseas Projects"><h1>Overseas Projects</h1></a></a><br>'
text_one[1] = ''
text_two[1] = '</li>'
image[2] = '<li><a href="consultancy.html" title="Consultancy"><img src="images/consultancy1.jpg" alt="Consultancy" title="Consultancy" width="138" height="184" class="image_border" /></a><br><a href="consultancy.html" title="Consultancy"><h1>Consultancy</h1></a></a><br>'
text_one[2] = ''
text_two[2] = '</li>'
image[3] = '<li><a href="introduction.html" title="Introduction"><img src="images/bush_small.jpg" alt="Introduction" title="Introduction" width="138" height="184" class="image_border" /></a><br><a href="introduction.html" title="Introduction"><h1>Introduction</h1></a></a><br>'
text_one[3] = ''
text_two[3] = '</li>'


function ranimage(m) {
  offset = m
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(Math.random()*1)
  core = core+offset
  return(image[core]+text_one[core]+'<br>'+text_two[core])
}
