
//Email check form
function isEmailAddr(address)
{
  var result = false
  var theStr = new String(address)
  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.address.value == "")
  {
    alert("Please enter a value for the \"address\" field.");
    theForm.address.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.address.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.address.focus();
    return (false);
  }
   
  if (theForm.address.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"address\" field.");
    theForm.address.focus();
    return (false);
  }
  return (true);
}


// Exit Popup
function bye() {
  var popWhat = "http://www.nastyfriends.com?angiexxx" ;
  var aw = screen.AvailWidth - 50 ;
  var ah = screen.AvailHeight - 80 ;
  
  
outtahere = window.open(popWhat,'exitWindow','toolbar=no,menubar=no,scrollbars=yes,status=yes,resizable=yes,left=20,top=20,screenX=20,screenY=20,width=' + aw + ',height=' + ah +'');
outtahere.blur(); 
}


