function checkfield(loginform)
{
	ok=true
	if(loginform.fullname.value=="Name")
	{
		alert("Please Enter Your Name.")
		loginform.fullname.focus()
		ok=false
	}
	else if(loginform.fullname.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.fullname.focus()
		ok=false
	}	
	else if(loginform.phoneno.value=="")
	{
		alert("Please Enter Phone Number.")
		loginform.phoneno.focus()
		ok=false
	}
	else if(loginform.phoneno.value=="Phone No.")
	{
		alert("Please Enter Phone Number.")
		loginform.phoneno.focus()
		ok=false
	}	
	else if (loginform.emailid.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform.emailid.focus();
		ok=false
	}
	else if (loginform.emailid.value == "Email")
	{
		alert("Please enter a value for the email field.");
		loginform.emailid.focus();
		ok=false
	}	
	else if (!isEmailAddr(loginform.emailid.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform.emailid.focus();
		ok=false
	}
	else if (loginform.query.value == "")
	{
		alert("Please enter your query.");
		loginform.query.focus();
		ok=false
	}
	else if (loginform.query.value == "Query")
	{
		alert("Please enter your query.");
		loginform.query.focus();
		ok=false
	}	
	return ok
}
function isEmailAddr(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;
}
