function kontroll()
{
 var b="";
 var s=top.location.href;
  for (var a=0;a<s.length;a++)
   {
     	if (s.charAt(s.length-a-1)!="/")
          {
		b=s.charAt(top.location.href.length-a-1)+b
   	 }
	else
	 {
		if (b!="index.html")
	 	   {
			top.location.href="index.html";
                    }
                 return;
   	  }

   }

}


function abfrage(a)
{Check = confirm("Wollen Sie wirklich löschen?");
if (Check == true)
  a.form.reset();
}

function wechsle(obj,a)
{
	s=obj.getElementsByTagName("div");
	if (a==0)
	{
		s[0].style.display="none";
		s[1].style.display="inline";
	}
	else
	{
		s[0].style.display="inline";
		s[1].style.display="none";
	}
}


function checkbutton()
{
	if (which==0)
	{
		document.getElementById("cont1").style.visibility="hidden";
	}
	else
	{
		if (which==(bilder-1))
		{
			document.getElementById("cont2").style.visibility="hidden";
		}
		else
		{
			document.getElementById("cont1").style.visibility="visible";
			document.getElementById("cont2").style.visibility="visible";
		}
	}
}

function enablebutton()
{
	document.getElementById("cont1").className="buttonnormalz";
	document.getElementById("cont2").className="buttonnormalw";
}