
function init()
{

	//loadFlashClip();
}

function hideText()
{
	var tmp = document.getElementById('s');
	if ( tmp.value == 'Suche' )
	{
		tmp.value = '';
	}
}

function restoreText()
{
	var tmp = document.getElementById('s');
	if ( tmp.value == '' )
	{
		tmp.value = 'Suche';
	}
}

var aktiv = 0;
var width = 0;
var abstand = 0;
var i = 0;

function loadFlashClip()
{
	//if(window.innerWidth > 1280)
	//	document.getElementById('flashClip').style.right = eval(window.innerWidth/2-600)+"px";
	//document.getElementById('flashClip').style.right = eval(window.innerWidth/2-489)+"px";
	aktiv = setInterval("moveFlashDiv()", 1);
	//document.getElementById('flashClip').style.display = "block";
}

function moveFlashDiv()
{
	i++;
	var flashDiv = document.getElementById('flashClip');
	width = eval(flashDiv.style.width.slice(0,-2));
	abstand = eval(flashDiv.style.right.slice(0,-2));
	if (width <= 156) 
	{
		width += 1.5;
		flashDiv.style.width = width + "px";
	}
	
	if ( i >= 4300) 
	{
		clearInterval(aktiv);
		closeFlashClip();
	}
}

function closeFlashClip()
{
	// löschen des ChildNodes, welcher den Flashclip beinhaltet
	var movie = window.document.trudent_intro;
	var parent = window.document.trudent_intro.parentNode;
	parent.removeChild(movie);
	
	// overlay div entfernen
	document.getElementById('flashClip').style.display = "none";
	clearInterval(aktiv);
}

