/**
* Simple Horizontal Scroll v0.1
* By: me@daantje.nl
* last update: Sun Dec 24 00:13:19 CET 2006
*
*	Documentation: Copy & paste
*	License: LGPL
*	Support: some.
*/
var paused = false;
var scrllTmr;
var scrllTmr2;
if(window.onload) {
	var ld=window.onload;
	var isld=true;
} else {
	var isld=false;
}
window.onload = function(){
	if (isld) ld();
	cw = 568;
	w = document.getElementById('scrollme').offsetWidth;
	w2 = document.getElementById('scrollme2').offsetWidth;
	document.getElementById('scroll').style.width = cw + "px";
	document.getElementById('scrollme').style.width = w + "px";
	document.getElementById('scrollme').style.left = 0 + "px";
	document.getElementById('scrollme2').style.width = w2 + "px";
	document.getElementById('scrollme2').style.left = w + "px";
	scrollStep(0);
	scrollStep2(w);
}
function scrollInit(){
	l = document.getElementById('scrollme').offsetLeft;
	l2 = document.getElementById('scrollme2').offsetLeft;
	paused=false;
	scrollStep(l);
	scrollStep2(l2);
}
function scrollStep(lft){
	//calc and do step
	var w = document.getElementById('scrollme').offsetWidth;
	var lftw = document.getElementById('scrollme2').offsetWidth;
	var lftpos = document.getElementById('scrollme2').offsetLeft;
	if(lft <= w * -1)
		lft = lftw+lftpos;
	if (!paused)
		document.getElementById('scrollme').style.left = lft + "px";
	
	//wait and do next...
	if(scrllTmr)
		clearTimeout(scrllTmr);
	if (!paused)
		scrllTmr = setTimeout('scrollStep('+(lft - 1) + ')',10);
}

function scrollStep2(lft){
	//calc and do step
	var w = document.getElementById('scrollme2').offsetWidth;
	var lftw = document.getElementById('scrollme').offsetWidth;
	var lftpos = document.getElementById('scrollme').offsetLeft;
	if(lft <= w * -1)
		lft = lftw+lftpos;
	if (!paused)
		document.getElementById('scrollme2').style.left = lft + "px";
	
	//wait and do next...
	if(scrllTmr2)
		clearTimeout(scrllTmr2);
	if (!paused)
		scrllTmr2 = setTimeout('scrollStep2(' + (lft - 1) + ')',10);
}

