// JavaScript Document
function validateForm(form) 
{ 
	if (form.name.value == "") { 
	   alert("The Name is empty."); 
	   form.name.focus( ); 
	   return false; 
	}
	if (form.from.value == "") { 
	   alert("The Email is empty."); 
	   form.from.focus( ); 
	   return false; 
   }
	if (form.area_code.value == "" || form.custom_phone_first.value == "" || form.custom_phone.value == "") { 
	   alert("The Phone is empty."); 
	   form.area_code.focus( ); 
	   return false; 
   }
	if (form.area_code.value != "") { 
		if(form.area_code.value.length != 3)
		{
		   alert("The Phone is invalid."); 
		   form.area_code.focus( ); 
		   return false; 
		}
	}
	if (form.custom_phone_first.value != "") { 
		if(form.custom_phone_first.value.length != 3)
		{
		   alert("The Phone is invalid."); 
		   form.custom_phone_first.focus( ); 
		   return false; 
		}
	}
	if (form.custom_phone.value != "") { 
		if(form.custom_phone.value.length != 4)
		{
		   alert("The Phone is invalid."); 
		   form.custom_phone.focus( ); 
		   return false; 
		}
	}
}