//jaja, quick und very dirty ;)

var click=0;

function change(bild){
	click=1;
	document.getElementById("startbild").style.display="none";
	for (var i=1; i <= 10; i++){
		if (i!=bild){
			if (document.getElementById("creat"+i)!=null){
				document.getElementById("creat"+i).style.display="none";
			}
			if (document.getElementById("li"+i)!=null){
				$("#li"+i).css({ color:"" });
				document.getElementById("li"+i).removeAttribute("style");
			}
		}
		else{
			document.getElementById("creat"+bild).style.display="block";
			document.getElementById("creat"+bild).style.zIndex="10";
			document.getElementById("li"+bild).style.color="#005192";		
		}
	}
}

function bildin(bild){
	if (click==0){
		if (document.getElementById("creat"+bild).style.display!="block"){
			document.getElementById("startbild").style.display="none";
			document.getElementById("creat"+bild).style.display="block";
			document.getElementById("creat"+bild).style.zIndex="123456";
		}
	}
}


function bildout(bild){
	if (click==0){
		if (document.getElementById("creat"+bild).style.zIndex=="123456"){
			document.getElementById("startbild").style.display="block";
			document.getElementById("startbild").style.zIndex="5";
			document.getElementById("creat"+bild).style.display="none";
			document.getElementById("creat"+bild).style.zIndex="10";
		}
	}
}

function creat_naehr(nummer, what){
		if (what!='naturelle') what=what+nummer;
		
	var html=document.getElementById("creat"+nummer).innerHTML;
	document.getElementById("creat"+nummer).innerHTML=html+"<div id='creat_popup' class='creat_popup' onclick='this.style.display=\"none\"'><img style='width:320px; height:300px;' src='fileadmin/templates/_images/content_rechts/"+what+"_naehr.png' border='none'/></div>";
}
