function bottonegiu(bottone, butimage)
{
 var a = bottone;
 a.src = butimage;
  }
 function bottonesu(bottone, butimage)
{
 var a = bottone;
 a.src = butimage;
 }
 function conferma(Tcodice, Tlink, Tparent)
{
 var CheckMsg = confirm("Confermi l'eliminazione?");
     if (CheckMsg==true) {
        var b = Tlink;
        document.Tform.action = b;
        document.Tform.method = "post";
        var a = Tcodice;
        document.getElementById("Tcw").value = a;
        document.Tform.submit();

    } else {
    var c = Tparent;
    document.Tform.action = c;
        document.Tform.submit();
    }
}
function confermaEliminazione()
{
 alert("Record eliminato correttamente");
 document.Tform.submit();
}
function confermaModifica()
{
 alert("Record modificato");
 document.Tform.submit();
}
function confermaInserimento()
{
 alert("Record inserito");
 document.Tform.submit();
}
function InserisciMessaggioErrore()
{
 alert("Codice prodotto gia' esistente");
 document.Tform.submit();
}
 function InviaCodice(Tcodice, Tlink)
{
        var b = Tlink;
        document.Tform.action = b;
        document.Tform.method = "post";
        var a = Tcodice;
        document.getElementById("Tcw").value = a;
        document.Tform.submit();
}
function ModificaRoutine(Tcodice)
{
        document.Tform.action = "T-ModificaRoutine.php";
        document.Tform.method = "post";
         var a = Tcodice;
        document.getElementById("Tcw").value = a;
        document.Tform.submit();
}
function GModificaRoutine(Tcodice)
{
        document.Tform.action = "T-G-ModificaRoutine.php";
        document.Tform.method = "post";
        document.Tform.submit();
}
function InserisciRoutine(Tcodice)
{
        document.Tform.action = "T-InserisciRoutine.php";
        document.Tform.method = "post";
         var a = Tcodice;
        document.getElementById("Tcw").value = a;
        document.Tform.submit();

}
function GInserisciRoutine()
{
        document.Tform.action = "T-G-InserisciRoutine.php";
        document.Tform.method = "post";
        document.Tform.submit();
        }
function RitornaElenco()
{
        document.Tform.action = "T-ProdottiResult.php";
        document.Tform.method = "post";
        document.Tform.submit();
}
function GRitornaElenco()
{
        document.Tform.action = "T-GalleryResult.php";
        document.Tform.method = "post";
        document.Tform.submit();
}
function SCprintpage()
{
  if (window.print)
  {
    window.print();
  }
  else
  {
    alert("Funzione non supportata dal browser");
  }
}

