// ************************************************************************************
// ** This file has been created with the Rotating Content Tool by Amesbury Web.     **
// ** For more information, visit us on the web:                                     **
// **                                                                                **
// **     Rotating Content Tool   -- http://rotatecontent.com/                       **
// **     Company: Amesbury Web   -- http://amesburyweb.com/                         **
// **     Author:  Randy Hoyt     -- http://randyhoyt.com/                           **
// **                                                                                **
// ************************************************************************************

today = new Date()
month = today.getMonth() + 1
year = today.getFullYear()

selectedDate = new Date("08/12/2009")
selectedContent = ""

varLength = 7
var entryDate = new Array(varLength)
var entryContent = new Array(varLength)

entryDate[0] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla1.jpg\" width=\"499\">&nbsp;"
entryContent[0] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla1.jpg\" width=\"499\">&nbsp;"

entryDate[1] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla2.jpg\" width=\"499\">"
entryContent[1] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla2.jpg\" width=\"499\">"

entryDate[2] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla3.jpg\" width=\"499\">"
entryContent[2] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla3.jpg\" width=\"499\">"

entryDate[3] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla5.jpg\" width=\"499\">"
entryContent[3] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla5.jpg\" width=\"499\">"

entryDate[4] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla6.jpg\" width=\"499\">"
entryContent[4] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla6.jpg\" width=\"499\">"

entryDate[5] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla7.jpg\" width=\"499\">"
entryContent[5] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla7.jpg\" width=\"499\">"

entryDate[6] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla8.jpg\" width=\"499\">"
entryContent[6] = " <img alt=\"\" height=\"162\" src=\"http://testsite5.webevolutionary.com/images/webJoomla8.jpg\" width=\"499\">"

if (typeof display == "undefined") { var display = "date" }

if (display == "random")
{
  var randomNumber = Math.random()
  randomNumber *= varLength
  randomNumber = parseInt(randomNumber)
  if(isNaN(randomNumber)) randomNumber = 0
  else randomNumber %= varLength
  selectedContent = entryContent[randomNumber]
}
else
{
  for (x=0; x<(entryContent.length); x++)
  {
    tempDate = new Date(entryDate[x])
    tempContent = entryContent[x]
    if ((tempDate <= today) && (tempDate > selectedDate))
    {
      selectedContent = tempContent
      selectDate = tempDate
    }
  }
}

document.write (selectedContent)