	var curMenu;

	function showMenu(parent,obj,file){
	//alert(curMenu);
	del=false;
	
	

	obj=parent.getElementsByTagName("div")[0];
	//obj=document.getElementById(id_ch);
	//alert(obj.style.display);
	if(curMenu!=undefined && curMenu!=obj){
	//	alert('do');
	  curMenu.style.display="none";
	  }
		if(obj.style.display!="none"){
	//alert('stop');
	return false;
	}
	obj.style.display="inline";
	curMenu=obj;
	
	num_height=parent.style.height.replace("px","");
	num_height=parseInt(num_height);
	//alert(num_height);
	num_top=parent.style.top.replace("px","");
	num_top=parseInt(num_top);
	//alert(num_top);
	hh=(num_height+num_top);
	// alert(hh);
	obj.style.top=hh+"px";
	obj.style.left="0px";
	ajax=http();	
	ajax.open("get",file,true);
	ajax.onreadystatechange =function(){

		if(ajax.status ==200){
		//alert(ajax.responseText);
			
			//////// ????? div ///////////
	
			
			text= ajax.responseText;
			//alert(text);
			obj.innerHTML=text;
			/////////// ????? div /////// */
		
		
		}
		
	}// end fucn
	ajax.send(null);

	//alert(innerMenu);
	
	}



function http(){
var req;
	
	if (window.XMLHttpRequest) { // Non-IE browsers
	
	  req = new XMLHttpRequest();
	
	
	} else if (window.ActiveXObject) { // IE
	
	  req = new ActiveXObject("Microsoft.XMLHTTP");
	
	}
return req;
}




function clearMenu(menu){
	alert('clearMenu');
	menu.style.display="none";
	//menu.getElementsByTagName("div")[0].style.display="none";
}
var del;
function clearAll(){
del=true;
//alert('out');
	window.setTimeout("delly()",1000);
}	
	
function delly(){
//alert('delly');
if(del==true){
	if(curMenu!=undefined){
		curMenu.style.display="none";
		}
	
 }

}
	
	document.onclick=clearAll;

