objWidth=991;
baseOffsetLeft=354;
offsetTop=464;
outTime=0;

var offsetLeft=new Array(0,0,53,157,244,326,462,490);
var is_on=new Array(0,0,0,0,0,0,0);

var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;

var outTime=new Array();

for(i=1;i<=7;i++){outTime[i]=0;}

function menuOn(n){
 th='menu'+n+'tab';
 obj='menu'+n;

 if(outTime[n]){clearTimeout(outTime[n]);outTime[n]=0;}
 is_on[n]=1;

 if(document.getElementById(obj).style){
  fromTop=offsetTop-height[n];
  fromLeft=baseOffsetLeft+Math.round(offsetLeft[n]-(objWidth/2));
  document.getElementById(obj).style.position='absolute';
  document.getElementById(obj).style.left='50%';
  document.getElementById(obj).style.top=fromTop+'px';
  document.getElementById(obj).style.marginLeft=fromLeft+'px';
  document.getElementById(obj).style.display='block';
 }
 document.getElementById('menu'+n+'tab').style.backgroundColor='#0b1506';
 for(i=1;i<=7;i++){if(i!=n&&is_on[i]){menuOff(i);}}
}

function menuOff(n){
 is_on[n]=0;
 if(document.getElementById('menu'+n).style){
  document.getElementById('menu'+n).style.display='none';
 }
 document.getElementById('menu'+n+'tab').style.backgroundColor='transparent';
}

function menu_init(){
 offsetTop=((document.body.offsetHeight-642)/2)+444;
 if(offsetTop<478){offsetTop=478;}
}

window.onresize=menu_init;
