var tM = null;
var oldObj= null;
function show_menu(obj) {
	clearT();
	if (oldObj && oldObj != obj) {
		oldObj.lastChild.style.visibility="hidden";
	}	
	oldObj = obj;
	obj.lastChild.style.visibility="visible";		
}
function hide_menu(obj) {
	tM = null;
	tM = setTimeout(function() {
		obj.lastChild.style.visibility="hidden";	
	}, 100);
}
function clearT(){
	if (tM == null) { return; }
	clearTimeout(tM);
	tM = null;
}
function hideM(obj) {
	obj.lastChild.style.visibility="hidden";
	clearT();		
}
function showDialog(href, title) {
	
	var d = dijit.byId("wd_dialog");
	if (!d) {return;}
	d.titleNode.innerHTML = title || "";
	if (d.href == href) {
		d.show();
	}
	d.href = href; 
	d.show(true);
}