function openImage(title, img, h, w) {
    var newWinContent = "<html>"
    newWinContent += "<head>"
    newWinContent += "<title>" + title + "</title>"
    newWinContent += "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    newWinContent += "</head>"
    newWinContent += "<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"
    newWinContent += "<table border='0' width='" + w + "' height='" + h + "' border='0' cellspacing='0' cellpadding='5'>"
    newWinContent += "<tr>"
    newWinContent += "<td align='center' valign='center'><img src='" + img + "'></td>"
    newWinContent += "</tr>"
    newWinContent += "</table>"
    newWinContent += "</body>"
    newWinContent += "</html>"
    
    newWindow = window.open('','newwin','width=' + w + ',height=' + h + "'");
    
    newWindow.document.write(newWinContent);
    newWindow.document.close() // close layout stream
}