	//document.write('<script type=\'text\/javascript\'> document.domain = \'woniu.com\';  <\/script>');
	//document.domain = 'woniu.com';;
	
	function debug(msg){
		//console.log(msg);
	}

	function isStringEmpty(str){
		return (str == null || str == undefined || str == "" || str == " ");
	}

	var request = null;
	if(window.XMLHttpRequest){
		request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject){
		try{
			request=new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				request=new ActiveXObject("Microsoft.XMLHTTP")
			}catch(e){
				request=false;
			}
		}
	};

	// Try to include page that url located.
    function include(url, func){
        if(request){
            request.onreadystatechange=func;
            request.open("GET",url,false);
            request.send(null);
        }
    }

    function includeCopyright(){
        if(request.readyState==4){
			var display = document.getElementById("copyright");
            var str=request.responseText;
            display.innerHTML=str;
        }
    }

	// Highlight element by image background.
	function highlight(elementId, imagePath, repeat){
		he = document.getElementById(elementId);
		//console.log(he);
		if(he == null || he == undefined){
			//console.log("No hight element");
			return;
		}
		//console.log(imagePath + repeat);
		he.style.background="url(" + imagePath + ") " + repeat + " ";
	}

	//@deprecated. Get message by Ajax
	function getMessage(url, func){
        if(request){
            request.onreadystatechange=func;
            request.open("GET",url,true);
            request.send(null);
        }
	}

	function submitForm(formId){
		//console.log("");
		document.getElementById(formId).submit();
	}

	function submitFormToNewWindow(formId){
		var f = document.getElementById(formId);
		f.target="_blank";
		f.submit();
	}


	/**
	 * Redirect to new URL.
	 */
	function redirect(url){
		document.location=url;
	}

	/**
	 * Open to new URL in new window.
	 */
	function openWindow(url){
		window.open(url);
	}

	function closeWindow(){
		window.close();
	}

	function setCookieValue(name, value){
		document.cookie = name + "=" + value;
	}

	function getCookieValue(name){
		var allCookies = document.cookie;
		var markPos = allCookies.indexOf(name+"=");
		if(markPos!=-1){
			var start = markPos + name.length + 1;
			var end = allCookies.indexOf(";", start);
			if(end == -1) end = allCookies.length;
			var value = allCookies.substring(start, end);
			return value;
		}
		return "";
	}



	function getBrowser() {
	   if(navigator.userAgent.indexOf("MSIE 6.0")>0) {
			return "MSIE6";
	   }
	   if(navigator.userAgent.indexOf("MSIE")>0) {
			return "MSIE7";
	   }
	   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
			return "Firefox";
	   }
	   if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
			return "Safari";
	   }
	   if(isCamino=navigator.userAgent.indexOf("Camino")>0){
			return "Camino";
	   }
	   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
			return "Gecko";
	   }
	   return "Unknown";
	}


    function changeMessage(value){
        var centAccount = document.getElementById("centerAccount");
        var subAccount = document.getElementById("subareaAccount");
        
        
        var tableVar =  document.getElementById("traaaa");
        var tableid = document.getElementById("tableid");            
        var vr = document.getElementById("ssss");
        var sssstr = document.getElementById("sssstr");
        var right123 = document.getElementById("right123");
        
        if(value == '1'){
            
            centAccount.style.display="block";
            subAccount.style.display="none";
            
            if(tableid == null)
            {
               tableVar.style.display="none";
               vr.style.display="none";
               sssstr.style.display="none";
               right123.style.dispaly="none";  
            }
            else
            {
               tableVar.style.display="inline";
               vr.style.display="inline";  
               sssstr.style.display="inline";
               right123.style.dispaly="inline";
            }
            
            
        } else if(value == '2'){
            centAccount.style.display="none";
            subAccount.style.display="block";
            if(tableid == null)
            {
               tableVar.style.display="none";
            }
            else
            {
               tableVar.style.display="inline";
               
            }
            right123.style.dispaly="inline";
            vr.style.display="inline"; 
            sssstr.style.display="inline";
        }
    }
    
    
    function submitFormByName(formName)
    {
        if(checkDispCenter() == "2")
        {
            submitForm(formName);
        }
        else
        {
            alert("请选择充入游戏线路和分区！");
        }
    }

    function checkDispCenter()
    {
        var tableObj = document.getElementById("ssss");
        if(tableObj!=null && tableObj.style.display=="inline")
        {
           var gameRealmId = document.getElementById("gameRealmId");
           var index = gameRealmId.selectedIndex;
           if(index == 0 || gameRealmId.options[index].value=="")
           {
              return "1";
           }
        }
        return "2";
    }

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	function MM_showHideLayers() { //v9.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) 
	  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
	}

	
	//head所用js-------------------start
	var menustatus=0;   //0---关闭  2---打开
	var timeid=0;
	function showhidetool(objname,type){
		var xiala = document.getElementById('xiala');
		var yxxiala = document.getElementById('yx-xiala');
		var lbxiala = document.getElementById('lb-xiala');
		if(objname=="xiala"){
			yxxiala.style.display= "none";
			lbxiala.style.display= "none";
		}else if(objname=="yx-xiala"){
			xiala.style.display= "none";
			lbxiala.style.display= "none";
		}else{
			yxxiala.style.display= "none";
			xiala.style.display= "none";
		}
		if(document.getElementById(objname)){
			if(type=="block"){
				window.clearTimeout(timeid);
				timeid=0;
				if(menustatus==0){
					aniopen(objname);
				}
			}
			if(type=="none"){
					if(menustatus==2){
						if(timeid==0){
							timeid=window.setTimeout("aniclose('"+objname+"')",100);
						}
					}
			}			
		}
	}
	
	function aniopen(objname){
		var xialaMenu=document.getElementById(objname);
		if(xialaMenu.style.display=="none"){
			xialaMenu.style.display="block";
			menustatus=2;	
		}
	}
	
	function aniclose(objname){
		var xialaMenu=document.getElementById(objname);
		xialaMenu.style.display="none";
		menustatus=0;
	}
	//head所用js-------------------end

		
	//内页左侧所用js-------------------------start
	function showGuide(leftMenu,url){
		/*
			for(i=1;i<10;i++){
				var leftMenuNo = document.getElementById("leftMenuNo" + i);
				var leftMenuI = document.getElementById("leftMenu" + i);
				
				if(leftMenuI != null && leftMenuNo != null){
					leftMenuI.style.display="none";
					leftMenuNo.style.display="block";
				}
			}
			var leftMenuInput = document.getElementById(leftMenu);
			inputElement.style.display="none";
			leftMenuInput.style.display="block";
			if(url!=null){
					location.href=url;
			}
	**/
		var browser = getBrowser();//得到当前浏览器
		for(i=0;i<10;i++){
				var leftMenuI = document.getElementById("leftMenu" + i);
				if(leftMenuI !=null){
					if(browser=="MSIE6"||browser=="MSIE7"){
						leftMenuI.setAttribute("className","a1");
					}else{
						leftMenuI.setAttribute("class","a1");
					}
				}		
			}
			var leftMenuInput = document.getElementById(leftMenu);
			if(browser=="MSIE6"||browser=="MSIE7"){
						leftMenuInput.setAttribute("className","a2");
					}else{
						leftMenuInput.setAttribute("class","a2");
					}
			if(url!=null){
					location.href=url;
			}		
		}

	function changeClassName(objId, className){
		var ele = document.getElementById(objId);
		if(ele != null && ele != undefined){
			ele.className=className;
		}
	}
	function submitOnlyOne(imgSubmitId){
		var imgSubmitIdObj = document.getElementById(imgSubmitId);
		imgSubmitIdObj.setAttribute("onclick","");
	}

