﻿//<--Start--添加商品至购物车的函数
function SetOrderForm(item_no,item_amount,item_price)
{
    var cookieString=document.cookie;
    if (cookieString.length>=4000)
    {
        alert("お客様のショッピングカート、ご注文の操作に終わり、再び買い物をした後でいっぱいです！");
    }
    else if(isNaN(item_amount)||item_amount<1)
    {
        alert("入力エラーの数！");
    }
    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("入力エラーの数！");
		window.location = "order-default.html";
	}
}
//-->End

//<--Start--删除商品至购物车的函数
function Delete(m_id, jump) {
    var confirm_delete=window.confirm("確かに、それを削除する？");
	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;
}
//-->End