// JavaScript Document


function formcheck(myForm) {
   var err = '';
   if (document[myForm].nombre.value=='') err += "\n\r- Name";
   if (document[myForm].email.value=='') err += "\n\r- e-mail";
   if (document[myForm].comentario.value=='') err += "\n\r- Comment";
   if (document[myForm].captcha.value=='') err += "\n\r- Verification Numbers";
   
   if (err!='') {
     alert ('Please fill in the following fields: '+err);
     return false;
   } else {
     mailcheck(myForm);
   }
} 
function mailcheck(myForm) {
 if (!isValidEmail(document[myForm].email.value)) {
  alert('Please enter a valid e-mail address.');
  return false;
 } else {
 document[myForm].SB.disabled = true;
 document[myForm].submit();
 }
 return true;
 
}
function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
} 


