function JustSizeWindow(img,width,height){ 

    /* ウィンドウを開く位置、ウィンドウサイズを指定 */ 
    var opt = ""; 
    opt += 'top=0,left=0'; 
    opt += ',width='+width+',height='+height+','; 
    opt += 'directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0'; 

    /* 新ウィンドウを開く */ 
    jsw=window.open('','jsw',opt); 
    /* 新ウィンドウにフォーカスを当てる */ 
    jsw.focus(); 

    /* 新ウィンドウにドキュメントを書出 */ 
    jsw.document.open(); 
    htm  = '<html><head>'; 
    htm += '<meta http-equiv="Content-Type" content="text/html; charset=shift_JIS">'; 
    htm += '<meta http-equiv="Imagetoolbar" content="no">'; 
    htm += '<title>画像サンプル</title>'; 
    htm += '</head>'; 
    /* BODYタグの余白をゼロに指定 */ 
    htm += '<bod' + 'y style="margin:0; padding:0;">'; 
    /* 画像をクリックすると、ウィンドウを閉じるようにする */ 
    htm += '<a href="javascript:window.close();">'; 
    htm += '<img src="'+img+'" width="'+width+'" height="'+height+'" border="0" alt="画像をクリックするとウィンドウを閉じます">'; 
    htm += '</a>'; 
    htm += '</bod'+'y></html>'; 
    jsw.document.write(htm); 
    jsw.document.close(); 

} 
