var newWin = null;


//verdeckte Ebenen anzeigen
//*************************

function showHideLayers() { //v3.0
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function findObj(n, d) { //v4.0
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
				
//Cursor in Formular platzieren
//*************************

function myfocus(){
	document.myform.mypass.focus();
	}
	



//Fest definiertes Pop-Up öffnen
function openWindow(theURL,winName) { //v2.0
    var winName =  "popup";
    var args =  "width=200,"
			+ "height=400,"
		    + "location=0,"
		    + "menubar=0,"
		    + "scrollbars=yes,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=10,"  // NN Only
		    + "screeny=10,"  // NN Only
		    + "left=10,"     // IE Only
		    + "top=10";      // IE Only

  window.open(theURL,winName,args);
}



//variables Pop-Up öffnen
function openOwnWindow(theURL,winName,features) { //v2.0

    var args =  features + ","
		    + "location=0,"
		    + "menubar=0,"
		    + "scrollbars=yes,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=10,"  // NN Only
		    + "screeny=10,"  // NN Only
		    + "left=10,"     // IE Only
		    + "top=10";      // IE Only


  window.open(theURL,winName,args);
}


// Seite wird neu geladen
function forceReload()
{
	if (document.layers) window.location.reload(true);
}



//Überprüfung Formulardaten
function chkFormular()
{
 if(document.Formular.name.value == "")  {
   alert("Bitte geben Sie Ihren Namen ein!");
   document.Formular.name.focus();
   return false;
   }
 if(document.Formular.tel.value == "")  {
   alert("Bitte geben Sie Ihre Telefonnummer ein!");
   document.Formular.tel.focus();
   return false;
   }
  if(document.Formular.anfrage.value == "") {
   alert("Bitte geben Sie Ihre Anfrage ein!");
   document.Formular.anfrage.focus();
   return false;
   }
}
