//*******************************************************
// Prodottto : WSC PRINTER PRO		   																							                                                                         
// Versione : 2.2                                       																						                                                                        
// Release : 04/2009                                   																					                                                                          
// Autore : Dynamicsoft di Luca Michele Ingenito                      
// Web Site : www.dynamicsoft.it                    
// Email : info@dynamicsoft.it                     																							                                                                          

//#######################################################################################à
//RICERCA INFO 
//#######################################################################################à
  var ricerca_info;
  var valoretipo_info;
  
  function ricercainfo(tipo_info)
  {
  
	valoretipo_info = tipo_info;
        switch (valoretipo_info)
	    {
		    case 1 : // Carta
			    var valoreid = document.modulo.FrmIdCarta.value;   
			    break;
		    case 2 : // Piegatura
			    var valoreid = document.modulo.Piegatura.value;	 
			    break;
            case 3 : // Plastificazione commerciale
			    var valoreid = document.modulo.Plastificazione.value;	 
			    break;
            case 4 : // Plastificazione editoria
			    var valoreid = document.modulo.PlastInterno.value;	 
			    break;				    
            case 5 : // Copertina editoria
			    var valoreid = document.modulo.TipCopertina.value;
			    var BloccoCopertina = document.getElementById('BoxPreventivi-Form-Box-Copertina');
				
			    if (document.modulo.TipCopertina.value != "" ) 
                {
                   // alert("piena");
                    BloccoCopertina.style.display="block";

			    } else {
			            //alert("vuota");
			            BloccoCopertina.style.display="none";
			           }
			    
			    	 
			    break;
            case 6 : // Carta Copertina editoria
			    var valoreid = document.modulo.FrmIdCartaCopertina.value;	 
			    break;
            case 7 : // Plastificazione Copertina editoria
			    var valoreid = document.modulo.PlastCopertina.value;	 
			    break;	
            case 8 : // Rilegatura editoria
			    var valoreid = document.modulo.Rilegatura.value;	 
			    break;	
            case 9 : // Taglio etichette adesive
			    var valoreid = document.modulo.Taglio.value;	 
			    break;	
            case 10 : // Plastificazione etichette adesive
			    var valoreid = document.modulo.Plastificazione.value;	 
			    break;			    
           case 11 : // Materiale flessibile
			    var valoreid = document.modulo.TipMaterialeFlessibile.value;	 
			    break;		    
           case 12 : // Plastificazione 
			    var valoreid = document.modulo.Plastificazione.value;	 
			    break;
           case 13 : // Supporto rigido
			    var valoreid = document.modulo.TipSupportoRigido.value;	 
			    break;	
           case 14 : // Occhielli
			    var valoreid = document.modulo.TipoOcchielli.value;	 
			    break;
           case 15: // Asola
			    var valoreid = document.modulo.TipoAsola.value;	 
			    break;	
           case 16: // ElettroSaldatura
			    var valoreid = document.modulo.TipoElettroSaldatura.value;	 
			    break;
           case 17: // Cucitura
			    var valoreid = document.modulo.TipoElettroSaldatura.value;	 
			    break;			    			    				    
           case 18: // Taglio Stampa diretta su materiali rigidi
			    var valoreid = document.modulo.TaglioSr.value;	 
			    break;				    			    			    				    
			    			    			    			    
    }		
	
	
	if (window.XMLHttpRequest) 
		{
		document.getElementById('BoxPreventivi-Form-Input-InfoPers'+valoretipo_info).innerHTML = 'Caricamento in corso...';
		ricerca_info = new XMLHttpRequest();
		ricerca_info.onreadystatechange = ricevivaloreinfo;
		ricerca_info.open("GET", "?PagePart=RicercaInfo&reg="+valoreid+"&tipoinfo="+valoretipo_info+"",true);
		ricerca_info.send(null);
		
		// per IE 
		} 
	else if (window.ActiveXObject)
	{
		document.getElementById('BoxPreventivi-Form-Input-InfoPers'+valoretipo_info).innerHTML = 'Caricamento in corso...';
		ricerca_info = new ActiveXObject("Microsoft.XMLHTTP");
			if (ricerca_info) 
			{
			ricerca_info.onreadystatechange = ricevivaloreinfo;
			ricerca_info.open("GET", "?PagePart=RicercaInfo&reg="+valoreid+"&tipoinfo="+valoretipo_info+"",true);
			ricerca_info.send();
			}
	}
	
}
	
  function ricevivaloreinfo() {   
	var strRes2;       
	      
	  if (ricerca_info.readyState == 4 && ricerca_info.status == 200) {	    
		  strRes2=ricerca_info.responseText;
		  //alert(strRes)
                var div_info = document.getElementById('BoxPreventivi-Form-Input-InfoPers'+valoretipo_info);
				div_info.style.display="block"	
				document.getElementById('BoxPreventivi-Form-Input-InfoPers'+valoretipo_info).innerHTML = strRes2
               			
				
		 } 
	}
