<!--
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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_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 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);


//-->
<!-- dhtml checkbox | sven halle | sep. 2003 -->
<!-- call to each function with three(four) parameters: -->
<!-- name of the checkbox, a increase number -->
<!-- accordingly to the checkbox-number and the path -->
<!-- to the grafik::  q = normal; q1 = highlight   -->
<!-- to evaluate the checkbox value use the -->
<!-- variable: check[x] 'x' is the checkbox-number -->
<!-- ask for "checked" -->
var check = new Array();
function change(obj,x,q1){if(check[x]!="checked"){check[x]="over";obj.src=q1;}}

function change_b(obj,x,q){if(check[x]=="over"){check[x]="normal";obj.src=q;}}

function change_p(obj,x,q,q1){
  if(check[x]=="checked"){
    check[x]="normal";obj.src=q;
  } else{
    check[x]="checked";obj.src=q1;
  }
}

function change_ckb_dl(obj,x,q,q1){
  if(check[x]=="checked"){
    check[x]="normal";obj.src=q;
    var cover = true;
    for(i=0; i<=check.length; i++){
      if(check[i]=="checked"){ cover = false; }
    }
    if(cover) { document.getElementById("cover_dlStart").style.visibility = "visible"; }
  } else{
    check[x]="checked";obj.src=q1;
    document.getElementById("cover_dlStart").style.visibility = "hidden";
  }
}

function change_pDecade(obj,x,q,q1){
  if(check[x]=="checked"){
    check[x]="normal";obj.src=q;
    var cover = true;
    for(i=0; i<=check.length; i++){
      if(check[i]=="checked"){ cover = false; }
    }
    if(cover) { document.getElementById("cover_updateDecade").style.visibility = "visible"; }
  } else{
    check[x]="checked";obj.src=q1;
    document.getElementById("cover_updateDecade").style.visibility = "hidden";
  }
}


<!-- function check/reset all: call to this function with -->
<!-- the number of checkboxes you want to check/reset -->
function check_all(c,q){for(i=1;i<=c;i++){check[i]="checked";eval('checkbox'+i+'.src=q');}}
function check_none(c,q){for(i=1;i<=c;i++){check[i]="normal";eval('checkbox'+i+'.src=q');}}
<!-- dhtml checkbox | sven halle | sep. 2003 -->

<!-- dhtml radiobutton | sven halle | sep. 2003 -->
<!-- call to each function with three(four) parameters: -->
<!-- name of the radiobutton, a increase number -->
<!-- accordingly to the radiobutton-number and the path -->
<!-- to the grafik::  q = normal; q1 = highlight   -->
<!-- to evaluate the radiobutton value use the -->
<!-- variable: check[x] 'x' is the radiobutton-number -->
<!-- ask for "checked" -->
var checkr = new Array();var obj_name = new Array();
function r_change(obj,x,q1){if(checkr[x]!="checked"){checkr[x]="over";obj_name[x]=obj;obj.src=q1;}}
function r_change_b(obj,x,q){if(checkr[x]=="over"){checkr[x]="normal";obj_name[x]=obj;obj.src=q;}}
function r_change_p(obj,x,q,q1){if(checkr[x]=="checked"){}else{for(i=0; i<=checkr.length; i++){
if(checkr[i]=="checked"){checkr[i]="normal";obj_name[i].src=q;}}checkr[x]="checked";obj.src=q1;}}

function pktest_change_p(obj,x,q,q_o){
  if(checkr[x]=="checked"){
    checkr[x]="normal";
    obj.src=q;
    document.pTester.testpic.value=0;
    document.getElementById('text'+x).className='download';
  } else{
    for(i=0; i<=checkr.length; i++){
      if(checkr[i]=="checked"){
        checkr[i]="normal";obj_name[i].src=q;
        document.getElementById('text'+i).className='download';
      }
    }
    checkr[x]="checked";
    obj.src=q_o;
    document.pTester.testpic.value=x;
    document.getElementById('text'+x).className="downloadOn";
  }
}

<!-- function reset: call to this function with -->
<!-- the number of radiobuttons on the page and the path to the l-grafik -->
function check_none_r(c,q){for(i=1;i<=c;i++){check[i]="normal";eval('radiobutton'+i+'.src=q');}}
<!-- dhtml radiobutton | sven halle | sep. 2003 -->


function checkEntriesChangePW() {

  if (document.changePW.old_pw.value != "" ) {
    if (document.changePW.new_pw.value != "" ) {
      if (document.changePW.reentry_new_pw.value != "" ) {
        if (document.changePW.reentry_new_pw.value ==  document.changePW.new_pw.value) {
            document.changePW.action = '/include/changePW.php';
            document.changePW.method = 'post';
            document.changePW.submit();
        }else{ showErrorEntry(1); }
      }else{ showErrorEntry(2); }
    }else{ showErrorEntry(3); }
  }else{ showErrorEntry(4); }
}

function checkEntriesEcards() {

  if (document.ecard.recipient.value != "" ) {
    if ((document.ecard.recipient.value.indexOf('@') != -1) && (document.ecard.recipient.value.indexOf('.') != -1)){
      if (document.ecard.sender.value != "" ) {
        if ((document.ecard.sender.value.indexOf('@') != -1) && (document.ecard.sender.value.indexOf('.') != -1)) {
          document.ecard.action = '/include/sendEcard.php';
          document.ecard.method = 'post';
          document.ecard.submit();
        }else{ showErrorEntry(1); }
      }else{ showErrorEntry(2); }
    }else{ showErrorEntry(3); }
  }else{ showErrorEntry(4); }
}

function checkEntriesSendArticle() {
  if (document.sendArticle.recipient.value != "" ) {
    if ((document.sendArticle.recipient.value.indexOf('@') != -1) && (document.sendArticle.recipient.value.indexOf('.') != -1)){
      if (document.sendArticle.sender.value != "" ) {
        if ((document.sendArticle.sender.value.indexOf('@') != -1) && (document.sendArticle.sender.value.indexOf('.') != -1)) {
          document.sendArticle.action = '/include/sendArticle.php';
          document.sendArticle.method = 'post';
          document.sendArticle.submit();
        }else{ showErrorEntry(1); }
      }else{ showErrorEntry(2); }
    }else{ showErrorEntry(3); }
  }else{ showErrorEntry(4); }
}

function checkEntriesContact() {
  if (document.contact.anrede.options[document.contact.anrede.options.selectedIndex].value != "" ) {
    if (document.contact.bereich.options[document.contact.bereich.options.selectedIndex].value != "" ) {
      if (document.contact.vorname.value != "" ) {
        if (document.contact.name.value != "" ) {
          if (document.contact.firma.value != "" ) {
//            if (document.contact.position.value != "" ) {
              if (document.contact.strasse.value != "" ) {
                if (document.contact.plz.value != "" ) {
                  if (document.contact.ort.value != "" ) {
                    if (document.contact.telefon.value != "" ) {
                      if (document.contact.email.value != "" ) {
                        if ((document.contact.email.value.indexOf('@') != -1) && (document.contact.email.value.indexOf('.') != -1)) {
                          document.contact.action = '/include/sendContact.php';
                          document.contact.method = 'post';
                          document.contact.submit();
                        }else{ showErrorEntry(12); }
                      }else{ showErrorEntry(11); }
                    }else{ showErrorEntry(10); }
                  }else{ showErrorEntry(9); }
                }else{ showErrorEntry(8); }
              }else{ showErrorEntry(7); }
//            }else{ showErrorEntry(6); }
          }else{ showErrorEntry(5); }
        }else{ showErrorEntry(4); }
      }else{ showErrorEntry(3); }
    }else{ showErrorEntry(2); }
  }else{ showErrorEntry(1); }
}

function checkEntryBewerbung() {
  if (document.bewerbung.anrede.options[document.bewerbung.anrede.options.selectedIndex].value != "" ) {
    if (document.bewerbung.vorname.value != "" ) {
      if (document.bewerbung.name.value != "" ) {
        if (document.bewerbung.firma.value != "" ) {
//          if (document.bewerbung.position.value != "" ) {
            if (document.bewerbung.strasse.value != "" ) {
              if (document.bewerbung.plz.value != "" ) {
                if (document.bewerbung.ort.value != "" ) {
                  if (document.bewerbung.telefon.value != "" ) {
                    if (document.bewerbung.email.value != "" ) {
                      if ((document.bewerbung.email.value.indexOf('@') != -1) && (document.bewerbung.email.value.indexOf('.') != -1)) {
                        document.bewerbung.action = '/include/sendBewerbung.php';
                        document.bewerbung.method = 'post';
                        document.bewerbung.submit();
                      }else{ showErrorEntry(1); }
                    }else{ showErrorEntry(2); }
                  }else{ showErrorEntry(3); }
                }else{ showErrorEntry(4); }
              }else{ showErrorEntry(5); }
            }else{ showErrorEntry(6); }
//          }else{ showErrorEntry(7); }
        }else{ showErrorEntry(8); }
      }else{ showErrorEntry(9); }
    }else{ showErrorEntry(10); }
  }else{ showErrorEntry(11); }
}


function checkEntryDatenAendern() {
  if (document.datenAendern.anrede.options[document.datenAendern.anrede.options.selectedIndex].value != "" ) {
    if (document.datenAendern.vorname.value != "" ) {
      if (document.datenAendern.name.value != "" ) {
        if (document.datenAendern.firma.value != "" ) {
//          if (document.datenAendern.position.value != "" ) {
            if (document.datenAendern.strasse.value != "" ) {
              if (document.datenAendern.plz.value != "" ) {
                if (document.datenAendern.ort.value != "" ) {
                  if (document.datenAendern.telefon.value != "" ) {
                    if (document.datenAendern.email.value != "" ) {
                      if ((document.datenAendern.email.value.indexOf('@') != -1) && (document.datenAendern.email.value.indexOf('.') != -1)) {
                        document.datenAendern.action = '/include/datenAendern.php';
                        document.datenAendern.method = 'post';
                        document.datenAendern.submit();
                      }else{ showErrorEntry(1); }
                    }else{ showErrorEntry(2); }
                  }else{ showErrorEntry(3); }
                }else{ showErrorEntry(4); }
              }else{ showErrorEntry(5); }
            }else{ showErrorEntry(6); }
//          }else{ showErrorEntry(7); }
        }else{ showErrorEntry(8); }
      }else{ showErrorEntry(9); }
    }else{ showErrorEntry(10); }
  }else{ showErrorEntry(11); }
}

function checkEntriesNewsletter() {

  if(document.newsletter.abonnieren.value == "1"){

    if (document.newsletter.anrede.options[document.newsletter.anrede.options.selectedIndex].value != "" ) {
      if (document.newsletter.vorname.value != "" ) {
        if (document.newsletter.name.value != "" ) {
          if (document.newsletter.firma.value != "" ) {
            if (document.newsletter.email.value != "" ) {
	      if ((document.newsletter.email.value.indexOf('@') != -1) && (document.newsletter.email.value.indexOf('.') != -1)) {
	        if (document.newsletter.strasse.value != "" ) {
		  if (document.newsletter.plz.value != "" ) {
		    if (document.newsletter.ort.value != "" ) {
		      if (document.newsletter.telefon.value != "" ) {
			document.newsletter.action = '/include/regNewsletter.php';
			document.newsletter.method = 'post';
			document.newsletter.submit();
		      }else{ showErrorEntry('error7'); }
	            }else{ showErrorEntry('error8'); }
		  }else{ showErrorEntry('error9'); }
		}else{ showErrorEntry('error10'); }
	      }else{ showErrorEntry('error1'); }
            }else{ showErrorEntry('error2'); }
          }else{ showErrorEntry('error3'); }
        }else{ showErrorEntry('error4'); }
      }else{ showErrorEntry('error5'); }
    }else{ showErrorEntry('error6'); }

  }else if(document.newsletter.abbestellen.value == "1"){

    if (document.newsletter.email.value != "" ) {
      if ((document.newsletter.email.value.indexOf('@') != -1) && (document.newsletter.email.value.indexOf('.') != -1)) {
        document.newsletter.action = '/include/regNewsletter.php';
        document.newsletter.method = 'post';
        document.newsletter.submit();
      }else { showErrorEntry('error1'); }
    }else { showErrorEntry('error2'); }

  } else { showErrorEntry('error11'); }
}

function checkEntriesNewsletter_OLD() {

  if(document.newsletter.abonnieren.value == "1"){

    if (document.newsletter.anrede.options[document.newsletter.anrede.options.selectedIndex].value != "" ) {
      if (document.newsletter.vorname.value != "" ) {
        if (document.newsletter.name.value != "" ) {
          if (document.newsletter.firma.value != "" ) {
            if (document.newsletter.email.value != "" ) {
              if ((document.newsletter.email.value.indexOf('@') != -1) && (document.newsletter.email.value.indexOf('.') != -1)) {
                document.newsletter.action = '/include/regNewsletter.php';
                document.newsletter.method = 'post';
                document.newsletter.submit();
              }else{ showErrorEntry(1); }
            }else{ showErrorEntry(2); }
          }else{ showErrorEntry(3); }
        }else{ showErrorEntry(4); }
      }else{ showErrorEntry(5); }
    }else{ showErrorEntry(6); }

  }else if(document.newsletter.abbestellen.value == "1"){

    if (document.newsletter.email.value != "" ) {
      if ((document.newsletter.email.value.indexOf('@') != -1) && (document.newsletter.email.value.indexOf('.') != -1)) {
        document.newsletter.action = '/include/regNewsletter.php';
        document.newsletter.method = 'post';
        document.newsletter.submit();
      }else { showErrorEntry(1); }
    }else { showErrorEntry(2); }

  } else { showErrorEntry(7); }
}

function checkEntriesLogin() {
  if(document.login.username.value != ""){
    if(document.login.pass.value != ""){
      document.login.action = 'https://'+window.location.hostname+'/ww/metanavigation/kunden-login/login.php';
      document.login.method = 'post';
      document.login.submit();
    }else { showErrorEntry(1); }
  }else { showErrorEntry(2); }
}

function checkEntriesEnquiry() {
  if(document.contact.email.value != ""){
    if ((document.contact.email.value.indexOf('@') != -1) && (document.contact.email.value.indexOf('.') != -1)) {
      document.contact.action = '/include/sendEnquiry.php';
      document.contact.method = 'post';
      document.contact.submit();
    }else { showErrorEntry(1); }
  }else { showErrorEntry(2); }
}

function checkEntriesPw_forgotten() {
  if(document.pw_forgotten.name.value != ""){
    if(document.pw_forgotten.email.value != ""){
      if ((document.pw_forgotten.email.value.indexOf('@') != -1) && (document.pw_forgotten.email.value.indexOf('.') != -1)) {
        document.pw_forgotten.action = '/include/sendPw_forgotten.php';
        document.pw_forgotten.method = 'post';
        document.pw_forgotten.submit();
      }else { showErrorEntry(3); }
    }else { showErrorEntry(1); }
  }else { showErrorEntry(2); }
}

function uploadPicture() {
  var sw=screen.width;
  var sh=screen.height;
  myLeft = (sw-300)/2;
  myTop = (sh-70)/2-20;
  var picture = document.pTester.testpic.value;
  if(!picture) { picture = 1; }
  upWin=window.open("uploadwin.php?templateFile="+picture+"","upWin","width=300,height=70,left="+myLeft+",top="+myTop+",directories=0,location=0,menubar=0,scrollbars=0,status=0,toolbar=0");
}

function uploadPicturePreview() {
  var sw=screen.width;
  var sh=screen.height;
  myLeft = (sw-300)/2;
  myTop = (sh-70)/2-20;
  var picture = document.pTester.testpic.value;
  if(!picture) { picture = 1; }
  upWin=window.open("/jvb/specials/plakat-tester/uploadwin.php?templateFile="+picture+"","upWin","width=300,height=70,left="+myLeft+",top="+myTop+",directories=0,location=0,menubar=0,scrollbars=0,status=0,toolbar=0");
}

function countlenECard() {

  var str = document.ecard.text.value;
  var arealen = str.length;
  if (arealen > 1000) {
    var body = document.ecard.text.value;
    body = body.slice(0,1000);
    document.ecard.text.value = body;
  }
}

// zeitform

function init_change_p(box,x,q1)
{
  check[x]="checked";
  if(obj=MM_findObj(box)) obj.src=q1;
}
function init_r_change_p(box,x,q1)
{
  checkr[x]="checked";
  if(obj=MM_findObj(box)) {obj_name[x]=obj; obj.src=q1;}
}

function reset_cb(q)
{
  for(i in check) // checkbox
    {
        check[i] = "";
        if(obj=MM_findObj("checkbox1_" + i)) obj.src=q;
        if(obj=MM_findObj("checkbox2_" + i)) obj.src=q;
    }
  if(obj=MM_findObj("textfield2")) obj.value="";
  if(obj=MM_findObj("textfield3")) obj.value="";
}

function reset_cb_mail(q)
{
  for(i in check) // checkbox
    {
        check[i] = "";
        if(obj=MM_findObj("checkbox1_" + i)) obj.src=q;
        if(obj=MM_findObj("checkbox2_" + i)) obj.src=q;
    }
  if(obj=MM_findObj("textfield2")) obj.value="";
  if(obj=MM_findObj("textfield3")) obj.value="";
  if(obj=MM_findObj("textfield4")) obj.value="";
  if(obj=MM_findObj("textfield5")) obj.value="";
  if(obj=MM_findObj("textfield6")) obj.value="";
  if(obj=MM_findObj("textfield42")) obj.value="";
}

function check_all_cb(q)
{
  for(i in check) // checkbox
    {
      if(obj=MM_findObj("checkbox1_" + i)) { check[i] = "checked";  obj.src=q; }
      //if(obj=MM_findObj("checkbox2_" + i)) { check[i] = "checked";  obj.src=q; }
    }
}

function reset_select(f)
{
  for(var i=0;i<f.length;++i)
    {
      if (f.elements[i].type == "select-multiple") f.elements[i].selectedIndex = -1;
    }

}

function check_all_select(f)
{
  for(var i=0;i<f.length;++i)
    {
      if (f.elements[i].type == "select-multiple")
        for(j=0;j<f.elements[i].length;++j) f.elements[i].options[j].selected = true;
    }
}

function submitr(f,name,status)
{

  for(i in checkr) // radio
    {
      if (checkr[i]=="checked") {
        x = document.createElement("input");
        x.name  = "js_r_" + name;
        x.type = "hidden";
        x.value = i;
        f.appendChild(x);
      }
    }

  for(i in check) // checkbox
    {
      if (check[i]=="checked") {
        x = document.createElement("input");
        x.name  = "js_c_" + name + "[" + i + "]";
        x.type = "hidden";
        x.value = 1;
        f.appendChild(x);
      }
    }

  if(! f.status)
    {
      var y = document.createElement("input");
      y.name  = "status";
      y.type = "hidden";
      y.value = status;
      f.appendChild(y);
    }
  else
    {
      f.status.value = status;
    }

  f.target = "_self";
  f.submit();

}

function submitr_new(f,name,status)
{
  if(! f.status)
    {
      var y = document.createElement("input");
      y.name  = "status";
      y.type = "hidden";
      y.value = status;
      f.appendChild(y);
    }
  else
    {
      f.status.value = status;
    }

  f.target = "_blank";
  f.submit();

}

function submitr_history(f)
{
/*
  if(f.status)
    {
      var y = document.createElement("input");
      y.name  = "status";
      y.type = "hidden";
      y.value = -1;
      f.appendChild(y);
    }
*/
var y = document.createElement("input");
y.name  = "status";
y.type = "hidden";
y.value = -1;
f.appendChild(y);

f.target = "_self";
f.submit();

}


function histsubmit(f,status)
{
  if(! f.status)
    {
      var x = document.createElement("input");
      x.name  = "history";
      x.type = "hidden";
      x.value = status;
    }

  f.appendChild(x);
  f.submit();
}
function abonnieren_value(){
if(document.newsletter.abonnieren.value == 0) { document.newsletter.abonnieren.value = 1;  } else { document.newsletter.abonnieren.value = 0; }
}