// JavaScript Document
function displayPhoto(imageUrl,imageWidth,imageHeight,textdescription) {

var name="popup";
var windowWidth=imageWidth+20;
var windowHeight=imageHeight+100;

var features="width="+windowWidth+",height="+windowHeight; 

features+="menubar=no,status=no,scrollbar=no,toolbar=no,location=no,top=30,left=30";

var myNewWindow=window.open('',name,features);

myNewWindow.focus();
myNewWindow.document.open();
myNewWindow.document.write("<html>");
myNewWindow.document.write("<head>");
myNewWindow.document.write("<title>Castles,Ruins,Churches</title>");
myNewWindow.document.write("</head>");
myNewWindow.document.write("<body bgcolor='#d3f6f6'>");
myNewWindow.document.write("<div style='text-align: center; color: #000066; font-size: 12px; margin-top: 5px;'>"+textdescription+"</div>");
myNewWindow.document.write("<img width="+imageWidth+" height="+imageHeight+" src="+imageUrl+">");
myNewWindow.document.write("<form>");
myNewWindow.document.write("<input type='button' value='close this window!' onClick='parent.close()'>");
myNewWindow.document.write("</form>");
myNewWindow.document.write("</body>");
myNewWindow.document.write("</html>"); 
myNewWindow.document.close();
}