function isValidEmail(checkStr)
{
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
	var EmailValid = filter.test(checkStr);
	return (EmailValid);
}

function isValidZip(zip)
{
	var filter = /^[0-9]{5}$/;
	var zipValid = filter.test(zip);
	return zipValid;
}

function isValidPhone(hphone)
{
	var filter = /^[^a-zA-Z]*$/;
	var phoneValid = filter.test(hphone);
	return phoneValid;
}

function checkForm()
{
	var fname = document.getElementById('first_name')
	var lname = document.getElementById('last_name');
	var hphone = document.getElementById('home_phone');
	var mail = document.getElementById('email');

	if ( fname.value == "" )
	{
		alert("Fill your First Name please.");
		fname.focus();
		return (false);
		exit();
	}

	if ( lname.value == "" )
	{
		alert("Enter your Last Name please.");
		lname.focus();
		return (false);
	}
	
	if ( hphone.value == "" )
	{
		alert("Enter your Phone number please.");
		hphone.focus();
		return (false);
	}
	
	if ( !isValidPhone(hphone.value) )
	{
		alert("This is not valid phone nuber! >> " + hphone.value + " << Fill it again please.");
		hphone.focus();
		return (false);
	}

	if ( mail.value == "" )
	{
		alert("Enter your Email address please.");
		mail.focus();
		return (false);
	}
	
	if (!isValidEmail(mail.value))
	{
    	alert("This is not valid email address! " + mail.value + " Fill email address again.");
	    mail.focus();
    	return (false);
	}
	return (true);
}