

//
// 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=auto,resizable=yes,top=0,left=0,status=yes");
         }else{
         	alert ("Spiacente ma non sono disponibili foto sull'argomento");
         }
        break;
        case 'Piano_Regolatore_2006':
        	window.open("data/pdf/" + fldValue + ".pdf",  "_blank", "menubar=yes,scrollbar=auto,resizable=yes,top=0,left=0,status=yes");	
         
        break;
	case 'PCCA':
        	window.open("data/html/" + fldValue + ".html",  "_blank", "menubar=yes,scrollbar=auto,resizable=yes,top=0,left=0,status=yes");	
         
        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 );
}



