﻿// JScript File

function Stampa() {

     //Nasconde le celle indesiderate
  
//        if(id1!=null){
//            if(isPresent(id1.id)==true)
//                id1.style.display = "None";
//         } 
//    
//        if(id2!=null){  
//           if(isPresent(id2.id)==true)
//                id2.style.display = "None";
//        } 
//       
//        if(id3!=null){ 
//            if(isPresent(id3.id))   
//                id3.style.display = "None";
//         }
//      
//        if(id4!=null){ 
//            if(isPresent(id4.id))   
//                id4.style.display = "None";
//         } 
//         
//         if(id5!=null){ 
//            if(isPresent(id5.id))   
//                id5.style.display = "None";
//         } 
//         
//         if(id6!=null){ 
//            if(isPresent(id6.id))   
//                id6.style.display = "None";
//         } 
//      
          document.getElementById('ctl00_ImagelogoDx').setAttribute('src','images_Dip/logodxV.png',1);
   
     //Imposta la parte da stampare a tutto schermo
   //   stampa.style.width = "100%";
     //Lancia la funzione di stampa
        window.print();
        
       document.getElementById('ctl00_ImagelogoDx').setAttribute('src','../images/logodx.png',1);

     //Ripristina la parte da stampare alle dimensioni originali
      //  stampa.style.width = "450px";
     //Ripristina l'impostazione iniziale delle celle indesiderate
         if(id1!=null){
            if(isPresent(id1.id)==true)
                id1.style.display = "";
         }
         
         if(id2!=null){  
           if(isPresent(id2.id)==true)
              id2.style.display = "";
         }
         
         if(id3!=null){ 
            if(isPresent(id3.id))   
             id3.style.display = "";
         }
         
         if(id4!=null){ 
            if(isPresent(id4.id))   
             id4.style.display = "";
         }
        
         if(id5!=null){ 
            if(isPresent(id5.id))   
             id5.style.display = "";
         }
         if(id6!=null){ 
            if(isPresent(id6.id))   
             id6.style.display = "";
         }

  }


function isPresent(id){
 
    if(document.getElementById(id)!=null)
       return true;
    else return false;
}

