// JavaScript Document

//http://www.cristalab.com/tips/popups-no-intrusivas-con-javascript-css-y-xhtml-c32633l/
//=====================================================================
// ARRAY DE PREGUNTAS
//=====================================================================
preguntas = new Array();
preguntas[1]="¿Se le atendió con disponibilidad y oportunidad?";
preguntas[2]="¿El trato recibido fue cordial y amable?";
preguntas[3]="¿El tiempo de respuesta y la información proporcionada fueron adecuadas.?";
preguntas[4]="¿En caso de quejas, se le dio solución a sus necesidades?";
preguntas[5]="¿Los horarios de trabajo en el Puerto responden a sus necesidades?";
preguntas[6]="¿Los costos en relación a las operaciones fueron adecuados?";
preguntas[7]="¿Los procesos administrativos y operativos no fueron complicados?";
preguntas[8]="¿El material o servicios proporcionado no sufrió demoras o daños?";
preguntas[9]="¿La seguridad en la operación del Puerto ha sido adecuada?";
preguntas[10]="¿En general, como califica el desempeño de las autoridades que te atendieron?";
preguntas[11]="¿Los servicios que ofrece el puerto son los necesarios para su negocio?";
preguntas[12]="¿Los espacios del Puerto son usados adecuadamente para prestar mejores servicios?";
preguntas[13]="¿Las actividades portuarias cumplen con las expectativas de negocio?";
preguntas[14]="¿Las instalaciones portuarias cumplen con la demanda de servicios?";
preguntas[15]="¿Se tiene la capacidad instalada para darle servicio?";
preguntas[16]="¿Hay tiempos de espera por falta de espacios o equipos?";
preguntas[17]="¿Las vialidades internas y externas del Puerto son adecuadas?";
preguntas[18]="¿Como califica el mantenimiento de las instalaciones portuarias?";
preguntas[19]="¿Se ofrecen nuevos servicios en el Puerto al menos una vez por año?";
preguntas[20]="¿Se visualizan cambios operativos en la operación que muestren mejoras en tiempos?";
preguntas[21]="¿Se abren espacios para comentarios de mejora al puerto y los servicios derivados?";
preguntas[22]="¿Almacenaje?";
preguntas[23]="¿Atraque?";
preguntas[24]="¿Muellaje?";
preguntas[25]="¿Puerto?";
preguntas[26]="¿Remolque?";
preguntas[27]="¿Pilotaje?";
preguntas[28]="¿Los muelles y áreas públicas del Puerto se encuentran en condiciones adecuadas?";
preguntas[29]="¿Las marinas se encuentran limpias y ordenadas?";
preguntas[30]="¿El área del malecón se encuentra en buenas condiciones?";
preguntas[31]="¿Las oficinas y edificios tienen buena presentación?";
preguntas[32]="¿Se han simplificado los procesos y/u operaciones en el Puerto?";
preguntas[33]="¿Se pueden realizar los trámites que requiere de manera electrónica?";
preguntas[34]="¿A través de la página del Puerto se realiza intercambio de datos?";
preguntas[35]="¿Almacenaje y entrega de mercancía?";
preguntas[36]="¿Disponibilidad de servicios portuarios?";
preguntas[37]="¿Disponibilidad de infraestructura portuaria?";
preguntas[38]="¿Disponibilidad de servicios logísticos?";
preguntas[39]="¿Le entregaron el producto que solicitó conforme a sus requerimientos?";
preguntas[40]="¿En general, como evalúa los servicios que le brindo el Puerto?";
preguntas[41]="¿Cual sería su recomendación sobre el Puerto?";
preguntas[42]="¿EIT ó API?";




//=====================================================================
function $J(id){
   return document.getElementById(id);
}

function ValidarCuestionario(){
	
  if($J("empresa").value==""){
   mostrar("errores","Debes de capturar el nombre de la empresa");
   $J("empresa").focus();
   return false;
 }else{
	    $J('errores').innerHTML='';
		var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
        var checkStr = $J('empresa').value;
        var allValid = true; 
        for(i = 0; i < checkStr.length; i++) {
           ch = checkStr.charAt(i); 
           for (j = 0; j < checkOK.length; j++)
             if(ch == checkOK.charAt(j))
                break;
             if(j == checkOK.length) { 
                allValid = false; 
                break; 
             }
        }
        
		if (!allValid) { 
          mostrar("errores","Por favor escribe solo letras en el campo Empresa"); 
          $J('empresa').focus(); 
          $J('empresa').value=""; 
          return false; 
        } 
	  
	  }
 
      //NOMBRE
	  if($J("nombre").value==""){
        mostrar("errores","Debes de capturar tu nombre");
        $J("nombre").focus();
        return false;
      }else{
	         $J('errores').innerHTML='';
		     var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
             var checkStr = $J('nombre').value;
             var allValid = true; 
             for(i = 0; i < checkStr.length; i++) {
               ch = checkStr.charAt(i); 
                 for (j = 0; j < checkOK.length; j++)
                   if(ch == checkOK.charAt(j))
                break;
             if(j == checkOK.length) { 
                allValid = false; 
                break; 
             }
        }
        
		if (!allValid) { 
          mostrar("errores","Por favor escribe solo letras en el campo Nombre"); 
          $J('nombre').focus(); 
          $J('nombre').value=""; 
          return false; 
        } 
	  
	  }
 
 //PUESTO
	  if($J("puesto").value==""){
        mostrar("errores","Debes de capturar tu Puesto");
        $J("puesto").focus();
        return false;
      }else{
	         $J('errores').innerHTML='';
		     var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
             var checkStr = $J('puesto').value;
             var allValid = true; 
             for(i = 0; i < checkStr.length; i++) {
               ch = checkStr.charAt(i); 
                 for (j = 0; j < checkOK.length; j++)
                   if(ch == checkOK.charAt(j))
                break;
             if(j == checkOK.length) { 
                allValid = false; 
                break; 
             }
        }
        
		if (!allValid) { 
          mostrar("errores","Por favor escribe solo letras en el campo Puesto"); 
          $J('puesto').focus(); 
          $J('puesto').value=""; 
          return false; 
        } 
	  
	  }
 
 
  if($J('tel').value== "") {
	  $J('tel').focus();
		mostrar("errores","Debes de capturar un telefono!");
		return false;
	}else{
		   var checkOK = "0123456789-()";
  var checkStr = $J('tel').value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid) {
    mostrar("errores","Escriba sólo dígitos en el campo Teléfono.");
    $J('tel').focus();
    return (false);
  } 
 }	 
 
 
 if($J('email').value == "") {
	   $J('email').focus();
	   mostrar("errores","El campo Email es obligatorio!");
	   return false;
	}else {
		      if(($J("email").value.indexOf ('@', 0) == -1)||($J("email").value.length < 20)) {
                 mostrar("errores","Escriba una dirección de correo válida en el campo Email.");
                 $J("email").focus();
			     $J("email").value="";
				 return false;
               }
			   
			   	  
  		   }
		   
	//=============================================================	   
	//               VALIDAR LOS RADIO BUTTONS 
	//=============================================================
	 
	 for(i=1;i<=41;i++){
	   for(j=1;j<=6;j++){
	  	 //alert("preg"+i+j + " preg"+i+j + " preg"+i+j + " preg"+i+j + " preg"+i+j + " preg"+i+j);
	     if( ($J("preg"+i+"1").checked==false) && ($J("preg"+i+"2").checked==false) && ($J("preg"+i+"3").checked==false) && ($J("preg"+i+"4").checked==false)&& ($J("preg"+i+"5").checked==false) && ($J("preg"+i+"6").checked==false)){
        // alert("entro con " + i);
	     //error="errorpreg"+i+"1";
		 
		  pos="pregs"+i+j;
	     if( (pos=="pregs61") || (pos=="pregs62") || (pos=="pregs71") || (pos=="pregs72") || (pos=="pregs81") || (pos=="pregs82") || (pos=="pregs221") || (pos=="pregs222") || (pos=="pregs231") || (pos=="pregs232") || (pos=="pregs241") || (pos=="pregs242") || (pos=="pregs351") || (pos=="pregs352") || (pos=="pregs361") || (pos=="pregs362") || (pos=="pregs371") || (pos=="pregs372")){
		  //alert( ($J("pregs"+i+"1").checked) + ($J("pregs"+i+"2").checked));
		  if( ($J("pregs"+i+"1").checked==0) && ($J("pregs"+i+"2").checked==0) ) {	 
		   //alert ("POS vale " + "pregs" + i + j);
		   errortextos= "<table width=500 class=txtgral><tr><td><strong>Debes de elegir a quien evaluar</strong><br>"+preguntas[42];
		   errortextos+="</td></tr></table>";			
		   mostrarpreguntas(errortextos);
	       $J("pregs"+i+j).focus();
		   return false;
		   break;
		  }
		 }
   	     
		 errortexto= "<table width=500 class=txtgral><tr><td><strong>Debes de responder a la pregunta</strong><br>"+preguntas[i];
		 errortexto+="</td></tr></table>";			
		 mostrarpreguntas(errortexto);
	     $J("preg"+i+j).focus();
	     return false;
		 break;
       }else{ continue; }
	  }
	 }
  
     
	 
  
	
	//=============================================================

 if($J("uword").value==""){
	 document.getElementById('flotante').style.display = 'none';
	  mostrar("erroruword","Debes de capturar el texto exactamente como aparece en la imagen");
	  $J("uword").focus();
	  return false;
	}else{
  	         var cuword = hex_md5(document.getElementById('uword').value);
	         if(cuword==cword[anum-1]) {
               return true;
			  }else{
		 	        mostrar("erroruword","Ingrese el texto exactamente como aparece abajo");
			        $J("uword").focus();
			        return false;
		           }//http://www.quinti.net/recursos.php
	     }

 return false;

}



function mostrar(id,error) {
	document.getElementById(id).innerHTML = error;
	//document.getElementById(id).style.background = "#E3EAEE";
	//document.getElementById(id).style.color = "#595959";
	
}

function mostrarpreguntas(error) {
	//cerrar="<a href='javascript:cerrarPopup("flotante");'>cerrar [X]</a>";
	document.getElementById("flotante").innerHTML = error;
	document.getElementById("flotante").style.display="block";
	
	//document.getElementById("root").style.display="block";
	//document.getElementById("flotante").focus();
}

function cerrarPopup(){
   document.getElementById('flotante').style.display = 'none';      
  // document.getElementById('root').style.display = 'none';      

}

function Item(){
this.length = Item.arguments.length 
for (var i = 0; i < this.length; i++)
  this[i] = Item.arguments[i]
}


function mifecha() {
var ndia = new Item('Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado')
var nmes = new Item('enero','febrero','marzo','abril','mayo','junio','julio','agosto','septiembre','octubre','noviembre','diciembre')
var ahora
var fecha = new Date()
var ano = fecha.getYear()
var mes = fecha.getMonth()
var dia = fecha.getDay()
var aux = "" + fecha

if (ano<10) {
 ano2 = "200" + eval(ano)
}
else if (ano<80) {// ano tiene 2 dígitos 19xx (más de 80)
 ano2 = "20" + ano
} 
else if (ano<=99) {// ano tiene 2 dígitos 20xx (menor de 80)
 ano2 = "19" + ano
}
else if (ano<1000) {// ano tiene 3 dígitos (100 es 2000)
 ano2 = eval(ano) + eval(1900)
}
else {// ano tiene 4 dígitos
 ano2 = ano
}
ahora = ndia[dia] + ", " + eval(aux.substring(7, 10)) + " de " + nmes[mes] + " de " + ano2
document.write(ahora);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function habilitar(form1){

 if(form1=='solinfo'){
   document.form1.solinfo.disabled=false;
   document.form1.solinfo.className="sinfondo";
   document.form1.desugerencias.disabled=true;
   document.form1.desugerencias.className="fondo";
   document.form1.desqueja.disabled=true;
   document.form1.desqueja.className="fondo";
   document.form1.desocurrio.disabled=true;
   document.form1.desocurrio.className="fondo";
   document.form1.desmotivo.disabled=true;
   document.form1.desmotivo.className="fondo";
   document.form1.desugerencias.value="";
   document.form1.desqueja.value="";
   document.form1.desocurrio.value="";
   document.form1.desmotivo.value="";
 
 }
 if(form1=='sugerencias'){
   document.form1.desugerencias.disabled=false;
   document.form1.desugerencias.className="sinfondo";
    document.form1.desqueja.disabled=true;
   document.form1.desqueja.className="fondo";
   document.form1.desocurrio.disabled=true;
   document.form1.desocurrio.className="fondo";
   document.form1.desmotivo.disabled=true;
   document.form1.desmotivo.className="fondo";
  document.form1.solinfo.disabled=true;
   document.form1.solinfo.className="fondo";
     document.form1.desugerencias.value="";
   document.form1.desqueja.value="";
   document.form1.desocurrio.value="";
   document.form1.desmotivo.value="";
   document.form1.solinfo.value="";
   
   
 }
 if(form1=='quejas'){
   document.form1.desqueja.disabled=false;
   document.form1.desqueja.className="sinfondo";
   document.form1.desocurrio.disabled=false;
   document.form1.desocurrio.className="sinfondo";
   document.form1.desmotivo.disabled=false;
   document.form1.desmotivo.className="sinfondo";
   document.form1.desugerencias.disabled=true;
   document.form1.desugerencias.className="fondo";
   document.form1.solinfo.disabled=true;
   document.form1.solinfo.className="fondo";
   document.form1.solinfo.value="";
   document.form1.desugerencias.value="";
   
   
 }
}

function getId(id){
   return document.getElementById(id);
}

function validaCampo(){
	
	
  //var er_tlfono = /[0123456789-()\s]/;
  //var er_email = /^(.+\@.+\..+)$/;
  //var er_empresa = /[A-Za-zñÑ\s.]/;
  
  
  
 if((document.getElementById("radio1").checked==false) && (document.getElementById("radio2").checked==false) && (document.getElementById("radio3").checked==false)){
      document.getElementById('errorradios').style.display='block';
	  return false;
						 
 }



 if(getId('name').value.length==0){
    getId('name').focus(); 
    getId('errorname').style.display='block';
    return false;
 }else{
	    getId('errorname').style.display='none';
	 	var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
        var checkStr = getId('name').value;
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++) {
           ch = checkStr.charAt(i); 
           for (j = 0; j < checkOK.length; j++)
             if (ch == checkOK.charAt(j))
                break;
             if (j == checkOK.length) { 
                allValid = false; 
                break; 
             }
        }
  
        if (!allValid) { 
          alert("Por favor escribe solo letras en el campo Nombre"); 
          getId('name').focus(); 
          getId('name').value=""; 
          return false; 
        } 
	  
	 }
	

  
   if(getId('email').value.length==0){
      getId('email').focus(); 
	 getId('erroremail').style.display='block';
	 return false;
  }else{
	     getId('erroremail').style.display='none';
	    var valor=getId('email').value;
	    var filter=/^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
        if(filter.test(valor)){
          // alert("Your e-mail is correct");
	       //return (true);
	    }else{
               alert("Por favor escribe un email valido");
	           getId('email').focus(); 
               getId('email').value=""; 
               return false;
             }
			// return false;
       }
	
  
  if(getId('empresa').value.length==0){
      getId('empresa').focus(); 
	getId('errorempresa').style.display='block';
	 return false;
  }else{
	  getId('errorempresa').style.display='none';
	   var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('empresa').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Empresa"); 
    getId('empresa').focus(); 
    getId('empresa').value=""; 
    return false; 
  } 
	    }
  
  if(getId('telefono').value.length==0){
      getId('telefono').focus(); 
	getId('errorphone').style.display='block';
	 return false;
  }else{
	getId('errorphone').style.display='none';
	  
	   var checkOK = "0123456789-()"; 
   var checkStr =getId('telefono').value; 
  var allValid = true; 
  var decPoints = 0; 
  var allNum = ""; 
  for (i = 0; i < checkStr.length; i++) { 
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++) 
      if (ch == checkOK.charAt(j))
        break; 
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    } 
    allNum += ch; 
  } 
  if (!allValid) { 
    alert("Por favor escribe solo digitos y -  en el campo Teléfono ");
    getId('telefono').value="";
	getId('telefono').focus();
    return (false); 
  } 
	  }
	
	  
 // PAIS
  if(getId('pais').value.length==0){
      getId('pais').focus(); 
	 getId('errorpais').style.display='block';
	 return false;
  }else{
	     getId('errorpais').style.display='none';
		
		 var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('pais').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Pais"); 
    getId('pais').focus(); 
    getId('pais').value=""; 
    return false; 
  } 
	  
       }
	   
	  //Ciudad
  if(getId('ciudad').value.length==0){
      getId('ciudad').focus(); 
	 getId('errorciudad').style.display='block';
	 return false;
  }else{
	     getId('errorciudad').style.display='none';
		
		 var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('ciudad').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Ciudad"); 
    getId('ciudad').focus(); 
    getId('ciudad').value=""; 
    return false; 
  } 
	  
       }
	  
  
  if(getId('dateArrival').value.length==0){
      getId('dateArrival').focus();
	getId('errorfecha').style.display='block';
	  return false;
  }else{ getId('errorfecha').style.display='none';
	}
  
  
  
  if((getId("radio2").checked==true) && (getId("radio2").value=='Quejas')){
  
    if(getId('desqueja').value.length==0){
     getId('errordesqueja').style.display='block';
     return false;
    }else{
	   var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ., " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('desqueja').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Queja"); 
    getId('desqueja').focus(); 
    getId('desqueja').value=""; 
    return false; 
  } 
	    }
	
	
	if(getId('desocurrio').value.length==0){
     getId('errordesocurrio').style.display='block';
     return false;
    }else{
	   var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ., " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('desocurrio').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Donde Ocurrio"); 
    getId('desocurrio').focus(); 
    getId('desocurrio').value=""; 
    return false; 
  } 
	    }
    
	if(getId('desmotivo').value.length==0){
     getId('errordesmotivo').style.display='block';
     return false;
    }else{
	   var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ., " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('desmotivo').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Que motivo la queja"); 
    getId('desmotivo').focus(); 
    getId('desmotivo').value=""; 
    return false; 
  } 
	    }
 
 }  
 
   
  if((getId("radio1").checked==true) && (getId("radio1").value=='Comentarios')){
  
    if(getId('descomentarios').value.length==0){
     getId('errordescomentarios').style.display='block';
     return false;
    }else{
	   var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ., " + "abcdefghijklmnñopqrstuvwxyz. " + "áéíóú";
  var checkStr = getId('descomentarios').value;
  var allValid = true; 
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i); 
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) { 
      allValid = false; 
      break; 
    }
  }
  if (!allValid) { 
    alert("Por favor escribe solo letras en el campo Comentarios"); 
    getId('descomentarios').focus(); 
    getId('descomentarios').value=""; 
    return false; 
  } 
	    }
  }
  
   if((getId("radio3").checked==true) && (getId("radio3").value=='Sugerencias')){
   
    if(getId('desugerencias').value.length==0){
     getId('errordesugerencias').style.display='block';
     return false;
    }else{
	          var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ. " + "abcdefghijklmnñopqrstuvwxyz., " + "áéíóú";
              var checkStr = getId('desugerencias').value;
              var allValid = true; 
              for (i = 0; i < checkStr.length; i++) {
                 ch = checkStr.charAt(i); 
                 for (j = 0; j < checkOK.length; j++)
                  if (ch == checkOK.charAt(j))
                   break;
                   if (j == checkOK.length) { 
                     allValid = false; 
                     break; 
                   }
              }
              
			  if (!allValid) { 
               alert("Por favor escribe solo letras en el campo Sugerencias"); 
               getId('desugerencias').focus(); 
               getId('desugerencias').value=""; 
               return false; 
              } 
	    }
  }
  
  if(getId("uword").value==""){
	  alert("Debes de capturar el texto que aparece en la imagen de abajo");
	  getId("uword").focus();
	  return false;
	}else{
  	         var cuword = hex_md5(document.getElementById('uword').value);
	         if(cuword==cword[anum-1]) {
               return true;
			  }else{
		 	        alert("Ingrese el texto exactamente como aparece abajo");
			        getId("uword").focus();
			        return false;
		           }//http://www.quinti.net/recursos.php
	     }
		 
	return false;
 
  
 }
