
	function IniMenu(){
		if( Menus.length != 0 ){
			arrStr = Menus[0].split(",");
	
	/*				============	oqOD椤Su|vj		============			*/
	/*		for( i = 1 ; i <= arrStr.length-2 ; i+=2 ){
				oTD = Toolbar.rows[0].insertCell(Toolbar.rows[0].cells.length);
				oTD.style.behavior = "url(toolbar.htc)";
				oTD.style.padding = "2 14 0 6";
				oTD.name = arrStr[i+1];
				oTD.id = "m00";
				oTD.innerHTML = arrStr[i];
			}*/
	
			for( i = 1 ; i < Menus.length ; i++ ){
				arrStr = Menus[i].split(",");
				oTable = document.createElement("TABLE");
				oTable.cellSpacing = 0;
				oTable.cellPadding = 0;
				oTable.className = "Menu";
				oTable.style.borderCollapce = "collapse";
				oTable.style.display = "none";
				oTable.style.position = "absolute";
				oTable.style.x = 0;
				oTable.style.y = 0;
				oTable.style.zIndex = 3;
				oTable.id = arrStr[0];
				for( j = 1 ; j < arrStr.length ; j+=2 ){
					
					oTR = oTable.insertRow(oTable.rows.length);
					Bid = oTR.addBehavior("htc/toolbar.htc");
					oTR.name = arrStr[j+1];
					
					if( arrStr[j] == "#sep" ){
						oTD = oTR.insertCell(0);
						oTD.style.background = Toolbar.style.background;
						oTD.style.height = "3pt";
						oTD.innerHTML = "<hr name='MMHr' style='width:95%; height:1px;'>";
						oTD.colSpan = 2;
						oTR.removeBehavior(Bid);
					}else if( arrStr[j].indexOf("#") == 0 ){
						oTD = oTR.insertCell(0);
						oTD.colSpan = 2;
						oTD.innerHTML = arrStr[j].replace("#","");
						oTD.align = "center";
						oTD.disabled = true;
					}else{
						oTD = oTR.insertCell(0);
						oTD.innerHTML = arrStr[j];
						oTD.style.paddingLeft = "3pt";
						oTD.style.paddingRight = AdjustWidth + "pt";
						//oTD.nowrap = true;
						Flag = oTR.name.indexOf("#m") != -1;
						oTD = oTR.insertCell(1);
						oTD.style.width = "18px";
						oTD.align = "center";
						if( Flag ){
							oTD.innerHTML = "<font face='webdings' style='font-size:10pt;'>4</font>";
						}else{
							oTD.innerHTML = "&nbsp;";
						}
					}
				}
				document.body.appendChild(oTable);
			}
		}
	}
	var ActiveMenu = null;
	var ActiveItem = null;
	var MenuQueue = "";
	function ShowMenu( objStr, objSource, Left, Top ){
		//Nselectð_
		if( (objStr.indexOf("m") == 0) && objSource == "m00" ){
			objSel = document.getElementsByTagName("SELECT");
			if( objSel!= null ) for( i = 0 ; i < objSel.length ; i++ ) objSel[i].style.visibility = "hidden";
		}else if( objSource == "m00" ){
			objSel = document.getElementsByTagName("SELECT");
			if( objSel!= null ) for( i = 0 ; i < objSel.length ; i++ ) objSel[i].style.visibility = "visible";
		}
		
		TarObj = document.all(objStr);
		if( objSource == "m00" ){
			TempArr = MenuQueue.split( "," );
			for( i = 0 ; i < TempArr.length-1 ; i++ ){
				document.all(TempArr[i]).style.display = "none";
			}
			MenuQueue = "";
		}
		if( ActiveMenu != null ){
			if( ActiveMenu != document.all(objSource) ){
				ActiveMenu.style.display = "none";
				MenuQueue.replace( ActiveMenu.id + ",", "" );
			}
		}
		if( TarObj != null ){
			TarObj.style.display = "inline";
			TempArr = MenuQueue.split( "," );
			if( MenuQueue.indexOf( objStr + "," ) == -1 )  MenuQueue += objStr + ","
			if( Left + TarObj.clientWidth > document.body.clientWidth - 10 + window.document.body.scrollLeft ) Left -= TarObj.clientWidth + event.srcElement.parentElement.clientWidth;
			//if( Top + TarObj.clientHeight > document.body.clientHeight - 10 ) Top -= TarObj.clientHeight + event.srcElement.parentElement.clientHeight;
			TarObj.style.left = Left;
			TarObj.style.top = Top;
			ActiveMenu = document.all(objStr);
		}
	}
	function HideMenu( Flag ){
		objSel = document.getElementsByTagName("SELECT");
		if( objSel!= null ) for( i = 0 ; i < objSel.length ; i++ ) objSel[i].style.visibility = "visible";
		//Flag檺ѼơAtruejAfalseP_
		if( event.srcElement.tagName != "TR" && event.srcElement.tagName != "TD" ){
			Flag = true;
			if( event.srcElement.tagName == "IMG" && event.srcElement.src.indexOf("images/arrow.gif") != -1 ){
				Flag = false;
			}
			if( event.srcElement.tagName == "HR" && event.srcElement.name == "MMHr" ){
				Flag = false;
			}
		}else{
			TarObj = event.srcElement.parentElement;
			while( TarObj.tagName != "TABLE" ) TarObj = TarObj.parentElement;
			if( TarObj.id.indexOf("m") != 0 ) Flag = true;
		}
		if( Flag ){
			TempArr = MenuQueue.split( "," );
			for( i = 0 ; i < TempArr.length-1 ; i++ ){
				document.all(TempArr[i]).style.display = "none";
			}
			MenuQueue = "";
			//if( ActiveItem != null ) ActiveItem.className = "ItemOFF";
		}
	}
	
	function OpenHyperLink( URLstr, Target ){
		if( "blank,parent,self,top,search".indexOf( Target ) != -1 ) Target = "_" + Target;
		if( URLstr == "MemberOnly" ){
			alert( "ػݵnJ|I" );
			window.location.href = "index.php?PageID=5";
		}else if( URLstr == "MemberExclude" ){
			alert( "|ŤALksI" );
			window.location.href = "index.php";
		}else{
			window.open( URLstr, Target );
		}
	}