// JavaScript for rNote
// Autho: maki 
// Copyright (c) 2005 maki. All rights reserved.

function openWin(top,url,name,width,height){ 
  var realHeight, option, newWin, imgsrc, css;
  realHeight = height + 40;
  option = "width=" + width + ",height=" + realHeight + ",resizable=yes";
  imgsrc = "<img src=\"" + top + "/" + url + "\" width=\"" + width + "px\" height=\"" + height + "px\" /><br />";
  css = "<link rel=\"stylesheet\" href=\"" + top + "/style/default.css" + "\" type=\"text/css\" media=\"screen\" />";
  newWin = window.open("", name, option); 
  newWin.document.open();
  newWin.document.write("<html>" + css + "<head></head><body style=\"padding:0px;margin:0px;overflow:scroll;\">");
  newWin.document.write(imgsrc);
  newWin.document.write("<div class=\"closeBottom\">");
  newWin.document.write("<a onClick='window.close()'>close</a>");
  newWin.document.write("</div></body></html>");
  newWin.document.close(); 
} 
