// set the path to the qForms directory
	//qFormAPI.setLibraryPath("view/lib/");
		qFormAPI.setLibraryPath("view/lib/qforms/lib/");
	// this loads all the default libraries
	qFormAPI.include("*");


	//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;
			}
		}//for (i = 0; i < sText.length && IsNumber == true; i++)

		if (numDecimals > 1 || IsNumber == false)
		{
			this.error = "The field " +
			this.description + " does not contain a valid number";
		}

	} //eof

	_addValidator("IsNumericfloat",__IsNumericfloat);

   function clearText(thefield){
	  if (thefield.defaultValue==thefield.value)
	    thefield.value = ""
	} 