	function photoWindow(img,w,h)
	{
	//width=" +w+ ",height=" +h+",
	phWindow=window.open(img,"photoWin","width="+w+",height="+h+",toolbar=no,location=no,scrollbars=yes,top=0,left=0,resizable=yes");
	phWindow.focus();
	}
	
	//function to dynamically create the pages for the full size photos
	function PhWindow(pTitle,pWidth,pHeight,phSrc,phAlt,phBack,phTxt) {
	var tWidth,tHeight
	tWidth = parseInt(pWidth) + 20
	tHeight = parseInt(pHeight) + 20

	pCode = "<html><head><title>" + pTitle + "</title>"
	pCode = pCode + "</head><body bgcolor='" + phBack + "' text='" + phTxt + "' link=#0000FF vlink=#FF00FF> "
	pCode = pCode + "<div align='center'><table width='" + tWidth + "' height='"
	pCode = pCode + tHeight + "'"
	pCode = pCode + " bordercolor='#A6A6A6' bordercolorlight='#A6A6A6' bordercolordark='#858585'"
	pCode = pCode + " bgcolor=#000000 cellspacing=0 cellpadding=0 border=20>"
	pCode = pCode + "<tr><td><div align='center'><img src='" + phSrc + "' width= '" + parseInt(pWidth)+ "'" 
	pCode = pCode + "  height='" + parseInt(pHeight) + "' alt='" + phAlt + "' border=0></div>"
	pCode = pCode + "</td></tr></table><br /><b>" + phAlt + "<b><br />"
	pCode = pCode + "</body></html>"

// note, Opera generates an error message with the window.open method if the first parameter is open " "
	pWin = window.open("","PhotoWin","width = 600,height = 400,scrollbars=yes,toolbar=no,location=yes,resizable=yes,status=yes")
	pWin.document.write(pCode)
	pWin.document.close()
	}
	
function getObj(name)
{
	if (document.getElementById)
	{
	   this.obj = document.getElementById(name);
	}
	else if (document.all)
	{
	   this.obj = document.all[name];
	}
 }	
	
// find the position of the dummy 'textEnd' element
function findBottom(){
	if (document.getElementById){
		this.obj = document.getElementById('textEnd');
		}
	else if (document.all){
		this.obj = document.all['textEnd'];
	}

		var xPos = findPosY(this.obj);
		//alert("position of bottom of text: " + xPos);
		if (xPos > 700){
			xPos += 10;
			setLayerPos(xPos)
		}
		else
			setLayerPos(700);
}
// this function copied from PPKoch
function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
	{
	curtop += obj.offsetTop
	obj = obj.offsetParent;
	}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
// resize layers to that of the text
// wrote this due to font, line height differences in browsers
function setLayerPos(X){
	document.getElementById('Foot').style.top = X + "px";
	document.getElementById('Layer1').style.height = X + "px";
	document.getElementById('Layer2').style.height = X + "px";
	document.getElementById('Layer3').style.height = X + "px";
}	