var disappeardelay=250;

var ie5=document.all 
var ns6=document.getElementById&&!document.all 

function showhide(obj, e, visible, hidden){ 
if (ie5||ns6) 
divI.style.left=divI.style.top=-500 
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") 
obj.visibility=visible 
else if (e.type=="click") 
obj.visibility=hidden 
} 

function getposOffset(what, offsettype){ 
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; 
var parentEl=what.offsetParent; 
while (parentEl!=null){ 
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; 
parentEl=parentEl.offsetParent; 
} 
return totaloffset; 
} 

function getclientxy(what,clienttype){
var clientxy="";
if(clienttype=="x"){
	txtnum=what.innerHTML;
	clientxy=txtnum.length*13;
}
else if(clienttype=="y")
    {
	  clientxy=120
    }
else{
	clientxy=13;

}
return clientxy;
}

function showdivclass(obj,e,id,strcont){
	if (window.event) event.cancelBubble=true 
	else if (e.stopPropagation) e.stopPropagation()
	if (typeof divI!="undefined") 
	divI.style.visibility="hidden" 
	clearhidemenu()
	divI=document.getElementById(strcont);
	obj.onmouseout=delayhidemenu;
	divI.onmouseover=clearhidemenu; 
	divI.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)} 
	showhide(divI.style, e , "visible", "hidden") 
	//divI.innerHTML=divC.innerHTML;
	//clw=getclientxy(obj,"y");
	clw=0;
	cly=20;//getclientxy(obj,"y");
	divI.style.top=(getposOffset(obj,"top")+cly)+"px";
	divI.style.left=(getposOffset(obj,"left")+clw)+"px";	
	divI.style.display="";
}


function delayhidemenu(){ 
delayhide=setTimeout("divI.style.visibility='hidden'",disappeardelay) 
}


function clearhidemenu(){ 
if (typeof delayhide!="undefined") 
clearTimeout(delayhide) 
} 

function dynamichide(e){ 
if (ie5&&!divI.contains(e.toElement)) 
delayhidemenu() 
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) 
delayhidemenu() 
} 

function delayhidemenu(){ 
delayhide=setTimeout("divI.style.visibility='hidden'",disappeardelay) 
} 

