// 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,description)
{
if (parseInt(navigator.appVersion) >= 4)
	{
	var window_width = (img_width + 20);
	var window_height = (img_height + 62);
	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);
	}
	
else
	{
	var window_width = (img_width + 25);
	var window_height = (img_height + 65);
	newwin= open("","newwindow","width="+ window_width +",height="+ window_height +",scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,left=200,top=100,screenx=200,screeny=100");
	}
	
newwin.document.open();

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

newpage += '<CENTER><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD COLSPAN="3"><IMG SRC="images/td_spacer_three.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR><TR><TD COLSPAN="3"><IMG SRC="images/td_seperator.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR><TR><TD BGCOLOR="#FABB04" COLSPAN="3" VALIGN="BOTTOM"><IMG SRC="images/td_seperator.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR><TR><TD BGCOLOR="#FABB04" ALIGN="RIGHT"><IMG SRC="images/td_seperator.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD><TD BGCOLOR="#FFFFFF"><TABLE><TR><TD><IMG SRC="'+img_url+'" WIDTH='+img_width+' HEIGHT='+img_height+' ALT="'+title+'" BORDER="0"></TD></TR></TABLE></TD><TD BGCOLOR="#FABB04" ALIGN="LEFT"><IMG SRC="images/td_seperator.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR><TR><TD BGCOLOR="#FABB04" VALIGN="TOP" COLSPAN="3"><IMG SRC="images/td_seperator.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR>';

newpage += '<TR><TD COLSPAN="3"><FONT FACE="Arial,Helvetica" SIZE="-1"><P ALIGN="CENTER">'+description+'</P></FONT></TD></TR>';

newpage += '<TR><TD COLSPAN="3"><IMG SRC="images/td_spacer_three.gif" WIDTH=1 HEIGHT=1 BORDER="0"></TD></TR>';

newpage += '<TR><TD COLSPAN="3"><CENTER><FORM><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();
}