
/* // VALIDACION FORMULARIO JAVASCRIPT // */

// Comprueba la validez del telefono de Webphone


function checkFormTelefono()
{
   var telefono = document.getElementById('telefonoWph');
	if(/^[9,6,8]{1}\d{8}$/.test(telefono.value)) 
	{ 
	   	if  (document.getElementById("txtlegal1").checked == false){ 
       		alert("Por favor, acepte la politica de privacidad"); 
       		return false; 
      	}
	   
	   else {
	   wphCallTo(document.getElementById('telefonoWph').value);
	   }
	}
	
 
   else { 
      alert("Debe introducir un n\u00FAmero de tel\u00E9fono v\u00E1lido."); 
      return false;
   }
   
}

// Verifica si un campo esta Vacio o solo contiene Blanks
function nullField(q) {  
    for ( i = 0; i < q.length; i++ ) {  
        if ( q.charAt(i) != " " ) {  
            return false; 
        }  
    }  
    return true;  
}
