/* Open window script

Place following line between <head> and </head>:
<script language="JavaScript"src="../java/open_window.js"></script>

Example 1:
<a href="JavaScript:openW('popup-windows/xxxxxxxxxxxxx.html','windowname',700,475,'scrollbars=yes')">OpenWindow</a>

Example 2 (without underlining of link):
<a href="JavaScript:openW('popup-windows/xxxxxxxxxxxxx.html','windowname',700,475,'scrollbars=yes')" style="text-decoration: none">OpenWindow</a>

Example 3 (linking from picture, no border):
<a href="JavaScript:openW('popup-windows/scn_pdc_1980-release.html','pdc1980',697,539,'scrollbars=no')"><img src="../images/lrh/clickpdc.gif" alt="PDC release 1980" width="150" height="138" hspace="10" vspace="5" border="0" align="right"></a>

*/

function openW(mypage,myname,w,h,features) {
if(screen.width){
var winl = (screen.width-w)/5; /* position of window from left, /2 is in middle */
var wint = (screen.height-h)/5; /* position of window from top, /2 is in middle */
}else{winl = 0;wint =0;}
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}