//Layer-Navigation
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
Ver4 = (NS4 || IE4);
offenMenu = false;
offenMenu2 = false;
timerLauft = false;

function checkTimer(){
  if (timerLauft){
    clearTimeout(timerLauft);
    timerLauft = false;
  }
}

function StartHpC(pKunde)
{
	var Fenster;
	var strUrl;
	//strUrl = "http://www.tz-bg.de/do/HomepageDesigner/Login"
	strUrl = "http://www.tz-bg.de/do/HomepageDesigner/Login.asp?Pfad=" + pKunde 
	if(navigator.appName =="Netscape")
	{
		alert("Diese Anwendung ist f?r den Microsoft Internet Explorer ab Version 5.0 optimiert")
	}
	else
	{
		
		Fenster = window.open(strUrl,'EditorTZ',"width=320,height=250,resizable=no, navigation=yes,top=320,left=300")
		
	}
}

function startTimer(){
    timerLauft = setTimeout("menuShow(); menuShow2();", 500);
}

function menuShow(welches){
  if (offenMenu){
    checkTimer();
    if (NS4){
            document.layers[offenMenu].visibility = "hide";
    }
    if (IE4){
                document.all(offenMenu).style.visibility = "hidden";
        }
    offenMenu = false;
  }
  if (welches){
    if (NS4){
                document.layers[welches].visibility = "show";
                document.layers[welches].onmouseover = checkTimer;
            document.layers[welches].onmouseout = startTimer;
    }
    if (IE4){
      document.all(welches).style.visibility = "visible";
      document.all(welches).onmouseover = checkTimer;
      document.all(welches).onmouseout = startTimer;
    }
    offenMenu = welches;
    menuOn = true;
  }
}

function Drucken()
{
	window.print()
}

function menuShow2(welches2){
  if (offenMenu2){
    checkTimer();
    if (NS4){
            document.layers[offenMenu2].visibility = "hide";
    }
    if (IE4){
                document.all(offenMenu2).style.visibility = "hidden";
        }
    offenMenu2 = false;
  }
  if (welches2){
    if (NS4){
                document.layers[welches2].visibility = "show";
                document.layers[welches2].onmouseover = checkTimer;
            document.layers[welches2].onmouseout = startTimer;
    }
    if (IE4){
      document.all(welches2).style.visibility = "visible";
      document.all(welches2).onmouseover = checkTimer;
      document.all(welches2).onmouseout = startTimer;
    }
    offenMenu2 = welches2;
    menuOn2 = true;
  }
}

function winOpen(theURL,winName,features) 
{ 
winName = window.open(theURL,winName,features); 
if(winName == null || winName.closed){window.open(theURL,winName,features);} 
else{winName.location.href = theURL;} 
if (!winName.closed) 
winName.focus(); 
}

function submitSearch(e)
{
  document.location.href='Suche.aspx?searchvalue='+escape(document.getElementById('searchvalue').value);
}
function sendSearchReturn(evt)
{
      var keyCode = null;
      if( evt.which )
      keyCode = evt.which;
      else if( evt.keyCode )
      keyCode = evt.keyCode;


      if( 13 == keyCode ) {
      submitSearch();
      return false;
      }
      return true;
}