function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/* SHORTLINKS START */

var arr = new Array();
var doAction = "close";
var arrpos = 0;
var elem = "alleleistungen";
var initiatedLN = false;


function initLeistungen()
{
	var arrW, arrH, arrX, arrY;
	
	if (document.all) 
	{
		// IE
	} 
	else 
	{
		// MOZILLA
	}
  		
	arrW = new Array('30px','90px','120px','150px','180px','210px','240px','270px','300px','330px','370px','410px');
	arrH = new Array('20px','30px','40px','50px','60px','80px','100px','120px','140px','160px','180px','200px');
	arrX = new Array('200px','190px','180px','170px','150px','130px','110px','90px','70px','50px','30px','10px');
	arrY = new Array('-35px','-32px','-29px','-26px','-23px','-20px','-17px','-14px','-11px','-8px','-5px','-2px');
		
	arr = new Array(arrW,arrH,arrX,arrY);
}

function OpenLN()
{	
	doAction = "open";
	if(!initiatedLN) 
	{	
		initLeistungen();
		initiatedLN = true;
	}
	timelinePlay(elem,arrpos);
}

function CloseLN()
{
	doAction = "close";
	window.setTimeout("finallyClose()",200);
}

function finallyClose()
{
	if(doAction == "close")
	{
		var o = MM_findObj(elem);
		o.style.display = "none";	
		arrpos = 0;
	}
}

function timelinePlay(obj,pos)
{
	if(doAction != "open") return;
	
	var o = MM_findObj(obj);
	var child = o.firstChild;
	
	if(pos >= arr[0].length)
	{
		child.style.display = "block";
		return;
	}
	else
	{
		o.style.display = "block";
		child.style.display = "none";
	
		o.style.width = arr[0][pos];
		o.style.height = arr[1][pos];
		o.style.left = arr[2][pos];	
		o.style.top = arr[3][pos];
		
		arrpos = pos+1;
		if(arrpos > arr[0].length) arrpos = arr[0].length;
		window.setTimeout("timelinePlay('"+obj+"',"+arrpos+")",10);
	}	
	
}


/* SHORTLINKS END */


function ShowMap(x, corr)
{
	document.getElementById('karte').src = corr + "images/karte_" + x + ".gif";
	if(x != '0') 
	{
		document.getElementById('standort_' + x).style.color = "#a3cd01";
	}
	else
	{
		for(i=1;i<=5;i++)
		{
			document.getElementById('standort_' + i).style.color = "black";
		}
	}
}