
// General Mainly Wine & Whisky product functions - developed by estona.com



// Product preview functions

function elitaProPrdAdd1(prdQuantity){
	if (prdQuantity.value<1){
		prdQuantity.value=1;
	}
	else {
		prdQuantity.value++;
	}
}

function elitaProPrdDel1(prdQuantity){
	if (prdQuantity.value<=2){
		prdQuantity.value=1;
	}
	else {
		prdQuantity.value--;
	}
}

function elitaProPrdQuantChk(prdQuantity){
	//prdQuantity.value = prdQuantity.value.replace(/^\s*/, "").replace(/\s*$/, ""); // Trim string Left and Right. Not needed with parseInt
	prdQuantity.value = parseInt(prdQuantity.value); // Convert to an int, converts to 'NaN' if not a number

	if (prdQuantity.value<=1 || prdQuantity.value=='NaN'){
		prdQuantity.value=1;
	}
}

function tempOrderMsg(){
	alert("Sorry but online ordering has been temporarily disabled while we upgrade our systems.\n\nIt will be available again very soon. Our apologies for any inconvience.\n\nIn the mean time please call the shop and we will be happy to take your order over the phone.");
}

function viewCart(){
	document.location.href='hypercaper/ecom/view-cart.php';
}