
function g(id){return document.getElementById(id);}
function n(name){return document.getElementsByName(name);}
function showObj(id,type){
if(type==0){g(id).style.display='none';}
else{g(id).style.display='block';}}
function getTextValue(id){
var obj=g(id);
return obj.value.Trim();}
function getRadioValue(radioObj){
var re='';
for(var i=0;i<radioObj.length;i++){
if(radioObj[i].checked){
re=radioObj[i].value;}}
return re;}
function showInfo(){
var arr=MyAjax.GetInfo().value;
if(arr.length==1){return false;}
g('span_name').innerHTML=arr[0];
g('span_address').innerHTML=arr[1];
g('span_mobile').innerHTML=arr[2];
g('span_tel').innerHTML=arr[3];
g('span_email').innerHTML=arr[4];
g('span_zipcode').innerHTML=arr[5];
var bill;
if(arr[12]=='0'){bill='无需发票';}
else{bill='发票抬头：'+arr[13]+'，发票内容：'+arr[15];}
g('span_bill').innerHTML=bill;
g('span_memo').innerHTML=arr[14];
g('span_district').innerHTML=arr[16]+arr[17]+arr[18];
g('span_address').innerHTML=arr[1];
g('span_delivertime').innerHTML=arr[19];
g('span_deliver').innerHTML=arr[20]+'，运费'+arr[21]+'元，送货时间'+arr[23]+'，'+arr[22];
g('span_payway').innerHTML=arr[24]+'，'+arr[25]+'，'+arr[26];
var total=MyAjax.GetTotalPrice().value;
var price=parseInt(total)+parseInt(arr[21]);
g('DivShowTotal').innerHTML='总价 = 商品总价：￥'+total+'元 + 运费：￥'+arr[21]+'元 = ￥'+price+'元';}
function ShowCartForConfirm(){
var re=MyAjax.ShowCart().value;
g('DivShowCart').innerHTML=re;}
function SubmitOrder(){
var re=MyAjax.CheckCartHasAny().value;
if(!re){
alert('页面超时，请重新购物！');
location.href='/index.aspx';
return;}
var arr=MyAjax.GetInfo().value;
if(arr.length==1){alert('页面超时，请重新购物！');location.href='/index.aspx';return;}
var r=MyAjax.SubmitOrder().value;
if(r!='1'){
alert(r);
return;}
location.href='/order/Succeed.aspx';}
function gobacktoReceiptInfo(){
location.href='/order/ReceiptInfo.aspx';}

