function imgWindow(imgurl, win, width, height, restitle, caption, catalogue)
{
 horz = width + 28;
 vert = height + 100;
 imgwin = window.open('', win, 'resizable=no,toolbar=no,menubar=no,width=' + horz + ',height=' + vert);
 imgwin.document.writeln('<html><head><title>' + restitle + '</title><meta http-equiv="imagetoolbar" content="no"></head>');
 imgwin.document.writeln('<body bgcolor="#f2f8ff" text="#000000">');
 imgwin.document.writeln('<div align="center"><img src="' + imgurl + '" width="' + width + '" height="' + height + '" border="0" alt="' + restitle + '"><div class="caption" style="font:10pt Verdana,Arial,Helvetica,sans-serif;">' + caption + '</div>');
 if (catalogue != '') {
  imgwin.document.writeln('<div style="font:8pt Verdana,sans-serif;color:#999">' + catalogue + '</div>');
 }
 imgwin.document.writeln('<div class="popupnav" style="margin:12px;width:100px;margin-right:0;"><a href="javascript:window.parent.close();" style="font:bold 8pt Verdana,Arial,Helvetica,sans-serif;">CLOSE</a></div><div style="height:60px"></div></div>');
 imgwin.document.writeln('</body></html>');
 imgwin.document.close();
 if (window.focus) {
  imgwin.focus()
 }
}

function heardImg(imgurl, win, width, height, restitle, caption)
{
	horz = width + 28;
	vert = height + 100;
	imgwin = window.open('', win, 'resizable=no,toolbar=no,menubar=no,width=' + horz + ',height=' + vert);
	imgwin.document.writeln('<html><head><title>' + restitle + '</title><meta http-equiv="imagetoolbar" content="no"><link rel="stylesheet" href="/style.css" type="text/css"></head>');
	imgwin.document.writeln('<body bgcolor="#ffffff" text="#000000">');
	imgwin.document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">');
	imgwin.document.writeln('<tr>');
	imgwin.document.writeln('<td colspan="3" width="100%"><img src="/images/spacer.gif" alt="" width="1" height="1" border="0"></td>');
	imgwin.document.writeln('</tr>');
	imgwin.document.writeln('<tr>');
	imgwin.document.writeln('<td width="50%" valign="middle"><img src="/images/spacer.gif" alt="" width="1" height="1" border="0"></td>');
	imgwin.document.writeln('<td align="left" valign="middle">');
	imgwin.document.writeln('<img src="' + imgurl + '" alt="' + restitle + '" width="' + width + '" height="' + height + '" border="0"><br>');
	imgwin.document.writeln('<table border="0" cellpadding="5" cellspacing="0" width="100%">');
	imgwin.document.writeln('<tr>');
	imgwin.document.writeln('<td align="left" valign="top" background="/images/popupTitleBacking.jpg"><img src="/images/spacer.gif" alt="" width="5" height="1" border="0"><b>Seal 003</b></td>');
	imgwin.document.writeln('</tr>');
	imgwin.document.writeln('</table>');
	imgwin.document.writeln('<br>');
	imgwin.document.writeln('<img src="/images/spacer.gif" alt="" width="10" height="1" border="0"><b>Dimensions:</b> ' + width + ' &times; ' + height + '<br>');
	imgwin.document.writeln('<img src="/images/spacer.gif" alt="" width="10" height="1" border="0">' + caption + '<br>');
	imgwin.document.writeln('</td>');
	imgwin.document.writeln('<td width="50%" valign="middle"><img src="/images/spacer.gif" alt="" width="1" height="1" border="0"></td>');
	imgwin.document.writeln('</tr>');
	imgwin.document.writeln('<tr>');
	imgwin.document.writeln('<td colspan="3" width="100%"><img src="/images/spacer.gif" alt="" width="1" height="1" border="0"></td>');
	imgwin.document.writeln('</tr>');
	imgwin.document.writeln('</table>');
	imgwin.document.writeln('<div class="popupnav" style="margin:12px;width:100px;margin-right:0;"><a href="javascript:window.parent.close();" style="font:bold 8pt Verdana,Arial,Helvetica,sans-serif;">CLOSE</a></div><div style="height:60px"></div></div>');
	imgwin.document.writeln('</body></html>');
	imgwin.document.close();
	if (window.focus) { imgwin.focus(); }
}

function copyImage(photoId)
{
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var r = document.body.createControlRange();
		if (r == null) {
			alert('Failed to create control range!');
		}
		else {
			r.add(document.all['T' + photoId]);
			r.select();
			r.execCommand('Copy');
		}
	}
	else {
		alert('Copy button only works on Internet Explorer!\nOn your current browser you need to click and drag to select, then press Ctrl+C to copy.');
	}
}

function copyImageText(photoId)
{
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var r = document.body.createTextRange();
		if (r == null) {
			alert('Failed to create text range!');
		}
		else {
			r.moveToElementText(document.all['T' + photoId]);
			r.select();
			r.execCommand('Copy');
		}
	}
	else {
		alert('Copy button only works on Internet Explorer!\nOn your current browser you need to click and drag to select, then press Ctrl+C to copy.');
	}
}