//Funciones varias Jose Cuellar -- ASOLIVA
function cambiarInput(letra){
	document.frmListado.letra.value=letra;
	document.frmListado.submit();
}

function abrirFichaEmpresa(Empresa_Id,Idioma){
	if (Idioma == "Ingles"){
		Ficha = open('../ingles/menu/frame_FichasEmergentes.cfm?id=' + Empresa_Id + '&Ficha=Empresa','Ficha','scrollbars=yes,width=590,height=500');
		window.Ficha.focus();
	}else{
		Ficha = open('../menu/frame_FichasEmergentes.cfm?id=' + Empresa_Id + '&Ficha=Empresa','Ficha','scrollbars=yes,width=590,height=500');
		window.Ficha.focus();
	}
}
function abrirFichaMarca(Marca_Id,Idioma){
	if (Idioma == "Ingles"){
		Ficha = open('../ingles/menu/frame_FichasEmergentes.cfm?id=' + Marca_Id + '&Ficha=Marca','Ficha','scrollbars=auto,width=590,height=500');
		window.Ficha.focus();
	}else{
		Ficha = open('../menu/frame_FichasEmergentes.cfm?id=' + Marca_Id + '&Ficha=Marca','Ficha','scrollbars=auto,width=590,height=500');
		window.Ficha.focus();
	}
}
function abrirFichaEmpresaDeMarca(Empresa_Id,Idioma){
	if (Idioma == "Ingles"){
		window.parent.location.href = '../ingles/menu/frame_FichasEmergentes.cfm?id=' + Empresa_Id + '&Ficha=Empresa';
	}else{
		window.parent.location.href = '../menu/frame_FichasEmergentes.cfm?id=' + Empresa_Id + '&Ficha=Empresa';
	}

}
function abrirFichaMarcaDeEmpresa(Marca_Id,Idioma){
	if (Idioma == "Ingles"){
		window.parent.location.href = '../ingles/menu/frame_FichasEmergentes.cfm?id=' + Marca_Id + '&Ficha=Marca';
	}else{
		window.parent.location.href = '../menu/frame_FichasEmergentes.cfm?id=' + Marca_Id + '&Ficha=Marca';
	}
}

function abrirFichaDelegacion(Delegacion_Id,Idioma){
	if (Idioma == "Ingles"){
		window.parent.location.href = '../ingles/menu/frame_FichasEmergentes.cfm?id=' + Delegacion_Id + '&Ficha=Delegacion';
	}else{
		window.parent.location.href = '../menu/frame_FichasEmergentes.cfm?id=' + Delegacion_Id + '&Ficha=Delegacion';
	}

}
function abrir_img(im,ti,ex,Idioma){
	imagen=im;
	tituloi=ti;
	extrasi=ex;
	ancho=300;
	alto=300;
	features = "width="+ancho+",height="+alto;	
	if (Idioma == "Ingles"){
	Visor = window.open("../Guia/functions/ver_imagenING.cfm?ruta="+imagen,ancho+alto,features,'Visor');	
	}else{
	Visor = window.open("../Guia/functions/ver_imagenESP.cfm?ruta="+imagen,ancho+alto,features,'Visor');
	}
}
function CerrarVisor(){
	if (window.Visor != undefined){window.Visor.close();}
}

function verificarfrmEmpresas(idioma){
	if ((document.frmBuscador.cmbNombreEmpresas.value != 'Todas') && (document.frmBuscador.provincias.value == 'Todas') && (document.frmBuscador.region.value == 'Todas') && (document.frmBuscador.palabraclaveEmpresas.value == '')){abrirFichaEmpresa(document.frmBuscador.cmbNombreEmpresas.value,idioma);}
	else{document.frmBuscador.submit();}
}

function verificarfrmMarcas(idMarca,Taceite,variedad,AE,EE,palabraClave,idioma){
		if ((idMarca != 'Todas') && (variedad == 'Todas') && (palabraClave== '')){abrirFichaMarca(idMarca,idioma);}
		else{document.frmBuscador.submit();}
}

