function checkMailForms(thisForm)

{

	var msg = "";

//alert(thisForm.where_did_you_hear.selectedIndex);

	if (thisForm.Name.value.length == 0) 

	{

		msg += " -- Name\n";

	}


	

	if (thisForm.email.value.length == 0) 

	{

		msg += " -- Email\n";

	}

	

	if (thisForm.phone_number.value.length == 0) 

	{

		msg += " -- Phone number\n"; 

	}

	

  var checkedButton = ""   

  for (var i=0; i < 7; i++) 

  {

    if (thisForm.how_did_you_learn[i].checked) 

    {

      checkedButton=thisForm.how_did_you_learn[i].value      

    }   

  }



	if (checkedButton == "") 

	{

		msg += " -- How did you learn about RBF\n"; 

	}


  var checkedButton = ""   

  for (var i=0; i < 2; i++) 

  {

    if (thisForm.are_you_a_citizen[i].checked)

    {

      checkedButton=thisForm.are_you_a_citizen[i].value      

    }

  }

	var v_status = thisForm.visa_status.options[thisForm.visa_status.selectedIndex].value;
	//alert(v_status);
	if (checkedButton == "")

	{

		msg += " -- Are you a US Citizen?\n";
		
	}
	
	if (checkedButton == "No")

	{
		//alert(v_status.length);
		if (v_status.length == 0)
		
		{
		
		msg += " -- Please enter a Visa Status\n";
		
		}
		
	}
	//} else if ((checkedButton == "No") && (v_status.length > 0))
	
	//{

	//msg += " -- Please enter a Visa Status\n";
	
	//}


	if (thisForm.please_define_reference.value.length == 0) 

	{

		msg += " -- Please define the above reference\n"; 

	}



	if ( msg != "")

	{

		alert( "The following fields are required:\n" + msg);

		return(false);

	}

	else

	{

  	if (thisForm.email.value.indexOf("@") == -1 || thisForm.email.value.indexOf(".") == -1)

  	{

  		alert("Incorrect email format in email field\n");

  		return(false);

  	}

  }

	  

						

	return true;

}

