

//
// HYPERLINK FUNCTION FOR RESULT WINDOW
//

function openHyperlink(layer, fldName, fldValue) {
    //alert (layer + ' - ' + fldName + ' - ' + fldValue);
    switch(layer) {
        
 	  case 'piano_regolatore_generale':
		var layerurl='./custom/zto/scheda_prg.php?cod='+fldValue;
		var mywin=window.open(layerurl,'','width=700,height=400,scrollbars=yes');
            //alert ('For layer ' + layer + ' - ' + fldName + ' - ' + fldValue);
            
	    break;

	  case 'particelle':
		var layerurl='./custom/default_terreni.php?chiave=' + fldValue;
//		var layerurl='./custom/cdu/richiedente_cdu_terreni.php?chiave=' + fldValue;
		var mywin=window.open(layerurl,'','width=750,height=350,scrollbars=yes');
            //alert ('For layer ' + layer + ' - ' + fldName + ' - ' + fldValue);

/*             window.open('./custom/cdu/richiedente_cdu_terreni.php?chiave=' + fldValue, 'cdu');
*/
		break;
	  
	  case 'fabbricati':
		var layerurl='./custom/default.php?chiave='+fldValue;
		var mywin=window.open(layerurl,'','width=750,height=350,scrollbars=yes');
            //alert ('For layer ' + layer + ' - ' + fldName + ' - ' + 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 );
}



