﻿function intercetta() {
    for (var i = 0; i < document.links.length; i++)
        if (document.links[i].className == "blank")
        {document.links[i].target = "_blank"; }
}

    
function doBookmark(a)
{
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
  {
    window.external.AddFavorite( document.location.href  , document.title + ' - ' + a) ;
  }
  else
  {
    if(navigator.appName == "Netscape") 
      alert('Per aggiungere la pagina ai Preferiti premere CTRL+D');
  }
}


function ShowHideInvia(ID) {
    if (document.getElementById(ID).style.display == "none") {
        document.getElementById(ID).style.display = "block";
    } else {
        document.getElementById(ID).style.display = "none";
    }
}


function chiudiRichiestaSilverlight(ID) {
    document.getElementById(ID).style.display = "none";
}

function installaRichiestaSilverlight(ID) {
    location.href = "http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0";
    document.getElementById(ID).style.display = "none";
}


function nascondiRichiestaSilverlight() {
    try {
        document.getElementById('no_silverlight').style.display = "none";
    }
    catch (e) {
    }
    finally {

    }
}




//function AltezzaFrame(h) {
//    var ifr = document.getElementById("frmSondaggio");
//    //var h = ifr.contentWindow.document.getElementById("txtAltezza").value;
//    h = h * 60;
//    document.getElementById("txtAltezza").value = h;
//    ifr.contentWindow.document.getElementById("txtAltezza2").value = h;
//    ifr.setAttribute("height", h + 'px');
//}


//function AltezzaFrame2() {
//var h = document.getElementById("txtAltezza2").value;
//h = h + 1000;
////alert(h);
////form1.formS.getElementById("frmSondaggio").setAttribute("height", h + 'px');
////document.setAttribute("height", h-200 + 'px');
////    var h = document.getElementById("txtAltezza").value;
////    alert(h);
////    ifr.setAttribute("height", h + 'px');
//}
 
