
/***********************************************
* 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 sampleeffects=["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 sampleeffects=["RandomBars"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var sampletickspeed= 30000 //24000 //ticker speed in miliseconds (2000=2 seconds)
var sampleeffectduration=1000 //Transitional effect duration in miliseconds
var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid=Math.floor(Math.random()*sampleeffects.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.samplecontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+sampleeffects[filterid]+'}\n')
else if (hidecontent_from_legacy)
document.write('#contentwrapper{display:none;}')
document.write('</style>\n')

var sampleselectedDiv=0
var sampletotalDivs=0

function samplecontractboard(){
var inc=0
while (document.getElementById("sample"+inc)){
document.getElementById("sample"+inc).style.display="none"
inc++
}
}

function sampleexpandboard(){
var sampleselectedDivObj=document.getElementById("sample"+sampleselectedDiv)
samplecontractboard()
if (sampleselectedDivObj.filters){
if (sampleeffects.length>1){
filterid=Math.floor(Math.random()*sampleeffects.length)
sampleselectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+sampleeffects[filterid]
}
sampleselectedDivObj.filters[0].duration=sampleeffectduration/1000
sampleselectedDivObj.filters[0].Apply()
}
sampleselectedDivObj.style.display="block"
if (sampleselectedDivObj.filters)
sampleselectedDivObj.filters[0].Play()
sampleselectedDiv=(sampleselectedDiv<sampletotalDivs-1)? sampleselectedDiv+1 : 0
setTimeout("sampleexpandboard()",sampletickspeed)
}

function samplestartbill(){
while (document.getElementById("sample"+sampletotalDivs)!=null)
sampletotalDivs++
if (document.getElementById("sample0").filters)
sampletickspeed+=sampleeffectduration
sampleexpandboard()
}

if (window.addEventListener)
window.addEventListener("load", samplestartbill, false)
else if (window.attachEvent)
window.attachEvent("onload", samplestartbill)
else if (document.getElementById)
window.onload=samplestartbill
