                  
var MyMenu = {
  dummy:0,
  version:'2.0.1.0',
  seo_links:0,
  menu_width:178,
  layer:true,
  x:30,
  y:30,
  valign:0,
  is_floating:false,
  show_selected:true,
  hlparent:false,
  expand_selected:true,
  expandSelAnimated:false,
  one_opened:true,
  animation_type:0,
  open_speed:10,
  OpenByMouseOver:false,
  DelayOpenByMouseOver:800,
  wrapText:true,
  rtl:false,
  PREVIEW_BACKGROUND_COLOR:'#FFFFFF',
  MENU_NAME:'Saeule',
  stream:[
0,"Club 10","Club 10",'&../index1.html','','MyMenu__Home',22,0,false,1,0,"Über uns","Über uns",'&../ueberuns.html','','MyMenu__Level-2',22,0,false,0,0,"Aktuelles","Aktuelles",'&../index.html','','MyMenu__Level-1',22,0,false,0,0,"Damen","Damen",'&../damen.html','','MyMenu__Level-1',22,0,false,0,0,"Anwesenheit","Anwesenheit",'&../anwesenheit.html','','MyMenu__Level-1',22,0,false,0,0,"Ambiente","Ambiente",'&../galerieliste2.html','','MyMenu__Level-1',22,0,false,0,0,"BDSM","BDSM",'&../bdsm.html','','MyMenu__Level-1-arrow',22,0,false,1,0,"Studio","Studio",'&../Studio.html','','MyMenu__Level-2',22,0,false,0,0,"Leistungen","Leistungen",'','','MyMenu__Level-1-arrow',22,0,false,2,0,"Angebote","Angebote",'&../angebote.html','','MyMenu__Level-2',22,0,false,0,0,"Haus/Hotel","Haus/Hotel",'&../haushotel.html','','MyMenu__Level-2',22,0,false,0,0,"Öffnungszeiten","Öffnungszeiten",'&../oeffnung.html','','MyMenu__Level-1',22,0,false,0,0,"Jobs","Jobs",'&../jobs.html','','MyMenu__Level-1',22,0,false,0,0,"Anfahrt","Anfahrt",'&../anfahrt.html','','MyMenu__Level-1',22,0,false,0,
0,"Ende","",'','','MyMenu__Bottom',22,0,false,0],
  END_PARAMETERS:1,

  browser:function() {
    var ua=navigator.userAgent.toLowerCase()
    this.opera=ua.indexOf('opera')>=0
    this.safari=ua.indexOf('safari')>=0
    this.ie=document.all&&!this.opera
    this.macie=this.ie&&ua.indexOf('mac')>=0
    this.winie=this.ie&&!this.macie
    this.ieCanvas=(this.ie&&document.compatMode=="CSS1Compat")?document.documentElement:document.body
    return this
  },

  setPathAdjustment:function(ID) {
    var sl=''
    var sc=document.getElementsByTagName('script')
    for(var i=0;i<sc.length;i++) {
      if(sc[i].innerHTML.search(ID)>-1)sl=sc[i].src
    }
    this.SCRIPT_LOCATION=sl.substr(0, sl.lastIndexOf('/')+1)
  },

  adjustPath:function(path) {
    var idf=path.charAt(0)
      if(idf=='*'||idf=='&')return this.SCRIPT_LOCATION+path.substr(1)
      return path
  },
  
  linkScripts:function(aNewScripts) {
    var scripts=document.getElementsByTagName('script')
    for(var i=0;i<aNewScripts.length;i++) {
      var bScriptLinked=false 
      for(var j=0;j<scripts.length;j++) {
        if(aNewScripts[i]==scripts[j].src) {
          bScriptLinked=true;break
        }
      }
      if(!bScriptLinked)document.write("<script src='"+this.adjustPath(aNewScripts[i])+"' type='text/javascript'><\/script>")
    }
  },

  isCurrent:function(r) {
    if(!r)return false
    var l=location.href.replace(/ /g,'%20')
    if(r.search('//')==-1) {
      if(r.charAt(0)=='/')
      r=l.replace(/(.*\/\/[^\/]*).*/,'$1')+r
    else
      r=l.replace(/[^\/]*$/,'')+r
    }
    do {
      var r1=r
      r=r1.replace(/[^\/]*\/\.\.\//,'')
    }
    while(r!=r1)
      return r==l
  },

  addLoadEvent:function(f) { 
    var done=0
    function w() { 
      if(!done) {
        done=1
        f()
      }
    }
    if(document.addEventListener) {
      document.addEventListener('DOMContentLoaded', w, false)
    }
    if(this.br.ie&&window==top)( function() {
                                   try {
                                     document.documentElement.doScroll('left')
                                   }
                                   catch(e) {
                                     setTimeout(arguments.callee, 0)
                                     return
                                   }
                                   w()
                                 })()
      var oldf=window.onload
      if(typeof oldf!='function') {
        window.onload=w
      } else {
        window.onload= function() {
                         try {
                           oldf()
                         }
                         catch(e){}
                         w()
                       }
      }
    },
    
    Preload:function() {
      var b=document.getElementsByTagName('body');
      if(b[0]) {
        var bb=b[0];
        var d;
        d=document.createElement('div'); d.className='MyMenu__Level-1-arrow MyMenu__Preload';     bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-1-arrow_MO MyMenu__Preload';  bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-1-arrow_SEL MyMenu__Preload'; bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-1 MyMenu__Preload';           bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-1_MO MyMenu__Preload';        bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-1_SEL MyMenu__Preload';       bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Bottom MyMenu__Preload';            bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Bottom_MO MyMenu__Preload';         bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Bottom_SEL MyMenu__Preload';        bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2 MyMenu__Preload';           bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2_MO MyMenu__Preload';        bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2_SEL MyMenu__Preload';       bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2-arrow MyMenu__Preload';     bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2-arrow_MO MyMenu__Preload';  bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Level-2-arrow_SEL MyMenu__Preload'; bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Home MyMenu__Preload';              bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Home_MO MyMenu__Preload';           bb.appendChild(d);
        d=document.createElement('div'); d.className='MyMenu__Home_SEL MyMenu__Preload';          bb.appendChild(d);
      }
    },

    init:function() { 
      var m=this
      m.ID=AcrdMenu_ID
      m.br=new m.browser()
      m.setPathAdjustment('AcrdMenuMenu script ID:'+m.ID+' ')
      m.linkScripts(new Array())
      m.addLoadEvent(m.onload)
    },

    onload:function() { 
      MyMenu.start()
    },

    addItem:function(i, p, level, submenuIndex) {
      if(i>=this.stream.length)return i;
      var li=document.createElement('li');
      li.bClosed=true;
      li.bAnimated=false;
      li.ItemType=this.stream[i++];
      li.ItemText=this.stream[i++];
      li.title=this.stream[i++];
      li.title=li.title.replace(/&quot;/gi, '"');
      li.ItemURL=this.adjustPath(this.stream[i++]);
      li.URLTarget=this.stream[i++];
      if(li.URLTarget.substr(0,3)=='_PL') {
        li.func=this.stream[i++];
        li.params=this.stream[i++];
      }
      li.classMain=this.stream[i++];
      li.h=this.stream[i++];
      var VertInterval=this.stream[i++];//-margin       css 
      li.AlwaysStayOpen=this.stream[i++];
      var nCountChildren=this.stream[i++];
      li.ItemCountChildren=nCountChildren;
      li.level=level;
      li.style.width=this.menu_width+'px';
      li.sel=false;
      if(this.show_selected) {
        li.sel=this.isCurrent(li.ItemURL);
      }
      li.onclick=this.onclick;
      var curLi=this.submenus[submenuIndex].lis.length;
      this.submenus[submenuIndex].lis[curLi]=li;
      if(nCountChildren>0) {
        this.SubMenuId++;
        this.submenus[this.SubMenuId]=new this.submenu(this, li, this.SubMenuId, submenuIndex);
        li.ChildSubMenuId=this.SubMenuId;
      } else {
        li.ChildSubMenuId=-1;
      }
      var curSubMenuInd=this.SubMenuId;
      while(nCountChildren--) {
        i=this.addItem(i, this.submenus[curSubMenuInd].ul, level+1, curSubMenuInd);
      }
      if(level==0) {
        i=this.addItem(i, p, level, submenuIndex);
      }return i;
    },

    SetAllLiHeight:function() {
      for(var i=0;i<this.submenus.length;i++) {
        for(var j=0;j<this.submenus[i].lis.length;j++) {
          this.submenus[i].lis[j].h=this.submenus[i].lis[j].offsetHeight;
        }
      }
      for(var i=0;i<this.submenus.length;i++) {
        if(i>0) {
          var d=this.submenus[i].div;d.style.height='0px';
          d.style.display='none';
          d.style.position='static';
        }
      }
    },

    start:function() {
      var m=this;m.Preload();
      m.submenus=new Array;
      m.SubMenuId=0;
      m.submenus[m.SubMenuId]=new m.submenu(m, null, 0,-1);
      var streamImdex=0;
      m.addItem(streamImdex, m.submenus[m.SubMenuId].ul, 0, m.SubMenuId);
      var i=0;
      while(i<m.submenus.length) {
        var ul=m.submenus[i].ul;
        var lis=m.submenus[i].lis;
        if(lis) { 
          for(var curLi=0;curLi<lis.length;curLi++) { 
            var li=lis[curLi];
            var h=document.createElement('div');
            if(li.sel) {
              h.className=li.classMain+'_SEL';
            } else {
              h.className=li.classMain;
              h.classMain=li.classMain;
              h.classMO=li.classMain+'_MO';h.onmouseover=this.onmouseover;
              h.onmouseout=this.onmouseout;
            }
            h.innerHTML=li.ItemText;
            li.appendChild(h);
            if(li.ChildSubMenuId>=0) {
              li.appendChild(m.submenus[li.ChildSubMenuId].div);
            }
          }
        }
        if(i==0) { 
          while(ul.firstChild)ul.removeChild(ul.firstChild);
        }
        for(var curLi=0;curLi<lis.length;curLi++) {
          ul.appendChild(lis[curLi]);
        }
        i++;
      }
      m.SetAllLiHeight();
      if(this.hlparent) {
        this.HLightParents();
      }
      this.ExpandAllAlwaysStayOpen();
      if(this.expand_selected==true) {
        this.ExpandSelected();
      }
    },

    arr:[],
    save_open_speed:0,

    DownAfterWait:function(ind) {
      if(this.arr[ind].SMParent.bAnimated==true) {
        window.setTimeout('MyMenu.DownAfterWait('+ind+')', 50);
        return;
      }
      this.arr[ind].SMParent.bClosed=false;
      ind--;
      if(ind>=0) {
        eval('MyMenu.sm'+this.arr[ind].SMParent.ChildSubMenuId+'.slidedown(0, 0, 2, 0, 0,-2)');
        this.DownAfterWait(ind);
      } else {
        this.arr.length=0;
        this.open_speed=this.save_open_speed;
      }
    },

    ExpandAllAlwaysStayOpen:function() {
      for(var j=0;j<this.submenus[0].lis.length;j++) { //top level only
        if(this.submenus[0].lis[j].AlwaysStayOpen==true&&this.submenus[0].lis[j].bClosed==true) {
          this.save_open_speed=this.open_speed;
          this.open_speed=1000;
          eval('MyMenu.sm'+this.submenus[0].lis[j].ChildSubMenuId+'.slidedown(0, 0, 2, 0, 0,-2)');
          this.open_speed=this.save_open_speed;
          this.submenus[0].lis[j].bClosed=false;
        }
      }
    },

    ExpandSelected:function() { 
      for(var i=0;i<this.submenus.length;i++) {
        for(var j=0;j<this.submenus[i].lis.length;j++) {
          if(this.submenus[i].lis[j].sel==true&&(i>0&&this.submenus[i].SMParent.bClosed==true||this.submenus[i].lis[j].ChildSubMenuId>=0)) {
        if(this.submenus[i].lis[j].ChildSubMenuId>=0) {
          this.arr.push(this.submenus[this.submenus[i].lis[j].ChildSubMenuId]);
        }
        if(this.submenus[i].lis[j].level>0) {
          var parent=this.submenus[i];
          while(parent.parentSubMenuInd>-1) {
            this.arr.push(parent);
            parent=this.submenus[parent.parentSubMenuInd];
          }
        }
        if(this.arr.length>0) {
          this.save_open_speed=this.open_speed;
          if(this.expandSelAnimated==false) {
            this.open_speed=1000;
          }
          eval('MyMenu.sm'+this.arr[this.arr.length-1].SMParent.ChildSubMenuId+'.slidedown(0, 0, 2, 0, 0,-2)');
          this.DownAfterWait(this.arr.length-1); 
          return;
        }
      }
    }
  }
},


HLightParents:function() {
  for(var i=0;i<this.submenus.length;i++) {
    for(var j=0;j<this.submenus[i].lis.length;j++) {
      if(this.submenus[i].lis[j].sel==true) {
        if(this.submenus[i].lis[j].level>0) {
          var h;
          var p=this.submenus[i];
          while(p) {
            if(p.SMParent) { 
              h=p.SMParent.firstChild;
              if(h) {
                h.className=p.SMParent.classMain+'_SEL';
                h.onmouseover='';
                h.onmouseout='';
              }
            }
            if(p.parentSubMenuInd>=0)p=this.submenus[p.parentSubMenuInd];
            else p=null;
          }
        }
      }
    }
  }
},

CloseAllLevels:function(level, index) {
  for(var j=0;j<this.submenus[index].lis.length;j++) {
    if(this.submenus[index].lis[j].bClosed==false&&
       this.submenus[index].lis[j].level==level&&
       this.submenus[index].lis[j].AlwaysStayOpen==false) {
      eval('MyMenu.sm'+this.submenus[index].lis[j].ChildSubMenuId+'.slideup(0, 0, 2)');
      this.submenus[index].lis[j].bClosed=true;
    }
  }
},

GetOpened:function(level, index) {
  for(var j=0;j<this.submenus[index].lis.length;j++) {
    if(this.submenus[index].lis[j].bClosed==false&&
       this.submenus[index].lis[j].level==level&&
       this.submenus[index].lis[j].AlwaysStayOpen==false) {
      return this.submenus[index].lis[j].ChildSubMenuId;
    }
  }
  return-1;
},

IsOtherAnimated:function(SubMenuId) {
  for(var i=0;i<this.submenus.length;i++) {
    for(var j=0;j<this.submenus[i].lis.length;j++) {
      if(this.submenus[i].lis[j].bAnimated==true&&this.submenus[i].lis[j].ChildSubMenuId!=SubMenuId) {
        return true;
      }
    }
  }
  return false;
},

CurLi:null,
DelayTimer:null,

OpenURL:function(){
	if(MyMenu.CurLi){
		if(!MyMenu.CurLi.ItemURL)
			return;
		if(MyMenu.CurLi.func)
			eval(MyMenu.CurLi.func+'("AcrdMenuMenu script ID:"+MyMenu.ID,"'+MyMenu.CurLi.ItemURL+'",'+MyMenu.CurLi.params+')');
		else{
			if(MyMenu.CurLi.URLTarget)
				window.open(MyMenu.CurLi.ItemURL,MyMenu.CurLi.URLTarget);
			else 
				location=MyMenu.CurLi.ItemURL;
		}
	}
},

onclick:function(evt) {
  var e=MyMenu.br.ie?event:evt;
  if(this.level&&this.level>0) {
    if(MyMenu.br.ie)
      e.cancelBubble=true;
    else 
      e.stopPropagation();
  }
  if(this.sel==true&&this.ChildSubMenuId<0)
    return;
  if(this.AlwaysStayOpen==true)
    return;
  if((this.sel==false)&&(this.ChildSubMenuId<0||(this.ChildSubMenuId>=0&&this.bClosed))) {
    if(!MyMenu.OpenByMouseOver) {
      MyMenu.CurLi=this;
      MyMenu.OpenURL();
    }
  }
  if(this.ChildSubMenuId>=0) {
    if(MyMenu.IsOtherAnimated(-1)==false) {
      if(this.bClosed) {
        if(MyMenu.one_opened==true) {
          if(MyMenu.animation_type==1) {
            eval('SubMenuObj=MyMenu.sm'+this.ChildSubMenuId);
            if(SubMenuObj) {
              MyMenu.CloseAllLevels(this.level, SubMenuObj.parentSubMenuInd);
            }
          }
        }
        eval('MyMenu.sm'+this.ChildSubMenuId+'.slidedown(0, 0, 2, 0, 0,-2)');
        this.bClosed=false;
      } else {
        eval('MyMenu.sm'+this.ChildSubMenuId+'.slideup(0, 0, 2)');
        this.bClosed=true;
      }
    }
  }
},

onmouseover:function(evt) {
  this.className+=' '+this.classMO;
  if(MyMenu.OpenByMouseOver) { 
    MyMenu.CurLi=this.parentNode;
    MyMenu.DelayTimer=setTimeout('MyMenu.OpenURL()', MyMenu.DelayOpenByMouseOver);
  }
},

onmouseout:function(evt) {
  this.className=this.classMain;
  if(MyMenu.DelayTimer) {
    clearTimeout(MyMenu.DelayTimer);
    MyMenu.CurLi=null;
  }
},

getSource:function(evt, CSSClass) {
  var e=this.br.ie?event.srcElement:evt.target;
  if(e&&e.className&&e.className.substr(0,CSSClass.length)==CSSClass)
    return e;
  return;
}};

MyMenu.submenu=function(m, p, index, parentSM) {
  var f=this;
  f.lis=new Array;
  if(index==0) {
    f.div=document.getElementById(m.ID+'Div');
    var uls=f.div.getElementsByTagName('ul');
    if(uls[0]) {
      f.ul=uls[0];
    }
  } else {
    f.div=document.createElement('div');
    f.div.style.margin   = '0px';
    f.div.style.padding  = '0px';
    f.div.style.overflow = 'hidden';
    f.div.style.border   = '0px';
    f.div.style.position = 'absolute';
    f.div.style.top      = '-1000px';
    f.div.style.left     = '0px';
    p.Child=f;
    f.ul=document.createElement('ul');
    f.ul.style.margin='-10000px 0px 0px';
    f.ul.style.width=m.menu_width+'px';
    f.div.appendChild(f.ul);
  }
  f.parentSubMenuInd=parentSM;
  f.SubMenuInd=index;
  f.m=m;
  f.SMParent=p;
  f.obj='MyMenu.sm'+index;
  f.ParentNeedUp=0;
  eval(f.obj+'=f');
};

MyMenu.submenu.prototype= {
  GetChildSize:function(iSize, iSubMenuId){with(this) {
    for(var i=0;i<m.submenus.length;i++) { 
      if(m.submenus[i].parentSubMenuInd==iSubMenuId) {
        if(m.submenus[i].SMParent&&m.submenus[i].SMParent.bClosed==false) {
          for(j=0;j<m.submenus[i].lis.length;j++) {
            iSize+=m.submenus[i].lis[j].h;
          }
          iSize=GetChildSize(iSize, m.submenus[i].SubMenuInd);
        }
      }
    }
  }
  return iSize;
},

slidedown:function(b, endSize, bRecurs, bUp, endSizeUp, Id) {
  with(this) {
    if(m.one_opened==true&&m.animation_type==1) {
      if(bRecurs==2&&m.IsOtherAnimated(SubMenuInd)) {
        window.setTimeout(obj+'.slidedown(0, 0, 2, 0, 0,-1)', 20);
        return;
      }
    }
    if(bRecurs==2) {
      SMParent.bAnimated=true;
    }
    if(m.one_opened==true) {
      if(m.animation_type==0&&bUp>=0) {
        if(Id==-2) {
          Id=m.GetOpened(SMParent.level, parentSubMenuInd);
        }
        if(Id>=0&&bUp<=endSizeUp) {
          eval('var valUp=m.sm'+Id+'.slideup(bUp, endSizeUp, 1)');
          bUp=valUp.b;
          endSizeUp=valUp.endSize;
        }
      }
    }
    if(endSize==0) {
      for(i=0;i<lis.length;i++) { 
        endSize+=lis[i].h; 
      }
      endSize=GetChildSize(endSize, SubMenuInd);
    }
    if(b<0)b=0;if(b==0) {
      div.style.display='block';
    }
    var addb=m.open_speed;
    if(bRecurs==2) {
      b+=m.open_speed;
      if((b>endSize)&&(b-endSize)<m.open_speed)
        b=endSize;
    }
    if(ul.style.marginTop!='0px') {
      ul.style.marginTop=b-endSize+'px';
    }
    if(b>0) {
      if(b==endSize) {
        var mod1=endSize % addb;
        if(mod1!=0)addb=mod1;
      }
      div.style.height=div.clientHeight+addb+'px';
    }
    if(parentSubMenuInd>0) {
      eval(m.submenus[parentSubMenuInd].obj+'.slidedown('+ b+','+endSize+',0,-1,-1,-1)');
    }
    if(bRecurs==0&&bUp==-1&&endSizeUp==-1&&Id==-1&&b>=endSize)
      ParentNeedUp++;
    if(bRecurs==2&&b>=endSize) { 
      ParentNeedUp++;
      SMParent.bAnimated=false;
      if(m.one_opened==true) {
        if(m.animation_type==0&&bUp>=0) {
          if(Id>=0&&bUp<endSizeUp) {
            eval('m.sm'+Id+'.slideup(bUp, endSizeUp, 2)');
          }
        }
      }
      return;
    }
    if(bRecurs==2) {
      if(b<endSize) {
        window.setTimeout(obj+'.slidedown('+b+','+endSize+',2,'+bUp+','+endSizeUp+','+Id+')', 20);
      }
    }
  }
},

slideup:function(b, endSize, bRecurs) {
  with(this) {
    if(bRecurs==2) {
      SMParent.bAnimated=true;
    }
    if(endSize==0) {
      endSize=div.clientHeight;
    }
    if(b<0)b=0;
    if(bRecurs>0) {
      if(b<endSize)
        b+=m.open_speed;
      if((b>endSize)&&(b-endSize)<=m.open_speed)
        b=endSize;
    }
    if(bRecurs>0) {
      ul.style.marginTop=-b+'px';
    }
    var addb=m.open_speed;
      if(b>0) {
        if(b==endSize) {
          var mod1=endSize % addb;
          if(mod1!=0)
            addb=mod1;
        }
        var divh=div.clientHeight-addb;
        if(divh<0)divh=0;
        div.style.height=divh+'px';
      }
      if(bRecurs>0&&b==endSize) {
        div.style.display='none';
      }
      if(parentSubMenuInd>0) {
        if(b<=endSize) {
          if(ParentNeedUp>0) {
            eval(m.submenus[parentSubMenuInd].obj+'.slideup('+ b+','+endSize+',0)');
            if(b==endSize) {
              ParentNeedUp--;
            }
          }
        }
      }
      if(b<endSize) { 
        if(bRecurs==2) { 
          window.setTimeout(obj+'.slideup('+b+','+endSize+',2)', 20);
        }
      } else {
        SMParent.bAnimated=false;
        if(bRecurs>0) {
          SMParent.bClosed=true;
        }
      }
    }
    return {b:b, endSize:endSize};
  },
  dummy:null
};

MyMenu.init();

