/*
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
*/
////NO NEED TO EDIT BELOW THIS LINE////////////
speed=(document.all)? speed : Math.max(1, speed-1); //slow speed down by 1 for NS
var copyspeed=speed;
var pausespeed=(pauseit==0)? copyspeed: 0;
var iedom=document.all||document.getElementById;
if (iedom){
	document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px;  border:1 solid black">'+content+'</span>');
}
var actualwidth='';
var cross_marquee1, ns_marquee;

function populate(){
	if (iedom){
		actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth;
		cross_marquee1=document.getElementById? document.getElementById("iemarquee1") : document.all.iemarquee1;
		cross_marquee1.style.left=parseInt(rw)+8+"px";
		cross_marquee1.innerHTML=content;
		cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee1;
		cross_marquee2.style.left=parseInt(actualwidth)+parseInt(rw)+8+"px";
		cross_marquee2.innerHTML=content;
	}else if (document.layers){
		ns_marquee=document.ns_marquee.document.ns_marquee1;
		ns_marquee.left=parseInt(rw)+8;
		ns_marquee.document.write(content);
		ns_marquee.document.close();
		actualwidth=ns_marquee.document.width;
	}
	lefttime=setInterval("scrollmarquee()",20);
}

window.onload=populate;

function scrollmarquee(){
	if (iedom){
		if (parseInt(cross_marquee1.style.left)>(actualwidth*(-1)+8)){
			cross_marquee1.style.left=parseInt(cross_marquee1.style.left)-copyspeed+"px";
			cross_marquee2.style.left=parseInt(cross_marquee2.style.left)-copyspeed+"px";
		}else{
			if(parseInt(actualwidth)<parseInt(rw)){
				cross_marquee1.style.left=parseInt(rw)+"px";
			}else{
				cross_marquee1.style.left=parseInt(cross_marquee2.style.left)+parseInt(actualwidth)+"px";
			}
		}
		if (parseInt(cross_marquee2.style.left)<(actualwidth*(-1)+8)){
			cross_marquee2.style.left=parseInt(cross_marquee1.style.left)+parseInt(actualwidth)+"px";
		}
	}else if (document.layers){
		if (ns_marquee.left>(actualwidth*(-1)+8)){
			ns_marquee.left-=copyspeed;
		}else{
			ns_marquee.left=parseInt(rw)+8;
		}
	}
}


if (iedom||document.layers){
	with (document){
		document.write('<table border="0" cellspacing="0" cellpadding="0"><td>');
		if (iedom){
			write('<div style="position:relative;width:'+rw+';height:'+rh+';overflow:hidden; border:0 solid red">');
			write('<div style="position:absolute;width:'+rw+';height:'+rh+';background-color:#ffffff; border:0 solid yellow" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
			write('<div id="iemarquee1" style="position:absolute;left:0px;top:0px; border:0 solid pink"></div>');
			write('<div id="iemarquee2" style="position:absolute;left:0px;top:0px; border:0 solid black"></div>');
			write('</div></div>');
		}else if (document.layers){
			write('<ilayer width='+rw+' height='+rh+' name="ns_marquee" bgColor=#ffffff>');
			write('<layer name="ns_marquee1" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed"></layer>');
			write('</ilayer>');
		}
		document.write('</td></table>');
	}
}

