/***********************************************
* DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//List of transitional effects to be randomly applied to billboard:
var billboardeffects2=["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]

var billboardeffects2=["RadialWipe"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var tickspeed2=6000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration2=1500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy2=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid2=Math.floor(Math.random()*billboardeffects2.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.billcontent2{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects2[filterid2]+'}\n')
else if (hidecontent_from_legacy2)
document.write('#contentwrapper2{display:none;}')
document.write('</style>\n')

var selectedDiv2=0
var totalDivs2=0

function contractboard2(){
var inc2=0
while (document.getElementById("billboardB"+inc2)){
document.getElementById("billboardB"+inc2).style.display="none"
inc2++
}
}

function expandboard2(){
var selectedDivObj2=document.getElementById("billboardB"+selectedDiv2)
contractboard2()
if (selectedDivObj2.filters){
if (billboardeffects2.length>1){
filterid2=Math.floor(Math.random()*billboardeffects2.length)
selectedDivObj2.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects2[filterid2]
}
selectedDivObj2.filters[0].duration=effectduration2/1000
selectedDivObj2.filters[0].Apply()
}
selectedDivObj2.style.display="block"
if (selectedDivObj2.filters)
selectedDivObj2.filters[0].Play()
selectedDiv2=(selectedDiv2<totalDivs2-1)? selectedDiv2+1 : 0
setTimeout("expandboard2()",tickspeed2)
}

function startbill2(){
while (document.getElementById("billboardB"+totalDivs2)!=null)
totalDivs2++
if (document.getElementById("billboardB0").filters)
tickspeed2+=effectduration2
expandboard2()
}

if (window.addEventListener)
window.addEventListener("load", startbill2, false)
else if (window.attachEvent)
window.attachEvent("onload", startbill2)
else if (document.getElementById)
window.onload=startbill2
