browser = navigator.appName
ver = navigator.appVersion
version = ver.substring(0,1)
if ((browser=="Netscape" & version<4) || (browser=="Internet Explorer" & version<5)) {
    document.location.href="/oldversion.php"
}






function Menu_set() {
 var i, d='', h="<style type=\"text/css\">", tA=navigator.userAgent.toLowerCase();
 if(window.opera) {
  if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1) return;
 }
 if(document.getElementById) {
  for(i=1;i<20;i++) {
   d+='ul ';
   h+="\n#mainnav "+d+" {position:absolute; left:-9000px;}";
  }
  document.write(h+"\n</style>");
 }
}
Menu_set();

function Menu_init() {
 var i, g, tD, tA, tU, pp, lvl, tn=navigator.userAgent.toLowerCase();
 if(window.opera) {
  if(tn.indexOf("opera 5")>-1||tn.indexOf("opera 6")>-1) return;
 }
 else if(!document.getElementById) return;
 menup=arguments;
 menuct=new Array;
 tD=document.getElementById('mainnav');
 if(tD) {
  tA=tD.getElementsByTagName('A');
  for(i=0;i<tA.length;i++) {
   tA[i].menucl=menuct.length;
   menuct[menuct.length]=tA[i];
   g=tA[i].parentNode.getElementsByTagName("UL");
   tA[i].menusub=(g)?g[0]:false;
   ev=tA[i].getAttribute("onmouseover");
   if(!ev||ev=='undefined') {
    tA[i].onmouseover=function() {
     Menu_trig(this);
    };
   }
   ev=tA[i].getAttribute("onfocus");
   if(!ev||ev=='undefined') {
    tA[i].onfocus=function() {
     Menu_trig(this);
    };
   }
   if(tA[i].menusub) {
    pp=tA[i].parentNode;
    lvl=0;
    while(pp) {
     if(pp.tagName&&pp.tagName=="UL") {
      lvl++;
     }
     pp=pp.parentNode;
    }
    tA[i].menulv=lvl;
   }
  }
  tD.onmouseout=Menu_close;
  Menu_open();
 }
}

function Menu_trig(a) {
 var b, t;
 if(document.menut) {
  clearTimeout(document.menut);
 }
 document.menua=1;
 b=(a.menusub)?'Menu_show(':'Menu_tg('; t='document.menut=setTimeout("'+b+a.menucl+')", 160)';
 eval (t);
}

function Menu_show(a, bp) {
 var u, lv, oft, ofr, uw, uh, pp, aw, ah, adj, mR, mT, wW=0, wH, w1, w2, w3, sct, pw, lc, pwv, xx=0, yy=0, wP=true;
 var iem=(navigator.appVersion.indexOf("MSIE 5")>-1)?true:false, dce=document.documentElement, dby=document.body;
 document.menua=1;
 if(!bp) Menu_tg(a);
 u=menuct[a].menusub;
 if(u.menupmax&&u.menupmax==1) return;
 u.menupmax=1;
 lv=(menup[0]==1&&menuct[a].menulv==1)?true:false;
 menuct[a].className=menuct[a].className.replace("menuaus", "menuan");
 oft=parseInt(menup[3]);
 ofr=parseInt(menup[4]);
 uw=u.offsetWidth;
 uh=u.offsetHeight;
 pp=menuct[a];
 aw=pp.offsetWidth;
 ah=pp.offsetHeight;
 while(pp) {
  xx+=(pp.offsetLeft)?pp.offsetLeft:0;
  yy+=(pp.offsetTop)?pp.offsetTop:0;
  if(window.opera||navigator.userAgent.indexOf("Safari")>-1) {
   if(menuct[a].menulv!=1&&pp.nodeName=="BODY") yy-=(pp.offsetTop)?pp.offsetTop:0;
  }
  pp=pp.offsetParent;
 }
 if(iem&&navigator.userAgent.indexOf("Mac")>-1) {
  yy+=parseInt(dby.currentStyle.marginTop);
 }
 adj=parseInt((aw*ofr)/100);
 mR=(lv)?0:aw-adj;
 adj=parseInt((ah*oft)/100);
 mT=(lv)?0:(ah-adj)*-1;
 w3=dby.parentNode.scrollLeft;
 if(!w3) w3=dby.scrollLeft;
 w3=(w3)?w3:0;
 if(dce&&dce.clientWidth) wW=dce.clientWidth+w3;
 else if(dby) wW=dby.clientWidth+w3;
 if(!wW) {
  wW=0;
  wP=false;
 }
 wH=window.innerHeight;
 if(!wH) {
  wH=dce.clientHeight;
  if(!wH||wH<=0) wH=dby.clientHeight;
 }
 sct=dby.parentNode.scrollTop;
 if(!sct) {
  sct=dby.scrollTop;
  if(!sct) sct=window.scrollY?window.scrollY:0;
 }
 pw=xx+mR+uw;
 if(pw>wW&&wP) {
  mR=uw*-1;
  mR+=10;
  if(lv) mR=(wW-xx)-uw;
 }
 lc=xx+mR;
 if(lc<0) mR=xx*-1;
 pw=yy+uh+ah+mT-sct;
 pwv=wH-pw;
 if(pwv<0) {
  mT+=pwv;
  if(uh>wH) mT=(yy+ah-sct)*-1;
 }
 u.style.marginLeft=mR+'px';
 u.style.marginTop=mT+'px';
 if(menup[2]==1) {
  if(!iem) Menu_anim(a, 20);
 }
 u.className="menushow";
}

function Menu_hide(u) {
 var i, tt, ua;
 u.menupmax=0;
 u.className="menuhide";
 ua=u.parentNode.firstChild;
 ua.className=ua.className.replace("menuan", "menuaus");
}

function Menu_tg(a, b) {
 var i, u, tA, tU, pp;
 tA=menuct[a];
 pp=tA.parentNode;
 while(pp) {
  if(pp.tagName=="UL") break;
  pp=pp.parentNode;
 }
 if(pp) {
  tU=pp.getElementsByTagName("UL");
  for(i=tU.length-1;i>-1;i--)
  {
   if(b!=1&&tA.menusub==tU[i]) continue;
   else Menu_hide(tU[i]);
  }
 }
}

function Menu_close(evt) {
 var pp, st, tS, m=true;
 evt=(evt)?evt:((event)?event:null);
 st=document.menua;
 if(st!=-1) {
  if(evt) {
   tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;
   if(tS) {
    pp=tS.parentNode;
    while(pp) {
     if(pp&&pp.id&&pp.id=="mainnav") {
      m=false;
      document.menua=1;
      break;
     }
     pp=pp.parentNode;
    }
   }
   if(m) {
    document.menua=-1;
    if(document.menut) clearTimeout(document.menut);
    document.menut=setTimeout("Menu_clr()", 360);
   }
  }
 }
}

function Menu_clr() {
 var i, tU, tUU;
 document.menua=-1;
 tU=document.getElementById('mainnav');
 if(tU) {
  tUU=tU.getElementsByTagName("UL");
  if(tUU) {
   for(i=tUU.length-1;i>-1;i--) Menu_hide(tUU[i]);
  }
 }
}
function Menu_anim(a, st) {
 var g=menuct[a].menusub, sp=30, inc=20;
 st=(st>=100)?100:st;
 g.style.fontSize=st+"%";
 if(st<100) {
  st+=inc;
  setTimeout("Menu_anim("+a+", "+st+")", sp);
 }
}

function Menu_mark() {
 document.menuop=arguments;
}
function Menu_open() {
 var i, x, tA, op, pp, wH, tA, aU, r1, k=-1, kk=-1, mt=new Array(1, '', '');
 if(document.menuop) mt=document.menuop;
 op=mt[0];
 if(op<1) return;
 tA=document.getElementById('mainnav').getElementsByTagName("A");
 wH=window.location.href;
 r1=/index\.[\S]*/i;
 for(i=0;i<tA.length;i++) {
  if(tA[i].href) {
   aU=tA[i].href.replace(r1, '');
   if(op>0) {
    if(tA[i].href==wH||aU==wH) {
     k=i;
     kk=-1;
     break;
    }
   }
   if(op==2) {
    if(tA[i].firstChild) {
     if(tA[i].firstChild.nodeValue==mt[1]) kk=i;
    }
   }
   if(op==3 && tA[i].href.indexOf(mt[1])>-1) kk=i;
   if(op==4) {
    for(x=1;x<mt.length;x+=2) {
     if(wH.indexOf(mt[x])>-1) {
      if(tA[i].firstChild&&tA[i].firstChild.data) {
       if(tA[i].firstChild.data==mt[x+1]) {
        kk=i;
        break;
       }
      }
     }
    }
   }
  }
 }
 k=(kk>k)?kk:k;
 if(k>-1) {
  pp=tA[k].parentNode;
  while(pp) {
   if(pp.nodeName=="LI") pp.firstChild.className="menumark "+pp.firstChild.className;
   pp=pp.parentNode;
  }
 }
 if(kk>-1) document.menuad=1;
 Menu_adma();
 Menu_admb();
}

function Menu_adma() {
 var s, ss, i, j, a, g, b, c, d, t, h, tA, b, tP, r1, r2, tI, bA, aA, tB=new Array(), bC='', x=0, ur=1, mt=document.menuad;
 g=document.getElementById("mainnav");
 b=document.getElementById("pmmcrumb");
 if(g&&b) {
  c=b.getElementsByTagName("A");
  if(c&&c[0]) {
   tP=c[0].parentNode.childNodes;
   r1=/<a/i;
   r2=/\/a>/i;
   tI=c[0].parentNode.innerHTML;
   j=tI.search(r1);
   bA=tI.substring(0, j);
   j=tI.search(r2);
   aA=tI.substring(j+3);
   bC+=(bA)?bA:'';
   s=(aA)?aA:' &gt ';
   if(!c[0].id||c[0].id!="pmmcn") {
    if(c[0].href!=window.location.href) {
     tB[0]=c[0];
     x++;
     ur=2;
    }
   }
   tA=g.getElementsByTagName("A");
   for(i=0;i<tA.length;i++) {
    if(tA[i].className.indexOf("menumark")>-1) {
     tB[x]=tA[i];
     x++;
    }
   }
   for(i=0;i<tB.length;i++) {
    ss=(i>0)?s:'';
    a=(i==tB.length-1)?0:1;
    d=(i==0&&c[0].id)?'id="'+c[0].id+'" ':' ';
    t=tB[i].firstChild.nodeValue;
    if(a==1||mt==1||x<ur) bC+=ss+'<a '+d+'hr'+'ef="'+tB[i].href+'">'+t+'</a>';
    else bC+=ss+t;
   }
   if(mt==1||i<ur) {
    ss=(i>0)?s:'';
    bC+=ss+document.title;
   }
   c[0].parentNode.innerHTML=bC;
  }
 }
}
function Menu_admb() { //v1.0 by PVII-www.projectseven.com
 var h='', g, i, tA, b, m=false;
 g=document.getElementById("mainnav");
 b=document.getElementById("pmmnext");
 if(g&&b) {
  tA=g.getElementsByTagName("A");
  for(i=tA.length-1;i>-1;i--) {
   if(tA[i].className.indexOf("menumark")>-1) {
    m=true;
    break;
   }
  }
  if(m) {
   if(i<tA.length-1) i++;
   else i=0;
   while(tA[i].href==window.location.href+"#"||tA[i].href=="javascript:;") {
    i++;
    if(i>tA.length-1) {
     i=0;
     break;
    }
   }
   b.href=tA[i].href;
   b.innerHTML=tA[i].firstChild.nodeValue;
  }
 }	
}




function checkfelder(typ) {
 var errortext=''
 var fehler=0
  if(document.postform.mailto.value=='') {
  var fehler=1;
  errortext+="Your Request \n";
 }
 if(document.postform.vorname.value=='') {
  var fehler=1;
  errortext+="First name \n";
 }
 if(document.postform.nachname.value=='') {
  var fehler=1;
  errortext+="Last name \n";
 }
 if(document.postform.email.value.match(/^[a-zA-Z0-9_\.-]{2,}@[a-z0-9-]{3,}\.[a-z]{2,4}|museum$/)==false || document.postform.email.value=='')
 {
  var fehler=1;
  errortext+="E-Mail\n";
 }
 if(typ=='kontakt') {
  if(document.postform.nachricht.value=='' || document.postform.nachricht.value=='Your message') {
   var fehler=1;
   errortext+="Message \n";
  }
 }

 if(fehler=='0') {
  if(typ=='kontakt' || (document.postform.bestatigung.checked==true & typ=='jobs')) return true;
  else { alert("Please confirm."); return false; }
 }
 else {
  if(typ=='kontakt' || (document.postform.bestatigung.checked==true & typ=='jobs')) { alert("Please correct the following fields:\n\n"+errortext); return false; }
  else { alert("Please confirm and correct the following fields:\n\n"+errortext); return false; }
 }
}
tooltip = null;
document.onmousemove = updatetooltip;
function updatetooltip(e) {
 x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
 y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
 if (tooltip != null) {
  tooltip.style.left = (x + 5) + "px";
  tooltip.style.top = (y + 5) + "px";
 }
}
function showtooltip(id) {
 tooltip = document.getElementById(id);
 tooltip.style.display = "inline"
}
function hidetooltip() {
 tooltip.style.display = "none";
}


middlelayer = null;
function showmiddlelayer(midlay) {
 if(middlelayer) {
  oldmiddlelayer = middlelayer;
  oldmiddlelayer.style.display = "none";
 }
 middlelayer = document.getElementById(midlay);
 if (self.pageYOffset) {
  x3 = self.pageXOffset;
  y3 = self.pageYOffset;
 }
 else if (document.documentElement && document.documentElement.scrollTop) {
  x3 = document.documentElement.scrollLeft;
  y3 = document.documentElement.scrollTop;
 }
 else if (document.body) {
  x3 = document.body.scrollLeft;
  y3 = document.body.scrollTop;
 }
 x4 = screen.availWidth/2-320;
 y4 = (screen.availHeight - 480)/2-90+y3;
 if(y4<10) y4=10;
 middlelayer.style.left = x4 + "px";
 middlelayer.style.top = y4 + "px";
 middlelayer.style.display = "inline";
}
function hidemiddlelayer() {
 middlelayer.style.display = "none";
}

function popupWindow(url) {
  window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=10,left=10')
}


function scrollMit(ebene, plusX, plusY) {
 docdiv=document.getElementById(ebene);
 if(document.body) diffY = document.body.scrollTop;
 if(document.documentElement && document.documentElement.scrollTop) diffY = document.documentElement.scrollTop;
 vonoben=diffY+plusY;
 vonlinks=(screen.availWidth/2)-500+plusX;
 docdiv.style.top = vonoben;
 docdiv.style.left = vonlinks;
}

function setflash(src, title, width, height) {
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'" title="'+title+'">');
 document.write('  <param name="movie" value="'+src+'" />');
 document.write('  <param name="quality" value="high" />');
 document.write('  <param name="wmode" value="transparent" />');
 document.write('  <embed src="'+src+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
 document.write('</object>');
}

//Arrange Formular
function chkFormular () {
  if (document.Formular.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular.firstname.focus();
    return false;
  }
  if (document.Formular.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular.surname.focus();
    return false;
  }
  if (document.Formular.company.value == "") {
    alert("Please enter your company!");
    document.Formular.company.focus();
    return false;
  }
   if (document.Formular.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular.phone.focus();
    return false;
  }
  if (document.Formular.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular.email.focus();
    return false;
  }
}

function chkFormular2 () {
  if (document.Formular2.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular2.firstname.focus();
    return false;
  }
  if (document.Formular2.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular2.surname.focus();
    return false;
  }
  if (document.Formular2.company.value == "") {
    alert("Please enter your company!");
    document.Formular2.company.focus();
    return false;
  }
   if (document.Formular2.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular2.phone.focus();
    return false;
  }
  if (document.Formular2.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular2.email.focus();
    return false;
  }
}

function chkFormular3 () {
  if (document.Formular3.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular3.firstname.focus();
    return false;
  }
  if (document.Formular3.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular3.surname.focus();
    return false;
  }
  if (document.Formular3.company.value == "") {
    alert("Please enter your company!");
    document.Formular3.company.focus();
    return false;
  }
   if (document.Formular3.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular3.phone.focus();
    return false;
  }
  if (document.Formular3.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular3.email.focus();
    return false;
  }
}

function chkFormular4 () {
  if (document.Formular4.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular4.firstname.focus();
    return false;
  }
  if (document.Formular4.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular4.surname.focus();
    return false;
  }
  if (document.Formular4.company.value == "") {
    alert("Please enter your company!");
    document.Formular4.company.focus();
    return false;
  }
   if (document.Formular4.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular4.phone.focus();
    return false;
  }
  if (document.Formular4.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular4.email.focus();
    return false;
  }
}

function chkFormular5 () {
  if (document.Formular5.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular5.firstname.focus();
    return false;
  }
  if (document.Formular5.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular5.surname.focus();
    return false;
  }
  if (document.Formular5.company.value == "") {
    alert("Please enter your company!");
    document.Formular5.company.focus();
    return false;
  }
   if (document.Formular5.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular5.phone.focus();
    return false;
  }
  if (document.Formular5.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular5.email.focus();
    return false;
  }
}
function chkFormular6 () {
  if (document.Formular6.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular6.firstname.focus();
    return false;
  }
  if (document.Formular6.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular6.surname.focus();
    return false;
  }
  if (document.Formular6.company.value == "") {
    alert("Please enter your company!");
    document.Formular6.company.focus();
    return false;
  }
   if (document.Formular6.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular6.phone.focus();
    return false;
  }
  if (document.Formular6.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular6.email.focus();
    return false;
  }
  if (document.Formular6.captcha.value != "sigos") {
    alert("Error: Spam protection");
    document.Formular6.captcha.focus();
    return false;
  }
}

function makeLowercase() {
document.Formular6.captcha.value = document.Formular6.captcha.value.toLowerCase();
}

function chkFormular7 () {
  if (document.Formular7.firstname.value == "") {
    alert("Please enter your first name!");
    document.Formular7.firstname.focus();
    return false;
  }
  if (document.Formular7.surname.value == "") {
    alert("Please enter your surname!");
    document.Formular7.surname.focus();
    return false;
  }
  if (document.Formular7.company.value == "") {
    alert("Please enter your company!");
    document.Formular7.company.focus();
    return false;
  }
   if (document.Formular7.phone.value == "") {
    alert("Please enter your phone number!");
    document.Formular7.phone.focus();
    return false;
  }
  if (document.Formular7.email.value.indexOf("@") == -1) {
    alert("Email not valid!");
    document.Formular7.email.focus();
    return false;
  }
  if (document.Formular7.captcha.value != "11") {
    alert("Error: Spam protection");
    document.Formular7.captcha.focus();
    return false;
  }
}
// ende Arrange