// thumbnail viewer
// dynamically auto-centres the window in version 4+ browsers
// by will b 24/10/00 (will@bfinternet.co.uk)

function viewthumb(img_url,img_width,img_height,title)
{
var window_width = (img_width + 30);
var window_height = (img_height + 50);
var sw = screen.width;
var sh = screen.height;
var window_left = ((sw/2) - (window_width/2) - 16);
var window_top = ((sh/2) - (window_height/2) - 20);
newwin = open("","newwindow","width="+ window_width +",height="+ window_height +",scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,left="+ window_left +",top="+ window_top +",screenx="+ window_left +",screeny="+ window_top);
	
newwin.document.open();

var newpage = '<HTML><HEAD><TITLE>'+title+'</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" MARGINWIDTH="0" MARGINHEIGHT="8" LEFTMARGIN="0" TOPMARGIN="8">';

newpage += '<CENTER><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD><IMG SRC="'+img_url+'" WIDTH='+img_width+' HEIGHT='+img_height+' ALT="'+title+'" BORDER="1" VSPACE="4"></TD></TR>';

newpage += '<TR><TD><CENTER><FORM STYLE="margin:0px"><INPUT TYPE="BUTTON" VALUE="Close Window" onClick="self.close()" STYLE="cursor: hand;"></FORM></CENTER></TD></TR></TABLE></CENTER></BODY></HTML>';

newwin.document.write(newpage);
newwin.document.close();  
newwin.focus();
}