var popImage = null
var popVideo = null
function openPopImg(imageFile, imageTitle, width, height) {
	if(popImage != null && !popImage.closed) popImage.close()
	popImage = window.open('', 'popupImage', 'toolbar=no,scrollbars=no,resizable=no,width=' + width + ',height=' + height)
	popImage.document.write("<html><head><title>" + imageTitle + "</title><style>body{background-image: url('" + imageFile + "');background-repeat: no-repeat;}</style><body></body></html>")
	popImage.document.close()
	}

function openPopVideo(videoName, windowTitle) {
  if (popVideo != null && !popVideo.closed) popVideo.close()
  popVideo = window.open('', 'popupVideo', 'toolbar=no,scrollbars=no,resizable=no,width=320,height=256')
  popVideo.document.write('<html><head><title>'+windowTitle+'</title><style>body{margin:0;padding:0;background-color:#000;}</style></head><body>')
  popVideo.document.write('<embed src="'+videoName+'" width=320 height=256 autoplay=true controller=true loop=false pluginspage="http://www.apple.com/quicktime/">')
  popVideo.document.write('</body></html>')
	popVideo.document.close()
	}
