function portfolio(portitem, itemgroup)
{
document.write('<table height="300" cellpadding="0" cellspacing="0" border="0" align="center">\n');
document.write('  <tr>\n');
document.write('    <td width="10"><img src="graphics/spacer.gif" width="10" height="300"></td>\n');

for (i = itemgroup[group].istart ; i <= itemgroup[group].iend ; i++) {
	document.write('    <td width="' + portitem[i].iwidth + '" align="right" valign="middle">\n');
	document.write('      <a href="javascript:openWin(\'' + portitem[i].html + '\',' + portitem[i].hwidth + ',' + portitem[i].hheight + ');"><img src="' + portitem[i].image + '" width="' + portitem[i].iwidth + '" height="' + portitem[i].iheight + ')" border="0"></a><br><font size="-1">' + i + '</font><img src="graphics/spacer.gif" width="20" height="10">\n');
	document.write('    </td>\n');
	document.write('    <td width="10"><img src="graphics/spacer.gif" width="10" height="10"></td>\n');
}

document.write('  </tr>\n');
document.write('</table>\n');
document.write('<table width="780" cellpadding="0" cellspacing="0" border="0">\n');
document.write('  <tr>\n');
document.write('    <td width="40"><br><img src="graphics/spacer.gif" width="40" height="10"></td>\n');
document.write('    <td width="530" height="24"><br><font face="charcoal, sans-serif" size="-1">');

for (g = 0 ; g < itemgroup.length ; g++) {
	var print_group;
	if (g != 0) {
		document.write(' , ');
	}
	if (itemgroup[g].istart == itemgroup[g].iend) {
		print_group = itemgroup[g].istart;
	}
	else {
		print_group = itemgroup[g].istart + '-' + itemgroup[g].iend;
	}
	if (g == group) {
		document.write('<b>' + print_group + '</b>');
	}
	else {
		document.write('<a href="' + curpath + '?grp=' + g + '">' + print_group + '</a>');
	}
}

document.write('    <br><font size="-2">Click on an image for more information.</font>\n');
document.write('    </td>\n');
document.write('    <td width="90"><br>');
if (group != 0) {
	document.write('<a href="' + curpath + '?grp=' + (group - 1) + '"><img src="graphics/back.jpg" width="40" height="24" border="0"></a>');
}
else {
	document.write('<img src="graphics/spacer.gif" width="40" height="24">');
}
if (group == (itemgroup.length - 1)) {
	document.write('<img src="graphics/spacer.gif" width="40" height="24">');
}
else {
	document.write('<a href="' + curpath + '?grp=' + (group - 0 + 1) + '"><img src="graphics/forward.jpg" width="40" height="24" border="0"></a>');
}
document.write('</td>\n');
document.write('  </tr>\n');
document.write('</table>\n');
}	

function openWin(winurl,winwd,winht) {					//open window for enlargement
	var winfeatures = 'width=' + winwd + ',height=' + winht + ',resizable=yes,toolbar,status,menubar,scrollbars,location';
	aWindow = window.open(winurl, "enlarge", winfeatures);
}

function setGroup()				//parse URL to determine current group selection.
{
var query = location.search;
var x = query.indexOf("grp=");

if (x == -1) {
	group = 0;
}
else {
	x = x + 4;
	group = query.substring(x);
}
}

function Item(img, iwd, iht, html, hwd, hht)
{						//Function constructor for portfolio item object
	this.image = img;
	this.iwidth = iwd;
	this.iheight = iht;
	this.html = html;
	this.hwidth = hwd;
	this.hheight = hht;
}

function Group(istart, iend)
{						//Function constructor for item group object
	this.istart = istart;
	this.iend = iend;
}

itemgroup_loeil = new Array(8);			//Initialize the item group array for Trompe L'oeil

itemgroup_loeil[0] = new Group(1,3);
itemgroup_loeil[1] = new Group(4,6);
itemgroup_loeil[2] = new Group(7,8);
itemgroup_loeil[3] = new Group(9,10);
itemgroup_loeil[4] = new Group(11,13);
itemgroup_loeil[5] = new Group(14,15);
itemgroup_loeil[6] = new Group(16,17);
itemgroup_loeil[7] = new Group(18,18);
						//Initialize the portfolio item array for Trompe L'oeil
portitem_loeil = new Array(19);			//Element 0 is unused

portitem_loeil[1] =	new Item("graphics/muraltl1.jpg", 203, 281, "mural1.html", 550, 500);
portitem_loeil[2] =	new Item("graphics/muraltl2.jpg", 217, 281, "mural2.html", 700, 380);
portitem_loeil[3] =	new Item("graphics/muraltl3.jpg", 211, 281, "mural3.html", 550, 500);
portitem_loeil[4] =	new Item("graphics/muraltl4.jpg", 202, 281, "mural4.html", 770, 370);
portitem_loeil[5] =	new Item("graphics/muraltl5.jpg", 218, 281, "mural5.html", 750, 470);
portitem_loeil[6] =	new Item("graphics/muraltl9.jpg", 210, 281, "mural6.html", 490, 530);
portitem_loeil[7] =	new Item("graphics/muraltl7.jpg", 300, 197, "mural7.html", 750, 380);
portitem_loeil[8] =	new Item("graphics/muraltl8.jpg", 300, 197, "mural8.html", 650, 500);
portitem_loeil[9] =	new Item("graphics/muraltl6.jpg", 300, 197, "mural9.html", 490, 500);
portitem_loeil[10] =	new Item("graphics/muraltl10creation.jpg", 300, 197, "mural10.html", 530, 470);
portitem_loeil[11] =	new Item("graphics/muraltl11baby.jpg", 210, 281, "muralbaby.html", 600, 530);
portitem_loeil[12] =	new Item("graphics/muraltl14statue.jpg", 216, 291, "mural14.html", 550, 530);
portitem_loeil[13] =	new Item("graphics/muraltl13lamb.jpg", 216, 291, "murallamb.html", 540, 500);
portitem_loeil[14] =	new Item("graphics/muraltl12.jpg", 300, 197, "mural12.html", 540, 500);
portitem_loeil[15] =	new Item("graphics/muraltl13.jpg", 300, 197, "mural13.html", 480, 600);
portitem_loeil[16] =	new Item("graphics/muraltl15hawaii.jpg", 300, 197, "muralhawaii.html", 480, 480);
portitem_loeil[17] =	new Item("graphics/muraltl16tuscan.jpg", 300, 197, "muraltuscan.html", 570, 480);
portitem_loeil[18] =	new Item("graphics/muraltl17prayer.jpg", 210, 281, "muralprayer.html", 600, 490);




itemgroup_kids = new Array(2);			//Initialize the item group array for Theme Rooms
itemgroup_kids[0] = new Group(1,2);		//if the last page has 1 photo, repeat the photo number
itemgroup_kids[1] = new Group(3,5);		//for example (6,6)
itemgroup_kids[2] = new Group(6,7);

						//Initialize the portfolio item array for Theme Rooms
portitem_kids = new Array(8);			//Element 0 is unused

portitem_kids[1] =	new Item("graphics/themeMAR1.jpg", 300, 197, "muraldolphins.html", 595, 530);
portitem_kids[2] =	new Item("graphics/themeMAR2.jpg", 300, 197, "muralwhales.html", 750, 365);
portitem_kids[3] =	new Item("graphics/themePRIN1L.jpg", 210, 281, "muralariel.html", 510, 485);
portitem_kids[4] =	new Item("graphics/themePRIN2L.jpg", 218, 281, "muraldwarves.html", 510, 475);
portitem_kids[5] =	new Item("graphics/themePRIN4L.jpg", 218, 281, "muralaurora.html", 510, 465);
portitem_kids[6] =	new Item("graphics/themeCAR1.jpg", 300, 197, "muralcar.html", 370, 600);
portitem_kids[7] =	new Item("graphics/themewavesm.jpg", 300, 197, "muralwave.html", 510, 365);




itemgroup_canvas = new Array(2);			//Initialize the item group array for Trompe L'oeil

itemgroup_canvas[0] = new Group(1,2);
itemgroup_canvas[1] = new Group(3,4);

						//Initialize the portfolio item array for Trompe L'oeil
portitem_canvas = new Array(4);			//Element 0 is unused

portitem_canvas[1] =	new Item("graphics/muralc1.jpg", 213, 281, "muralc1.html", 550, 300);
portitem_canvas[2] =	new Item("graphics/muralc2.jpg", 218, 281, "muralc2.html", 600, 300);
portitem_canvas[3] =	new Item("graphics/muralc3.jpg", 218, 281, "muralc3.html", 250, 310);
portitem_canvas[4] =	new Item("graphics/muralc4.jpg", 218, 281, "muralc4.html", 250, 310);


var group;
setGroup();					//Set the current group selection

