
/***********************************************

* 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 marqueespeedH=1
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 copyspeedH=marqueespeedH
var pausespeed=(pauseit==0)? copyspeed: 0
var actualhwidth='';

/* Horizontal marquee */
function scrollHmarquee(){
	if (parseInt(cross_Hmarquee.style.right)>(actualhwidth*(-1)+8)) {
		cross_Hmarquee.style.right=parseInt(cross_Hmarquee.style.right)-copyspeedH+"px" /*move scroller right if scroller hasn't reached the end of its width*/
	}
	else {
		cross_Hmarquee.style.right=parseInt(marqueewidth)+8+"px" /* else, reset to original position*/
	}
	setTimeout(scrollHmarquee, 30);
}

function initializeHmarquee(){
	cross_Hmarquee=document.getElementById("hmarquee");
	if (!cross_Hmarquee) {
		return false;
	}
	cross_Hmarquee.style.top = -1;
	cross_Hmarquee.style.right = 95;
	cross_Hmarquee.onmouseout= function() {
		copyspeedH=marqueespeedH;
	}
	cross_Hmarquee.onmouseover=function() {
		copyspeedH=pausespeed;
	}

	marqueewidth=document.getElementById("hMarqueecontainer").offsetWidth
	actualhwidth=cross_Hmarquee.offsetWidth //width of marquee content (much of which is hidden from view)
	setTimeout(scrollHmarquee, delayb4scroll);
	return true;
}
/* End horizontal marquee */


/* vertical marquee */
function scrollmarquee(){
	if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) {
		cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" /*move scroller upwards if scroller hasn't reached the end of its height*/
	}
	else {
		cross_marquee.style.top=parseInt(marqueeheight)+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;
	}
	marqueeheight=document.getElementById("marqueecontainer").offsetHeight
	actualheight=cross_marquee.offsetHeight //height of marquee content (much of which is hidden from view)
	setTimeout(scrollmarquee, delayb4scroll);
	return true;
}
