// JavaScript Document

function copyright() {

<!-- Begin
today = new Date();
year = today.getYear();
if (year < 2000)    
year = year + 1900; 
document.write(year);
// End -->
		
} 

function IsNumeric(sText)

{
   var ValidChars = "0123456789.()-+ ";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }

function checkForm() {

var problem = 'No';
	if (document.Estimate.realname.value.length <= 1) {
		alert ("Please enter your Name.");
		return false;	
	}
	
	
	if (document.Estimate.email.value==""){alert("Please enter your E-Mail Address");document.Estimate.email.focus();return false;
	}
	
	if (document.Estimate.email.value=="email@gmail.com"){
		location.replace("index.html");return false;
	}
	
	if (document.Estimate.email.value!=""){var atPresent1 = document.Estimate.email.value.indexOf("@",0);var atPresent2 = document.Estimate.email.value.indexOf(".",0);
	if (atPresent1 < 1 || atPresent2 < 1)	{alert("The e-mail address you supplied does not seem to be valid. Please enter it again.");document.Estimate.email.focus();
	return false;}}
	
	if (document.Estimate.Phone.value.length <= 6) {
		alert ("Please enter your Telephone Number");
		return false;	
	}
	if (!IsNumeric(document.Estimate.Phone.value)) {
		alert("Please enter a valid Telephone number.");
		return false;
	}
	
	if (document.Estimate.Phone.value!="")
	{
	var atPresent31 = document.Estimate.Phone.value.indexOf("000-000-0000",0);
	var atPresent32 = document.Estimate.Phone.value.indexOf("000 000 0000",0);
	var atPresent33 = document.Estimate.Phone.value.indexOf("123-456-7890",0);
	
	if (atPresent31 != -1 || atPresent32 != -1 || atPresent33 != -1)	{alert("The Phone number you supplied does not seem to be valid. Please enter it again.");document.Estimate.Phone.focus();
	return false;}}
	
	if (document.Estimate.Message.value==""){alert("Please enter your Message");document.Estimate.Message.focus();return false;
	}
	
	if (document.Estimate.Message.value!="")
	{
	var atPresent3 = document.Estimate.Message.value.indexOf("google",0);
	var atPresent4 = document.Estimate.Message.value.indexOf("Google",0);
	var atPresent5 = document.Estimate.Message.value.indexOf("GOOGLE",0);
	var atPresent6 = document.Estimate.Message.value.indexOf("rank",0);
	var atPresent7 = document.Estimate.Message.value.indexOf("engine",0);
	var atPresent8 = document.Estimate.Message.value.indexOf("Engine",0);
	var atPresent9 = document.Estimate.Message.value.indexOf("optimization",0);
	var atPresent10 = document.Estimate.Message.value.indexOf("penalized",0);
	var atPresent11 = document.Estimate.Message.value.indexOf("increase traffic",0);
	var atPresent12 = document.Estimate.Message.value.indexOf("SEO",0);
	var atPresent13 = document.Estimate.Message.value.indexOf("white-hat",0);
	var atPresent14 = document.Estimate.Message.value.indexOf("http",0);
	var atPresent15 = document.Estimate.Message.value.indexOf("www",0);
	
	if (atPresent3 != -1 || atPresent4 != -1 || atPresent5 != -1 || atPresent6 != -1 || atPresent7 != -1 || atPresent8 != -1 || atPresent9 != -1 || atPresent10 != -1 || atPresent11 != -1 || atPresent12 != -1 || atPresent13 != -1 || atPresent14 != -1 || atPresent15 != -1)	{location.replace("index.html");return false;
	}
	}
	
	if (document.Estimate.imgverify.value==""){alert("Please enter CAPTCHA verification numbers");document.Estimate.imgverify.focus();return false;
	}
} 

