<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head xmlns="">
        <title>购物车信息-{#YXShopRivetTag*网站名称#}-{#YXShopRivetTag*网站标题#}</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta content="{#YXShopRivetTag*网站关键字#}" name="keywords" />
        <meta content="{#YXShopRivetTag*网站描述#}" name="description" />
        <link href="{#YXShopRivetTag*网站虚拟路径#}favicon.ico" rel="shortcut icon" />
        <link href="{#YXShopRivetTag*网站虚拟路径#}templates/yxshop_template/green/css/yxshop_main.css" type="text/css" rel="stylesheet" />
        <link href="{#YXShopRivetTag*网站虚拟路径#}templates/yxshop_template/green/css/yxshop_head.css" type="text/css" rel="stylesheet" /><script type="text/javascript" src="{#YXShopRivetTag*网站虚拟路径#}scripts/prototype.js"></script><script type="text/javascript" language="javascript">
function AbuthDle()
{
    if(confirm("删除后将不可再恢复，您确认要删除所选择吗？"))
    {
        var strID = document.getElementsByName("ShoppCartID");
        var j=0;
        for(var i=0;i<strID.length;i++)
        { 
            if(strID[i].checked)
            { 
                var param = "Option=del&id=" + strID[i].value;
                var options={
                method:'post',
                parameters:param,
                onComplete:
                function(transport)
                {
                   
                }}
                new  Ajax.Request('shoppingcart.aspx',options);
            }
        }
       window.location.reload();
    }
}
function UpdataShoppCart(Count,ID,ProductId)
{
    var reg=/[\D]/g; 
    if(reg.exec(Count)) 
    {
        alert("修改数量必须是数字");
        return false;
    }
    if(Count<=0)
    {
       alert("修改数量不能小于或等于零!");
       return false;
    }
    var param = "Option=MofiyInfo&productcount=" + Count+ "&id="+ID+"&productId="+ProductId;
    var options={
        method:'post',
        parameters:param,
        onComplete:
        function(transport)
	    {
	        var retv=transport.responseText;
	        if(retv=="ok")
	        {
	           alert("购买商品数量超过了商品库存数量，请重新填写");
	        }
            window.location.reload();
		}     
	  }
	new  Ajax.Request('shoppingcart.aspx',options);
}
function backstrs(res)
{
   document.getElementById("ShopInfo").innerHTML=res.value;  
}

function SubmitOrders(id,Tyid)
{
   SendAjax("SubmitOrders",id,Tyid);
}
function SendAjax(op,id,Tyid)
{
    var param = "Option="+ op;
    var options={
        method:'post',
        parameters:param,
        onComplete:
        function(transport)
	    {
	      var retv=transport.responseText;
		  window.location.href=retv+"?MeId=" + id+ "&MeTyId="+Tyid+""
		}     

	  }
	new  Ajax.Request('ShoppingCart.aspx',options);
}
function SelectAll(tempControl)
{
      var theBox=tempControl;
      xState=theBox.checked;    
      elem=theBox.form.elements;
      for(i=0;i<elem.length;i++)
      if(elem[i].type=='checkbox' && elem[i].id!=theBox.id)
      {
        if(elem[i].checked!=xState)
           elem[i].click();
                        
      }
}   
    </script>
    </head>
    <body xmlns="">
        <div id="Div1">
        <p>{#YXShopDefinTag*网站头部#}</p>
        <ul class="shop2">
            <li>立即购买，还是再三犹豫？购物车令您方便选购物品。</li>
        </ul>
        <ul class="shop3">
            <li class="shop3-1"><!--<input id="chall" type="checkbox" onclick="SelectAll(chall)" />--></li>
            <li class="shop3-2">物品图片</li>
            <li class="shop3-3">物品名称</li>
            <li class="shop3-4">市场价</li>
            <li class="shop3-4">商城价</li>
            <li class="shop3-5">数量</li>
            <li class="shop3-5">小计（元）</li>
        </ul>
        <div>{#YXShopDefinTag*购物车1信息#}</div>
        </div>
        <div id="copyright">
        <ul>{#YXShopDefinTag*易想资讯#} </ul>
            </div>
            <p>{#YXShopDefinTag*网站底部#}</p>
        </body>
    </html>
