// JavaScript Document
scrollStep=3;
timerLeft="";
timerRight="";
timerDown="";
var width=0;
var dir=0;
function autoScroll(id){
	if(dir==0){
		clearTimeout(timerRight);
		clearTimeout(timerLeft);
		document.getElementById(id).scrollLeft+=1;
		timerLeft=setTimeout("autoScroll('"+id+"')",50);
		if(document.getElementById(id).scrollLeft>=window.document.body.width-345)
			dir=1;
	}
	if(dir==1){
		clearTimeout(timerRight);
		clearTimeout(timerLeft);
		document.getElementById(id).scrollLeft-=1;
		timerRight=setTimeout("autoScroll('"+id+"')",50);
		if(document.getElementById(id).scrollLeft==1)
			dir=0;
	}
}
function scrollDivLeft(id){
	document.getElementById(id).scrollLeft-=scrollStep;
	timerRight=setTimeout("scrollDivLeft('"+id+"')",10);
}
function scrollDivRight(id){
	document.getElementById(id).scrollLeft+=scrollStep;
	timerLeft=setTimeout("scrollDivRight('"+id+"')",10);
}
function stopMe(){
	clearTimeout(timerRight);
	clearTimeout(timerLeft);
}
function loadImg(imgUrl){
	var el=document.getElementById('imgBig');
	el.setAttribute("src",imgUrl);
}
/*
function scrollDownPage(){
	if(document.getElementById('img_div').offsetTop){
		var positionDiv=document.getElementById('img_div').offsetTop;
	}else if(document.getElementById('img_div').scrollTop){
		var positionDiv=document.getElementById('img_div').scrollTop;
	}else if(document.getElementById('img_div').clientHeight){
		var positionDiv=850;
	}
	window.scrollTo(0,positionDiv);
}
*/
