<!-- 
function trimspace(str) 
{ 
  temp_str = ""; 
  for (i=0; i<str.length; i++) { 
    c = str.charAt(i); 
    if (c != " "){ 
      temp_str = str.substring(i, str.length); 
      break; 
    } 
  } 
 
  for (i=temp_str.length-1; i>=0; i--) { 
    c = temp_str.charAt(i); 
    if (c != " ") { 
      temp_str = temp_str.substring(0, i+1); 
      break; 
    } 
  } 
 
   return temp_str; 
} 
 
function validate_str(str) { 
  var ok = 1;
  if (str.indexOf("'") != -1)
    ok = 0;
  if (str.indexOf("#") != -1)
    ok = 0;
  if (str.indexOf("%") != -1)
    ok = 0;
  if (str.indexOf("?") != -1)
    ok = 0;
  if (str.indexOf('"') != -1)
    ok = 0;
  if (str.indexOf("$") != -1)
    ok = 0;
  if (str.indexOf("&") != -1)
    ok = 0;
   if (str.indexOf("<") != -1) 
    ok = 0;
  if (str.indexOf(">") != -1)
    ok = 0;
  if (str.indexOf(",") != -1)
    ok = 0;
  if (ok == 0) { 
    alert("Invalid input - cannot contain ' # % ? $ & < > ," + '"'); 
    return -1; 
 
  } else  
    return 1; 
} 
function update(theform) {
  var email = trimspace(document.forms[theform].emailaddress.value);
  if (email == "") {
    alert("Please enter a your e-mail address first");
    return;
  }
  if (email.indexOf("@") == -1) {
   email = email + "schamato.com"
    }   
  else if (email.indexOf(".") == -1) {
    alert("This is not a valid email address.");
    return;
    }   
  document.forms[theform].emailaddress.value = email;
  document.forms[theform].submit();
}
function lemmein(keypressed){
  var key;
  
  if (document.all) {
    key=window.event.keyCode;
  } else {
    key=keypressed.which;
  };
  if (key==13) {
    update("email");
  }
}
//-->
