var scrollPosRight;var scrollPos;var scroll_X=1;var playCtrl=0;function switchImage(){if(document.images[document.images.length-1].src.indexOf("stop.gif")!="-1")	{	stopScroll();	document.images[document.images.length-1].src="media/play.gif";	}else	{	if(document.images[document.images.length-2].src.indexOf("stop.gif")!="-1")		{		stopScroll2();		setTimeout("startScroll()",500);		document.images[document.images.length-2].src="media/play2.gif";		}	else		startScroll();	document.images[document.images.length-1].src="media/stop.gif";	}}function checkScrollWidth(){if(window.innerHeight)	document.getElementById("last").scrollIntoView(true);else	document.all.last.scrollIntoView(true);	if(!window.innerHeight)	scrollPosRight=document.body.scrollLeft;else	scrollPosRight=window.pageXOffset;window.scrollTo(0,0);document.getElementById("exhibition").style.visibility="visible";}function startScroll(){playCtrl=1;window.setTimeout("checkScrollPos()",200);}function checkScrollPos(){getScrollPos();if(scroll_X>=parent.ateliers.scrollPosRight)	scroll_X=0;setTimeout("setScroll()",100);window.scrollTo(0,0);document.getElementById("lead").title="Animation anhalten";}function setScroll(){if(playCtrl==1)	{	if(scroll_X>=parent.ateliers.scrollPosRight)		{		scrollPos=0;		stopScroll();		document.images[document.images.length-1].src="media/play.gif";				}	else		{		scrollPos=scrollPosRight;		scroll_X=scroll_X+2;		}	parent.ateliers.window.scrollTo(scroll_X,0);	window.setTimeout("setScroll()",10);	}}function stopScroll(){playCtrl=0;document.getElementById("lead").title="Animation abspielen";}function getScrollPos(){if(!window.innerHeight)	scroll_X=parent.ateliers.document.body.scrollLeft;else	scroll_X=parent.ateliers.window.pageXOffset;}/**************************************************/function switchImage2(){stopScroll();if(document.images[document.images.length-2].src.indexOf("stop.gif")!="-1")	{	stopScroll2();	document.images[document.images.length-2].src="media/play2.gif";	}else	{	if(document.images[document.images.length-1].src.indexOf("stop.gif")!="-1")		{		stopScroll();		setTimeout("startScroll2()",500);		document.images[document.images.length-1].src="media/play.gif";		}	else		startScroll2();	document.images[document.images.length-2].src="media/stop.gif";	}}function startScroll2(){playCtrl=1;window.setTimeout("checkScrollPos2()",200);}function checkScrollPos2(){getScrollPos();if(scroll_X<=0)	scroll_X=parent.ateliers.scrollPosRight;setTimeout("setScroll2()",100);document.getElementById("lead2").title="Animation anhalten";}function setScroll2(){if(playCtrl==1)	{	if(scroll_X<=0)		{		scrollPos=0;		stopScroll2();		document.images[document.images.length-2].src="media/play2.gif";				}	else		{		scrollPos=0;		scroll_X=scroll_X-2;		}	parent.ateliers.window.scrollTo(scroll_X,0);	window.setTimeout("setScroll2()",10);	}}function stopScroll2(){playCtrl=0;document.getElementById("lead2").title="Animation abspielen";}function getScrollPos(){if(!window.innerHeight)	scroll_X=parent.ateliers.document.body.scrollLeft;else	scroll_X=parent.ateliers.window.pageXOffset;}