



function validateInfoRqstFields()

{	



	if (document.frmContact.firstName.value == "")  {

		alert("Please enter your First Name before submitting the form.");

		document.frmContact.firstName.focus();

		return false;

	}



	

	if (document.frmContact.lastName.value == "")  {

			alert("Please enter your Last Name before submitting the form.");

			document.frmContact.lastName.focus();

			return false;

	}

	

	if (document.frmContact.email.value == "")  {

			alert("Please enter your Email before submitting the form.");

			document.frmContact.email.focus();

			return false;

		}

	

	

	

	// if its fine upto here, check email validity

	var emailText = document.frmContact.email.value;

	var atSymbolPosition    = emailText.indexOf('@');

	var dotPosition   = emailText.lastIndexOf('.');

	var spacePosition    = emailText.indexOf(' ');

	var emailLength   = emailText.length - 1   // Array is from 0 to length-1



	if ((atSymbolPosition < 1) ||           // '@' cannot be in first position

		(dotPosition <= atSymbolPosition + 1) ||   // Must be atleast one valid char btwn '@' and '.'

		(dotPosition == emailLength ) ||   // Must be atleast one valid char after '.'

		(spacePosition  != -1))          // No empty spaces permitted

	{  

		alert('Please enter a valid e-mail address before submitting the form.');

		document.frmContact.email.focus();

		return false;

	}



	return true;



}


