//<--Start--添加商品至购物车的函数
function SetOrderForm(item_no,item_amount,item_price)
{
    var cookieString=document.cookie;
    if (cookieString.length>=4000)
    {
        alert("Your shopping cart is full！");
    }
    else if(isNaN(item_amount)||item_amount<1)
    {
        alert("Please enter correct count！");
    }
    else
    {
		window.location = "order-add-"+ item_no +"-"+ item_amount +"-"+ item_price +".html";
    }
}
//-->End

//<--Start--添加商品至购物车的函数
function updQty(m_id, m_nums, jump) {
	var code=/^[0-9]*$/;
	if (code.test(m_nums) && (m_nums != ''))
	{
		window.location = "order-operation-"+ m_id +"-"+ m_nums +"-"+ jump +".html";
	} else {
        alert("Fill in the number of errors!");
		window.location = "order-default.html";
	}
}
//-->End

//<--Start--删除商品至购物车的函数
function Delete(m_id, jump) {
    var confirm_delete=window.confirm("Are you sure Delete?");
	if (confirm_delete)
	{
		window.location = "order-del-"+ m_id +"-"+ jump +".html";
	}
}
//-->End

//<--Start--清除表单
function ResClear () {
	document.getElementById("txtName").value = "";
	document.getElementById("txtAddress").value = "";
	document.getElementById("txtCode").value = "";
	document.getElementById("txtPhone").value = "";
	document.getElementById("txtEmail").value = "";
	document.getElementById("textarea").value = "";
	return false;
}
//<--Start--添加商品至购物车的函数
function updCompare(m_id) {
		window.location = "product-add-"+ m_id +".html";
}
//-->End
