var urlAddress = 'http://www.texasholdem-info.com';
var pageName = 'TexasHoldem-Info.com ~ #1 Texas Holdem Guide';
		
function addToFavorites()
{
  if (window.external)
  {
  window.external.AddFavorite(urlAddress,pageName)
  }
  else
  { 
  alert("Sorry! Your browser doesn't support this function.");
}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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;
}

function FormValidator(theForm)
{

  if (theForm.email.value == "")
  {
    alert("Please enter a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  if (theForm.firstname.value == "")
  {
    alert("Please enter your first name.");
    theForm.firstname.focus();
    return (false);
  }
  if (theForm.lastname.value == "")
  {
    alert("Please enter your last name.");
    theForm.lastname.focus();
    return (false);
  }
  return (true);
}