function validNum(str,lgt,name)
{
	if (str.length == 0) return true;
	for (var i=0; i< str.length; i++)
	{
		oneChar = str.charAt(i);
		if ("0123456789".indexOf(oneChar) == -1)
		{
			alert("This is not a valid numeric input for " + name);
			return false;
		}
	}
	if (lgt != 0 && str.length != lgt)
	{
		alert("This is not a valid numeric input for " + name);
		return false;
	}
	return true;
}
