/**
 * \file validateForm.js
 * \brief Validates a HTML form and return true if all three SNN parts (numeric) 
 *			and a last name (chars) was entered.
 *
 *
 * \author		Woggel <javscript.coding@woggel.com>
 * \par Copyright:
 * 		Woggel 2008
 * \par Licence:
 *		http://www.woggel.com/license/license_001_00.txt  License 1.0
 * \date First modification date 2009-04-06
 * \date Last modification date 2009-04-06
 */


function validateForm(formToValidate)
{
	if(!isNumeric(formToValidate.ssn1.value, 3))
	{
		alert("Please enter the first part of a valid SSN.");
		formToValidate.ssn1.focus();
		
		
		return	false;
	}
	if(!isNumeric(formToValidate.ssn2.value, 2))
	{
		alert("Please enter the second part a valid SSN.");
		formToValidate.ssn2.focus();
		
		
		return	false;
	}
	if(!isNumeric(formToValidate.ssn3.value, 4))
	{
		alert("Please enter the third part a valid SSN.");
		formToValidate.ssn3.focus();
		
		
		return	false;
	}
	

	if(formToValidate.lastname.value == "")
	{
		alert("Please enter a last name.");
		formToValidate.lastname.focus();
		
		
		return	false;
	}
};