// JavaScript Document

// Home Page Banner

if (document.all || document.getElementById){ //if IE4 or NS6+
document.write('<style type="text/css">\n')
document.write('.homeBanner{display: none; width: 800px; height: 85px;}\n')
document.write('</style>')
}

var curcontentindex=0
var images=new Array()

function getElementByClass(classname){
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
images[inc++]=alltags[i]
}
}

function rotatecontent(){
//get current message index (to show it):
curcontentindex=(curcontentindex<images.length-1)? curcontentindex+1 : 0
//get previous message index (to hide it):
prevcontentindex=(curcontentindex==0)? images.length-1 : curcontentindex-1
images[prevcontentindex].style.display="none" //hide previous message
images[curcontentindex].style.display="block" //show current message
}

window.onload=function(){
if (document.all || document.getElementById){
getElementByClass("homeBanner")
setInterval("rotatecontent()", 4000)
}
}
