// 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)
{
if (parseInt(navigator.appVersion) >= 4)
	{
	var window_width = (img_width + 20);
	var window_height = (img_height + 40);
	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 + 55);
	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><IMG SRC="../schools_files/%27%2Bimg_url%2B%27" WIDTH='+img_width+' HEIGHT='+img_height+' ALT="'+title+'" BORDER="0" VSPACE="4"></TD></TR>';

newpage += '<TR><TD><CENTER><FORM><INPUT TYPE="BUTTON" VALUE="Close" onclick="self.close()" STYLE="cursor: hand;"></FORM></CENTER></TD></TR></TABLE></CENTER></BODY></HTML>';

newwin.document.write(newpage);
newwin.document.close();  
newwin.focus();
}