


function FormatNumber(num,decimalNum,bolLeadingZero,bolParens,bolCommas)
{
if (isNaN(parseInt(num))) return "NaN";

var tmpNum = num;
var iSign = num < 0 ? -1 : 1; 


tmpNum *= Math.pow(10,decimalNum);
tmpNum = Math.round(Math.abs(tmpNum))
tmpNum /= Math.pow(10,decimalNum);
tmpNum *= iSign; 
var tmpNumStr = new String(tmpNum);


if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
if (num > 0)
tmpNumStr = tmpNumStr.substring(1,tmpNumStr.length);
else
tmpNumStr = "-" + tmpNumStr.substring(2,tmpNumStr.length);


if (bolCommas && (num >= 1000 || num <= -1000)) {
var iStart = tmpNumStr.indexOf(".");
if (iStart < 0)
iStart = tmpNumStr.length;

iStart -= 3;
while (iStart >= 1) {
tmpNumStr = tmpNumStr.substring(0,iStart) + "," + tmpNumStr.substring(iStart,tmpNumStr.length)
iStart -= 3;
}
}


if (bolParens && num < 0)
tmpNumStr = "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";

var spStr = tmpNumStr.split('.');
if(spStr.length< 2)
	tmpNumStr = tmpNumStr + ".00";

if(spStr.length > 1)
{
	var spStrtwo = spStr[1];
	if(spStrtwo.length<2)
		tmpNumStr = tmpNumStr + "0";
}

return tmpNumStr; 
}


	function moControl()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "block";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		

		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";
		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";

		var str = "MyInfo";		
		var str1 = str.toLowerCase();
		var str2 = location.href;
		var str3 = str2.toLowerCase();		
		if(str3.indexOf(str1)==-1) 
		{
			moLook();		
		}
				
       		 else
		{
			moLookdef();	
		}
		
	}

	function qqControl()
	{		
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "block";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		

		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";
		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";
	}

	function my91Control()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		
		
		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "block";

		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";
	}


	function SafeIDControl()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		
		
		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";

		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "block";
	}

	function perControl()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		
		document.all.perRebate.style.display = "block";

		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";
		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";

		var str = "MyInfo";		
		var str1 = str.toLowerCase();
		var str2 = location.href;
		var str3 = str2.toLowerCase();
		if(str3.indexOf(str1)==-1) 
		{
			perLook();		
		}		
        else
		{
			perLookdef();	
		}

	}	



	function soCardControl()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "none";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		

		if(null != document.all.soCard)
			document.all.soCard.style.display = "block";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";
		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";
	}


	function soSkypeControl()
	{
		document.all.moVal.style.display = "none";
		document.all.moRebate.style.display = "none";
		document.all.qqVal.style.display = "none";
		document.all.qqVal.style.display = "none";
                if(null!=document.all.SkypeVal)
		document.all.SkypeVal.style.display = "block";
		document.all.perVal.style.display = "none";
		document.all.perRebate.style.display = "none";
		

		if(null != document.all.soCard)
			document.all.soCard.style.display = "none";
		if(null != document.all.my91Val)
			document.all.my91Val.style.display = "none";
		if(null != document.all.SafeID)
			document.all.SafeID.style.display = "none";
		CheckSkypeCategroy('gn');
		document.getElementById("gncard").checked = true;
	}



    function CheckSkypeCategroy(str)
    {   
        var displayVal = "";
        var typeVal = "";
        if(str == "gn")
        {   
            displayVal = "<select onchange='SkypeTypeChange(this.value)' id='ddlskypeType' style='width:90%'><option value='国内卡30分钟' selected;>国内卡30分钟</option><option value='国内卡150分钟'>国内卡150分钟</option><option value='国内卡400分钟'>国内卡400分钟</option><option value='国内卡900分钟' checked;>国内卡900分钟</option></select>"
            typeVal = "国内卡30分钟";
        }
        else if(str == "by")
        {
             displayVal = "<select onchange='SkypeTypeChange(this.value)' id='ddlskypeType' style='width:90%'><option value='大陆通400分钟包月' selected;>大陆通400分钟包月</option><option value='大陆通400分钟包季'>大陆通400分钟包季</option><option value='大陆通400分钟包年' checked;>大陆通400分钟包年</option></select>"
             typeVal = "大陆通400分钟包月";
        }
        else
        {
             displayVal = "<select onchange='SkypeTypeChange(this.value)' id='ddlskypeType' style='width:90%'><option value='国际卡0.2欧元' selected>国际卡0.2欧元</option><option value='国际卡2欧元'>国际卡2欧元</option><option value='国际卡5欧元'>国际卡5欧元</option><option value='国际卡10欧元' checked;>国际卡10欧元</option></select>"
             typeVal = "国际卡0.2欧元";
        }
        document.getElementById("SkypeType").innerHTML = displayVal;
        SkypeTypeChange(typeVal);
    }
    

    var skypeOpenUrl =""; 
    function SkypeTypeChange(typeVal)
    {
        var price = document.getElementById("SkypePrice");
        switch (typeVal)
        {
            case '国内卡30分钟':
                price.innerHTML = "<font color='red'>5.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721162220181";
                break;
            case '国内卡150分钟':
                price.innerHTML = "<font color='red'>19.20</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721162012978";
                break;
            case '国内卡400分钟':
                price.innerHTML = "<font color='red'>48.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721161832869";
                break;
            case '国内卡900分钟':
                price.innerHTML = "<font color='red'>94.50</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721161517791";
                break;
            case '大陆通400分钟包月':
                price.innerHTML = "<font color='red'>33.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080814120340343";
                break;
            case '大陆通400分钟包季':
                price.innerHTML = "<font color='red'>93.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080814120122156";
                break;
            case '大陆通400分钟包年':
                price.innerHTML = "<font color='red'>312.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080814120335031";
                break;
			case '国际卡0.2欧元':
                price.innerHTML = "<font color='red'>1.95</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721160830041";
                break;
            case '国际卡2欧元':
                price.innerHTML = "<font color='red'>19.20</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721160601619";
                break;
            case '国际卡5欧元':
                price.innerHTML = "<font color='red'>48.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721160336775";
                break;
            case '国际卡10欧元':
                price.innerHTML = "<font color='red'>96.00</font>元";
                skypeOpenUrl = "http://mall.5173.com/Sale/Order.aspx?ProductID=PR080721160047509";
                break;
        }
    }

    function OpenSkypeOrderUrl()
    {
      
       window.open(skypeOpenUrl,"_blank");;
    }


	function moLook()
	{
		document.getElementById("catalogtop1").options[document.getElementById("catalogtop1").selectedIndex].text="中国";
		document.all.Select1.value="100";	
		if(document.getElementById("moArea"))
		{
			document.getElementById("moArea").innerText= document.getElementById("catalogtop1").options[document.getElementById("catalogtop1").selectedIndex].text;
		}	
		else
		{
			document.getElementById("Default1_moArea").innerText= document.getElementById("catalogtop1").options[document.getElementById("catalogtop1").selectedIndex].text;
		}	
	    
	    	if(document.getElementById("moMoney"))
		{
			document.getElementById("moMoney").innerText= document.all.Select1.value;	
		}
		else
		{
			document.getElementById("Default1_moMoney").innerText= document.all.Select1.value;	
		}
		    
	    if(document.all.Select1.value == 50)
	        document.getElementById("wushi").checked=true;
	    if(document.all.Select1.value == 100)
	       document.getElementById("yibai").checked=true;
	    if(document.all.Select1.value == 300)
	       document.getElementById("sanbai").checked=true;
	     if(document.all.Select1.value == 500)
	       document.getElementById("wubai").checked=true;
	    
	   // if(document.getElementById("quickFill"))
//	    {
//		document.getElementById("quickFill").innerText = FormatNumber(document.all.Select1.value * 0.98,2,false,false,true);
//	    }
//	    else
//	    {
//		document.getElementById("Default1_quickFill").innerText = FormatNumber(document.all.Select1.value * 0.982,2,false,false,true);
//	    }
//	    
//
//	    if(document.getElementById("slowFill"))
//	    {
//		 document.getElementById("slowFill").innerText =  FormatNumber(document.all.Select1.value * 0.95,2,false,false,true);
//	    }
//	    else
//	    {
//		document.getElementById("Default1_slowFill").innerText =  FormatNumber(document.all.Select1.value * 0.95,2,false,false,true);
//	    }
//	   
		if(document.all.moVal)
		{
			document.all.moVal.style.display = "none";
		}
		else
		{
			document.all.Default1_moVal.style.display = "none";
		}
		
		if(document.all.moRebate)
		{
			document.all.moRebate.style.display = "block";
		}
		else
		{
			document.all.Default1_moRebate.style.display = "block";
		}
		
	}

	function perLook()
	{
	    
		
		if(document.getElementById("perArea"))
		{
			document.getElementById("perArea").innerText= document.getElementById("Select3").options[document.getElementById("Select3").selectedIndex].text;
		}
		else
		{
			document.getElementById("Default1_perArea").innerText= document.getElementById("Select3").options[document.getElementById("Select3").selectedIndex].text;
		}
		
		if(document.getElementById("perMoney"))
		{
			document.getElementById("perMoney").innerText= document.all.Select4.value;
		}
		else
		{
			document.getElementById("Default1_perMoney").innerText= document.all.Select4.value;
		}
	    
	    
	    if(document.all.Select4.value == 15)
	        document.getElementById("wmwushi").checked=true;
	    if(document.all.Select4.value == 30)
	       document.getElementById("wmyibai").checked=true;
	    if(document.all.Select4.value == 50)
	       document.getElementById("wmsanbai").checked=true;
	     if(document.all.Select4.value == 100)
	       document.getElementById("wmwubai").checked=true;
	    
	    if(document.getElementById("perQuickFill"))
	    {
		document.getElementById("perQuickFill").innerText = FormatNumber(document.all.Select4.value * 0.89,2,false,false,true);
	    }
	    else
   	    {
		document.getElementById("Default1_perQuickFill").innerText = FormatNumber(document.all.Select4.value * 0.89,2,false,false,true);
	    }
	    
	    if(document.getElementById("perSlowFill"))
	    {
		document.getElementById("perSlowFill").innerText = FormatNumber(document.all.Select4.value * 0.87,2,false,false,true);
	    }
	    else
	    {
		document.getElementById("Default1_perSlowFill").innerText = FormatNumber(document.all.Select4.value * 0.87,2,false,false,true);
	    }

 	    if(document.all.perVal)
	    {
		document.all.perVal.style.display = "none";
	    }
	    else
	    {
		document.all.Default1_perVal.style.display = "none";
	    }
		
	    if(document.all.perRebate)
	    {
		document.all.perRebate.style.display = "block";
	    }
	    else
	    {
		document.all.Default1_perRebate.style.display = "block";
	    }
		
	}

	function moFillMoney(type,hr)
	{
	    if(document.all.wushi.checked==false && document.all.yibai.checked==false && document.all.sanbai.checked==false && document.all.wubai.checked==false)
	        {
	            alert("请选择冲值卡金额");
	            return;
	        }
	    
	    
	    if(type == 'quick')
	        document.getElementById("myFormType").value= '1';
	    if(type == 'slow')
	        document.getElementById("myFormType").value= '0';

	    if(document.getElementById("moMoney"))
	    {
		document.getElementById("myFormMoney").value = document.getElementById("moMoney").innerText;
	    }
	    else
	    {
		document.getElementById("myFormMoney").value = document.getElementById("Default1_moMoney").innerText;
	    }
	    
	    document.getElementById("myFormArea").value = document.getElementById("catalogtop1").value;
	    
	   
	
		
		document.all.myFillPay.action = hr + "/onlinecard/cardchongzhi1.aspx";
		
		formFillMoney();
	}

    function moChoose(rbName)
    {
	if(document.getElementById("moMoney"))
	{
		document.getElementById("moMoney").innerText= document.getElementById(rbName).value;
	}
	else
	{
		document.getElementById("Default1_moMoney").innerText= document.getElementById(rbName).value;
	}
        

	if(document.getElementById("quickFill"))
	{
		document.getElementById("quickFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.98,2,false,false,true);
	}
	else
	{
		document.getElementById("Default1_quickFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.98,2,false,false,true);	
	}
	

	if(document.getElementById("slowFill"))
	{
		document.getElementById("slowFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.95,2,false,false,true);
	}
	else
	{
		document.getElementById("Default1_slowFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.95,2,false,false,true);
	}
	    
	    
	    
        
    }

	function qqFillMoney()
	{	
		document.all.myFillPay.action = "http://www.google.com/";
		document.all.myFillMoney.style.display = "";
	}

	function perFillMoney(type,hr)
	{
	     if(document.all.wmsanbai.checked==false && document.all.wmwubai.checked==false)
	        {
	            alert("请选择冲值卡金额");
	            return;
	        }
	    
	    
	    if(type == 'quick')
	        document.getElementById("myFormType").value= '1';
	    if(type == 'slow')
	        document.getElementById("myFormType").value= '0';

	    if(document.getElementById("perMoney"))
	    {
		document.getElementById("myFormMoney").value = document.getElementById("perMoney").innerText;
	    }
	    else
	    {
		document.getElementById("myFormMoney").value = document.getElementById("Default1_perMoney").innerText;
	    }
	    
	    document.getElementById("myFormArea").value = document.getElementById("Select3").value;
	    
	    
	    
	
		var area = document.getElementById("myFormArea").value;
		if( area == '赤壁' )
			document.all.myFillPay.action= hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=cb";
		if( area == '诛仙' )
			document.all.myFillPay.action= hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=zx";
		if( area == '完美国际' )
		    document.all.myFillPay.action= hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=wmgj";
		if( area == '完美世界' )
			document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=xjqy";
		if( area == '武林外转' )
			document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=wlwz";

		
		
		formFillMoney();
	}
 function perChoose(rbName)
    {
	if(document.getElementById("perMoney"))
	{
		document.getElementById("perMoney").innerText= document.getElementById(rbName).value;
	}
	else
	{
		document.getElementById("Default1_perMoney").innerText= document.getElementById(rbName).value;
	}
        

	if(document.getElementById("perQuickFill"))
	{
		 document.getElementById("perQuickFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.89,2,false,false,true);
	}	
	else
	{
		
		 document.getElementById("Default1_perQuickFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.89,2,false,false,true);	
	}
	   

	if(document.getElementById("perSlowFill"))
	{
		document.getElementById("perSlowFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.87,2,false,false,true);
	}
	else
	{
		document.getElementById("Default1_perSlowFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.87,2,false,false,true);	
	}
	    
        
    }
	
	
	
	
	function moLookdef()
	{  	
		document.getElementById("catalogtop1").options[document.getElementById("catalogtop1").selectedIndex].text="中国";
		document.all.Select1.value="100";

	    document.getElementById("Default1_moArea").innerText= document.getElementById("catalogtop1").options[document.getElementById("catalogtop1").selectedIndex].text;
	    document.getElementById("Default1_moMoney").innerText= document.all.Select1.value;
	    
	    if(document.all.Select1.value == 50)
	        document.getElementById("wushi").checked=true;
	    if(document.all.Select1.value == 100)
	       document.getElementById("yibai").checked=true;
	    if(document.all.Select1.value == 300)
	       document.getElementById("sanbai").checked=true;
	     if(document.all.Select1.value == 500)
	       document.getElementById("wubai").checked=true;
	    
//	    document.getElementById("Default1_quickFill").innerText = FormatNumber(document.all.Select1.value * 0.98,2,false,false,true);
//	    document.getElementById("Default1_slowFill").innerText = FormatNumber(document.all.Select1.value * 0.95,2,false,false,true);
	
		
	    	if(document.all.moVal)
		{
			document.all.moVal.style.display = "none";
		}
		else
		{
			document.all.Default1_moVal.style.display = "none";
		}

		if(document.all.moRebate)
		{
			document.all.moRebate.style.display = "block";
		}
		else
		{
			document.all.Default1_moRebate.style.display = "block";
		}
		
	}
	

	function perLookdef()
	{
	    document.getElementById("Default1_perArea").innerText= document.getElementById("Select3").options[document.getElementById("Select3").selectedIndex].text;
	    document.getElementById("Default1_perMoney").innerText= document.all.Select4.value;
	    
	    if(document.all.Select4.value == 15)
	        document.getElementById("zx10").checked=true;
	    if(document.all.Select4.value == 30)
	       document.getElementById("zx30").checked=true;
	    if(document.all.Select4.value == 50)
	       document.getElementById("zx50").checked=true;
	     if(document.all.Select4.value == 100)
	       document.getElementById("zx100").checked=true;	    
	    document.getElementById("Default1_perQuickFill").innerText =FormatNumber(document.all.Select4.value * 0.89,2,false,false,true);
	    document.getElementById("Default1_perSlowFill").innerText = FormatNumber(document.all.Select4.value * 0.87,2,false,false,true);
	

	    if(document.all.perVal)
	    {
		document.all.perVal.style.display = "none";
	    }
	    else
	    {
		document.all.Default1_perVal.style.display = "none";
	    }
		

	    if(document.all.perRebate)
	    {
		document.all.perRebate.style.display = "block";
	    }
	    else
	    {
		document.all.Default1_perRebate.style.display = "block";
	    }
		
	}

	

   /* function moChoosedef(rbName)
    {
        document.getElementById("Default1_moMoney").innerText= document.getElementById(rbName).value;
	    document.getElementById("Default1_quickFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.982,2,false,false,true);
		document.getElementById("Default1_quickLimitFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.98,2,false,false,true);
	    document.getElementById("Default1_slowFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.965,2,false,false,true);
        
    }*/
	
	
	function perFillMoneydef(type,hr)
	{
	     /*if(document.all.wmsanbai.checked==false && document.all.wmwubai.checked==false)
	        {
	            alert("请选择冲值卡金额");
	            return;
	        }*/
	    
	    
	    if(type == 'quick')
	        document.getElementById("myFormType").value= '1';
	    if(type == 'slow')
	        document.getElementById("myFormType").value= '0';
	    document.getElementById("myFormMoney").value =document.getElementById("Default1_perMoney").innerText;
	    document.getElementById("myFormArea").value = document.getElementById("Select3").value;
	
		var area = document.getElementById("myFormArea").value;
		if( area == '赤壁' )
			document.all.myFillPay.action= hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=cb";
		if( area == '诛仙' )
			document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=zx";
		if( area == '完美国际' )
		    document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=wmgj";
		if( area == '完美世界' )
			document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=xjqy";
		if( area == '武林外转' )
			document.all.myFillPay.action=hr + "/onlinewmcard/wmcardchongzhi2.aspx?game=wlwz";

		
		
		formFillMoney();
	}
function perChoosedef(rbName)
   {
     document.getElementById("Default1_perMoney").innerText= document.getElementById(rbName).value;
	 document.getElementById("Default1_perQuickFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.89,2,false,false,true);
	 document.getElementById("Default1_perSlowFill").innerText = FormatNumber(document.getElementById(rbName).value * 0.87,2,false,false,true);
	 document.getElementById("perZXGFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.898,2,false,false,true);
        if(rbName=="zx30" || rbName=="zx15")
			document.getElementById("ZXNotGuanfang").style.display="none";
		if(rbName=="zx100"|| rbName=="zx50")
			document.getElementById("ZXNotGuanfang").style.display="";
   }	

function selectChoose(gameName,gameTitle)
{
	var allGamePrice = document.getElementById("PriceContainer").childNodes;
	var allGameRef =document.getElementById("RefContainer").childNodes;
	for(var i=0;i<allGamePrice.length;i++)
	{	
		document.getElementById(allGamePrice[i].id).style.display="none";
	}
	for(var i=0;i<allGameRef.length;i++)
	{	
		document.getElementById(allGameRef[i].id).style.display="none";
	}
	document.getElementById(gameName).style.display="";
	document.getElementById("show"+gameTitle).style.display="";
}


function preChooseZT(rbName)
{
	document.getElementById("perZTFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.905,2,false,false,true);
}
function preChooseSD(rbName)
{
	document.getElementById("perSDFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.91,2,false,false,true);
}
function preChooseSH(rbName)
{
	document.getElementById("perSHFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.91,2,false,false,true);
}
function preChooseGY(rbName)
{
	document.getElementById("perGYFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.88,2,false,false,true);
}
function preChooseJY(rbName)
{
	document.getElementById("perJYFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.88,2,false,false,true);
}
function preChooseHJD(rbName)
{
	document.getElementById("perHJDFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.86,2,false,false,true);
}
function preChooseLQ(rbName)
{
	document.getElementById("perLQFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.87,2,false,false,true);
}
function preChooseJC(rbName)
{
	document.getElementById("perJCFill").innerText=document.getElementById(rbName).value;
}
function preChooseJYK(rbName)
{
	document.getElementById("perJYKFill").innerText=document.getElementById(rbName).value;
}
function preChooseJS(rbName)
{
	document.getElementById("perJSFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.905,2,false,false,true);
}
function preChooseSJ(rbName)
{
	document.getElementById("perSJFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.895,2,false,false,true);
}
function preChooseWYU(rbName)
{
	document.getElementById("perWYUFill").innerText=document.getElementById(rbName).value;
}
function preChooseZH(rbName)
{
	document.getElementById("perZHFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.89,2,false,false,true);
}
function preChooseWY(rbName)
{
	document.getElementById("perWYFill").innerText=document.getElementById(rbName).value;
}
function preChooseWM(rbName)
{
	document.getElementById("perWMFill").innerText=document.getElementById(rbName).value;
}
function preChooseRXJH(rbName)
{
	document.getElementById("perRXJHFill").innerText=FormatNumber(document.getElementById(rbName).value * 0.88,2,false,false,true);
}
function refHandle(radName)
{
	var proId;
	var childRad=document.getElementsByName(radName);
	for(var i=0;i<childRad.length;i++)
	{
		if(childRad[i].checked==true)
		{
			proId=childRad[i].title;
		}
	}	
	if(proId!="")
	{
		if(proId=='PR200810291167575097')
		{
			window.open("http://mall.5173.com/Sale/order.aspx?ProductID="+proId);
		}
		else
		{
			window.open("http://mall.5173.com/Sale/QuickPay.aspx?ProductID="+proId);
		}
	}
	else
	{
		alert("请选择冲值卡金额！");
	}
}
var quickSpecial =["内蒙古","黑龙江","吉林","青海","甘肃","新疆","西藏","宁夏","重庆","安徽","江西","云南","贵州","海南","湖南"];
var quickArea=["北京","上海","山东","江苏","辽宁","河北","河南","福建","天津","浙江","陕西","山西","四川","广东","内蒙古","黑龙江","吉林","陕西","青海","甘肃","新疆","西藏","宁夏","重庆","安徽","江西","湖北","湖南","云南","贵州","广西","海南"];
var quickLimitArea=["北京","上海","江苏","河南","广西","湖北"];
var slowArea=["北京","上海","浙江","江苏","广东","河南","广西","湖北","天津","四川"];
function areaChange(areaName)
{
	document.getElementById("mo_quick").style.display="none";
	//document.getElementById("mo_quickLimit").style.display="none";
	document.getElementById("mo_slow").style.display="none";
	for(var i=0;i<quickArea.length;i++)
	{
		if(areaName==quickArea[i])
		{
			document.getElementById("mo_quick").style.display="";
		}
		continue;
	}
	for(var i=0;i<slowArea.length;i++)
	{
		if(areaName==slowArea[i])
		{
			document.getElementById("mo_slow").style.display="";
		}
		continue;
	}
	for(var i=0;i<quickSpecial.length;i++)
	{
		if(areaName == quickSpecial[i]){
			document.getElementById("mo_Money").options[0].title="PR200812112006391097";
			document.getElementById("mo_Money").options[1].title="PR200812122051670097";
			if(document.getElementById('mo_Money').options[document.getElementById('mo_Money').selectedIndex].id =="yibai"){
				document.getElementById("Default1_quickFill").innerText="98.50";
			}else{
				document.getElementById("Default1_quickFill").innerText="49.25";
			}
			return;
		}else{
			for(var j=0;j<quickLimitArea.length;j++){
				if(areaName ==quickLimitArea[j]){
					if(document.getElementById('mo_Money').options[document.getElementById('mo_Money').selectedIndex].id =="yibai"){
						document.getElementById("Default1_quickFill").innerText="98.00";
					}else{
						document.getElementById("Default1_quickFill").innerText="49.00";
					}
					return;
				}else{
					document.getElementById("mo_Money").options[0].title="PR200810311323661097";
					document.getElementById("mo_Money").options[1].title="PR200810311323718097";
					if(document.getElementById('mo_Money').options[document.getElementById('mo_Money').selectedIndex].id =="yibai"){
						document.getElementById("Default1_quickFill").innerText="98.20";
					}else{
						document.getElementById("Default1_quickFill").innerText="49.10";
					}
				}}
		}
	}
}
function moFillMoneydef(type,hr,areaName)
{
	var isKuaiqian = true;
	for(var i=0;i<quickLimitArea.length;i++){
		if(areaName ==quickLimitArea[i]){
			isKuaiqian = false;
		}
	}
	if(type == 'slow')
		document.getElementById("myFormType").value= '0';
	if(type == 'quickLimit')
		document.getElementById("myFormType").value= '1';
	if(type == 'quick' && isKuaiqian==false)
		document.getElementById("myFormType").value= '1';
		
	document.getElementById("myFormMoney").value =  document.getElementById("Default1_moMoney").innerText;
	document.getElementById("myFormArea").value = document.getElementById("catalogtop1").value;
	
	if(type == 'quickLimit' || type=='slow')
		document.all.myFillPay.action = "http://www.5173.com/onlinecard/cardchongzhi1.aspx";
	if(type=='quick' && isKuaiqian==true)
		document.all.myFillPay.action="http://mall.5173.com/Sale/Order.aspx?ProductID="+hr;
	if(type=='quick' && isKuaiqian==false)
		document.all.myFillPay.action = "http://www.5173.com/onlinecard/cardchongzhi1.aspx";
	formFillMoney();
}
function moChoosedef(rbName,areaName)
{
	document.getElementById("Default1_moMoney").innerText= document.getElementById(rbName).value;
	document.getElementById("Default1_slowFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.960,2,false,false,true);
	for(var i=0;i<quickSpecial.length;i++)
	{
		if(areaName == quickSpecial[i]){
			document.getElementById("Default1_quickFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.985,2,false,false,true);
			return;
		}else{
			for(var j=0;j<quickLimitArea.length;j++){
				if(areaName ==quickLimitArea[j]){
					document.getElementById("Default1_quickFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.980,2,false,false,true);
					return;
				}else{
					document.getElementById("Default1_quickFill").innerText =FormatNumber(document.getElementById(rbName).value * 0.982,2,false,false,true);
				}
			}
		}
	}
	
	
}