<%temp_shopping_order_form_show=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_shopping_order_form_show -->
<%
site.temp.shopping.cart.ReadCart()
if site.temp.shopping.cart.total=0 then
site.Error.info="购物车里没有商品！"
site.Error.location="back"
site.Error.err()
end if
%>
<style type="text/css">
<!--
body {
	background-image: url(<%=site.object(temp_shopping_order_form_show).image%>/contects_bg.jpg);
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<table align=center cellpadding='0' cellspacing='0' width='600' height='100%' background="<%=site.object(temp_shopping_order_form_show).image%>/page_bg.gif" style='padding:10px;border:1px solid #ebebeb;border-top:0px;border-bottom:0px' <%=site.object(temp_shopping_order_form_show).style%>>
<tr >
  <td width='100%' valign=top>
  <table cellpadding="0" cellspacing="0" width="600" height=100% bgcolor="#FFFFFF" style='padding:10px;border:1px solid ebebeb'>
   <tr >
     <td width='100%' valign=top>

		<table cellpadding="0" cellspacing="0" width="600" bgcolor="#FFFFFF">
				<tr>
					<td height="140" width="150" align=center><img hspace="10" align=absmiddle border="0" src="<%=site.object(temp_shopping_order_form_show).image%>/link.gif" ></td>
					<td height="140" align="center"><img border="0" src="<%=site.object(temp_shopping_order_form_show).image%>/order_title02.gif" width="333" height="87"></td>
				</tr>
		</table>
		
		<table align=center cellpadding='0' cellspacing='0' width='600' height='20' <%=site.object(temp_shopping_order_form_show).style%>>
		<tr >
		  <td width='100%' bgcolor=#ffffff>
		<form name='order' method='post' action=do.asp?tr=shopping|order|check >
<%

site.temp.shopping.cart.ReadCart()

%>

<%

site.object(temp_shopping_order_form_show).object_include(temp_shopping_order_form_show)

%>	
		<table align=center cellpadding='0' cellspacing='0' bgcolor="#FFFFFF" width='600' height='60' style="padding-left:8px;" <%=site.object(temp_shopping_order_form_show).style%>>
		<tr >
		  <!--<td width='20%' style='padding-left:15'><input type=hidden name=id_cart ><input type=button value=全选 onclick="javascript:selectall();"> <input type=button value=全不选 onclick="javascript:cannelall();"> </td>//-->
		  <td width='100%' align=right>
		  <input type=image hspace="10" align=absmiddle onclick='window.close()' alt="关闭此页面！" border="0" src="<%=site.object(temp_shopping_order_form_show).image%>/cart01.gif" >
		  <a href="do.asp?tr=shopping|check"><img hspace="0" align=absmiddle alt="返回上一步"  border="0" src="<%=site.object(temp_shopping_order_form_show).image%>/back.gif" ></a>
		  <img style='CURSOR: hand' onclick='ordersubmit();' type=image hspace="10" align=absmiddle alt="下一步"  border="0" src="<%=site.object(temp_shopping_order_form_show).image%>/next.gif">
		  </td>
		</tr>
		</table>
		</form>

		</td>
		</tr>
		</table>

	  </td>
	</tr>
	</table>
  </td>
</tr>
</table>
<script language=javascript>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}

function checkorderinfo()
{

 if(document.order.buyer_email.value.length!=0)
  {
    if (document.order.buyer_email.value.charAt(0)=="." ||        
         document.order.buyer_email.value.charAt(0)=="@"||       
         document.order.buyer_email.value.indexOf('@', 0) == -1 || 
         document.order.buyer_email.value.indexOf('.', 0) == -1 || 
         document.order.buyer_email.value.lastIndexOf("@")==document.order.buyer_email.value.length-1 || 
         document.order.buyer_email.value.lastIndexOf(".")==document.order.buyer_email.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.order.buyer_email.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.order.buyer_email.focus();
   return false;
   }

   if(checkspace(document.order.buyer_realname.value)) {
	document.order.buyer_realname.focus();
    alert("对不起，请填写真实姓名！");
	return false;
  }
  if(checkspace(document.order.buyer_address.value)) {
	document.order.buyer_address.focus();
    alert("对不起，请填写收货人详细收货地址！");
	return false;
  }
  if(checkspace(document.order.buyer_postcode.value)) {
	document.order.buyer_postcode.focus();
    alert("对不起，请填写邮编！");
	return false;
  }
  if(document.order.buyer_postcode.value.length!=6) {
	document.order.buyer_postcode.focus();
    alert("对不起，请正确填写邮编！");
	return false;
  } 
    if(checkspace(document.order.buyer_telnumber.value)) {
	document.order.buyer_telnumber.focus();
    alert("对不起，请留下您的联系电话！");
	return false;
  }
    if(checkspace(document.order.buyer_age.value)) {
	document.order.buyer_age.focus();
    alert("对不起，请留下您的年龄！");
	return false;
  }
	return true;
}

function ordersubmit(){
if(checkorderinfo())
order.submit()
}

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

</script>