function verifyFormFunc(aamir)
{
	
	var fname=aamir.fname.value;
	var lname=aamir.lname.value;
	var email=aamir.email.value;
	var email1=aamir.email.value;
	var gender=aamir.gender.value;
	var citizenship=aamir.citizenship.value;
	var canadianstatus=aamir.canadianstatus.value;
	var address=aamir.address.value;
	var city=aamir.city.value;
	var country=aamir.country.value;
	var postalcode=aamir.postalcode.value;
	var phone=aamir.phone.value;
	var cellphone=aamir.cellphone.value;
	var degree=aamir.degree.value;
	var interests=aamir.interests.value;

	var err=0;
	var msg="";

   if(fname=="")
   {
//    	alert("Please enter your first name");
//    	aamir.fname.focus();
    	err++;
    	msg=msg+"\nPlease enter your first name";
//    	return false;
   }
   if(lname=="")
   {
//  	alert("Please enter your last name");
//    	aamir.lname.focus();
    	err++;
    	msg=msg+"\nPlease enter your last name";
//    	return false;
   }
   if(email1=="")
   {
//    	alert("Please enter your email address");
//  	aamir.email.focus();
    	err++;
    	msg=msg+"\nPlease enter your email address";
//    	return false;
   }
   if(citizenship=="")
   {
//    	alert("Please enter your citizenship");
//    	aamir.citizenship.focus();
    	err++;
    	msg=msg+"\nPlease enter your citizenship";
//    	return false;
   }
   if(phone=="")
   {
//    	alert("Please enter your phone number");
//    	aamir.phone.focus();
    	err++;
    	msg=msg+"\nPlease enter your phone number";
//    	return false;
   }

if(err>0)
{
	alert(msg);	
	return false;
}



   Position=(email1).indexOf("@",1);
   if(Position==-1) // If no @ found
   {
    	alert("Invalid email address. There should be atleast one \'@\' in the email address");
//    	aamir.email="";
    	aamir.email.focus();
    	return false;
   }

	// Make sure there is only only one @ sign by adding the result we got to one and
	// comparing with -1. It true the answer will not be -1, else it will be.
  if((email1).indexOf("@",Position+1)!=-1)
   {
   	alert("Invalid Email address. There should be only one \'@\' in the email address");
    	//aamir.email="";
    	aamir.email.focus();
   	return false;
   }
  
	Period=(email1).indexOf(".",1);
	if(Period==-1)
	{
	 	alert("Invalid email address, please modify and try again");
	 	aamir.email.focus();
 		return false;
	}	
	
   return true;
}
