
var delay=5000
var delay2=5000
var delay3=5000
var delay4=5000
var delay5=5000


var ie4=document.all

var curindex=0
var totalcontent=0

function get_total(){
if (ie4){
while (eval("document.all.content1"+totalcontent))
totalcontent++
}
else{
while (document.getElementById("content1"+totalcontent))
totalcontent++
}
}

function contract_all(){
for (y=0;y<totalcontent;y++){
if (ie4)
eval("document.all.content1"+y).style.display="none"
else
document.getElementById("content1"+y).style.display="none"
}
}

function expand_one(which){
contract_all()
if (ie4)
eval("document.all.content1"+which).style.display=""
else
document.getElementById("content1"+which).style.display=""
}

function rotate_content(){
get_total()
contract_all()
expand_one(curindex)
curindex=(curindex<totalcontent-1)? curindex+1: 0
setTimeout("rotate_content()",delay)
}




var curindex2=0
var totalcontent2=0

function get_total2(){
if (ie4){
while (eval("document.all.content2"+totalcontent2))
totalcontent2++
}
else{
while (document.getElementById("content2"+totalcontent2))
totalcontent2++
}
}

function contract_all2(){
for (y=0;y<totalcontent2;y++){
if (ie4)
eval("document.all.content2"+y).style.display="none"
else
document.getElementById("content2"+y).style.display="none"
}
}

function expand_one2(which){
contract_all2()
if (ie4)
eval("document.all.content2"+which).style.display=""
else
document.getElementById("content2"+which).style.display=""
}

function rotate_content2(){
get_total2()
contract_all2()
expand_one2(curindex2)
curindex2=(curindex2<totalcontent2-1)? curindex2+1: 0
setTimeout("rotate_content2()",delay2)
}

//===========
var curindex3=0
var totalcontent3=0

function get_total3(){
if (ie4){
while (eval("document.all.content3"+totalcontent3))
totalcontent3++
}
else{
while (document.getElementById("content3"+totalcontent3))
totalcontent3++
}
}

function contract_all3(){
for (y=0;y<totalcontent3;y++){
if (ie4)
eval("document.all.content3"+y).style.display="none"
else
document.getElementById("content3"+y).style.display="none"
}
}

function expand_one3(which){
contract_all3()
if (ie4)
eval("document.all.content3"+which).style.display=""
else
document.getElementById("content3"+which).style.display=""
}

function rotate_content3(){
get_total3()
contract_all3()
expand_one3(curindex3)
curindex3=(curindex3<totalcontent3-1)? curindex3+1: 0
setTimeout("rotate_content3()",delay3)
}

//===========
var curindex4=0
var totalcontent4=0

function get_total4(){
if (ie4){
while (eval("document.all.content4"+totalcontent4))
totalcontent4++
}
else{
while (document.getElementById("content4"+totalcontent4))
totalcontent4++
}
}

function contract_all4(){
for (y=0;y<totalcontent4;y++){
if (ie4)
eval("document.all.content4"+y).style.display="none"
else
document.getElementById("content4"+y).style.display="none"
}
}

function expand_one4(which){
contract_all4()
if (ie4)
eval("document.all.content4"+which).style.display=""
else
document.getElementById("content4"+which).style.display=""
}

function rotate_content4(){
get_total4()
contract_all4()
expand_one4(curindex4)
curindex4=(curindex4<totalcontent4-1)? curindex4+1: 0
setTimeout("rotate_content4()",delay4)
}

function totalRandBanner(){
try{
rotate_content();
}catch(e){}
try{
rotate_content2();
}catch(e){}
try{
rotate_content3();
}catch(e){}
try{
rotate_content4();
}catch(e){}
}
window.onload = totalRandBanner;