// JavaScript Document
	/*
		Form validation code
	*/
	function validation(theForm)
{ 
	var emailRegxp = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
  var phoneType = "";
  switch(theForm.Prefer.value){
	case "email" :
	Prefer = "email"
	break;
	case "phone" :
	Prefer = "phone"
	break;
	case "fax" :
	Prefer = "fax"
	break;
	case "mail" :
	Prefer = "mail"
	break;
  }
  
    if (theForm.Name.value == "")
  {
	window.document.getElementById("errorF").innerHTML = "Please complete the Name field.";
    theForm.Name.focus();
    return false;
  }
  


  if (theForm.from.value == "")
  {
    window.document.getElementById("errorF").innerHTML = "Please complete the Email Address field.";
	var oldstyle = theForm.from.style.borderStyle;
	var oldcol  = theForm.from.style.borderColor;
	var oldwidth  = theForm.from.style.borderWidth;
	theForm.from.style.color = "#FF0000";
    theForm.from.focus();
	theForm.from.onkeydown = function(){
		this.style.color = "#000000";	
		this.style.borderColor = oldcol	;
		this.style.borderWidth = oldwidth	;
		this.style.borderStyle = oldstyle	;
	}
    return false;
  }
  
	var emailRegxp = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
  if(!emailRegxp.test(theForm.from.value))
  {
    window.document.getElementById("errorF").innerHTML = "Please use a valid Email Address.";
	theForm.from.style.color = "#FF0000";
	var oldstyle = theForm.from.style.borderStyle;
	var oldcol  = theForm.from.style.borderColor;
	var oldwidth  = theForm.from.style.borderWidth;
	theForm.from.style.borderColor = "#FF0000";
	theForm.from.style.borderStyle = "solid";
	theForm.from.style.borderWidth = "1px";
    theForm.from.focus();
	theForm.from.onkeydown = function(){
		this.style.color = "#000000";	
		this.style.borderColor = oldcol	;
		this.style.borderWidth = oldwidth	;
		this.style.borderStyle = oldstyle	;
	}
    return false;
  }
    /*if (theForm.Address1.value == "")
  {
    window.document.getElementById("errorF").innerHTML = "Please complete the Address field.";
    theForm.Address1.focus();
    return false;
  }*/
    /*if (theForm.City.value == "")
  {
    window.document.getElementById("errorF").innerHTML = "Please complete the City field.";
    theForm.City.focus();
    return false;
  }*/
  
    /*if (theForm.ZIP.value == "")
  {
    window.document.getElementById("errorF").innerHTML = "Please complete the Zip Code field.";
    theForm.ZIP.focus();
    return false;
  }*/
  

  /*if (theForm.HomePhone.value == "" )
  {
    window.document.getElementById("errorF").innerHTML = "Please complete the Phone field.";
    theForm.HomePhone.focus();
    return false;
  }*/
  	/*var pref = false;
  	for (i = 0; i<theForm.Prefer.length; i++){
				if(theForm.Prefer[i].checked == true){
					pref = true;
					//alert (theForm.Prefer[i].value);
				}
			}
		if(!pref){
		window.document.getElementById("errorF").innerHTML = "Please Select a Prefered Contact method.";
    	theForm.Prefer[0].focus();
		return false;
		}*/


 

	theForm.ready.value = "true";
   	
	var poststr = "?" + DisplayFormValues();
  
  return poststr;
}