function openImgXY(FileName,W,H,Title) { var Str="", Max=false; var X=0,Y=0,oW=0,oH=0; var aW=0,aH=0;xc=0,yc=0; if (window.screen) { // centre it on the screen... aW=screen.availWidth; aH=screen.availHeight; xc=(aW-W)/2; yc=(aH-H)/2; } if (W!=null) { if (W>0) { X=W } if (W>(aW-10) || W<0) { Max=true; oW=aW; W=aW-10; xc=0; } } if (H!=null) { if (H>0) { Y=H } if (H>(aH-30) || H<0) { Max=true; oH=aH; H=aH-30; yc=0; } } if (Max) {Str="scrollbars=yes,resizable=yes,width="+W+",height="+H+",outerWidth="+oW+",outerHeight="+oH} else {Str="scrollbars=no,status=no,menubar=no,width="+W+",height="+H+",innerWidth="+W+",innerHeight="+H} Str +=",left="+xc+",top="+yc+",screenX="+xc+",screenY="+yc; myWin=window.open("",'_blank',Str); if (myWin) { var netscape = (navigator.appName.toLowerCase().indexOf("netscape") > -1); var widthAdj = (netscape) ? 6 : 10; var heightAdj = (netscape) ? 41 : 30; if (W == null || H == null) { with (myWin) { var contents=" "+ FileName +" \n\n\n"; document.open("text/html"); document.write(contents); document.close(); } // with } else { myWin.document.writeln(""+Title+""); myWin.document.writeln(""); myWin.document.write(""); myWin.document.writeln(""); myWin.document.close; } } myWin.focus(); //return myWin; }