function mailpage()
{
mail_str = "mailto:?subject=Take a look at the " + document.title + " website";
mail_str += "&body=" + document.title;
mail_str += ". Web Address: " + location.href; 
location.href = mail_str;
}

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 Email_Form_Validation(theForm)
{
	var EmailURL;
	
  if (theForm.Email.value == "")
  {
    alert("Email cannot be blank.");
    theForm.Email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.Email.value))
  {
    alert("Invalid Email address.");
    theForm.Email.focus();
    return (false);
  }
  EmailURL = 'email_popup.asp';
  
  window.open(EmailURL, 'EmailSignup', 'width=300,height=200,status=0,resizable=1,scrollbars=1')
  
  theForm.submit();
}

function openWindow(link, name, variables) {
	window.open(link, name, variables);
 }
