
function OpenBigImage(imgFileName,imgTitle,imgWidth,imgHeight) {
	if (!imgWidth) {
		var imgWidth = 640;
	}
	if (!imgHeight) {
		var imgHeight = 480;
	}
	if (imgWidth > imgHeight) {
		var imageWindow = window.open('','imageWindow','width=660,height=540,scrollbars=no,toolbars=no,resizable=no');
	} else {
		var imageWindow = window.open('','imageWindow','width=500,height=700,scrollbars=no,toolbars=no,resizable=no');
	}
	var imageDocument = imageWindow.document;

	imageDocument.write('<html><head><title>' + imgTitle + '</title>\n');
	imageDocument.write('<link rel="stylesheet" href="style.css" type="text/css"></head>\n<body class="biggerimagepage">\n');
	if (imgWidth > imgHeight) {
		imageDocument.write('<img src="' + imgFileName + '" width=640 height=480><p>\n');
	} else {
		imageDocument.write('<img src="' + imgFileName + '" width=480 height=640><p>\n');
	}
	imageDocument.write('<input type="button" value="Close Window" class="biggerimagebutton" onclick="javascr' + 'ipt:window.close();" align=center>\n');
	imageDocument.write('</body></html>');
	imageDocument.close();
}
