BaseWidth=1280; NewWindowWidth=BaseWidth-50; NewWindowHeight=Math.floor(BaseWidth*0.75)-50; MaxWidth=NewWindowWidth-30; MaxHeight=NewWindowHeight-30; function Disp(FileName,Wo,Ho){ Ratio=Math.min(MaxWidth/Wo,MaxHeight/Ho); if(Ratio>1)Ratio=1; W=Math.floor(Wo*Ratio); H=Math.floor(Ho*Ratio); mW=window.open("","NewWindow","width="+NewWindowWidth+",Height="+NewWindowHeight); mW.focus(); mW.document.open(); mW.document.write("
");
mW.document.write("");
mW.document.write(" |