function browserCheck(){
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
brows=new browserCheck()

var elementID, topPosition, leftPosition;
var actLayer='welcome';
var d=5;

function getElem(p1,p2,p3) {
 var Elem;
 var byId, byName, byTag;
 switch(p1.toLowerCase()){
 case "id":byId=true;
                                 break;
 case "name":byName=true;
                                 break;
 case "tagname":byTag=true;
                                 break;}
 if(brows.dom) {
   if(byId) {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(byName) {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(byTag) {
     if (typeof document.getElementsByTagName(p2) == "object" ||
        (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(brows.ie4) {
   if(byId) {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(byTag) {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(byName) {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(brows.ns4) {
   if(byId || byName) {
   if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="index") {
    if (typeof document.layers[p2] == "object")
     Elem = document.layers[p2];
    else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
}


function getStyle(elID){//gibt ein element.style oder layer objekt zurück
if(!brows.ns4){
        var s=getElem('id',elID).style;}
else{
        var s=getElem('id',elID)}
if(s!=null)return s;
else return void(0);}

var actmusic;
var actmethod="";

function musicbsp(x, _sndObj, sndFile) {
  var i, method = "", sndObj = eval(_sndObj);
  if(actmethod=='play'&& brows.ie){eval(actmusic+".stop()");}
  if(x=="stop"){return;}
  actmethod=x;
  actmusic=_sndObj;

  if (sndObj != null) {
                                      if (brows.ns4) method = x;
                                        else {
                                                       if (window.WMP == null) {
                                                                                                window.WMP = false;
                                                                                   for(i in sndObj) if (i == "ActiveMovie") {
                                                                                                                                                                          window.WMP = true; break;}
                                                                                                         }
                                       if (window.WMP) method = x;
                                       else if (sndObj.FileName&&x=='play') method = "run";
                                                    }
                                            }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile;
}

function frameCheck (seite) {
var mainUrl = 'index.htm?'+seite;
if(!top.isIndex){top.location.href=mainUrl;}
}
function tauschen()
{if(brows.mac) return true; 
  neu_url = self.location.search;
    anker = self.location.search.indexOf('*');
    if(neu_url.length > 0){
    self.leftFrame.MM_showHideLayers('wern','','hide','werner','','show');
       if (anker == -1){
          self.mainFrame.location.href =neu_url.substring(1,neu_url.length);}
       else{
         self.mainFrame.location.href = neu_url.substring(1,anker)+ '#'+ neu_url.substring(anker+1,neu_url.length);}}
}

function myHover(q,s){
if(s=='in'){q.style.backgroundColor='#000066';}
else{q.style.backgroundColor='#FFFFFF';
                q.style.Color='#00FFFF';}
if(s=='in')q.style.cursor='hand';}