var scrollcontainerwidth = 0;
var scrollcontainerheight = 121;
var scrollcontentwidth = 0;
var scrollcontainer = false;
var scrollcontent1 = false;
var scrollcontent2 = false;
var scrollcurrent1x = 0;
var scrollcurrent1y = 0;
var scrollcurrent2x = 0;
var scrollcurrent2y = 0;
var scrollspeedy = 0; // vertical pixels to move per repeat
var scrollspeedx = -1; // horizontal pixels to move per repeat
var scrollrepeat = 60; // milliseconds per repeat
var scrollmove = false;
var scrollinit = false;
var pos = new Array(207, 51);

function scroll() {
	if (scrollinit) {
		scrollcurrent1x += scrollspeedx;
		scrollcurrent1y += scrollspeedy;
		scrollcurrent2x += scrollspeedx;
		scrollcurrent2y += scrollspeedy;
		
		if (scrollcurrent1x > scrollcontentwidth) {
			scrollcurrent1x = scrollcurrent2x-scrollcontentwidth;
		}
		if (scrollcurrent1x < 0-scrollcontentwidth) {
			scrollcurrent1x = scrollcurrent2x+scrollcontentwidth;
		}
		if (scrollcurrent2x > scrollcontentwidth) {
			scrollcurrent2x = scrollcurrent1x-scrollcontentwidth;
		}
		if (scrollcurrent2x < 0-scrollcontentwidth) {
			scrollcurrent2x = scrollcurrent1x+scrollcontentwidth;
		}
		sP(scrollcontent1,scrollcurrent1x,scrollcurrent1y);
		sP(scrollcontent2,scrollcurrent2x,scrollcurrent2y);
		if (scrollmove) {
			setTimeout("scroll()",scrollrepeat);
		}
	}
}

function scrollOut() {
	scrollspeedx = -1;
}

function scrollSpeed(e) {
	if(nn){xpos=e.pageX;}else{if(e)xpos=e.clientX;else xpos=event.clientX;}
	var speeds = new Array(4, 3, 2, 1, 0, -1, -2, -3, -4);
	w = docW();
	if (xpos) {
		if (xpos >= 0 && xpos < (w/9)*1) {
			speed = speeds[0];
		} else if (xpos >= xpos < (w/9)*1 && xpos < (w/9)*2) {
			speed = speeds[1];
		} else if (xpos >= xpos < (w/9)*2 && xpos < (w/9)*3) {
			speed = speeds[2];
		} else if (xpos >= xpos < (w/3)*3 && xpos < (w/9)*4) {
			speed = speeds[3];
		} else if (xpos >= xpos < (w/9)*4 && xpos < (w/9)*5) {
			speed = speeds[4];
		} else if (xpos >= xpos < (w/9)*5 && xpos < (w/9)*6) {
			speed = speeds[5];
		} else if (xpos >= xpos < (w/9)*6 && xpos < (w/9)*7) {
			speed = speeds[6];
		} else if (xpos >= xpos < (w/9)*7 && xpos < (w/9)*8) {
			speed = speeds[7];
		} else if (xpos >= xpos < (w/9)*8 && xpos < (w/9)*9) {
			speed = speeds[8];
		}
	} else {
		speed = 0;
	}
	scrollspeedx = speed;
	return true;
}

function scrollerInit() {
	var pos = getPos('salogo');
	pos[0]+=getWidth('salogo')-1;
	pos[1]-=13;
	if (op) {
		pos[0]-=0;
		pos[1]-=0;
	} else if (ie && ua.indexOf('win')>-1) {
		if (ua.indexOf('msie 5.0')!=-1 || ua.indexOf('msie 5.5')!=-1) {
			pos[0]-=0;
			pos[1]-=1;
		} else {
			pos[0]-=0;
			pos[1]-=1;
		}
	} else if (ie && ua.indexOf('mac')>-1) {
		pos[0]-=0;
		pos[1]-=51;
	} else if (nn) {
		pos[0]-=12;
		pos[1]+=16;
	} else if (ua.indexOf('gecko')>-1 && ua.indexOf('khtml')==-1) {
		pos[0]-=0;
		pos[1]-=1;
	} else {
		pos[0]-=0;
		pos[1]-=0;
	}
	scrollcontainer = gE('scrollcontainer');
	scrollcontent1 = gE('scrollcontentone', scrollcontainer);
	scrollcontent2 = gE('scrollcontenttwo', scrollcontainer);
	scrollcontainerwidth = docW()-pos[0];
	scrollcontentwidth = gW(scrollcontent1);
	sS(scrollcontainer,scrollcontainerwidth,scrollcontainerheight);
	sC(scrollcontainer,0,scrollcontainerwidth,scrollcontainerheight,0);

	sP(scrollcontainer, pos[0], pos[1]);
	sX(scrollcontent1, 0);
	sX(scrollcontent2, scrollcontentwidth);

	scrollcurrent1x = 0;
	scrollcurrent2x = scrollcontentwidth;

	sE(scrollcontainer);
	sE(scrollcontent1);
	sE(scrollcontent2);
	
	aE(scrollcontainer, 'mouseover', scrollSpeed, true);
	aE(scrollcontainer, 'mouseout', scrollOut, true);
	scrollinit = true;
	scrollmove = true;
	scroll();
}


onload=function(){
initMenus();
scrollerInit();
}
