var ie=document.all?1:0;var n=document.layers?1:0;
var ns6=(document.getElementById&&!document.all)?1:0;
var move=10;var menuSpeed=15;var tim=0;

function makeMenu(obj,nest){
 nest=(!nest)?'':'document.'+nest+'.';
 if(n) this.css=eval(nest+'document.'+obj);
 else if(ns6) this.css=document.getElementById(obj).style;
 else if(ie) this.css=eval(obj+'.style');
 this.state=1;this.go=0;
 if(n) this.width=this.css.document.width;
 else if(ns6) this.width=document.getElementById(obj).offsetWidth;
 else if(ie) this.width=eval(obj+'.offsetWidth');
 this.top=b_getleft;this.obj=obj+"Object";
 eval(this.obj+"=this");
}

function b_getleft(){
 if(n||ns6) gleft=parseInt(this.css.top);
 else if(ie) gleft=eval(this.css.pixelTop);
 return gleft;
}

function moveMenu(obj){
 if(oMenu.go==1) oMenu.state=(!oMenu.state);
 clearTimeout(tim);
 if(!oMenu.state){
  oMenu.css.visibility='visible';
  oMenu.gototop=86;
  menuPosLeft();
  mIn();
 } else mOut();
}

function mIn(){
 if(oMenu.top()!=oMenu.gototop){
  oMenu.go=1;
  if((oMenu.top()+move)>oMenu.gototop) oMenu.css.top=oMenu.gototop;
  else oMenu.css.top=oMenu.top()+move;
  tim=setTimeout("mIn()",menuSpeed);
 }else{
  oMenu.go=0; oMenu.state=1;
 }
}

function mOut() {
 if(oMenu.top()<=-174){
  oMenu.go=0;oMenu.state=0;oMenu.css.visibility='hidden';
 }else{
  oMenu.go=1;oMenu.css.top=oMenu.top()-move;
  tim=setTimeout("mOut()",menuSpeed);
 }
}

function menuPosLeft() {
 oMenu.css.left=parseInt(ie?document.body.scrollLeft:pageXOffset)+parseInt(ie?document.body.clientWidth:(window.innerWidth-20))-165;
}

function menuInit() {
 oMenu=new makeMenu('divMenu');
 menuPosLeft();
 
 oMenu.css.top=-174;oMenu.css.visibility='hidden';
 oMenu.state = 0;
 
 //setInterval("menuPosLeft()", 50);
}

