﻿// Archivo JScript
function irDestinoDesdeBusquedaRapida() {

	var strValue = document.getElementById("iHtmlBusquedaRapida").value;
	window.open(strValue + "&nocache=" + getFechaNoCache(), "_self");
	
}
function getFechaNoCache() {
    var objFecha = new Date();
    var year = objFecha.getFullYear();
    var month = objFecha.getMonth();
    var days = objFecha.getDate();
    var hours = objFecha.getHours();
    var minutes = objFecha.getMinutes();
    var seconds = objFecha.getSeconds();
    return year + month + days + hours + minutes + seconds;
}
function verPoliticasPrivacidad() {
		
	var anchura = 550;
	var altura = 482;
	
	var txt_url = "politicas-privacidad.aspx";

	if (screen){
		var pos_izquierda = (screen.width - anchura) / 2;
		var pos_top = (screen.height - altura) / 2;
	} else {
		var pos_izquierda = 0;
		var pos_top = 0;
	};

	var txt_atributos = "width=" + anchura + ", height=" + altura + ", scrollbars=yes," + 
						"left=" + pos_izquierda + ",top=" + pos_top;

	objVentanaPoliticasPrivacidad = window.open(txt_url, "VentanaPoliticasPrivacidad" , txt_atributos);
	
	objVentanaPoliticasPrivacidad.focus();
	
}
function abrirVentanaCondicionesSeguros(strNombreDocPDF){

	var txt_url = "pdfs/seguros/" + strNombreDocPDF;
	
	var txt_atributos = "scrollbars=yes, toolbar=no, location=no, resizable=yes";
						
	VentanaSeguros = window.open(txt_url, "VentanaSeguros", txt_atributos);
	
	VentanaSeguros.focus();

}
function abrirVentanaInfoCriteriosBusqueda(){
	
	var txt_url = "info_criterios_busqueda.aspx";
	
	var anchura = 600;
	var altura = 500;
	
	if (screen){
		var pos_izquierda = (screen.width - anchura) / 2;
		var pos_top = (screen.height - altura) / 2;
	} else {
		var pos_izquierda = 0;
		var pos_top = 0;
	};

	var txt_atributos = "width=" + anchura + ", height=" + altura + ", scrollbars=yes," + 
						"left=" + pos_izquierda + ",top=" + pos_top;
						
	VentanaNueva = window.open(txt_url, "infoCriteriosBusqueda" , txt_atributos);
	
	VentanaNueva.focus();

}
function irOpcionMantenimiento(strModuloQueLlama, idReg, intNumPagAct){

	var intPosicion = document.getElementById("ddlHTMLOpcion_" + idReg).selectedIndex;
	var strOpcion = document.getElementById("ddlHTMLOpcion_" + idReg).options[intPosicion].value;

	strURL = strModuloQueLlama + ".aspx?modo=" + strOpcion + "&id=" + idReg + "&pag=" + intNumPagAct;
	
	window.open(strURL, "_self");
}
function cabeceraSinFoto(objImagen){
				
	objImagen.src ="img/Paises/FotoCabeceraBusquedas.jpg";
				
}
function promocionInternaSinFoto(objImagen){
				
	objImagen.src ="img/comodinPromocionInterna.gif";
				
}


