var newWin = null;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function laden(theURL) {
location.href=theURL;
}

//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);
}



//zentriertes Pop-Up öffnen, Größe fest
function openWindowCentered(theURL)
{
	var width="600";
	var height="600";
	
    var args = "location=0,"
		    + "menubar=0,"
		    + "scrollbars=no,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}


//zentriertes Pop-Up öffnen; Größe variabel
function openOwnWindowCentered(theURL,width,height)
{
    var args = "location=0,"
		    + "menubar=0,"
		    + "scrollbars=no,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}




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

    var args =  features + ","
		    + "location=0,"
		    + "menubar=0,"
		    + "scrollbars=no,"
		    + "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 Formular
function chkFormular()
{
  if (document.Formular.Name.value == "")
  {
    alert("Bitte geben Sie Ihren Namen ein");
    document.Formular.Name.focus();
    return (false);
  }


  if (document.Formular.Email.value == "")
  {
    alert("Bitte geben Sie Ihre Emailadresse ein");
    document.Formular.Email.focus();
    return (false);
  }

  if(document.Formular.Email.value.indexOf('@') == -1)	{
       alert("Bitte korrigieren Sie Ihre Emailadresse");
       document.Formular.Email.focus();
       return (false);
  } 

  return (true);
}
