function openPDF (url) { window.open(url ,"directory_window","toolbar=0,location=0,scrollbars=1,resizable=1"); return false; } var utilmap_window; var rightmargin = 50; var maxWidth = 1280; var maxHeight = maxWidth/(4/3); var windowRatio = 0.85; function openMap (url) { var height = getHeight(); var width = getWidth(); var imagewidth = width - rightmargin; //alert(width + ' ' + imagewidth); var newurl = url + '&width=' + imagewidth; //alert ('url is ' + newurl); var params = "toolbar=0,location=0,scrollbars=1,resizable=1,status=1,directories=0,width=" + width + ",height=" + height + ",left=10,top=10"; utilmap_window = window.open(newurl ,"utilmap_window",params); if (utilmap_window != null) utilmap_window.focus(); return false; } function getWidth () { //alert('screen width' + screen.width); if (screen.width > maxWidth) return (maxWidth * windowRatio); else return (screen.width * windowRatio); } function getHeight () { if (screen.height > maxHeight) return (maxHeight * windowRatio); else return (screen.height * windowRatio); }