var menuTimer =null;
function showmenu(obj8,obj7,state,location){ 
    var btn=document.getElementById(obj8);
    var obj=document.getElementById(obj7);
    var h=btn.offsetHeight;
    var w=btn.offsetWidth;
    var x=btn.offsetLeft;
    var y=btn.offsetTop;
    
    obj.onmouseover =function(){
        showmenu(obj8,obj7,'show',location);
    }
    obj.onmouseout =function(){
        showmenu(obj8,obj7,'hide',location);
    }
    
    while(btn=btn.offsetParent){y+=btn.offsetTop;x+=btn.offsetLeft;}
    
    var hh=obj.offsetHeight;
    var ww=obj.offsetWidth;
    var xx=obj.offsetLeft;//style.left;
    var yy=obj.offsetTop;//style.top;
    var obj7state=state.toLowerCase();
    var obj7location=location.toLowerCase();
    
    var showx,showy;

    if(obj7location=="left" || obj7location=="l" || obj7location=="top" || obj7location=="t" || obj7location=="u" || obj7location=="b" || obj7location=="r" || obj7location=="up" || obj7location=="right" || obj7location=="bottom"){
        if(obj7location=="left" || obj7location=="l"){showx=x-ww;showy=y;}
        if(obj7location=="top" || obj7location=="t" || obj7location=="u"){showx=x;showy=y-hh;}
        if(obj7location=="right" || obj7location=="r"){showx=x+w;showy=y;}
        if(obj7location=="bottom" || obj7location=="b"){showx=x;showy=y+h;}
    }else{ 
        showx=xx;showy=yy;
    }
    obj.style.left=showx+"px";
    obj.style.top=showy+"px";
    if(state =="hide"){
        menuTimer =setTimeout("hiddenmenu('"+ obj7 +"')", 0.1);
    }else{
        clearTimeout(menuTimer);
        obj.style.visibility ="visible";
    }
}
function hiddenmenu(psObjId){
    document.getElementById(psObjId).style.visibility ="hidden";
} 
