var lastobj = null;
var topobj;
function showdiv(obj){
	var oldobj = obj;
	if(!obj){
		if(lastobj)lastobj.style.display = 'none';
		return;
	}
	
	var divname = obj.childmenu;
	var obj = document.getElementById(divname);
	if(obj){
		if(lastobj)	lastobj.style.display = 'none';
		obj.style.display = '';
		lastobj = obj;
	}
	topobj=oldobj///////////////////////当前主菜单项
	oldobj.className="menu2"//显示框框
}
function checkRange(obj){
	var toObj = event.toElement;
	if(toObj&&toObj.childmenu==obj.id)return;
	while(toObj){
		if(toObj==obj)
			return;
		toObj = toObj.parentElement;
	};topobj.className="menu"//隐藏框框
	showdiv(null)
}
function checkRangeA(obj){
	var toObj = event.toElement;
	while(toObj){
		if(toObj==document.getElementById(obj.childmenu))
			return;
		toObj = toObj.parentElement;
	}
	showdiv(null);
	topobj.className="menu"//隐藏框框
}
function over(obj){
	obj.style.backgroundColor="#B9D2F8"
	obj.style.cursor="hand";
}function out(obj){
	obj.style.backgroundColor=""
}function ov2(obj){
	obj.className="menu2";
}function ou2(obj){
	obj.className="menu";
}
