function Menu(){
	this.remember = null;
	this.checkIt;
	this.sMenuReference = "oMenu";
	this.nDisplayType = 1; //1 = Visibility, 2 = Display
	this.sShortName = null;
}

Menu.prototype.show = Menu_show;
function Menu_show(name,obj) {
	if(!DHTML){	return; }
	eval( this.sMenuReference+ ".resetCheckIt()" );
	this.sShortName = name;
	if(this.remember != null && this.remember == name) { return; }
	if(this.remember != null ){ eval( this.sMenuReference+ ".hide()" ); }

	if( this.sMenuReference == "oMenu" 
			&& name != null 
			&& name != this.sShortName ){ eval( this.sMenuReference+ ".hide()" ); }
	if(name) {
		var x = getObj('Nav_'+name+'_Layer');
		switch( this.nDisplayType  ){
			case 2: x.style.display = 'inline'; break;			
			default: x.style.visibility = 'visible'; /*alert( "Menu.show: visibility" );*/ break;
		}
		if( this.sMenuReference == "oMenu" ){
			this.highlightMainNav( this.sShortName );
		}
	}
	this.remember = name;
//	alert( "Menu.show: this.remember = " + this.remember );
}


Menu.prototype.hide = Menu_hide;
function Menu_hide(name) {
	if( this.remember != null && this.remember != this.sShortName) {
	//	alert( "Menu.hide: 1 this.remember = " + this.remember );
		var x = getObj('Nav_'+this.remember+'_Layer');//Retrieve Layer to hide
		switch( this.nDisplayType  ){
			case 2: x.style.display = 'none'; break;			
			default: x.style.visibility = 'hidden'; break;
		}
		if( this.sMenuReference == "oMenu" ){ this.normalMainNav( this.remember ); }
	}

	if(this.remember != null ) {
	//	alert( "Menu.hide: 2 this.remember = " + this.remember );
		var x = getObj('Nav_'+this.remember+'_Layer');//Retrieve Layer to hide
		switch( this.nDisplayType  ){
			case 2: x.style.display = 'none'; break;			
			default: x.style.visibility = 'hidden'; break;
		}
		if( this.sMenuReference == "oMenu" ){ this.normalMainNav( this.sShortName );	}
	}
	this.remember = null;
}

Menu.prototype.resetCheckIt = Menu_resetCheckIt;
function Menu_resetCheckIt() {
	//alert( "Menu.resetCheckIt: this.remember = " + this.remember );
	//alert( "Menu.resetCheckIt: this.sMenuReference = " + this.sMenuReference );

	if(this.checkIt){ clearTimeout(this.checkIt); }
	this.checkIt = setTimeout(this.sMenuReference+'.hide()',60000);
}

Menu.prototype.checkUserInput = Menu_checkUserInput;
function Menu_checkUserInput() {
	if (this.checkIt){ clearTimeout(this.checkIt); }
//	alert( "Menu.checkUserInput: this.sMenuReference = " + this.sMenuReference );
	this.checkIt = setTimeout(this.sMenuReference+'.hide()',500);
}

/*CSS Handling Javascript to ensure the main navigation rollover work correctly*/
Menu.prototype.highlightMainNav = Menu_highlightMainNav;
function Menu_highlightMainNav( sElementName ){	
	var oElement = getObj("Nav_"+sElementName+"_Cell");
	oElement.style.backgroundColor="#cccccc";
	oElement.style.borderStyle="solid"; 
	oElement.style.borderWidth="1";
	oElement.style.borderTopColor="#FFFFFF";
	oElement.style.borderLeftColor="#FFFFFF"; 
	oElement.style.borderBottomColor="#FFFFFF";
	oElement.style.borderRightWidth=0; 
	oElement.style.textIndent=20;

	oElement = getObj("Nav_"+sElementName+"_Separator_Cell");
	oElement.style.backgroundColor="#cccccc";
}

Menu.prototype.normalMainNav = Menu_normalMainNav;
function Menu_normalMainNav( sElementName ){	
	var oElement = getObj("Nav_"+sElementName+"_Cell");
	oElement.style.backgroundColor="#484848";
	oElement.style.borderStyle="solid"; 
	oElement.style.borderWidth="1";
	oElement.style.borderTopColor="#484848";
	oElement.style.borderLeftColor="#484848"; 
	oElement.style.borderBottomColor="#484848";
	oElement.style.borderRightWidth=0; 
	oElement.style.textIndent=20;

	oElement = getObj("Nav_"+sElementName+"_Separator_Cell");
	oElement.style.backgroundColor="#FFFFFF";
}


var oMenu = new Menu();
var oSubMenu = new Menu();
oSubMenu.sMenuReference = "oSubMenu";
oSubMenu.nDisplayType = 2;



//////////  表格变色

function f1(obj)
{
obj.style.backgroundColor="";
}
function f2(obj)
{
obj.style.backgroundColor="BCCFE3";
}



function f3(obj,sElementName)
{
obj.style.backgroundColor="cccccc";

	var oElement = getObj("Nav_"+sElementName+"_Cell");
	oElement.style.borderWidth="1";
	oElement.style.borderTopColor="#FFFFFF";
	oElement.style.borderLeftColor="#FFFFFF"; 
	oElement.style.borderBottomColor="#FFFFFF";
	oElement.style.borderRightWidth=0; 


}
function f4(obj,sElementName)
{
obj.style.backgroundColor="";
	
	var oElement = getObj("Nav_"+sElementName+"_Cell");
	oElement.style.borderWidth="0";
	oElement.style.borderTopColor="";
	oElement.style.borderLeftColor=""; 
	oElement.style.borderBottomColor="";
}



function f5(obj)
{
obj.style.backgroundColor="FFCCCC";
}
function f6(obj)
{
obj.style.backgroundColor="FF0000";
}







function f33(obj,sElementName)
{
obj.style.backgroundColor="cccccc";

}



function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//////////  表格变色



