var timer1, timer2;
var DivId1 = "mnu_accom";
var DivId2 = "mnu_acti";
var DivId3 = "mnu_about";
var DivId4 = "mnu_book";
function findPosx(obj) {                	
	var curleft = 0;
	curleft = obj.offsetLeft;
	while (obj = obj.offsetParent) {
		curleft += obj.offsetLeft;
	}
	return(curleft);
}

//to find the y position
function findPosy(obj) {					
	var curtop = 0;
	curtop = obj.offsetTop;
	while (obj = obj.offsetParent) {
		curtop += obj.offsetTop;
	}
	return(curtop);
}

function popshow(id,myid){
	pophide();
	var xpos=findPosx(myid);
	var ypos=findPosy(myid)+20;
	var po= new getObj(id);
	po.style.visibility="visible";
	po.style.top=ypos+"px";
	po.style.left=xpos+"px";
	po.obj.onmouseout=function(){
		startime();
	}
	po.obj.onmouseover=function(){
		clearTimeout(timer1);
	}
}

function pophide(){
	var	mnu1 = new getObj(DivId1);
	var mnu2 = new getObj(DivId2);
	var mnu3 = new getObj(DivId3);
	var mnu4 = new getObj(DivId4);
	mnu1.style.visibility="hidden";
	mnu2.style.visibility="hidden";
	mnu3.style.visibility="hidden";
	mnu4.style.visibility="hidden";
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}


function startime(){ timer1=setTimeout('pophide()', 500);}
