// JavaScript Document
function checkfield2(mainform)
			{
	ok=true
	if(mainform.name.value=="")
	{
		alert("Please Enter Your Name.")
		mainform.name.focus()
		ok=false
	}
		else if(mainform.phone.value=="")
	{
		alert("Please enter your Phone Number.")
		mainform.phone.focus()
		ok=false
	}
	else if (mainform.email.value == "")
	{
		alert("Please Mention Your Email ID.");
		mainform.email.focus();
		ok=false
	}
	else if (!isEmailAddr2(mainform.email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		mainform.email.focus();
		ok=false
	}
   	else if(mainform.state.value=="")
	{
		alert("Please mention you belongs to which state?.")
		mainform.state.focus()
		ok=false
	}
	else if(mainform.course.value=="")
	{
		alert("Plz, enter your course.")
		mainform.course.focus()
		ok=false
	}
	else if(mainform.message.value=="")
	{
		alert("Type in message, your qualification, date of joing etc.")
		mainform.message.focus()
		ok=false
	}
	return ok
}
function isEmailAddr2(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}
