function isEmpty(str) 
  {
   // Check whether string is empty.
      for (var intLoop = 0; intLoop < str.length; intLoop++)
       if (" " != str.charAt(intLoop))
        return false;
      return true;
  }
  
 function checkForm(f)
 {
  var errors = 0;
  var msg = "";
  
  if (isEmpty(f.elements('email').value))
   {
   msg = msg + "Email \n";
   // alert('The E-Mail field is required');
   errors = errors + 1;
   }
 
  // alert('errors is ' + errors);
  if (errors == 0)
   return true
  else
   {
   alert('The following required field(s) were missing:\n\n ' + msg);
   return false;
  } 
 }   
