// JavaScript Document


function checkfield1(loginform1)
{
	ok=true
	if (loginform1.email_news.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform1.email_news.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform1.email_news.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform1.email_news.focus();
		ok=false
	}
	else if (loginform1.mob_cod.value == "")
	{
		alert("Please Enter Your Code.");
		loginform1.mob_cod.focus();
		ok=false
	}
	else if (loginform1.mobile.value == "")
	{
		alert("Please Enter Mobile No.");
		loginform1.mobile.focus();
		ok=false
	}
	return ok
}
function isEmailAddr(email_news)
{
  var result = false
  var theStr = new String(email_news)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

