<!--
var singlequote = "'";

if (document.layers) {
	isNS = true;
}
else {
	isNS = false;
}

function setText(layerOrDiv, theText) {
	if (isNS) {
		layerOrDiv.document.open();
		layerOrDiv.document.writeln(theText);
		layerOrDiv.document.close(); 
	}
	else {
		layerOrDiv.innerText = theText;
	}

}

function setCatLabel(centerX, label) {
	var catImgOffset = 162;
	var layerWidth = 80;
	if (isNS) {
		aLayer = document.layers["catTitle"];
		aLayer.left = catImgOffset + centerX - (layerWidth / 2);
		aLayer.top = 78;
		setText(aLayer, "<DIV CLASS='nav' ALIGN='center'>" + label + "</DIV>");
	}
	else {
		aDiv = document.all("catTitle");
		aDiv.style.width = layerWidth;
		aDiv.style.left = catImgOffset + centerX - (layerWidth / 2);
		aDiv.style.top = 84;
		setText(aDiv, label);
	}
	
}

function clearCatLabel() {
	if (isNS) {
		aLayer = document.layers["catTitle"];
		setText(aLayer, "<DIV CLASS='nav'></DIV>");
	}
	else {
		aDiv = document.all("catTitle");
		setText(aDiv, "");
	}
}

function buildMainTablePart1 (photoFile,categoryDescripText) {
	document.write ('<MAP NAME="cat"><AREA ALT="Chicago Jazz" COORDS="8,4,67,59" HREF="cat-chicago.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "37, 'Chicago Jazz')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Untamed Spirits" COORDS="67,4,96,59" HREF="cat-natural.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "82, 'Untamed Spirits')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Take Five" COORDS="96,4,128,59" HREF="cat-chess.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "113, 'Take Five')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Judaica" COORDS="128,4,157,59" HREF="cat-judaica.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "143, 'Judaica')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Sculpted Works" COORDS="157,4,193,59" HREF="cat-carved.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "177, 'Sculpted Works')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Eastern Winds" COORDS="193,4,220,59" HREF="cat-oriental.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "207, 'Eastern Winds')" +'" onMouseOut="clearCatLabel()"><AREA ALT="Chairs" COORDS="220,4,247,59" HREF="cat-chairs.html" SHAPE="RECT" onMouseOver="setCatLabel(' + "236, 'Chairs')" +'" onMouseOut="clearCatLabel()"></MAP>');

	document.write ('<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0"><TR>');
	
	document.write('<TD WIDTH="165" VALIGN="top" BACKGROUND="img-nav/nav-menu.gif"><A HREF="index.html"><IMG SRC="img-nav/nav-title.gif" WIDTH="165" HEIGHT="75" BORDER="0" ALT=""></A>'); // The left "nav" column of the main table.

	document.write('<DIV CLASS="nav"><A HREF="index.html">Home</A></DIV><DIV CLASS="nav"><A HREF="artist.html">The Artist</A></DIV><DIV CLASS="nav"><A HREF="new.html">New Works</A></DIV><DIV CLASS="nav"><A HREF="contact.html">Contact</A></DIV>');
	document.write('<IMG SRC="'); // The detail photo.
	document.write(photoFile);
	document.write('" WIDTH="165" BORDER="0" ALT="">'); //End of detail photo.
	document.write('<BR><BR><DIV CLASS="cat-descrip">');
	document.write(categoryDescripText);
	document.write('</DIV><BR><BR><BR><DIV CLASS="cat-descrip""><BR><BR><HR ALIGN="left" SIZE="1" WIDTH="120" COLOR="#F7B859"><BR>Web site created by <A HREF="http://www.intellity.com" TARGET="Intellity">Intellity Interactive Media</A><BR><BR></DIV></TD>'); // End of "nav' column.
	document.write('<TD VALIGN="top"><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0"><TR><TD WIDTH="258" VALIGN="top" NOWRAP><IMG ID="categories" SRC="img-nav/nav-categories.gif" WIDTH="258" HEIGHT="75" BORDER="0" ALT="" USEMAP="#cat"></TD><TD WIDTH="100%" BACKGROUND="img-nav/nav-line-repeat.gif" VALIGN="top"><IMG SRC="pixel.gif" WIDTH="1" HEIGHT="75" BORDER="0" ALT="">');

	if (document.layers) {
		document.write('<LAYER NAME="catTitle" LEFT="420" WIDTH="80" HEIGHT="24" Z-INDEX="2"></LAYER>');
	}
	else {
		document.write('<SPAN ID="catTitle" CLASS="catLabel" STYLE="position : absolute;"></SPAN>');
	}
	document.write('</TD></TR></TABLE>'); // Categories bar at top of second column.
	document.write('<DIV ALIGN="left">'); // Main content -- Set alignment here //
	//document.write('<BR><IMG SRC="img-nav/divider.jpg" BORDER="0" ALT="">'); 
	document.write('<BR><BR>');
}

function buildMainTablePart2 () {
	document.write ('</DIV></TD></TR><TR><TD ALIGN="right"><IMG SRC="img-nav/nav-pixel.gif" WIDTH="8" HEIGHT="1" BORDER="0" ALT=""></TD><TD BACKGROUND="img-nav/nav-pixel.gif" VALIGN="top"><IMG SRC="pixel.gif" WIDTH="1" HEIGHT="1" BORDER="0" ALT=""></TD></TR><TR><TD><IMG SRC="pixel.gif" WIDTH="1" HEIGHT="1" BORDER="0" ALT=""></TD><TD><DIV CLASS="item"><BR><A HREF="#top">Top of page</A></DIV>');
	document.write ('</TD></TR></TABLE>');
}

function itemLeft (photoFile,itemName,itemText,pushToRightPixels) {
	document.write ('<TABLE><TR>');
	if (!pushToRightPixels) {pushToRightPixels = 18};
	document.write ('<TD><IMG SRC="pixel.gif" HEIGHT="1" WIDTH="' + pushToRightPixels + '" ALT="" BORDER="0"></TD>');
	document.write ('<TD VALIGN="top" ALIGN="right"><A HREF="javascript:zoom(' + singlequote + 'img-large/' + photoFile + singlequote + ')"><IMG SRC="img/' + photoFile + '" ALT="Click to enlarge" BORDER="0"></A></TD>');
	document.write ('<TD VALIGN="bottom" ALIGN="left"><DIV CLASS="item"><DIV CLASS="item-name"><A HREF="javascript:zoom(' + singlequote + 'img-large/' + photoFile + singlequote + ')">' + itemName + '</A></DIV>' + itemText + '<BR><BR><BR><BR></DIV></TD></TR></TABLE>');
	document.write ('<BR><BR>');
}

function itemRight (photoFile,itemName,itemText,pushToRightPixels,detailPhotoFile) {
	document.write ('<TABLE><TR>');
	if (!pushToRightPixels) {pushToRightPixels = 18};
	document.write ('<TD><IMG SRC="pixel.gif" HEIGHT="1" WIDTH="' + pushToRightPixels + '" ALT="" BORDER="0"></TD>');
	document.write ('<TD VALIGN="bottom" ALIGN="left">');
	if (detailPhotoFile) {
		document.write ('<IMG SRC="img/' + detailPhotoFile + '" ALT="" BORDER="0"><BR>');
	}
	document.write('<DIV CLASS="item-right"><DIV CLASS="item-name"><A HREF="javascript:zoom(' + singlequote + 'img-large/' + photoFile + singlequote + ')">' + itemName + '</A></DIV>' + itemText + '<BR><BR><BR><BR></DIV></TD>');
	document.write ('<TD VALIGN="top" ALIGN="right"><A HREF="javascript:zoom(' + singlequote + 'img-large/' + photoFile + singlequote + ')"><IMG SRC="img/' + photoFile + '" ALT="Click to enlarge" BORDER="0"></A></TD></TR></TABLE>');
	document.write ('<BR><BR>');
}

function zoom(imageFile) { 
	if (document.layers) { //Netscape 4
		windowURL = imageFile;
	}
	else { 
		windowURL = "detail.html?" + imageFile;
	}
	popupWindow = window.open(windowURL, "Detail", "width=700,height=550,scrollbars=yes,menubar=no,directories=no,resizable=yes,toolbar=no,status=no,left=20,top=20,screenX=20,screenY=20");
	popupWindow.focus();
}

// -->
