function ValidateField(objField, blnRequired, blnNum, strFieldName)
{

var blnHold = true;
var strValue = objField.value;
if (blnRequired && strValue.length == 0)
	{
	blnHold = false;
	alert(strFieldName + " was left blank.\nThis field is required for registration");
	objField.focus();
	}
if (blnHold && blnNum == 1 && strValue.length > 0)
	{
//Regular Expression
phoneNum='^[(]{0,1}[0-9]{3}[ ]{0,1}[)+-.]{0,1}[ ]{0,1}[0-9]{3}[ ]{0,1}[+-.]{0,1}[ ]{0,1}[0-9]{4}$';
  myReg=new RegExp(phoneNum);

	if(!myReg.test(strValue))
		{
		blnHold = false;
		alert(strFieldName + " must be numeric,\n Eg.\n (333) 333 - 3333\n 333+333+3333\n 333.333.3333");
		objField.focus();
		}
	}
if (blnHold && blnNum == 2 && strValue.length > 0)
	{
//Regular Expression,,, this is the E Mail
emails='^[-a-zA-Z0-9_+.]{1,40}[@]{1}[a-zA-Z0-9]{2,40}[.]{0,1}[a-zA-Z0-9]{0,40}[.]{1}[a-zA-Z]{2,4}$';
  myReg=new RegExp(emails);

	if(!myReg.test(strValue))
		{
		blnHold = false;
		alert(strFieldName + " must be as\n Ex: john@doe.com");
		objField.focus();
		}
	}
return blnHold;
}


function ValidateForm()
{
var blnHold = true;
blnHold = ValidateField(document.getElementById("company"), true, 0, "Your Company Name field");
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("fname"), true, 0, "Your Contact Name field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("Phone"), true, 1, "Your Phone Number field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("city"), true, 0, "Your City field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("prov"), true, 0, "Your Prov/State field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("country"), true, 0, "Your Country field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("email"), true, 2, "Your E-mail field");
	}
if (blnHold)
	{
	blnHold = ValidateField(document.getElementById("annualusage"), true, 0, "Your Approx Annual Usage field");
	}
return blnHold;
}