//
// HYPERLINK FUNCTION FOR RESULT WINDOW
//

function openHyperlink(layer, fldName, fldValue) {

    switch(layer) {
/*    
        case 'secteurs':
		      if (fldValue!="") {
        		w=open("./data/reglement/"+fldValue,'rglt','width=400,height=400,toolbar=yes,scrollbars=yes,menubar=yes,resizable=yes');
        	}
        	break;
       	
        case 'secteursContour':
		      if (fldValue!="") {
        		w=open("./data/reglement/"+fldValue,'rglt','width=572,height=400,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes');
        	}
        	break;
*/ 
        case 'secteursCouleurFond':
		      if (fldValue!="") {
        		w=open("./data/reglement/"+fldValue,'rglt','width=572,height=400,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes');
        	}
        	break;
        	
        case 'arbre_prot':
            	w=open("./data/raster/Photo_arbre_70Mo/"+fldValue,'photo','width=440,height=350,toolbar=no,scrollbars=yes,resizable=yes');	// width=400
        	break;
        	
        case 'amenagmnt':
            	w=open("./data/raster/Schema_orientation/"+fldValue,'amenagmnt','width=400,height=350,toolbar=no,scrollbars=yes,resizable=yes');
        	break;
        	
        case 'eboulmnt':
            	w=open("./data/reglement/"+fldValue,'eboulemnt','width=500,height=500,toolbar=no,scrollbars=yes,resizable=yes');
        	break;        	
        
        case 'zpr_poly':
            	w=open("./data/reglement/"+fldValue,'zpr','width=572,height=500,toolbar=no,scrollbars=yes,resizable=yes');
            	break;    	

        case 'monu_hist':
            	w=open("./data/reglement/"+fldValue,'monu','width=572,height=500,toolbar=no,scrollbars=yes,resizable=yes');
            	break;    	

        case 'bruit1':
            	w=open("./data/reglement/"+fldValue,'bruit','width=572,height=500,toolbar=no,scrollbars=yes,resizable=yes');
            	break;    	
            	
        case 'schema_amenag_ouest':
            	w=open("./data/reglement/"+fldValue,'schema_amenag_ouest','width=572,height=500,toolbar=no,scrollbars=yes,resizable=yes');
            	break;    	
        	
        default : 

    }
}



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 );
}




