// JavaScript Document
function AddCart(LN){
	var sheet = document.forms["sheet"];
	if(sheet.CartNum.value =="" || !checkNumber(sheet.CartNum.value)){
		alert("Please Input the Order Quantity");
		return false;
	}
	if(parseInt(sheet.CartNum.value)<1){
		alert("Please Input the Order Quantity");
		return false;
	}
	if(parseInt(sheet.CartNum.value)< LN){
		alert("Sorry,Minimum order quantity is " + LN);
		return false;
	}
	sheet.operation.value = "AddCart";
	sheet.submit();
}

function GotoVender(ProductID,url){
	if(url==''){
		return false;
	}
	var n = url.indexOf("AgentID-");
	if(n>-1){
		window.open(url.substring(n+8))
	}
	else{
		window.open('Selling.aspx?ProductID=' + ProductID + '&Guojia='+url,'','width=600,height=300')
	}
}

function SendToFrd(){
	var d = document.forms["sheet"];
	if(d.FrdEmail.value == "" || !checkEmail(d.FrdEmail.value)){
		alert("Please input correct Email");
		return false;
	}
	d.operation.value = "SendToFrd";
	d.submit();
}

function SendLog(){
	var d = document.forms["sheet"];
	d.operation.value = "SendLog";
	d.submit();
}

function shipcost(ProductID){
	window.open('/Product/ProCata/ShippingCost.aspx?ProductID=' + ProductID,'','width=600,height=500')
}