﻿// time
var ns,ie
ns = (document.layers)? true:false
ie = (document.all)? true:false
var TimeOutID ;
function getobj(obj){
	if(typeof(obj)=="string"){
		if(ie){
			return eval("document.all."+obj+".style");
		}else if((!document.all) && document.getElementById){	//Mozilla Firefox瀏覽器用
			return eval("document.getElementById('"+obj+"').style");
		}else{
			return eval("document.obj");
		}
	}else{
		if(ie) return eval('obj.style');
		else return obj;
	}
}
function menuid(level,id){
   this.level = level;
   this.id = id;
   return this;
}
function MM_hideall(level){
	for(i=0;i<divs.length;i++){
		if(divs[i].level>=level) MM_hide(divs[i].id);
	}
}
function MM_hide(objName){ //v3.0
	var obj = getobj(objName);
	obj.visibility = "hidden";
}
function MM_show(objName) { //v3.0
	var obj = getobj(objName);
	obj.visibility = "visible";
}
function swapCgColor(p_obj,p_color) {
	p_obj.bgColor=p_color;
}
function hideallTimer(p_inteval) {
	if(TimeOutID){clearTimeout(TimeOutID);}
	if(p_inteval!=-1){
		TimeOutID = setTimeout('MM_hideall(0)',p_inteval*100);
	}
}


