
var IE = false;
var NS = false;
var browser_version = parseInt(navigator.appVersion);
var browser_type = navigator.appName;
if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4))
{
	IE = true;
}
else if (browser_type == "Netscape" && (browser_version >= 4) && (browser_version < 5))
{
	NS = true;
}
else if (browser_type == "Netscape" && (browser_version >= 5))
{
	NS = false;
}

function showLayer(name)
{
	if (IE) { name.style.visibility = "visible"; }
	if (NS) { name.visibility = "show"; }
}

function hideLayer(name)
{
	if (IE) { name.style.visibility = "hidden"; }
	if (NS) { name.visibility = "hide"; }
}

function createLayer(layer, sImage, lImage, caption, sWidth, sHeight, lWidth, lHeight)
{
	if (NS)
	{
		document.write('<ILAYER>');
		document.write('<LAYER id="' + layer + '" visibility="hide" z-index="10" onMouseOver="showLayer(' + layer + '); " onClick="hideLayer (' + layer + ')">');
		document.write('<table border=0><tr><td valign=middle align=top><IMG src="/resize.php?hirez=1&size=' + lWidth + 'x' + lHeight + '&color=1&file=' + lImage + '" border="0" height=' + lHeight + ' width=' + lWidth + '></td>');
		document.write('<td valign=middle align=top>' + caption + '</td></tr></table>');
		document.write('</LAYER>');
		document.write('<LAYER visibility="show" z-index="5" onClick="showLayer(' + layer + ')" onMouseOut="hideLayer(' + layer + ')">');
		document.write('<IMG src="/resize.php?hirez=1&size=' + sWidth + 'x' + sHeight + '&color=1&file=' + sImage + '" border="0" height=' + sHeight + ' width=' + sWidth + '>');
		document.write('</LAYER>');
		document.write('</ILAYER>');
	}
	if (IE)
	{
		document.write('<DIV id="' + layer + '" style="position: absolute; visibility: hidden; z-index: 10; background-color: black;"  onMouseOver="showLayer(' + layer + ')" onClick="hideLayer(' + layer + ')">');
		document.write('<table border=2 width=' + (lWidth + 150) + '><tr class=row1><td width=' + lWidth + ' valign=middle align=top><IMG src="/resize.php?hirez=1&size=' + lWidth + 'x' + lHeight + '&color=1&file=' + lImage + '"  border="0" height=' + lHeight + ' width=' + lWidth + '></td>');
		document.write('<td class=row2 valign=top align=top width=150>' + caption + '</font></td></tr></table>');
		document.write('</DIV>');
		document.write('<IMG alt="Click to zoom" src="/resize.php?hirez=1&size=' + sWidth + 'x' + sHeight + '&color=1&file=' + sImage + '" border="0" onClick="showLayer(' + layer + ');" height=' + sHeight + ' width=' + sWidth + '>');
	}
};

