function Trim(strToTrim) {
	return(strToTrim.replace(/^\s+|\s+$/g, ''));
}
function checkQty(abc) {
	if (abc.qty.length) {
		for(i=0;i<abc.qty.length;i++) {
			if (abc.qty[i].value.length==0 || Trim(abc.qty[i].value)=="") abc.qty[i].value=0;
			if (abc.qty[i].value.length==0 || isNaN(abc.qty[i].value) || abc.qty[i].value<0) {
				alert("Please enter a quantity greater than zero.");
				abc.qty[i].focus();
				return false;
			}
		}
	} else {
		if (abc.qty.value.length<0) abc.qty.value=0;
		if (abc.qty.value.length==0 || isNaN(abc.qty.value) || abc.qty.value<0) {
			alert("Please enter a quantity greater than zero.");
			abc.qty.focus();
			return false;
		}
	}
	return true;
}

