function isEmpty(str)
{
    strRE = new RegExp( );
    strRE.compile( '^[\s ]*$', 'gi' );

    return strRE.test( str.value );
}
 
function notValidEmail(str)
{
    mailRE = new RegExp( );
    mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' );

    return !(mailRE.test( str.value ));
}

function checkForm(form)
{
	if(isEmpty(form.fname))
	{
		alert('Please fill in your First name'); 
		form.fname.focus();
		return false;
	}

	if(notValidEmail(form.email))
	{
		alert('Incorrect or missing Email address!');
		form.email.focus();
		return false;
	}
	
	if(isEmpty(form.phone1)||isEmpty(form.phone2)||isEmpty(form.phone3))
	{
		alert('Please fill in your Phone'); 
		form.phone1.focus();
		return false;
	}
}