/* Vap div menu 2006 */


NC = (document.layers);  
IE = (document.all);  
DOM = (document.getElementById);


function off_all_time(){
	off_all();
	timeoutID=setTimeout ("off_all_time();", 50);   
}

function on_a(num){	
  var divnum = num + 'div';
  var x_coodr = getLeft(num+'i');
  x_coodr += getLeft('bmu');  
  /* x_coodr += 1 + getLeft('home');   */
  x_coodr += 1;
  
  if(num == 'm1'){ x_coodr--; }
  
  off_all();
  
  catchid(divnum,x_coodr,0);
  catchstyle(divnum,'block');
}

function off_all(){
  off_a('m1');
  off_a('m2');
  off_a('m3');
  off_a('m4');
}
function off_a(num){
  var divnum = num + 'div';
  timeoutID=setTimeout ("x=1;", 50);
  catchstyle(divnum,'none');
  
}

function catchid(idd,newPosX,newPosY){
  if (NC) { document.layers[idd].top = newPosY;  
            document.layers[idd].left = newPosX;}
  if (DOM){ document.getElementById(idd).style.top = newPosY;
            document.getElementById(idd).style.left = newPosX;}
  if (IE) { document.all[idd].style.top = newPosY;
            document.all[idd].style.left = newPosX;}
}

function catchstyle(idd,stil){
  if (NC) { document.layers[idd].display = stil;}
  if (DOM){ document.getElementById(idd).style.display = stil;}
  if (IE) { document.all[idd].style.display = stil;}
}

function getLeft(idd){
  if (NC) {return document.layers[idd].offsetLeft;}
  if (DOM){ offdom = document.getElementById(idd).offsetLeft;
          	return offdom;}	  
  if (IE) {return document.all[idd].offsetLeft;}
  return 0;
}

