// writes on the fly a document with photo and caption
function showPhoto(whichPhoto, myWidth, myHeight){
	myCaption = whichPhoto.title;
	myWindow = window.open("", "_blank", "width=" + myWidth + ",height=" + (parseInt(myHeight)+34) + ",toolbar=0,resizable=0,location=0,menubar=0,status=0,scrollbars=0");
	myContent="<html><head><title>" + myCaption + "</title><link rel='stylesheet' type='text/css' href='sheets/llfstyles.css' media='screen'></head>"
	myContent += "<body id='gallery' onBlur='self.close()'><img src=" + whichPhoto + " />"
	myContent += "<p class='popcaption'>"+myCaption+"</p></body></html>"

	myWindow.document.write(myContent)
	myWindow.document.close() 
}

// Function to open "Video" popup window
function showVideo(whichVideo) {
	PlayWin = window.open("","_blank", "width=260,height=220,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0");
	PlayWin.focus(); 
var winContent = "<html><head><title>" + whichVideo + "</title></head>";
winContent += "<body><p><param name='SRC' value='" +  whichVideo + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>";
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#000000'>";
winContent += "<EMBED SRC='" + whichVideo + "' AUTOSTART='TRUE' LOOP='FALSE' CONTROLLER='TRUE' BGCOLOR='#000000'></EMBED>";
winContent += "</OBJECT></p></body></html>";

PlayWin.document.write(winContent);
PlayWin.document.close();
}