function obten_hol(f){

hol_cve = document.hologramas.cve_hol.value

vinculo = "hol_ajax.php?hol_cve="+hol_cve;
//alert(vinculo);
carga_contenido('num_hol',vinculo);

}

function regresa_inicio(clave){
id = clave;

	document.forms[0].action="hol_formulario.php?id="+id;
	document.forms[0].target='_self';
       	document.forms[0].submit();
}
function abrir_ventana(nombre){

		//alert(nombre);
		function Is(){
		var agent = navigator.userAgent.toLowerCase();
		this.ns = (navigator.appName == "Netscape");
		this.ie = (navigator.appName == "Microsoft Internet Explorer");
		}
			var is = new Is();
				if(is.ie){
					var obj = window.open(nombre, "","SCROLLBARS=yes,WIDTH=900,HEIGHT=300,TOP=90,LEFT=120,ALWAYSRAISED=no,TITLEBAR=no,MENUBAR=no,HOTKEYS=no,TOOLBAR=no" )
				}else if(is.ns){
					var obj = window.open( nombre,"","SCROLLBARS=yes,WIDTH=900,HEIGHT=300,TOP=90,LEFT=120,ALWAYSRAISED=no,TITLEBAR=no,MENUBAR=no,HOTKEYS=no,TOOLBAR=no" )
				}

}

function validarnumero(valor){

	valor = parseInt(valor)

	if (isNaN(valor)) {
		return ""
	}else{
		return valor
	}
}

function valida_datos(f){

/*
		prueba = document.hologramas.num_hol.value;
		alert (prueba);
*/

		if (document.hologramas.cve_veri.value.length < 1){
				alert("Por favor seleccione una clave de Verificientro.");
				document.hologramas.cve_veri.focus();
				return(false);
		}

		if (document.hologramas.cve_hol.value.length < 1){
				alert("Por favor seleccione una clave de Holograma.");
				document.hologramas.cve_hol.focus();
				return(false);
		}

		if (document.hologramas.num_hol.value  < 1){
			alert("Por favor introduzca el numero de hologramas.");
			return(false);
		}
		
		cve_veri = document.hologramas.cve_veri.value;
		cve_hol = document.hologramas.cve_hol.value;
		cantidad_hol = document.hologramas.num_hol.value;
		ejercicio = document.hologramas.ejercicio.value;
		cve_tramite = document.hologramas.cve_tramite.value;
		titulo = document.hologramas.titulo.value;

		liga = "hol_resultados.php?cve_veri="+cve_veri+"&cve_hol="+cve_hol+"&cantidad_hol="+cantidad_hol+"&ejercicio="+ejercicio+"&cve_tramite="+cve_tramite+"&titulo="+titulo;
		//alert (liga);
		idElemento = "principal";
		carga_contenido (idElemento,liga);
}

function datos_fut(f){
//Revision de los datos
		if (document.bridge.nombre.value.length < 1){
				alert ("Por favor escriba un nombre o razon social.");
				document.bridge.nombre.focus();
				return(false);
		}

		if (document.bridge.calle.value.length < 1){
				alert("Por favor escriba su calle y numero.");
				document.bridge.calle.focus();
				return(false);
		}
		if (document.bridge.colonia.value.length < 1){
				alert("Por favor escriba su colonia.");
				document.bridge.colonia.focus();
				return(false);
		}
		if (document.bridge.cp.value.length < 5){
				alert("Por favor escriba su codigo postal.");
				document.bridge.cp.focus();
				return(false);
		}
		if(!f.comercial.checked && f.password.value !=""){
				alert("Para generar el FUT con codigo de barras seleccione el recuadro de \"COMER\".");
				return false;
			}
		if(f.comercial.checked && f.password.value == ""){
				alert("Para generar el FUT con codigo de barras por favor escriba el \"password\".");
				f.password.focus();
				return false;
			}

	f.action="../../utilerias/utl_bridgefut.php";
	f.target="_blank";
	f.method="post";
	f.submit();

}
