<!--
function validatequantity(f, bOption) {
// Check Quanty. if Null Alert
		   if (f.elements["iQTY"].value == "") {
		    f.elements["iQTY"].focus();
		    alert("Quanity must be a Number")
		    return false;
		  }
		  if (!isInteger(f.elements["iQTY"].value)) {
			f.elements["iQTY"].focus();
		 	alert("Quanity must be a Number")
		    return false;
		 }	
		 if (bOption == true || bOption == "NONE"){	
			if (f.elements["ProductOption"].value == "") {
				f.elements["ProductOption"].focus();
				alert("Must Choose an option")
				return false;
			}
		}
	return true;
}

// Checks to see if the value is an Integer
// Dependent functions are "isEmpty, isDigit"
function isInteger(s){
   var i;

    if (isEmpty(s)) 
       if (isInteger.arguments.length == 1) return false;
       else return (isInteger.arguments[1] == true);

    // Search through string's characters one by one
    // until we find a non-numeric character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if (!isDigit(c)) return false;
    }

    // All characters are numbers.
    return true;
}
// Check whether string s is empty.
function isEmpty(s){   
	return ((s == null) || (s.length == 0))
}


// Returns true if character c is a digit 
// (0 .. 9).
function isDigit(c){ 
	 return ((c >= "0") && (c <= "9"))
}


//-->
