// JavaScript Document

			function escondeSelects(){
				if(!window.attachEvent) return false;
				var selects = document.getElementsByTagName("select");
				for( var i=0; i<selects .length; i++ ){
					selects[i].style.display = "none";
				}
			}
			function showSelects(){
				if(!window.attachEvent) return false;
				var selects = document.getElementsByTagName("select");
				for( var i=0; i<selects .length; i++ ){
					selects[i].style.display = "inline";
				}
			}
		
			function verNotaLegal(){
				escondeSelects();
				document.getElementById("notaLegal").style.display = "block";
				pageTracker._trackPageview("nota_legal");
			}
			function ocultarNotaLegal(){
				showSelects();
				document.getElementById("notaLegal").style.display = "none";
			} 	
			function verCondiciones(){
				
                window.open("condicionesGenerales.php","id", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=375,height=440');

			}
			function ocultarCondiciones(){
				showSelects();
				document.getElementById("condicionesGenerales").style.display = "none";
			}
            
            
            
            function mostrarSelect(radioPadre) {
                
                //alert(radioPadre.value);
                //alert(document.getElementById("vfuturo_formapagoDetalle_1_2_select").innerHTML);
                if(radioPadre.value == "162803"){
                    divSelect = document.getElementById("vfuturo_formaPagoDetalle_1_2_select");
                    divSelect.style.borderColor = resetColorEspecial;
					divSelect.style.border = "none";
                    divSelectNew = document.getElementById("vfuturo_formaPagoDetalle_1_1_select"); 
                    elementChild = document.getElementById("vfuturo_formaPagoDetalle_1");
                    if(elementChild)divSelect.removeChild(elementChild);
        
                }else if(radioPadre.value == "162804") {
                    divSelect = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");
                    divSelect.style.borderColor = resetColorEspecial;
					divSelect.style.border = "none";
                    elementChild = document.getElementById("vfuturo_formaPagoDetalle_1");
                    if(elementChild)divSelect.removeChild(elementChild);
                    divSelectNew = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");
 
                }/*else {
                    divSelect1 = document.getElementById("vfuturo_formapagoDetalle_1_1_select");
                    divSelect2 = document.getElementById("vfuturo_formapagoDetalle_1_2_select");
                    elementChild = document.getElementById("vfuturo_formapagoDetalle_1");
                    if(elementChild)divSelect1.removeChild(elementChild);    
                    if(elementChild)divSelect2.removeChild(elementChild);    
                }  */
                 //alert(selectHijo.value);
                 obtenerRespuestaDominioAsociadoEspecial(radioPadre, "vfuturo_formaPagoDetalle_1");
                
                
            }
            
            function destruirSelect(){
                divSelect1 = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");
                divSelect2 = document.getElementById("vfuturo_formaPagoDetalle_1_2_select");
                elementChild = document.getElementById("vfuturo_formaPagoDetalle_1");
                if(divSelect1.innerHTML != ""){
          
                    if(elementChild)divSelect1.removeChild(elementChild);    
                }else if(divSelect2.innerHTML != "") {
        
                    if(elementChild)divSelect2.removeChild(elementChild); 
                }
                
                    
            }
            
            function mostrarFields(field) {

                //alert(radioPadre.value);
               // alert(document.getElementById("vfuturo_formapagoDetalle_1_2_select").innerHTML);
                if(radioPadre.value == "162803"){ /* 127067 */
                    divSelect = document.getElementById("vfuturo_formaPagoDetalle_1_2_select");
                    divSelect.style.borderColor = resetColorEspecial;
                    divSelectNew = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");
                    elementChild = document.getElementById("vfuturo_formaPagoDetalle_1");
                    if(elementChild)divSelect.removeChild(elementChild);

                }else if(radioPadre.value == "162804") { /* 127068 */
                    divSelect = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");
                    divSelect.style.borderColor = resetColorEspecial;
                    elementChild = document.getElementById("vfuturo_formaPagoDetalle_1");
                    if(elementChild)divSelect.removeChild(elementChild);
                    divSelectNew = document.getElementById("vfuturo_formaPagoDetalle_1_1_select");

                }/*else {
                    divSelect1 = document.getElementById("vfuturo_formapagoDetalle_1_1_select");
                    divSelect2 = document.getElementById("vfuturo_formapagoDetalle_1_2_select");
                    elementChild = document.getElementById("vfuturo_formapagoDetalle_1");
                    if(elementChild)divSelect1.removeChild(elementChild);
                    if(elementChild)divSelect2.removeChild(elementChild);
                }  */
                 //alert(selectHijo.value);
                 obtenerRespuestaDominioAsociadoEspecial(radioPadre, "vfuturo_formaPagoDetalle_1");


            }
            // estas funciones de mostrar campos estan feas, en la prox version las cambio para q sea solamente una
            // y mas generico, q sirva para todos...
            function mostrarFieldsets() {
                if($("input[name='vfuturo_tiempoCompra_1']:checked").val() == "161397" || $("input[name='vfuturo_tiempoCompra_1']:checked").val() == "161398" || $("input[name='vfuturo_tiempoCompra_1']:checked").val() == "161399" || $("input[name='vfuturo_tiempoCompra_1']:checked").val() == "161400"){
                //alert("si");
                //$("#pregunta5, #pregunta6, #pregunta7, #pregunta8").show("slow");
                $("#pregunta5, #pregunta6, #pregunta7, #pregunta8").css({'display': 'block'});
				
				
				

                }else{
                //alert("no");
                //$("#pregunta5, #pregunta6, #pregunta7, #pregunta8").hide("slow");
                $("#pregunta5, #pregunta6, #pregunta7, #pregunta8").css({'display': 'none'});
                }
            }
            
            function mostrarConcesion() { /*125675*/
                if($("input[name='vfuturo_deseo_TD_1']:checked").val() == "161392"){
                //alert("si");
                //$("#pregunta10").show("slow");
                $("#pregunta10").css({'display': 'block'});


                }else{
                //alert("no");
                //$("#pregunta10").hide("slow");
                $("#pregunta10").css({'display': 'none'});
                }    
            }
            
            function mostrarAuto() { /* żż??? */
                if(document.forms[0].vactual_marca_1.options[document.forms[0].vactual_marca_1.selectedIndex].value == 127003 || document.forms[0].vactual_marca_1.options[document.forms[0].vactual_marca_1.selectedIndex].value == 0){
                //alert("si");
                //$("#pregunta3").hide("slow");
                $("#pregunta3").css({'display': 'none'});


                }else{
                //alert("no");
                //$("#pregunta3").show("slow");
                $("#pregunta3").css({'display': 'block'});

                }
            }			
