var rutaInicialAplicacion="http://www.vaillant.es/Web/";

function mostrarFamilias(valor){	
	comboCata=document.getElementById("selectFam");
	if(valor!=-1){
		comboCata.style.display="";
		if(document.getElementById("contFlechaProd"))
			document.getElementById("contFlechaProd").style.margin="-19px 3px 0px 0px";
		if(document.getElementById("flechaCombo")){
			document.getElementById("flechaCombo").style.marginTop="50px";
		}
	}else{
		comboCata.style.display="none";
		if(document.getElementById("productos_flecha"))
			document.getElementById("productos_flecha").style.marginTop ="5px";
		if(document.getElementById("flechaCombo")){
			document.getElementById("flechaCombo").style.marginTop="5px";
		}
	}
	
	vaciarComboF(comboCata);
	
	if(valor==valor_ACUMULADORES){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayAcum.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayAcum[a];
			varOpcion1.title = arrayAcum[a];
			varOpcion1.value = arrayAcumValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_CALDERAS){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayCal.length; a++){
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayCal[a];
			varOpcion1.title = arrayCal[a];
			varOpcion1.value = arrayCaldeValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_CALENTADORES){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayCalent.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayCalent[a];
			varOpcion1.title = arrayCalent[a];
			varOpcion1.value = arrayCalentValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_TERMO){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayTermo.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayTermo[a];
			varOpcion1.title = arrayTermo[a];
			varOpcion1.value = arrayTermoValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_GEOTERMIA){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayGeotermia.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayGeotermia[a];
			varOpcion1.title = arrayGeotermia[a];
			varOpcion1.value = arrayGeotermiaValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_ACCESORIOS){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayAcce.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayAcce[a];
			varOpcion1.title = arrayAcce[a];
			varOpcion1.value = arrayAcceValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_REGULACION){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayRegu.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayRegu[a];
			varOpcion1.title = arrayRegu[a];
			varOpcion1.value = arrayReguValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_CALDERASOBRA){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayCalObra.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayCalObra[a];
			varOpcion1.title = arrayCalObra[a];
			varOpcion1.value = arrayCaldeObraValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_AIRE){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arrayAire.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayAire[a];
			varOpcion1.title = arrayAire[a];
			varOpcion1.value = arrayAireValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else if(valor==valor_ENERGIASOLAR){
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "Seleccione Familia";
		varOpcion1.title = "Seleccione Familia";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
		for(var a=0; a<arraySolar.length; a++){
			combo= document.getElementById("selectFam");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arraySolar[a];
			varOpcion1.title = arraySolar[a];
			varOpcion1.value = arraySolarValor[a];
			combo.options.add(varOpcion1);
		}
	}
	else{
		combo= document.getElementById("selectFam");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "";
		varOpcion1.title = "";
		varOpcion1.value = "";
		combo.options.add(varOpcion1);
	}
}

// Muestra en el tercer combo los valores de los modelos existentes para la familia
// seleccionada en el segundo combo.
function mostrarModelos(){
	familia=document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].text;
	arrayAux=null;
	arrayAuxNombre=null;
	for(a=0;a<arrayModelos.length;a++){
		if(arrayModelos[a][0]==familia){
			arrayAux=arrayModelos[a];
			arrayAuxNombr=arrayModelosNombre[a];
		}
	}
	combo= document.getElementById("selectTE");
		vaciarComboF(combo);
		var varOpcion1 = document.createElement("OPTION");
		varOpcion1.text = "MODELO";
		varOpcion1.title = "MODELO";
		varOpcion1.value = "-1";
		combo.options.add(varOpcion1);
	if(arrayAux!=null){
	    combo.disabled=false;
		for(a=1;a<arrayAux.length;a++){
			combo= document.getElementById("selectTE");
			var varOpcion1 = document.createElement("OPTION");
			varOpcion1.text = arrayAuxNombr[a];
			varOpcion1.title = arrayAuxNombr[a];
			varOpcion1.value = arrayAux[a];
			combo.options.add(varOpcion1);
		}
	}else{
		combo.disabled=true;
	}
	if ((familia==valor_ReguladoresAccesorios) || (familia==valor_ReguladoresProgramadores)) {	
		combo.disabled=true;
	}
}

// Vacia de valores el combo que se le pasa como parámetro
function vaciarComboF(combo){
	for(var a=0; a<combo.length; a++){
		combo.options[a]= null;
	}
	combo.length=0;
}

// Vacia de valores del combo de tipo de evacuación.
function vaciarComboTE(combo){
	for(a=0;a<combo.length;a++){
		combo.options[a]= null;
	}
	combo.length=0;
	var varOpcion1 = document.createElement("OPTION");
	varOpcion1.text = "MODELO";
	varOpcion1.title = "MODELO";
	varOpcion1.value = "-1";
	combo.options.add(varOpcion1);
}

function endsWith(testString, endingString){
      if(endingString.length > testString.length) return false;
      return testString.indexOf(endingString)==(testString.length-endingString.length);
}


// Función que renavega ,en función de los valores seleccionados en los combos,a la página
// correspondiente.
function renavegarCombo(selec){
   tipoAparato = document.getElementById("selectTA").options[document.getElementById("selectTA").selectedIndex].value;
   familiaAccesorio = document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].value;
   
   var selecion = selec;
   
   if(document.getElementById("selectTE"))
   	tipoEvacuacion = document.getElementById("selectTE").options[document.getElementById("selectTE").selectedIndex].value;  
   
   if (selecion == 'null' || selecion == "" || selecion == ''){   		
   		if(endsWith(valor_SELECCION, "PROF")){
   			selecion = "Profesional";
   		}else if(endsWith(valor_SELECCION, "PART")){
   			selecion = "Particular";
   		}else if(endsWith(valor_SELECCION, "INT")){
   			selecion = "Privado";
   		}else{
   			selecion = valor_SELECCION;
   		}
   }
   
   if (tipoAparato == -1) {
   		selecion = "PRODUCTOSPROF";
   } else if (tipoAparato == valor_ACUMULADORES) {
   		selecion = "ACUMULADORESPROF";
   }else if (tipoAparato == valor_TERMO) {
   		selecion = "TERMOPROF";
   }else if (tipoAparato == valor_GEOTERMIA) {
   		selecion = "GEOTERMIAPROF";
   }else if (tipoAparato == valor_CALDERAS) {
   		selecion = "CALDERASPROF";
   }else if (tipoAparato == valor_CALENTADORES) {
   		selecion = "CALENTADORESPROF";
   }else if (tipoAparato == valor_ACCESORIOS) {
   		selecion = "ACCESORIOSPROF";
   }
   else if (tipoAparato == valor_REGULACION) {
   		selecion = "REGULACIONPROF";
   }
   else if (tipoAparato == valor_AIRE) {
   		selecion = "AIREACONDICIONADOPROF";
   }
   else if (tipoAparato == valor_ENERGIASOLAR) {
   		selecion = "ENERGIASOLARPARTPROF";
   }
       
   var urlDestino = "";      
   if(tipoAparato != -2){
  	   if(tipoAparato != -1 && familiaAccesorio == -1){
  	   	if(tipoAparato == valor_ACUMULADORES){
  	   		urlDestino = 'catalogoAcumuladores.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato == valor_TERMO){
  	   		urlDestino = 'catalogoTermos.jsp?ID_CATALOGO=' + valor_TERMO + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato == valor_GEOTERMIA){
  	   		urlDestino = 'catalogoGeotermia.jsp?ID_CATALOGO=' + valor_GEOTERMIA + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato==valor_CALDERAS){
  	   		urlDestino='catalogoCalderas.jsp?ID_CATALOGO=' + valor_CALDERAS + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato==valor_CALENTADORES){
  	   		urlDestino='catalogoCalentadores.jsp?ID_CATALOGO=' + valor_CALENTADORES + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato==valor_ACCESORIOS){
  	   		urlDestino='catalogoAccesorios.jsp?ID_CATALOGO=' + valor_ACCESORIOS + '&SELECCION=' + selecion;
  	   	}
		if(tipoAparato==valor_REGULACION){
  	   		urlDestino='catalogoReguladores.jsp?ID_CATALOGO=' + valor_REGULACION + '&SELECCION=' + selecion;
  	   	}
  	   	if(tipoAparato==valor_CALDERASOBRA){
  	   		urlDestino='catalogoCalderasObra.jsp?ID_CATALOGO=' + valor_CALDERASOBRA + '&SELECCION=' + selecion;
  	   	}
		if(tipoAparato==valor_AIRE){
  	   		urlDestino='catalogoAA.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + selecion;
  	   	}
		if(tipoAparato==valor_ENERGIASOLAR){
  	   		urlDestino='catalogoSolar.jsp?ID_CATALOGO=' + valor_ENERGIASOLAR + '&SELECCION=' + selecion;
  	   	}
  	   }

  	   if(tipoAparato!=-1 && familiaAccesorio!=-1){
  	   	familia=document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].text;
  	   	if(tipoAparato==valor_ACUMULADORES){
  	   		urlDestino= 'familiaAcumuladores.jsp?ID_CATALOGO=' + valor_ACUMULADORES  + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_CALDERAS){
  	   		urlDestino= 'familiaCalderas.jsp?ID_CATALOGO=' + valor_CALDERAS + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_TERMO){
  	   		urlDestino='familiaTermos.jsp?ID_CATALOGO=' + valor_TERMO + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_GEOTERMIA){
  	   		urlDestino='familiaGeotermia.jsp?ID_CATALOGO=' + valor_GEOTERMIA + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_CALENTADORES){
  	   		urlDestino= 'familiaCalentadores.jsp?ID_CATALOGO=' + valor_CALENTADORES + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_ACCESORIOS){
  	   		urlDestino= 'familiaAccesorios.jsp?ID_CATALOGO=' + valor_ACCESORIOS + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
		if(tipoAparato==valor_REGULACION){
  	   		urlDestino= 'familiaReguladores.jsp?ID_CATALOGO=' + valor_REGULACION + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   	if(tipoAparato==valor_CALDERASOBRA){
  	   		urlDestino= 'familiaCalderasObra.jsp?ID_CATALOGO=' + valor_CALDERASOBRA + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
		if(tipoAparato==valor_AIRE){
  	   		if(familiaAccesorio==valor_FAMILIA_MULTISCOMBINABLESINVERTER){
				urlDestino= 'familiaClimaMultisCombinables.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
			}else{
				urlDestino= 'familiaAA.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
			}
  	   	}
		if(tipoAparato==valor_ENERGIASOLAR){
			urlDestino= 'familiaSolar.jsp?ID_CATALOGO=' + valor_ENERGIASOLAR + '&SELECCION=' + selecion + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   	}
  	   }
  	   if(tipoAparato == -1){
  	   	 urlDestino =  'productos.jsp?ID_CATALOGO=' + valor_MENU_CATALOGO + '&SELECCION=' + selecion;
  	   }
   }
   else{
	urlDestino =  'productos.jsp?ID_CATALOGO=' + valor_MENU_CATALOGO + '&SELECCION=' + selecion;
   }
   
   var formuCombo = document.createElement("form");
   formuCombo.id = "FORMCOMB";
   var accion =  "ComboCatalogosServlet";   
   formuCombo.action = rutaInicialAplicacion + accion;  
   
   var input1 = document.createElement('INPUT');
   input1.type = "hidden";
   input1.value = urlDestino;
   input1.name = 'redireccion';
   formuCombo.appendChild(input1);    
	
   document.body.appendChild(formuCombo);	  
   formuCombo.submit();
}

// Función que renavega ,en función de los valores seleccionados en los combos,a la página
// correspondiente.
function renavegarComboProductos(path){
   tipoAparato=document.getElementById("selectTA").options[document.getElementById("selectTA").selectedIndex].value;
   familiaAccesorio=document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].value;
   tipoEvacuacion=document.getElementById("selectTE").options[document.getElementById("selectTE").selectedIndex].value;
	path= "http://" + path;
   if(tipoAparato!=-1 && familiaAccesorio==-1 ){
   	if(tipoAparato==valor_ACUMULADORES){
   		document.location.href=rutaInicialAplicacion + 'catalogoAcumuladores.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + valor_SELECCION;
   	}
   	if(tipoAparato==valor_CALDERAS){
   		document.location.href=rutaInicialAplicacion + 'catalogoCalderas.jsp?ID_CATALOGO=' + valor_CALDERAS + '&SELECCION=' + valor_SELECCION;
   	}
   	if(tipoAparato==valor_TERMO){
  	   		document.location.href='catalogoTermos.jsp?ID_CATALOGO=' + valor_TERMO + '&SELECCION=' + valor_SELECCION;
  	   }
  		if(tipoAparato==valor_GEOTERMIA){
  	   		document.location.href='catalogoGeotermia.jsp?ID_CATALOGO=' + valor_GEOTERMIA + '&SELECCION=' + valor_SELECCION;
  	   }
   	if(tipoAparato==valor_CALENTADORES){
   		document.location.href=rutaInicialAplicacion + 'catalogoCalentadores.jsp?ID_CATALOGO=' + valor_CALENTADORES + '&SELECCION=' + valor_SELECCION;
   	}
   	if(tipoAparato==valor_ACCESORIOS){
   		document.location.href=rutaInicialAplicacion + 'catalogoAccesorios.jsp?ID_CATALOGO=' + valor_ACCESORIOS + '&SELECCION=' + valor_SELECCION;
   	}
	if(tipoAparato==valor_REGULACION){
   		document.location.href=rutaInicialAplicacion + 'catalogoReguladores.jsp?ID_CATALOGO=' + valor_REGULACION + '&SELECCION=' + valor_SELECCION;
   	}
   	if(tipoAparato==valor_CALDERASOBRA){
   		document.location.href=rutaInicialAplicacion + 'catalogoCalderasObra.jsp?ID_CATALOGO=' + valor_CALDERASOBRA + '&SELECCION=' + valor_SELECCION;
   	}
	if(tipoAparato==valor_AIRE){
   		document.location.href=rutaInicialAplicacion + 'catalogoAA.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + valor_SELECCION;
   	}
   	if(tipoAparato==valor_ENERGIASOLAR){
   		document.location.href=rutaInicialAplicacion + 'catalogoSolar.jsp?ID_CATALOGO=' + valor_ENERGIASOLAR + '&SELECCION=' + valor_SELECCION;
   	}
   }
   if(tipoAparato!=-1 && familiaAccesorio!=-1 && tipoEvacuacion==-1){
   	familia=document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].text;
   	if(tipoAparato==valor_ACUMULADORES){
   		document.location.href=rutaInicialAplicacion + 'familiaAcumuladores.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
   	if(tipoAparato==valor_CALDERAS){
   		document.location.href=rutaInicialAplicacion + 'familiaCalderas.jsp?ID_CATALOGO=' + valor_CALDERAS + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
   	if(tipoAparato==valor_CALENTADORES){
   		document.location.href=rutaInicialAplicacion + 'familiaCalentadores.jsp?ID_CATALOGO=' + valor_CALENTADORES + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
   	 	if(tipoAparato==valor_TERMO){
  	   		document.location.href='familiaTermos.jsp?ID_CATALOGO=' + valor_TERMO + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   }
  	   	if(tipoAparato==valor_GEOTERMIA){
  	   		document.location.href='familiaGeotermia.jsp?ID_CATALOGO=' + valor_GEOTERMIA + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
  	   }
   	if(tipoAparato==valor_ACCESORIOS){
   		document.location.href=rutaInicialAplicacion + 'familiaAccesorios.jsp?ID_CATALOGO=' + valor_ACCESORIOS + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
	if(tipoAparato==valor_REGULACION){
   		document.location.href=rutaInicialAplicacion + 'familiaReguladores.jsp?ID_CATALOGO=' + valor_REGULACION + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
   	if(tipoAparato==valor_CALDERASOBRA){
   		document.location.href='familiaCalderasObra.jsp?ID_CATALOGO=' + valor_CALDERASOBRA + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
	if(tipoAparato==valor_AIRE){
   		if(familiaAccesorio=="MULTISCOMBINABLESINVERTER"){
			document.location.href=rutaInicialAplicacion + 'familiaClimaMultisCombinables.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
		}else{
			document.location.href=rutaInicialAplicacion + 'familiaAA.jsp?ID_CATALOGO=' + valor_AIRE + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
		}
   	}
   	if(tipoAparato==valor_ENERGIASOLAR){
		var destino="";	   		
		if(familiaAccesorio=="CaptadorSolar"){
			destino = "familiaCaptadores.jsp";
		}else if(familiaAccesorio=="DepositosSolares"){
			destino = "familiaDepositos.jsp";
		}else if(familiaAccesorio=="GruposHidraulicos"){
			destino = "familiaGrupos.jsp";
		}else{
			destino = "familiaHelioPack.jsp";
		}
		document.location.href=rutaInicialAplicacion + destino+'?ID_CATALOGO=' + valor_ENERGIASOLAR + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&nombreFamilia='+familia;
   	}
   }
   if(tipoAparato!=-1 && familiaAccesorio!=-1 && tipoEvacuacion!=-1){
   	familia=document.getElementById("selectFam").options[document.getElementById("selectFam").selectedIndex].text;
   	if(tipoAparato==valor_ACUMULADORES){
		destino=rutaInicialAplicacion + 'modeloAcumuladores.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloAcumuladorFlotante');
   	}
   	if(tipoAparato==valor_CALDERAS){
		destino=rutaInicialAplicacion + 'modeloCalderas.jsp?ID_CATALOGO=' + valor_CALDERAS + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloCalderaFlotante');
   	}
   	if(tipoAparato==valor_TERMO){
  	   		//document.location.href='catalogoTermos.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + valor_SELECCION;
  	   		destino='catalogoTermos.jsp?ID_CATALOGO=' + valor_TERMO + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloTermo');
  	   }
  	 if(tipoAparato==valor_GEOTERMIA){
  	   		//document.location.href='catalogoTermos.jsp?ID_CATALOGO=' + valor_ACUMULADORES + '&SELECCION=' + valor_SELECCION;
  	   		destino='catalogoGeotermia.jsp?ID_CATALOGO=' + valor_GEOTERMIA + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloGeotermia');
  	   }
   	if(tipoAparato==valor_CALENTADORES){
		destino=rutaInicialAplicacion + 'modeloCalentadores.jsp?ID_CATALOGO=' + valor_CALENTADORES + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloCalentadorrFlotante');
   	}
   	if(tipoAparato==valor_REGULACION){
		destino=rutaInicialAplicacion + 'modeloReguladores.jsp?ID_CATALOGO=' + valor_REGULACION + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloRegulacionFlotante');
   	}
   	if(tipoAparato==valor_CALDERASOBRA){
		destino=rutaInicialAplicacion + 'modeloCalderasObra.jsp?ID_CATALOGO=' + valor_CALDERASOBRA + '&SELECCION=' + valor_SELECCION + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloCalderaFlotante');
   	}
   	if(tipoAparato==valor_AIRE){
		while(tipoEvacuacion.indexOf(" ")!=-1){
			tipoEvacuacion = tipoEvacuacion.replace(" ","");
		}
		if(familiaAccesorio==valor_FAMILIA_MULTISCOMBINABLESINVERTER){
			destino=rutaInicialAplicacion + 'modeloClimaMultisCombinables.jsp?ID_CATALOGO=' + valor_AIRE + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion + '&SELECCION=' + valor_SELECCION;
		}else{
			destino=rutaInicialAplicacion + 'modeloAA.jsp?ID_CATALOGO=' + valor_AIRE + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion + '&SELECCION=' + valor_SELECCION;
		}
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloAire');
   	}
	// modelos Energia Solar
   	if(tipoAparato==valor_ENERGIASOLAR){
		while(tipoEvacuacion.indexOf(" ")!=-1){
			tipoEvacuacion = tipoEvacuacion.replace(" ","");
		}
		if(tipoEvacuacion.indexOf("VFK")!=-1 || tipoEvacuacion.indexOf("VTK")!=-1){
			destino='ModeloSolar_captadores.jsp';
		}else if(tipoEvacuacion.indexOf("auroSTOR")!=-1){
			destino='ModeloSolar_depositos.jsp';
		}else if(tipoEvacuacion.indexOf("Grupo")!=-1 || tipoEvacuacion.indexOf("VR")!=-1 ){
			destino='ModeloSolar_grupos.jsp';
		}else if(tipoEvacuacion.indexOf("VSL")!=-1){
			destino='ModeloSolar_HelioPack.jsp';
		}else{
			return;
		}
		destino = rutaInicialAplicacion + destino + '?ID_CATALOGO=' + valor_ENERGIASOLAR + '&ID_FAMILIA='+familiaAccesorio+'&ID_MODELO='+tipoEvacuacion + '&SELECCION=' + valor_SELECCION;
   		abrir_ventanaConScroll(destino,750,500,'detallemodeloEnergiaSolar');
   	}
	// modelos Energia Solar
   }
}
