

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.";
   var strChar;
   var blnResult = true;

   if (strString.length == 0)
	{
         	alert("Please specify a correct amount.")
		return false;
	}
	document.getElementById("amount").value = document.getElementById("amount").value.replace(",",".")
	strString = document.getElementById("amount").value

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if ((strValidChars.indexOf(strChar) == -1))
         {
         	alert("Please specify a correct amount.")
			blnResult = false;
         }
      }
   return blnResult;
   }



function ValidateForm(){
	
	if (document.getElementById("delivery1.Namn").value == ""){
		alert("Please specify your company name.")
		document.getElementById("delivery1.Namn").focus()
		return false
	}

	if (document.getElementById("refNo").value == "")
	{
		alert("Please specify invoice number.")
		document.getElementById("refNo").focus()
		return false
	}


	if ((IsNumeric(document.getElementById("amount").value)==false))
	{
		document.getElementById("amount").focus()
		return false
	}


	return true
 }