//zentriertes Pop-Up öffnen; Größe variabel
function openOwnWindowCentered(theURL,width,height)
{
	
    var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=yes,"
		    + "resizable=yes,"			
		    + "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, nicht anpassbar
function openOwnWindowCenteredFix(theURL,width,height)
{
	
    var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=yes,"			
		    + "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=yes,"
		    + "resizable=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);
}

//Fenster AB-Druck
function neuesFenster()
{
		var uebergeben='';
		var win;
		var formular=document.eingabe;

		uebergeben="?kd_nr="+formular.kd_nr.value+"&abnummer="+formular.abnummer.value+"&abdat="+formular.abdat.value+"&versand="+formular.versand.value;

		win=window.open("/cgi-bin/ng_bestell_bestaet_druck.pl"+uebergeben,"bestaetigung","width=600,height=620,top=20,left=150,resizable=no,scrollbars=yes");
		win.focus();
}


//NG-Ebenen ein- und Ausblenden
function einblenden(){
	document.getElementById("tooltip").style.visibility = "visible";
	}

function ausblenden(){
	document.getElementById("tooltip").style.visibility = "hidden";
	}


// Eingabevalidation dt. Formular
function chkFormular()
{
  if (document.Formular.Name.value == "")
  {
    alert("Bitte geben Sie Ihren Namen ein");
    document.Formular.Name.focus();
    return (false);
  }

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

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

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

  if (document.Formular.Land.value == "")
  {
    alert("Bitte geben Sie das Land ein");
    document.Formular.Land.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("Keine gültige Emailadresse. Bitte korrigieren.");
       document.Formular.eMail.focus();
       return (false);
  }

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

  return (true);
}


// Eingabevalidation dt. Formular
function chkFormularVol11()
{
  if (document.Formular.KdNr.value == "")
  {
    alert("Bitte geben Sie Ihren Kundennummer ein");
    document.Formular.KdNr.focus();
    return (false);
  }

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

if (document.Formular.Name.value == "")
  {
    alert("Bitte geben Sie Ihren Namen ein");
    document.Formular.Name.focus();
    return (false);
  }

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

  if (document.Formular.Ort.value == "")
  {
    alert("Bitte geben Sie Ihren PLZ und Ort ein");
    document.Formular.Ort.focus();
    return (false);
  }


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

  return (true);
}



//Eingabevalidation engl. Formular
function chkFormularEng()
{
  if (document.Formular.Name.value == "")
  {
    alert("please enter your name");
    document.Formular.Name.focus();
    return (false);
  }

  if (document.Formular.Strasse.value == "")
  {
    alert("please enter your address");
    document.Formular.Strasse.focus();
    return (false);
  }

  if (document.Formular.PLZ.value == "")
  {
    alert("please enter your ZIP code");
    document.Formular.PLZ.focus();
    return (false);
  }

  if (document.Formular.Ort.value == "")
  {
    alert("please enter your place of residence");
    document.Formular.Ort.focus();
    return (false);
  }

  if (document.Formular.Land.value == "")
  {
    alert("please enter the country");
    document.Formular.Land.focus();
    return (false);
  }


  if (document.Formular.eMail.value == "")
  {
    alert("please enter your e-mail address");
    document.Formular.eMail.focus();
    return (false);
  }

  if(document.Formular.eMail.value.indexOf('@') == -1)
  {
       alert("no valid e-mail address, please correct");
       document.Formular.eMail.focus();
       return (false);
  }

  if (document.Formular.Telefon.value == "")
  {
    alert("please enter your phone number");
    document.Formular.Telefon.focus();
    return (false);
  }

  return (true);
}


// Eingabevalidation russ. Formular
function chkFormularRuss()
{
  if (document.Formular.Name.value == "")
  {
    alert("please enter your name");
    document.Formular.Name.focus();
    return (false);
  }

  if (document.Formular.Strasse.value == "")
  {
    alert("please enter your address");
    document.Formular.Strasse.focus();
    return (false);
  }

  if (document.Formular.PLZ.value == "")
  {
    alert("please enter your ZIP code");
    document.Formular.PLZ.focus();
    return (false);
  }

  if (document.Formular.Ort.value == "")
  {
    alert("please enter your place of residence");
    document.Formular.Ort.focus();
    return (false);
  }

  if (document.Formular.Land.value == "")
  {
    alert("please enter the country");
    document.Formular.Land.focus();
    return (false);
  }


  if (document.Formular.eMail.value == "")
  {
    alert("please enter your e-mail address");
    document.Formular.eMail.focus();
    return (false);
  }

  if(document.Formular.eMail.value.indexOf('@') == -1)
  {
       alert("no valid e-mail address, please correct");
       document.Formular.eMail.focus();
       return (false);
  }

  if (document.Formular.Telefon.value == "")
  {
    alert("please enter your phone number");
    document.Formular.Telefon.focus();
    return (false);
  }

  return (true);
}
