//<!--
function NewWindow(mypage, myname, w, h, scroll)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function checkInputValidity (iQuantityNo)
{
	sQuantityName = 'quantity' + iQuantityNo;
	var errors = new String();

	if (document.getElementById(sQuantityName).value == "") {
		errors = "Please provide a quantity\n\n";
	} else if (isNaN(document.getElementById(sQuantityName).value)) {
		errors = "The quantity must be a number";
	} else if (document.getElementById(sQuantityName).value < 1) {
		errors = "The quantity must be more than 0";
	}
	if (errors != "") {
		alert(errors);
		return false;
	}
}
// -->