 var lavar = false;
	function ResultadoValidacion(datos) {
	    //alert(datos);
	    if ((datos != '0') || (lavar == true)){
		  Habilita(true);
		  document.frmContacto.submit();
		 } 
		else{		
          Habilita(true);		
		  alert('El código es incorrecto, por favor inténtalo de nuevo');
        }
		var body = document.getElementsByTagName("body")[0];
		var scr = document.getElementById("scriptTemporal");
		body.removeChild(scr);
		
	}

	function cargarDatos() {
	    Habilita(false, 'btnValida');
	    var codigo = document.getElementById("codigo").value;
		var url = "http://www.grupobfx.com/seguridad/valida_captcha.php?lavar="+lavar+"&codigo="+codigo;
		var body = document.getElementsByTagName("body")[0];
		var scr = document.createElement("script");
		scr.setAttribute("type","text/javascript");
		scr.setAttribute("src",url);
		scr.setAttribute("id","scriptTemporal");
 		body.appendChild(scr);
		return false;
		
	}
	
	function ResultadoValidacion_en(datos) {
	    //alert(datos);
	    if ((datos != '0') || (lavar == true)){
		  Habilita(true);
		  document.frmContacto.submit();
		 } 
		else{		
          Habilita(true);		
		  alert('The code is wrong, please try again');
        }
		var body = document.getElementsByTagName("body")[0];
		var scr = document.getElementById("scriptTemporal");
		body.removeChild(scr);
		
	}

	function cargarDatos_en() {
	    Habilita(false, 'btnValida');
	    var codigo = document.getElementById("codigo").value;
		var url = "http://www.grupobfx.com/seguridad/valida_captcha_en.php?lavar="+lavar+"&codigo="+codigo;
		var body = document.getElementsByTagName("body")[0];
		var scr = document.createElement("script");
		scr.setAttribute("type","text/javascript");
		scr.setAttribute("src",url);
		scr.setAttribute("id","scriptTemporal");
 		body.appendChild(scr);
		return false;
		
	}	
	
	
	
	function Habilita(valor){
	 /*if (valor)
    	 document.getElementById('btnValida').value ="Validar";
	 else	   
     	 document.getElementById('btnValida').value ="Validando...";
		*/
	  document.getElementById('btnValida').disabled = (!valor);
	}
	function ReloadImage(){
	  img = document.getElementById('img')
	  var date = new Date();
	  img.src= img.src + '?v='+date.getTime();
	  return false;
	}
	
	