max2=l=(max-4)*-110;
l2=0
function start()
{
	getobject('lenta').style.left=max2+"px";
	getobject('lenta').style.width=max*110+"px";
	getobject('kartinki').style.margin ="0 0 0 "+(document.body.clientWidth-672)/2+"px";
	getobject('proekty').style.margin ="0 0 0 "+(document.body.clientWidth-500)/2+"px";
	getobject('comment').style.margin ="0 0 0 "+(document.body.clientWidth-440)/2+"px";
	for(i=1;i<=max;i++)
	{
	getobject('im'+i).style.margin = "0 5px 0 5px";
	getobject('im'+i).style.border = "1px solid #ccc";
	getobject('im'+i).style.cursor = "pointer";
	getobject('im'+i).style.cursor = "hand";
	}
	getobject('im'+max).style.border="1px solid #000";
}

function left()
{
	if (l < 0) {
			l2+=4
			getobject('lenta').style.left = l+l2 + "px";
			if(l2<110){setTimeout("left()",1)}else{l+=110;l2=0;}
		}
	}	

function right()
{
	if (l > max2) {
		l2+=4
		getobject('lenta').style.left = l-l2+ "px";
		if(l2<110){setTimeout("right()",1)}else{l-=110;l2=0;}
	}	
}
function onmouss(){
	for (i = 1; i <= max; i++) {
	getobject('im'+i).style.border = "1px solid #ccc";
	}
}

function getobject(obj){
if (document.getElementById)
return document.getElementById(obj)
else if (document.all)
return document.all[obj]
}
