/*
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
*/

/* PREFERENCES */
top.marqueespeed = 3;
//Pause marquee onMousever (0=no. 1=yes)?
top.pauseit = 1;

pageInit = function() {
	if (document.getElementById("marquee")) {
		//Get the marquee's width
		top.marqueewidth = document.getElementById('marquee').style.width;
		//Get the marquee's height
		top.marqueeheight = document.getElementById('marquee').style.height;
		//Specify the marquee's marquee speed (larger is faster 1-10)
		
		//var marqueecontent='<nobr><font face="Arial">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a> If you find this script useful, please consider linking to us by <a href="../link.htm">click here.</a> Enjoy your stay!</font></nobr>'
		
		
		////NO NEED TO EDIT BELOW THIS LINE////////////
		
		top.copyspeed = marqueespeed;
		top.pausespeed = (pauseit == 0) ? copyspeed : 0;
		
		//document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
		
		top.actualwidth = '';
		var cross_marquee;
		
		initialize_marquee();
	}
}

window.onload = pageInit;

function initialize_marquee() {
	cross_marquee = document.getElementById("iemarquee");
	cross_marquee.style.left = marqueewidth;
	actualwidth=document.getElementById("iemarquee").offsetWidth;
	lefttime=setInterval("scrollmarquee()",20);
	document.getElementById('iemarquee').style.visibility = 'visible';
}

function scrollmarquee(){
	if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) {
		cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
	} else {
		cross_marquee.style.left=parseInt(marqueewidth)+8+"px";
	}	
}