
/***********************************************

* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)

* This notice MUST stay intact for legal use

* Visit http://http://www.dynamicdrive.com/dynamicindex2/cmarquee2.htm for this script and 100s more.

***********************************************/

var delayb4scroll=1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

/* Edited below - to have the scroller move horizontally, instead of vertically -Michal */
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualhwidth='';

function scrollmarquee(){
	if (parseInt(cross_marquee.style.right)>(actualhwidth*(-1)+8)) {
		cross_marquee.style.right=parseInt(cross_marquee.style.right)-copyspeed+"px" /*move scroller upwards if scroller hasn't reached the end of its width*/
	}
	else {
		cross_marquee.style.right=parseInt(marqueewidth)+8+"px" /* else, reset to original position*/
	}
	setTimeout(scrollmarquee, 30);
}

function initializemarquee(){
	cross_marquee=document.getElementById("vmarquee");
	if (!cross_marquee) {
		return false;
	}
	cross_marquee.style.top = 0;
	cross_marquee.style.right = 0;
	cross_marquee.onmouseout= function() {
		copyspeed=marqueespeed;
	}
	cross_marquee.onmouseover=function() {
		copyspeed=pausespeed;
	}

	marqueewidth=document.getElementById("marqueecontainer").offsetWidth
	actualhwidth=cross_marquee.offsetWidth //width of marquee content (much of which is hidden from view)
	setTimeout(scrollmarquee, delayb4scroll);
}
