// JavaScript Document
menu = {timer : null, current : null};
menu.getStyle = function(name){
if(document.getElementById) return document.getElementById(name).style;
else if(document.all) return document.all[name].style;
else if(document.layers) return document.layers[name];
}


menu.getObjX = function (obj){ 
var x = 0;
do {
x += obj.offsetLeft;
obj = obj.offsetParent;
} while(obj!=null);
return x;
}


menu.show = function(name,anchor){
if(this.timer) clearTimeout(this.timer);
if(anchor)this.getStyle(name).left = menu.getObjX(anchor)+"px";
this.getStyle(name).visibility = "visible";
this.current = name;
}

menu.hide = function(){
this.timer = setTimeout("menu.doHide()",300);
}
menu.doHide = function(){
if(this.current){
this.getStyle(this.current).visibility = "hidden";
this.current = null;
}
}