<!--
function validateRequestForm(theForm)
{

	var strMsg = "";

  if (theForm.Name.value == "")
  {
    strMsg = "The \"Your Name\" field.\n";
  }
    
  if (theForm.Email.value == "")
  {
    strMsg += "The \"Your Email\" field.\n";
  }
  
  if (theForm.Phone.value == "")
  {
    strMsg += "The \"Your Phone Number\" field.\n";
  }
  else{
		if (theForm.Phone.value.length < 12)
		{
		  strMsg += "A valid phone number including area code.\n";
		}
	}
   
  if (theForm.URL.value == "")
  {
    strMsg += "The \"Your Web Address\" field.\n";
  }
  
  if (theForm.Type_of_Business.value == "")
  {
    strMsg += "The \"Type of Site\" field.\n";
  }
	
	if (strMsg != ""){
		strMsg = "Please enter values in these required fields.\n\n" + strMsg 
		alert(strMsg);
		theForm.Name.focus();
		return (false);
	}

  
  return (true);
}
//=========================================================
function validateContactForm(theForm)
{

	var strMsg = "";

  if (theForm.Name.value == "")
  {
    strMsg = "The \"Name\" field.\n";
  }

  if (theForm.Address.value == "")
  {
    strMsg += "The \"Address\" field.\n";
  }
  
  if (theForm.City.value == "")
  {
    strMsg += "The \"City\" field.\n";
  }
  
  if (theForm.State.value == "")
  {
    strMsg += "The \"State\" field.\n";
  }
  
  if (theForm.Zip.value == "")
  {
    strMsg += "The \"Zip\" field.\n";
  }
	
  
  if (theForm.Email.value == "")
  {
    strMsg += "The \"Email\" field.\n";
  }
  
  if (theForm.Phone.value == "")
  {
    strMsg += "The \"Phone\" field.\n";
  }
  else{
		if (theForm.Phone.value.length < 12)
		{
		  strMsg += "A valid phone number including area code.\n";
		}
	}
	
	if (strMsg != ""){
		strMsg = "Please enter values in these required fields.\n\n" + strMsg 
		alert(strMsg);
		theForm.Name.focus();
		return (false);
	}

  
  return (true);
}
//=========================================================
 
 function trim_string(strValue) {
     var ichar, icount;
     //var strValue = this;
     ichar = strValue.length - 1;
     icount = -1;
     while (strValue.charAt(ichar)==' ' && ichar > icount)
         --ichar;
     if (ichar!=(strValue.length-1))
         strValue = strValue.slice(0,ichar+1);
     ichar = 0;
     icount = strValue.length - 1;
     while (strValue.charAt(ichar)==' ' && ichar < icount)
         ++ichar;
     if (ichar!=0)
         strValue = strValue.slice(ichar,strValue.length);
     return strValue;
 }
 
 //=========================================================
 
function FormData(){
	var AllData;	
	this.max = -1;
	//Properties
	this.value = function(index){
		return this.AllData[index][0];
	}
	this.name = function(index){
		return this.AllData[index][1];
	}
	this.minimum = function(index){
		return this.AllData[index][2];
	}
	this.maximum = function(index){
		return this.AllData[index][3];
	}
	this.datatype = function(index){
		return this.AllData[index][4];
	}		
	this.count = function(){
		return this.max;
	}
	// Methods
	this.add = function(strval,strname,intmin,intmax,type){
		this.max++
		var index = this.max;
		if (index == 0){
			this.AllData = new Array();
		}
		this.AllData[index] = new Array(trim_string(strval + ""),strname,intmin,intmax,type);
		return this.AllData[index][1];
	}
	this.validate = function(index){
		var varvalue = this.AllData[index][0];
		var name = this.AllData[index][1];
		var min = this.AllData[index][2]; 
		var max = this.AllData[index][3];		
		var type = this.AllData[index][4];
		var strRet = "";	
		// now test for data type
		if (max > 0){
			if (min  > 0){
				if (varvalue.length < min || varvalue.length > max){
					strRet = "The "+name+" information is invalid because the "+name+" must be ";
					strRet += "between "+min+" and "+max+" characters or numbers long.\n";
				}
			}
			else{
				if (varvalue.length > max){
					strRet = "The "+name+" information is invalid because the "+name+" must be ";
					strRet += "less than "+max+" characters or numbers long.\n";
				}
			}
		}
		// now test for data type
	
		switch (type){
		   case INT_TYPE:
				//test for integer data type
				if (isNan(parseInt(varvalue))) {
				  strRet += "The "+name+" information is invalid because the "+name+" must be a number.\n";
				}
				else{
					varvalue = parseInt(varvalue);
				}
				break;
		   case FLOAT_TYPE:
				//test for float data type
				if (isNan(parseFloat(varvalue))) {
				  strRet += "The "+name+" information is invalid because the "+name+" must be a number.\n";
				}
				else{
					varvalue = parseFloat(varvalue);
				}
				break;
		   case DATE_TYPE:
				//test for date data type
				// for now do nothing
		}
		this.AllData[index][0] = varvalue;
		
		return strRet;
		
  }
	
	
	
	
	
}
// -->