// Verificar Email
			function verifica_email ()
			{
				ObtDatos('http://' + document.domain + '/catalogs/verif_mail.php?email=' + document.getElementById('email1').value ,'div_email');
				setTimeout("verifica_email2()",1250);

			}
			function verifica_email2()
			{
				if ((document.getElementById('origin_sitio')) && (document.getElementById('origin_sitio').value!=""))
				{
					if (document.getElementById('confirmado').value==1)
					{
							jQuery("#formulario_registro_home").hide();
							jQuery("#formulario_login_home").slideDown();
							document.getElementById('texto_origin').innerHTML=document.getElementById('origin_sitio').value;
							document.getElementById('correoa').value=document.getElementById('email1').value;
							
							//alert("tu registro en: " + document.getElementById('origin').value + " es valido para nosotros, inicia session con tu misma cuenta.");
					}
					
					else
					{
						jQuery("#formulario_registro_home").hide();
						jQuery("#confirma_login_home").slideDown();
						document.getElementById('texto_origin_tmp').innerHTML=document.getElementById('origin_sitio').value;
						//alert("Notamos que ya tienes un registro en: " + document.getElementById('origin').value + ". Por favor revisa tu e-mail y sigue las instrucciones para ingresar a templeo.com");
						//alert ("Tu registro de: " + document.getElementById('origin').value + " es valido para nosotros, inicia sesion con tu correo y tu contraseña");
					}
				}
				else
				{
					//alert("Oculta Div");
				}
			}
		
		
			// Validacion del formulario
			function terminoVerificaionFormulario(valor)
			{
				if (valor==false)
					document.getElementById('error_formulario').style.display="block";
			}
			
			// Funciones AJAX
			var http = new Array();
			
			function createRequestObject(){
				var peticion;
				var browser = navigator.appName;
					if(browser == "Microsoft Internet Explorer"){
						peticion = new ActiveXObject("Microsoft.XMLHTTP");
					}else{
						peticion = new XMLHttpRequest();
					}
				return peticion;
			}
			function ObtDatos(url,destino){
				var act = new Date();
				http[act] = createRequestObject();
				http[act].open('get', url);
				http[act].onreadystatechange = function() {
					if (http[act].readyState == 4) {
						if (http[act].status == 200 || http[act].status == 304) {
							var texto = http[act].responseText;
							var DivDestino = document.getElementById(destino);
							DivDestino.innerHTML = ""+texto+"";
						}
					}
				}
				http[act].send(null);
			}
			