/*
<a href="#"><img src="images/gal32a.jpg" 
name="gallery32" width="140" height="100" border="0" id="gallery32" 
onClick="galwindow('gal32.jpg',359,390, '')"></a>
*/

function galwindow(filename, width, height, copy)
{
	var filename;
	var height;
	var width;
	var copy = copy.toString();
	var copystring = "";
	var winwidth  = parseInt(width) + 60;
	var winheight = parseInt(height) + 250;
	
	

	if(copy.length > 1)
	{copystring = "<p>&copy; " + copy + "</p>";}
	else
	{copystring = "<p>&nbsp; </p>";}

	gallerywindow = window.open('', "Gallery",
	"height=" + winheight + ", width=" + winwidth +
	",directories=no,location=no,menubar=no, top=2 left=2" +
	"resizeable=no,status=no,toolbar=no",1);
	
	gallerywindow.resizeTo(winwidth, winheight);
	
	gallerywindow.document.open();
	
	gallerywindow.window.focus();
	
	gallerywindow.document.writeln("<html><head><title>CFRC Gallery</title></head>" +
		"<body>"+ 
		"<div align='center'><a href='#' onClick='return window.close();'>" + 
		"<img src='" + filename + "' width = '" + width +
		" height = '" + height + "' alt='Gallery Image, Click to close' border='0'></a>" +
		"<p><b>Please click the image to return to the main site</b><br>" +
		"Images on this site are copyright and may not be reproduced without the express "+
		"permission of the photographer</p>" + copystring +
		"</div></body></html>");
	
	gallerywindow.document.close()

	return true;
}
