<!-- //
		function clearConfirm()
		  {
		  var r=confirm("Clear the Form?")
		  if (r==true)
		    {
				ContactForm.Name.value = "";
				ContactForm.Email.value = "";
				ContactForm.Company.value = "";
				ContactForm.Phone.value = "";
		    }
		  else
		    {
		    }
		  }
		function KeyCheck(myfield,e) {
		// This is to prevent potentially malicious input being typed into certain fields on the email form.
		// Only letters, numbers, dashes, ampersand, period, comma, and underscore are permitted in Name, Email, and Subject field.
		// Comment field is not restricted, but this form only sends in TEXT format so malicous HTML or scripting shouldn't
		// be a problem.
		   var keycode;
		   if (window.event) {
		      keycode = window.event.keyCode;
		   } else if (e) {
		      keycode = e.which;
		   } else {
		      return true;
		   }
		   if (((keycode > 31) && (keycode < 60)) || (keycode == 61) || (keycode > 62)) {
		      return true;
		   } else {
		      return false;
		   }
		}
		function alphaNumOnly(myfield,e) {
		// This is to prevent potentially malicious input being typed into certain fields on the email form.
		// Only letters, numbers, dashes, ampersand, period, comma, and underscore are permitted in Name, Email, and Subject field.
		// Comment field is not restricted, but this form only sends in TEXT format so malicous HTML or scripting shouldn't
		// be a problem.
		   var keycode;
		   if (window.event) {
		      keycode = window.event.keyCode;
		   } else if (e) {
		      keycode = e.which;
		   } else {
		      return true;
		   }
		   if (((keycode > 47) && (keycode < 58)) || ((keycode > 63) && (keycode < 91)) || ((keycode > 96) && (keycode < 123))  || (keycode == 8) || (keycode == 32) || (keycode == 39) || (keycode == 44) || (keycode == 45) || (keycode == 46) || (keycode == 95) || (keycode == 96)) {
		      return true;
		   } else {
		      return false;
		   }
		}				
		function isblank(strIn) {
		   for(var i = 0; i < strIn.length; i++) {
		      var c = strIn.charAt(i);
		      if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
		   }
		   return true;
		}
		function isalpha(str) {
		
		   var isValid = true;
		
		   if (!isblank(str)) {
		      str += "";
		      for (i = 0; i < str.length; i++) {
		         // Alpha must be between "A"-"Z", or "a"-"z" or
		         if ( !( ((str.charAt(i) >= "a") && (str.charAt(i) <= "z")) ||
		                  ((str.charAt(i) >= "A") && (str.charAt(i) <= "Z")) ||
		                  (" '.&-/`#@".indexOf(str.charAt(i)) >= 0)) ) {
		                        isValid = false;
		                        break;
		                  }
		      }
		   }
		   return isValid;
		}
		function isvalidemail(estr) {
		
		   var isValid = true;
		
		   if (!isblank(estr)) {
		      var filter=/^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/
		      if (!filter.test(estr)) {
		            isValid = false;
		      }
		   }
		   return isValid;
		}
		function CheckMailForm() { 
		
			var errorMsg = "";
		
			if (ContactForm.Name.value == ""){
				errorMsg += "\n\tYour Name \t- Enter your Name";	
			} else {
				if (!isalpha(ContactForm.Name.value)){
					errorMsg += "<b>Name</b> must be non-numeric.";
				}
			}
				 	
			if (ContactForm.Email.value == ""){
				errorMsg += "\n\tYour E-mail \t- Enter a valid e-mail address";
			} else {
					if (!isvalidemail(ContactForm.Email.value)) {
						errorMsg += "\n\tE-mail Address \t- Enter a valid e-mail address";
		      }
			}
			
			if (ContactForm.Company.value == ""){
				errorMsg += "\n\tCompany \t- Enter a Company";
			}
					
			//Check for an message
			if (ContactForm.Phone.value == "") { 
		 		errorMsg += "\n\tPhone \t- Enter a Phone number";
			}

			//Verify Security Code
			if (ContactForm.securityCode.value == "") { 
		 		errorMsg += "\n\tSecurity Code \t- Confirm Security Code";
			}							
			//If there is aproblem with the form then display an error
			if (errorMsg != ""){
				msg = "______________________________________________________________\n\n";
				msg += "Your inquiry has not been sent because there are problem(s) with the form.\n";
				msg += "Please correct the problem(s) and re-submit the form.\n";
				msg += "______________________________________________________________\n\n";
				msg += "The following field(s) need to be corrected: -\n";
				
				errorMsg += alert(msg + errorMsg + "\n\n");
				return false;
			}
			
			return true;
		}
		// -->
