/*
Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

var mwidth="580px";
var mheight="32px";
var mspeed=2;
var mbgcolor="";
var mpauseit=1;

mspeed=(document.all)? mspeed : Math.max(1, mspeed-1) //slow speed down by 1 for NS
var mcopyspeed=mspeed
var mpausespeed=(mpauseit==0)? mcopyspeed: 0
var iedom=document.all||document.getElementById

if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var mactualwidth=''
var mcross_marquee, mns_marquee

function populate(){
if (iedom){
mcross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
mcross_marquee.style.left=parseInt(mwidth)+8+"px"
mcross_marquee.innerHTML=marqueecontent
mactualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
mns_marquee=document.mns_marquee.document.mns_marquee2
mns_marquee.left=parseInt(mwidth)+8
mns_marquee.document.write(marqueecontent)
mns_marquee.document.close()
mactualwidth=mns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(mcross_marquee.style.left)>(mactualwidth*(-1)+8))
mcross_marquee.style.left=parseInt(mcross_marquee.style.left)-mcopyspeed+"px"
else
mcross_marquee.style.left=parseInt(mwidth)+8+"px"

}
else if (document.layers){
if (mns_marquee.left>(mactualwidth*(-1)+8))
mns_marquee.left-=mcopyspeed
else
mns_marquee.left=parseInt(mwidth)+8
}
}

if (iedom||document.layers){

with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0" style="background:url(images/tickerbg.png) no-repeat;width:600px;height:32px;"><tr><td style="letter-spacing:1px;padding-left:10px;color:#000;font-size:14px;font-family:Arial,Helvetica;line-height:32px;">')
if (iedom){
write('<div style="position:relative;width:'+mwidth+';height:'+mheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+mwidth+';height:'+mheight+';background-color:'+mbgcolor+'" onMouseover="mcopyspeed=mpausespeed" onMouseout="mcopyspeed=mspeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+mwidth+' height='+mheight+' name="mns_marquee" bgColor='+mbgcolor+'>')
write('<layer name="mns_marquee2" left=0 top=0 onMouseover="mcopyspeed=mpausespeed" onMouseout="mcopyspeed=mspeed"></layer>')
write('</ilayer>')
}
document.write('</td></tr></table>')
}
}