function poppreview(filepath,filew,fileh,filet){ var minsize=100; var maxw=800; var maxh=600; var neww=filew; var newh=fileh; if((filew<minsize)||(fileh<minsize)){ if(filew>fileh){ neww=(filew*minsize)/fileh; neww=Math.floor(neww); newh=minsize; } if(fileh>filew){ newh=(fileh*minsize)/filew; newh=Math.floor(newh); neww=minsize; } if(fileh==filew){ neww=minsize; newh=minsize; } } if(filew>maxw){neww=maxw;} if(fileh>maxh){newh=maxh;} ViewImage(filepath,neww,newh,filet,'shakew','yes'); } function ViewImage(ifile,ix,iy,ititle,theName,bResize,tBar,bLoc,mBar,stat,bScroll) { var NS = (document.layers) ? 1 : 0; var NN6=(!document.all && document.getElementById)?1:0; var isAOL = (navigator.appVersion.indexOf("AOL") != -1)?1:0; var flag=((NN6==true) || (isAOL))?1:0; var win; var sWidth; var sHeight; if (!theName){theName='viewer';} if (!ix){width=640;} if (!iy){height=480;} if (!bResize){bResize="yes";} if (!tBar){tbar="no";} if (!bLoc){bLoc="no";} if(!mBar){mbar="no";} if (!stat){stat="no";} if (!bScroll){bScroll="no";} var attr=",scrollbars=" + bScroll + ",status=" + stat + ", menubar=" + mBar + ", toolbar=" + tBar + ", location=" + bLoc + ", resizable=" + bResize; if (NS){theleft=window.screenX + ((window.outerWidth - ix) / 2); thetop=window.screenY + ((window.outerHeight - iy) / 2)}else{theleft = (screen.width - ix) / 2 ; thetop = (screen.height - iy) / 2;} win = window.open("",theName,"width="+ix+",height="+iy+",left="+theleft+",top="+thetop+attr); if (NS) { sWidth = win.innerWidth; sHeight = win.innerHeight; } else if(!isAOL){ sWidth = win.document.body.clientWidth; sHeight = win.document.body.clientHeight; } if(!flag){ if(sWidth!=ix || sHeight!=iy) { win.close(); setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"'"+",'"+theName+"')", 250); return; } } win.document.open(); win.document.write("<html><head><title>"+ititle+"</title>"); win.document.write("</head><body bottommargin='0' leftmargin='0' marginheight='0' marginwidth='0' rightmargin='0' topmargin='0'>"); win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">'); win.document.write("<table align='center' border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td valign='middle' align='center'><img src="+ifile+"></td></tr></table></div></body></html>"); win.document.close(); win.focus(); }