
//Test float fields to make sure they are proper floats (allows negative numbers)
function __IsNumericfloat()
{
var ValidChars = "01213456789.-";
var IsNumber = true;
var Char ;
var sText = this.value;
var numDecimals = 0;

for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
//Checks for minus sign
if (Char == '-' && i > 0)
{
IsNumber = false;
}
//Checks to make sure there is only 1 decimal point in the number
if (Char == '.')
{
numDecimals = numDecimals + 1;
}
}

if (numDecimals > 1 || IsNumber == false)
{
this.error = "The field " +
this.description + " does not contain a valid number";
}
}




