function anmeldungOpenSitemap(haupt,subm,cont) {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont + "_ns.htm";
  }
  else {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont + ".htm";
  }
}

function browserErmitteln() {
 if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
    sprungMenue('../../_haupt/_nav_aktu.htm','../../_sub/_aktu/_anme.htm','../_aktu/_open_ns.htm');
  }
  else {
    sprungMenue('../../_haupt/_nav_aktu.htm','../../_sub/_aktu/_anme.htm','../_aktu/_open.htm');
  }
}



function anmeldungOpen() {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
    parent.submenue.location.href="_anme.htm";
   	parent.content.location.href="../../_content/_aktu/_open_ns.htm";
  }
  else {
    parent.submenue.location.href="_anme.htm";
   	parent.content.location.href="../../_content/_aktu/_open.htm";
  }
}

function regiOpen() {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
    parent.submenue.location.href="_gewi.htm";
   	parent.content.location.href="../../_content/_aktu/_regi_ns.htm";
  }
  else {
    parent.submenue.location.href="_gewi.htm";
   	parent.content.location.href="../../_content/_aktu/_regi.htm";
  }
}

function regiOpenLinks() {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
   	parent.content.location.href="../../_content/_aktu/_regi_ns.htm";
  }
  else {
   	parent.content.location.href="../../_content/_aktu/_regi.htm";
  }
}

function newsletterOpen() {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
    parent.submenue.location.href="_news.htm";
   	parent.content.location.href="../../_content/_aktu/_news_ns.htm";
  }
  else {
    parent.submenue.location.href="_news.htm";
   	parent.content.location.href="../../_content/_aktu/_news.htm";
  }
}

function newsletterOpenSitemap(haupt,subm,cont) {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont + "_ns.htm";
  }
  else {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont + ".htm";
  }
}

function mailOpenSitemap(haupt,subm,cont) {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont + "_ns.php";
  }
  else {
		  parent.hauptmenue.location.href=haupt;
    parent.submenue.location.href=subm;
   	parent.content.location.href=cont;
  }
}

function mailOpen() {
  if(navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4") {
    parent.submenue.location.href="_emai.htm";
   	parent.content.location.href="../../_content/_wir/_emai_ns.php";
  }
  else {
    parent.submenue.location.href="_emai.htm";
   	parent.content.location.href="../../_content/_wir/_emai.php";
  }
}

function sprungMenue(nav,sub,content)
{
   parent.hauptmenue.location.href=nav;
   parent.submenue.location.href=sub;
   parent.content.location.href=content;
}

function leerzeichen(ident) {
	var laenge = ident.length;
	while (ident.charCodeAt(0) == 32) {
		ident = ident.substr(1,laenge);
		laenge = ident.length;
	}
	while (ident.charCodeAt(laenge-1) == 32) {
		ident = ident.substr(0,laenge-1);
		laenge = ident.length;
	}
	return ident;
}

function chkEinloggen(){
 window.document.einloggen.nickname.value = leerzeichen(document.einloggen.nickname.value);
 window.document.einloggen.passwort.value = leerzeichen(document.einloggen.passwort.value);
 if(document.einloggen.nickname.value == "")  {
   alert("Bitte Ihren Nicknamen eingeben!");
   document.einloggen.nickname.focus();
   return false;
  }
 if(document.einloggen.passwort.value == "")  {
   alert("Bitte Ihr Passwort eingeben!");
   document.einloggen.passwort.focus();
   return false;
  }
}

function chkEmail(){
 window.document.emailForm.name.value = leerzeichen(document.emailForm.name.value);
 window.document.emailForm.vorname.value = leerzeichen(document.emailForm.vorname.value);
 window.document.emailForm.email.value = leerzeichen(document.emailForm.email.value);
 if(document.emailForm.name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.emailForm.name.focus();
   return false;
  }
 if(document.emailForm.vorname.value == "")  {
   alert("Bitte Ihren Vornamen eingeben!");
   document.emailForm.vorname.focus();
   return false;
  }
 if(document.emailForm.email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.emailForm.email.focus();
   return false;
  }
 if(document.emailForm.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.emailForm.email.focus();
   return false;
  }
	if(document.emailForm.betreff.value == "") {
   alert("Bitte einen Betreff eingeben!");
   document.emailForm.betreff.focus();
   return false;
  }
 if(document.emailForm.anfrage.value == "") {
   alert("Bitte eine Anfrage eingeben!");
   document.emailForm.anfrage.focus();
   return false;
  }
}

function chkNewsletter(){
 window.document.newsletter.name.value = leerzeichen(document.newsletter.name.value);
 window.document.newsletter.vorname.value = leerzeichen(document.newsletter.vorname.value);
 window.document.newsletter.email.value = leerzeichen(document.newsletter.email.value);
 window.document.newsletter.firma.value = leerzeichen(document.newsletter.firma.value);
 window.document.newsletter.beruf.value = leerzeichen(document.newsletter.beruf.value);
 if(document.newsletter.name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.newsletter.name.focus();
   return false;
  }
 if(document.newsletter.vorname.value == "")  {
   alert("Bitte Ihren Vornamen eingeben!");
   document.newsletter.vorname.focus();
   return false;
  }
 if(document.newsletter.email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.newsletter.email.focus();
   return false;
  }
 if(document.newsletter.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.newsletter.email.focus();
   return false;
  }
	if(document.newsletter.firma.value == "") {
   alert("Bitte Ihre Firma eingeben!");
   document.newsletter.firma.focus();
   return false;
  }
 if(document.newsletter.beruf.value == "") {
   alert("Bitte Ihren Beruf eingeben!");
   document.newsletter.beruf.focus();
   return false;
  }
}

function chkOpenHouse(){
 window.document.openhouse.name.value = leerzeichen(document.openhouse.name.value);
 window.document.openhouse.vorname.value = leerzeichen(document.openhouse.vorname.value);
 window.document.openhouse.email.value = leerzeichen(document.openhouse.email.value);
 window.document.openhouse.firma.value = leerzeichen(document.openhouse.firma.value);

 if(document.openhouse.name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.openhouse.name.focus();
   return false;
  }
 if(document.openhouse.vorname.value == "")  {
   alert("Bitte Ihren Vornamen eingeben!");
   document.openhouse.vorname.focus();
   return false;
  }
 if(document.openhouse.email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.openhouse.email.focus();
   return false;
  }
 if(document.openhouse.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.openhouse.email.focus();
   return false;
  }
	if(document.openhouse.firma.value == "") {
   alert("Bitte Ihre Firma eingeben!");
   document.openhouse.firma.focus();
   return false;
  }
}

function chkOpenHouseFrueh(){
 window.document.openhouse.name.value = leerzeichen(document.openhouse.name.value);
 window.document.openhouse.vorname.value = leerzeichen(document.openhouse.vorname.value);
 window.document.openhouse.email.value = leerzeichen(document.openhouse.email.value);
 window.document.openhouse.firma.value = leerzeichen(document.openhouse.firma.value);

 if(document.openhouse.name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.openhouse.name.focus();
   return false;
  }
 if(document.openhouse.vorname.value == "")  {
   alert("Bitte Ihren Vornamen eingeben!");
   document.openhouse.vorname.focus();
   return false;
  }
 if(document.openhouse.email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.openhouse.email.focus();
   return false;
  }
 if(document.openhouse.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.openhouse.email.focus();
   return false;
  }
	if(document.openhouse.firma.value == "") {
   alert("Bitte Ihre Firma eingeben!");
   document.openhouse.firma.focus();
   return false;
  }

 if(document.openhouse.anzahl.value == "") {
   alert("Bitte die Teilnehmerzahl eingeben!");
   document.openhouse.anzahl.focus();
   return false;
  }
 var chkZ = 1;
 for(i=0;i<document.openhouse.anzahl.value.length;++i)
   if(document.openhouse.anzahl.value.charAt(i) < "0"
   || document.openhouse.anzahl.value.charAt(i) > "9")
     chkZ = -1;
 if(chkZ == -1) {
   alert("Teilnehmerzahl ist keine Zahl!");
   document.openhouse.anzahl.focus();
   return false;
  }

}

function chkSpiel(){
 window.document.anmeldung.name.value = leerzeichen(document.anmeldung.name.value);
 window.document.anmeldung.vorname.value = leerzeichen(document.anmeldung.vorname.value);
 window.document.anmeldung.email.value = leerzeichen(document.anmeldung.email.value);
 window.document.anmeldung.nickname.value = leerzeichen(document.anmeldung.nickname.value);
 if(document.anmeldung.name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.anmeldung.name.focus();
   return false;
  }
 if(document.anmeldung.vorname.value == "")  {
   alert("Bitte Ihren Vornamen eingeben!");
   document.anmeldung.vorname.focus();
   return false;
  }
 if(document.anmeldung.email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.anmeldung.email.focus();
   return false;
  }
 if(document.anmeldung.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.anmeldung.email.focus();
   return false;
  }
 if(document.anmeldung.nickname.value == "")  {
   alert("Bitte einen Nicknamen eingeben!");
   document.anmeldung.nickname.focus();
   return false;
  }
}

function windowSize() {
  if(navigator.appName == "Netscape") {
     window.moveTo (0, 0);
     window.innerHeight = 600;
     window.innerWidth = 1000;
     window.location.href="_start.htm";
  }
  else if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) == "4") {
     window.moveTo (0, 0);
     window.resizeTo (1004,738);
     window.location.href="_start.htm";
  }
  else {
    window.moveTo (0, 0);
    window.resizeTo (1024,748);
    window.location.href="_start.htm";
  }
}

function windowOpen() {
         Fenster = window.open("_them.htm","BERNSTEIN","width=200,height=200,top=0,left=0","resizable=yes","scrollbars=yes");
         Fenster.moveTo(0,0);
}

function startHaupt()
{
        window.setTimeout("startHaupt1()",2000);
}

function startHaupt1()
{
        window.location.href="_haup_1.htm";
}

function startSub()
{
        window.setTimeout("startSub1()",2000);
}

function startSub1()
{
        window.location.href="_subm_1.htm";
}

function startCont()
{
        window.setTimeout("startCont1()",2000);
}

function startCont1()
{
        window.location.href="_cont_1.htm";
}

function startNav()
{
        window.setTimeout("startNav1()",2000);
}

function startNav1()
{
        window.location.href="_nav_1.htm";
}

function buttonChange(x,y){
      parent.submenue.location.href=x;
      parent.content.location.href=y;
}

function buttonChangeSub(x){
      parent.submenue.location.href=x;
}

window.defaultStatus="BERNSTEIN Consult, Werther";

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_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=MM_findObj(n,d.layers[i].document);

  if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_nbGroup(event, grpName) { //v3.0

  var i,img,nbArr,args=MM_nbGroup.arguments;

  if (event == "init" && args.length > 2) {

    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {

      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;

      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();

      nbArr[nbArr.length] = img;

      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {

        if (!img.MM_up) img.MM_up = img.src;

        img.src = img.MM_dn = args[i+1];

        nbArr[nbArr.length] = img;

    } }

  } else if (event == "over") {

    document.MM_nbOver = nbArr = new Array();

    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];

      nbArr[nbArr.length] = img;

    }

  } else if (event == "out" ) {

    for (i=0; i < document.MM_nbOver.length; i++) {

      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }

  } else if (event == "down") {

    if ((nbArr = document[grpName]) != null)

      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }

    document[grpName] = nbArr = new Array();

    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = img.MM_dn = args[i+1];

      nbArr[nbArr.length] = img;

  } }

}


