

//
// HYPERLINK FUNCTION FOR RESULT WINDOW
//

function openHyperlink(layer, fldName, fldValue) {
//     alert ('See function openHyperlink in custom.js: ' + layer + ' - ' + fldName + ' - ' + fldValue);
    switch(layer) {
//        case 'punti_interesse':
 //        if (fldValue){
 //        	window.open("info_vedi.phtml?photo=" + fldValue,  "_blank", "width=200,height=200,menubar=no,scrollbar=yes,resizable=yes,top=0,left=0,status=yes");
 //        }else{
 //        	alert ("Spiacente ma non sono disponibili foto sull'argomento");
 //        }
 //       break;
        case 'Pericolosita_Idraulica':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Pericolosita_Geomorfologica':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Rischio_Idraulico':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Vie_di_fuga':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'RI_Evacuazione':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'RIAree_Soccorso':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Cancelli_Punti_Imbarco_Sottopassaggi':       
		window.open("/www/protezionecivile/images/html/" + fldValue +".htm" ,  "", "");
        break;
        case 'Punti_di_Osservazione':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'RischioSismico':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Rischio_Frane':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Aree_evacuazione_frane':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'RGMAree_Soccorso':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'cancelli_frane':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Coronamento_Frana':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Raggio_influenza_100_m':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Raggio_influenza_300_m':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Raggio_influenza_500_m':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Raggio_influenza_1000_m':       
		window.open("/www/protezionecivile/images/html/" + fldValue ,  "", "");
        break;
        case 'Azienda_a_rischio':       
		window.open("/www/protezionecivile/images/html/" + fldValue + ".htm",  "", "");
        break;
        case 'Posto_medico_avanzato':       
		window.open("/www/protezionecivile/images/html/" + fldValue + ".htm",  "", "");
        break;
        case 'Attivita_Produttive_e_Commerciali':       
		window.open("/www/protezionecivile/images/html/" + fldValue + ".htm",  "", "");
        break;
        case 'Cancelli':       
		window.open("/www/protezionecivile/images/html/" + fldValue + ".htm",  "", "");
        break;
	case 'Percorsi':       
		window.open("/www/protezionecivile/images/html/" + fldValue + "",  "", "");
        break;
//        case 'localita':       
//		window.open("/pmapper_ippico/images/html/" + fldValue ,  "", "");
//        break;

    }
}



function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
}



