function MM_validateForm() 
{ //v4.0
  var alguno=false,i,p,q,nm,test,ob,num,min,max,errors='',args=MM_validateForm.arguments;

	for (i=0; i<(args.length-2); i+=3) 
  { 
    test=args[i+2]; 
    ob=val=MM_findObj(args[i]);

    if (val) 
    { 
			nm=val.name; 
 			
			if (test.charAt(0) == 'L')
      {
				 if (!ob.checked)
				 {
        	errors+='- Debe aceptar las condiciones legales.\n';
				 }
      }
      else if ((test.charAt(0) == 'U') || (test.charAt(0) == 'W'))
    	{
    	   if (ob.checked) 
    	     alguno=true;
    	   if ((test.charAt(0) == 'W') && (!alguno))
    	    errors+='- Debe marcar al menos un ' + args[i+1] +  '\n';
    	}
      else if ((val=val.value)!="") 
      {
        if (test.indexOf('isEmail')!=-1) 
       { 
          p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) 
            errors+='- '+nm+' debe contener una dirección e-mail.\n';
        } 
        else if (test.charAt(0) == 'C')
        {
           if (val != MM_findObj(args[i+1]).value )
            errors+='- La confirmación de '+nm+' no es correcta.\n';
        }
        else if (test!='R') 
        {
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) 
          { 
            p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (val<min || max<val) 
              errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } 
        } 
      } 
      else if (test.charAt(0) == 'R') 
      {
        if (!ob.disabled)
          errors += '- '+nm+' es obligatorio.\n'; 
      }
    }
  }
 
  if (errors) 
    alert('Datos inadecuadamente cumplimentados:\n\n' + errors + ' \nPor favor revise los datos.');

  document.MM_returnValue = (errors == '');
}