winset = new Array()

function openwin_content(content, width, height, params) {
  wl = winset.length
  winset[wl] = window.open("about:blank", 'win_'+wl, 'width='+(width)+',height='+(height)+','+params);
  winset[wl].document.write(content);
}

function makepopup(src_file, title, w, h) {
pgwindow = window.open('', 'BadenBaden', 'toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,width=' + w + ',height=' + h);
pgwindow.document.write("<head><title>" + title + "<\/title>");
pgwindow.document.write("<script language='javascript'>");  
pgwindow.document.write("var NS = (navigator.appName == 'Netscape') ? true : false;");
pgwindow.document.write("function resize() {");
pgwindow.document.write("iWidth = (NS)?window.innerWidth:document.body.clientWidth;");
pgwindow.document.write("iHeight = (NS)?window.innerHeight:document.body.clientHeight;");
pgwindow.document.write("iWidth = document.images[0].width - iWidth;");
pgwindow.document.write("iHeight = document.images[0].height - iHeight;");
pgwindow.document.write("window.resizeBy(iWidth, iHeight);");
pgwindow.document.write("self.focus();");
pgwindow.document.write("}");
pgwindow.document.write("<\/script>");
pgwindow.document.write("<\/head>");
pgwindow.document.write("<body topmargin='0' marginheight='0' leftmargin='0' marginwidth='0' onload='resize();'><img src='" + src_file + "' border='0' hspace='0' vspace='0' \/><\/body>");
pgwindow.document.close();
pgwindow.moveTo(0,0);	
}

