imagename = '';
function img_popup(imgnme) {
    lrgewin = window.open("about:blank","","height=200,width=400")
    imagename = imgnme;
    setTimeout('update()',500)
}

function update() {
    doc = lrgewin.document;
    doc.open('text/html');
    doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n');
    doc.write('<html>\n<head>\n<title>Wingpsread Gallery<\/title>\n<link rel="stylesheet" type="text/css" href="/css/wingspread.css" />\n<\/head>\n<body onLoad="if (self.resizeTo)self.resizeTo((document.images[0].width+140),(document.images[0].height+150))">\n');
    doc.write('<table style="width: 100%;"><tr><td style="text-align: center;">');
    doc.write('<a href="#" onClick="window.close()"><img alt="Wingspread Gallery" src="' + imagename + '"  /></a>\n');
    doc.write('<br />Click the image to close the window.');
    doc.write('</td></tr></table>');
    doc.write('<div style="color: white;" id="footer">All Text and Images Copyright Wingspread Gallery. All Rights Reserved.</div>\n');
    /* doc.write('<form name="viewn">\n<input type="button" value="Close Window" onClick="self.close()" />\n<\/form>\n'); */
    doc.write('<\/body><\/html>');
    doc.close();
}

