var Required = new Array();

function CheckForm()
{	
        var MsgBody = '';
	var Header = '';
	var Sep    = "\n-----------------------------------------------------\n";
	var Footer = '';
	
	if(document.frmRegistration.salutation.selectedIndex == '') MsgBody += '\tSalutation\n';
	if(document.frmRegistration.FirstName.value == '') MsgBody += '\tFirst Name\n';
	if(document.frmRegistration.LastName.value == '') MsgBody += '\tLast Name\n';
	if(document.frmRegistration.Company.value == '') MsgBody += '\tCompany\n';
	if(document.frmRegistration.Title.value == '') MsgBody += '\tTitle\n';
	if(document.frmRegistration.Address1.value == '') MsgBody += '\tAddress1\n';
	if(document.frmRegistration.City.value == '') MsgBody += '\tCity\n';
	
	if(document.frmRegistration.State.selectedIndex == '' && document.frmRegistration.Country.selectedIndex == '1') MsgBody += '\tState\n';
	
	if(document.frmRegistration.State.selectedIndex == '' && document.frmRegistration.Country.selectedIndex != '1')
	  {	
	  //if(document.frmRegistration.Other_State_Province.value == '') MsgBody += '\tOther Sate/Province\n';
	  }
	  
	if(document.frmRegistration.Zip.value == '') MsgBody += '\tZip/Postal Code\n';
	if(document.frmRegistration.Country.selectedIndex == '') MsgBody += '\tCountry\n';
	if(document.frmRegistration.Telephone.value == '') MsgBody += '\tTelephone\n';
	if((email = new String(document.frmRegistration.Email.value)) == '') MsgBody += '\tEmail Address\n';
	if(document.frmRegistration.HowHeardSelect.selectedIndex == '') MsgBody += '\tHow did you hear about us?';
	
	if(MsgBody.length)
	{
		Header = "The following fields are required:\n\n";
		Footer = "\nPlease ensure that you have provided\ninformation for all above fields."
		alert(Header + Sep + MsgBody + Sep + Footer);
		return false;
	}
	

	else if(!(email.match("@"))  || !(email.match(".")) )
		{
			alert("Please provide email address in the correct format.");
			return false;
		}
		
	else
	 {	
	  if(!document.frmRegistration.TNC.checked)
		{
			alert("Please Accept Terms & Conditions!")
			return;
		}	 
	  document.frmRegistration.submit();
	 }

}