function popPhoto(varTitle,varYear,varNotes,varAltImagePath,varAltImageWidth,varAltImageHeight){    

var windowWidth;
var windowHeight;
windowWidth = (parseInt(varAltImageWidth) + 100);
windowHeight = (parseInt(varAltImageHeight) + 160);
//alert("varImageWidth: " + varImageWidth + " and theWinWidth: " + theWinWidth); 
	var OpenWindow=window.open('','newwin','scrollbars=yes,height='+windowHeight+',width='+windowWidth+',resizable=yes');  
		OpenWindow.document.writeln('<html><head><title>' + varTitle + '</title><link rel="stylesheet" href="/css/popup_photo.css" type="text/css"/></head>');
		OpenWindow.document.writeln('<body onload="self.focus();">');  
		OpenWindow.document.writeln('<div id="imagepopup">');
		OpenWindow.document.writeln('<img src="' + varAltImagePath  +'" width="' + varAltImageWidth + '" height="' + varAltImageHeight + '" alt="" border="0"/>');
		OpenWindow.document.writeln('<div id="title">' + varTitle + '</div>'); 
			if(varYear !='')OpenWindow.document.writeln('<div id="date">' + varYear + '</div>'); 
			if(varNotes !='') OpenWindow.document.writeln('<div id="notes"><i>' + varNotes + '</i></div>'); 
		OpenWindow.document.writeln('<div id="close"><a href="javascript: window.close();">X Close</a></div>'); 
		OpenWindow.document.writeln('</div></body></html>'); 
		OpenWindow.document.close();
		OpenWindow.focus();
}
