<!--
function check_email(e) {
  good = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

  for(i=0; i < e.length ;i++){
    if(good.indexOf(e.charAt(i))<0){ 
      return (false);
    }	
  } 

  if (document.images) {
    chars = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
    chars2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
    if (!e.match(chars) && e.match(chars2)) {
      return (-1);
    } 
  }
}

function checkForm(code) { 
  OK = true;
  userCaptcha = document.tellafriend.strCAPTCHA.value.toUpperCase();
  if(document.tellafriend.from_name.value == ''){
    alert("Please enter your name in the 'Your name' field.");
    document.tellafriend.from_name.focus();
    OK = false;
  } else if(document.tellafriend.to_name.value == ''){
    alert("Please enter your friend's name in the 'Friend's name' field.");
    document.tellafriend.to_name.focus();
    OK = false;
  } else if(!check_email(document.tellafriend.from_email.value)){
    alert("Invalid email entered.");
    document.tellafriend.from_email.focus(); 
    OK = false;
  } else if(!check_email(document.tellafriend.to_email.value)){
    alert("Invalid email entered.");
    document.tellafriend.to_email.focus(); 
    OK = false;
  } else if( userCaptcha != code ) {
		alert('Please input the correct verification code.');
		OK = false;
  }
  if( OK == true )
		document.tellafriend.submit();
}
// -->