// JavaScript Document

	//fährt den Content rauf
	function showContent(element)
	{
		doAction('showContent',element);
		
		window.setTimeout("doScrollbar('scroll')", 1250);
	}
	//fährt den Content runter
	function hideContent(element)
	{	
		doScrollbar('hidden');

		window.setTimeout("doAction('hideContent','" + element + "')", 400);
	}
	
	//hide & show der Scrollbar
	function doScrollbar(action)
	{
		if ( action == "scroll" ) 
			document.getElementById('main_content').style.overflowY = action;
		else if ( action == "hidden" )
			document.getElementById('main_content').style.overflowY = action;

	}
	//führ diverse Actionen aus
	function doAction(action,element)
	{
		if ( action == "hideContent" )
		{
			new Effect.Move(document.getElementById(element),{ x: 0, y: 500, mode: "relative", duration: 0.4, transition: Effect.Transitions.sinoidal});
			new Effect.Move(document.getElementById(element),{ x: 0, y: 375, mode: "absolute", queue: "end", duration: 0.6});
			document.getElementById('b_showContent').style.display = "block";
			document.getElementById('b_hideContent').style.display = "none";
		}
		if ( action == "showContent" )
		{
			new Effect.Move(document.getElementById(element),{ x: 0, y: 150, mode: "relative", duration: 0.4, transition: Effect.Transitions.sinoidal});
			new Effect.Move(document.getElementById(element),{ x: 0, y: 0, mode: "absolute", queue: "end", duration: 0.6});
			document.getElementById('b_showContent').style.display = "none";
			document.getElementById('b_hideContent').style.display = "block";
		}
	}
	
	/* jw -> js for HTML / partner flash communication */
	function showDiv(div){
		for(i=1; i<100;i++){
			if(document.getElementById("kontakt" + i))
				document.getElementById("kontakt" + i).style.display = "none";
		}
		document.getElementById(div).style.display = "block";
	}