var get_open="";

function new_wind(width,height,title,url) { if (check_window()) get_open.close();
 var add="width="+(width)+",height="+(height);
 add+=",left="+((screen.availWidth-width)/2);
 add+=",top="+((screen.availHeight-height)/2);
 add+=",scrollbars=no";
 get_open = window.open("","wind",add);

 var html='<html><head>';
 html+='<title>'+title+'</title></head><body onclick="javascript:self.close()" leftmargin=0 topmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0>';

 html+=("<table cellspacing=0 cellpadding=0 width="+width+">");
 //if (title) html+="<tr><td style='padding-left:8px;padding-bottom:4px'><b style='font:bold 11px tahoma'>"+title+"</b></td></tr>";
 html+=("<tr><td><img alt='"+title+"' title='"+title+"' width="+width+" height="+height+" src=\""+unescape(url)+"\"></td></tr>");
 html+="</table>";
 html+="</body></html>";

 get_open.document.open();
 get_open.document.write(html);
 get_open.document.close();
}

function check_window() { if (!get_open) return false;
 else if(get_open.open.closed) return false;
 else return true;
}