
//<![CDATA[
				
function SelZoneTorino(valore){


if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelZoneTorino1;
ricercaxx.open("GET", "select_zonetorino_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelZoneTorino1;
ricercaxx.open("GET", "select_zonetorino_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
}
}
}

function SelZoneTorino1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
}
}

function SelTipologia(valore){


if (valore ==1){

var IE = navigator.appName.indexOf("Microsoft") != -1;
  var oggetto = IE ? window.filmato : window.document.filmato;
if(oggetto && IE==true){
  var frame = filmato.TCurrentFrame("_root")
  if (frame==2){
  oggetto.GotoFrame(1);
  }
    if (frame==4){
  oggetto.GotoFrame(3);
  }
 }
}
else
{
var IE = navigator.appName.indexOf("Microsoft") != -1;
  var oggetto = IE ? window.filmato : window.document.filmato;
if(oggetto && IE==true){
var frame = filmato.TCurrentFrame("_root")
  if (frame==1){
  oggetto.GotoFrame(2);
  }
    if (frame==3){
  oggetto.GotoFrame(4);
  }
}
}

var tendina=document.getElementById('t_tipologia');
var attesa=document.getElementById('att_t_tipologia');

attesa.style.display = "inline";
tendina.style.display = "none";

if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelTipologia1;
ricercaxx.open("GET", "select_tipologia_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelTipologia1;
ricercaxx.open("GET", "select_tipologia_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
}
}
}

function SelTipologia1(){

var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
var i
var tendina=document.getElementById('t_tipologia');
var attesa=document.getElementById('att_t_tipologia');


for(i=tendina.length-1;i>=0;i--){
tendina.remove(i);	
}


var optn = document.createElement("OPTION");
 optn.text = "Seleziona.."
 optn.value = ""
 tendina.options.add(optn);

var pos = strRes.indexOf("|")


strRes1 = strRes.substr(0,pos)
strRes1 = strRes1.replace(/1/g,"à");
strRes1 = strRes1.replace(/2/g,"è");
strRes1 = strRes1.replace(/3/g,"ì");
strRes1 = strRes1.replace(/4/g,"ò");
strRes1 = strRes1.replace(/5/g,"ù");

strRes2 = strRes.substr(pos+1)



var tipologie1=strRes1.split(",");
var tipologie2=strRes2.split(",");
var inizio=0;
while (inizio < tipologie1.length)
 {
 var optn = document.createElement("OPTION");
 optn.text = tipologie1[inizio]
 optn.value = tipologie2[inizio]
 tendina.options.add(optn);
 
 
 
  inizio+=1;
  }


attesa.style.display = "none";
tendina.style.display = "inline";





}


}



function SelZona(valore){

var IE = navigator.appName.indexOf("Microsoft") != -1;

if(IE==true){
var oggetto = IE ? window.filmato : window.document.filmato;

if (oggetto && IE==true){
   
 if(document.getElementById("r_tipologia1").checked==true){

 oggetto.GotoFrame(1);
}
else
{
 oggetto.GotoFrame(2);
}
}
}
document.getElementById("sh_txt1_a").style.display='none'
document.getElementById("sh_inp_a").style.display='none'
var tendina=document.getElementById('t_comuni');
var attesa=document.getElementById('att_t_comuni');


attesa.style.display = "inline";
tendina.style.display = "none";






if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelZona1;
ricercaxx.open("GET", "select_zona_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelZona1;
ricercaxx.open("GET", "select_zona_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);

ricercaxx.send(null);
}
}

}

function SelZona1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
strRes = strRes.replace(/1/g,"à");
strRes = strRes.replace(/2/g,"è");
strRes = strRes.replace(/3/g,"ì");
strRes = strRes.replace(/4/g,"ò");
strRes = strRes.replace(/5/g,"ù");
var i
var tendina=document.getElementById('t_comuni');
var attesa=document.getElementById('att_t_comuni');



for(i=tendina.length-1;i>=0;i--){
tendina.remove(i);	
}


var optn = document.createElement("OPTION");
 optn.text = "Seleziona.."
 optn.value = ""
 tendina.options.add(optn);

var comuni=strRes.split(",");
var inizio=0;
while (inizio < comuni.length)
 {
 var optn = document.createElement("OPTION");
 optn.text = comuni[inizio]
 optn.value = comuni[inizio]
 tendina.options.add(optn);
 
 
 
  inizio+=1;
  }


attesa.style.display = "none";
tendina.style.display = "inline";





}

}


function SelComune(valore){


if(valore=="Torino" || valore == 'Alessandria' || valore == 'Asti' || valore == 'Cuneo'  || valore == 'Novara' || valore == 'Vercelli'  || valore == 'Biella' || valore == 'Verbania'){

document.getElementById("sh_txt1_a").style.display='inline'
document.getElementById("sh_inp_a").style.display='inline'
document.getElementById("att_t_zonetorino").style.display='inline'
document.getElementById("t_zonetorino").style.display='none'

  var IE = navigator.appName.indexOf("Microsoft") != -1;
  var oggetto = IE ? window.filmato : window.document.filmato;
 
 
 if(document.getElementById("r_tipologia1").checked==true){
 if(oggetto && IE==true){
 if(valore=="Torino"){
 oggetto.GotoFrame(3);
 }
 else
 {
 oggetto.GotoFrame(1);
 }
 }
 }
 else
 {
 if(oggetto  && IE==true){
 if(valore=="Torino"){
  oggetto.GotoFrame(4);
}
else
{
 oggetto.GotoFrame(2);
}
}
  }


}
 
else
{

var IE = navigator.appName.indexOf("Microsoft") != -1;
  var oggetto = IE ? window.filmato : window.document.filmato
 
 if(document.getElementById("r_tipologia1").checked==true){
 if(oggetto  && IE==true){
 oggetto.GotoFrame(1);

 }
 else
 {

  oggetto.GotoFrame(2);

  }
}

document.getElementById("sh_txt1_a").style.display='none'
document.getElementById("sh_inp_a").style.display='none'
}

if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelComune1;
ricercaxx.open("GET", "select_comune_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelComune1;
ricercaxx.open("GET", "select_comune_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);

ricercaxx.send(null);
}
}

}

function SelComune1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;


strRes = strRes.replace(/1/g,"à");
strRes = strRes.replace(/2/g,"è");
strRes = strRes.replace(/3/g,"ì");
strRes = strRes.replace(/4/g,"ò");
strRes = strRes.replace(/5/g,"ù");

var i
var tendina=document.getElementById('t_zonetorino');
var attesa=document.getElementById('att_t_zonetorino');


for(i=tendina.length-1;i>=0;i--){
tendina.remove(i);	
}


var optn = document.createElement("OPTION");
 optn.text = "Seleziona.."
 optn.value = ""
 tendina.options.add(optn);

var zonet=strRes.split(",");
var inizio=0;
while (inizio < zonet.length)
 {
 var optn = document.createElement("OPTION");
 optn.text = zonet[inizio]
 optn.value = zonet[inizio]
 tendina.options.add(optn);
 
 
 
  inizio+=1;
  }


attesa.style.display = "none";
tendina.style.display = "inline";




}

}

function SelStato(valore){

if(valore=='2'){
document.getElementById("sh_txt1_b").style.display='none'
document.getElementById("sh_inp_b").style.display='none'
}
else
{
document.getElementById("sh_txt1_b").style.display='block'
document.getElementById("sh_inp_b").style.display='inline'
}



if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelStato1;
ricercaxx.open("GET", "select_stato_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelStato1;
ricercaxx.open("GET", "select_stato_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);

ricercaxx.send(null);
}
}

}

function SelStato1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
}
}
function SelPrezzo(valore){
if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = SelPrezzo1;
ricercaxx.open("GET", "select_prezzo_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = SelPrezzo1;
ricercaxx.open("GET", "select_prezzo_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
}
}
}
function SelPrezzo1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
}
}
function ModTipologia(valore){
if (window.XMLHttpRequest) {
ricercaxx = new XMLHttpRequest();
ricercaxx.onreadystatechange = ModTipologia1;
ricercaxx.open("GET", "select_idtipologia_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
} else if (window.ActiveXObject) {
ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
if (ricercaxx) {
ricercaxx.onreadystatechange = ModTipologia1;
ricercaxx.open("GET", "select_idtipologia_ax.asp?valore=" + valore  + "&rand=" + Math.random() ,true);
ricercaxx.send(null);
}
}
}
function ModTipologia1(){
var strRes; 
if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
strRes=ricercaxx.responseText;
}
}
//]]>

