cm=null;
tstat=0;
ff=0;
agt=navigator.userAgent.toLowerCase();
if(agt.indexOf('mozilla/5')!=-1){ ff=1; }
if(agt.indexOf('safari')!=-1){ ff=0; }

function switchDiv(objElement,bolVisible){
  if(!bolVisible){
     objElement.style.display = "none";
  } else {
     objElement.style.display = "";
  }
}

function getPos(el,sProp) {
	var iPos = 0;
	while (el!=null) {
		iPos+=el["offset" + sProp]
		el = el.offsetParent
	}
	return iPos
}

function show(el) {
 if (cm!=null) {
 switchDiv(cm,false);
 }
 if (el!=null) {
 m=el.childNodes[2];
 if (m!=null) {
	 m.style.left = getPos(el,"Left")+"px";
	 m.style.top =  getPos(el,"Top")+el.offsetHeight+ff+"px";
	 switchDiv(m,true);
	 cm=m;
	}
 }
}

function hidemenu(el) {
	timer1=setTimeout("show(null)",100);
	tstat=1;
}

function cancelhide() {
 if (tstat==1) {
	 clearTimeout(timer1);
	 tstat=0;
 }
}