<!--
function isEmpty(s)
{ return ((s == null) || (s.length == 0)); }
function isSpace(c)
{ return ((c == "\n") || (c == " ") || (c == "\b") || (c == "\t")); }
function isWhiteSpace(s)
{ for(i=0; i<s.length; i++)
  if(!isSpace(s.charAt(i))) return false;
  return true;
}
function warning(f,s)
{ f.focus();
  f.select();
  alert(s);
  return false;
}
function isEmail(email)
{
  if(isEmpty(email)) return false;
  if(isWhiteSpace(email)) return false;
  invalidChars = " /:,;";
  for(i=0; i<invalidChars.length; i++)
  {
    badChar = invalidChars.charAt(i);
    if(email.indexOf(badChar,0) > -1) return false; 
  }
  atPos = email.indexOf("@",1);
  if(atPos == -1) return false; 
  if(email.indexOf("@",atPos+1) > -1) return false; 
  periodPos = email.indexOf(".",atPos);
  if(periodPos == -1) return false; 
  if(periodPos+3 > email.length) return false; 
 return true;
}


function validaforma(fm)
{
  businessname = fm.businessname.value;
  contactname = fm.contactname.value;
  phonefax = fm.phonefax.value;
  email = fm.email.value;
  comments = fm.comments.value;
  
  if(isEmpty(businessname))
    return (warning(fm.businessname,"Please type your Business Name"));

  if(isEmpty(contactname))
    return (warning(fm.contactname,"Please type your Full Name"));

  if(isEmpty(phonefax))
    return (warning(fm.phonefax,"Please type your Phone Number"));

  if(!isEmail(email))
    return (warning(fm.email,"The Email field is Empty or Invalid"));
	 
  if(isEmpty(comments))
    return (warning(fm.comments,"Please type your Comments or Questions"));

  return true;
}

function validaformados(fm)
{
  fullname = fm.fullname.value;
  email = fm.email.value;
  city = fm.city.value;
  zip = fm.zip.value;
  
  if(isEmpty(fullname))
    return (warning(fm.fullname,"Please type your Full Name"));

  if(!isEmail(email))
    return (warning(fm.email,"The Email field is Empty or Invalid"));
	 
  if(isEmpty(city))
    return (warning(fm.city,"Please type your City"));

  if(isEmpty(zip))
    return (warning(fm.zip,"Please type your Zip Code"));

  return true;
}
-->
