// JScript 文件
function GetOnlineType(ctlName)
{
      
       if(document.getElementById("PayType_0").checked)
       {
         document.getElementById('OnlinePaySelectType').style.display="";
        
       }
        else
       { 
         document.getElementById('OnlinePaySelectType').style.display="none";
       }
}

 function ShowAddress()
 {
   var address=document.getElementById("show_new_address");
   address.style.display=address.style.display=="none"?"":"none";
 }
function SelectMyChoice(sValue)
{
   var obj=document.getElementById("otherBus");
   if(sValue=="1")
      obj.style.display="block";
   else
      obj.style.display="none";
      
}


function SelectPayType(ControlID,Svalue,ItemCount)
{
  var obj;
  for(var i=0;i<ItemCount;i++)
  {
     obj=document.getElementById(ControlID+"_"+i);
     ((obj.parentNode).parentNode).className="";
  
  }
  obj=document.getElementById(ControlID+"_"+Svalue);
  ((obj.parentNode).parentNode).className="ShopBuyOnClick";
  
   
}
function refreshCode(){

  var CheckCodeObj=document.getElementById("ImgCheckCode");
  if(CheckCodeObj!=null)
  {
    CheckCodeObj.innerHTML = "<img alt='验证码' title='验证码' src='../../Passport/CheckCode.aspx?Rnd="+Math.random()+"' style='vertical-align:middle'/>";
  }
  

}
//deliver_area[0]=[["平邮","其它",18,7],["福建,广东,广西,海南",16,5],["云南,山西,山东",20,6]];
 function setAreaPrice(area){       
    var _province=area.replace("省","");
    var tableObj=document.getElementById("deliver_pay_list");   
    if(tableObj==null)return;
   
    var str ="至&nbsp;&nbsp;"+area+"<br/>";
    str+="<div style='clear:both;width:90%;padding-left:25px'>"
    
    
    for(var i=0;i<deliver_area.length;i++){ 
           var area_in=false;
           var check="";
           if(deliver_area.length==1)
           {
              check="checked";
           }
           else if(i==0)
           {
              check="checked";
           }  
           var deliver_value=deliver_area[i][0][0]+"|";
           for(var j=1;j<deliver_area[i].length;j++){
              if(deliver_area[i][j][0].indexOf(_province)>-1 ){
                 str += "<input type='radio' id='deliver_item_"+i+"' "+check+" name='deliver_payType' value='"+deliver_value + deliver_area[i][j][1] + "|" + deliver_area[i][j][2] +"'/><label for='deliver_item_"+i+"'>"+deliver_area[i][0][0]+"："+deliver_area[i][j][1]+"元,（每多一件商品加收"+deliver_area[i][j][2]+"元）</label><br/>";
                 
                 area_in=true;
                 break;
              }
             
           }
           if(!area_in){
              str += "<input type='radio' id='deliver_item_"+i+"' "+check+" name='deliver_payType' value='"+deliver_value + deliver_area[i][0][2] + "|" + deliver_area[i][0][3] + "'/><label for='deliver_item_"+i+"'>"+deliver_area[i][0][0]+"："+deliver_area[i][0][2]+"元,（每多一件商品加收"+deliver_area[i][0][3]+"元）</label><br/>";
            
           }  
    }
    str+="</div>";
  
    tableObj.innerHTML=str;
 }
 function setAreaName(SValue,id){
   var obj=document.getElementById(id);
   if(obj!=null){
      obj.value=SValue;
   
   }
 
 }
 


