// function view_image_popup(string text, int x, int y)
//
// This function opens a new window of width 'int x' pixels, and height 'int y' pixels;
//  and then displays the image 'string text' within a set page context.
//
function view_image_popup(image, width, height) {

    // Test image is 403 x 301 pixels and test results are window needs to be 419 x 335 for output using Firefox
    width += 16;
    height += 34;

    win1 = window.open("", "Window1", "width=" + width + ",height=" + height + ",resizeable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no");
    win1.document.writeln('<html>');
    win1.document.writeln('<head>');
    win1.document.writeln('</head>');
    win1.document.writeln('<body>');
    win1.document.writeln('<img src="images/' + image + '"><br>');
    win1.document.writeln('<a href="javascript:self.close()" onmouseover="window.status=\'\';return true" onmouseout="window.status=\'\';return true">close window</a>');
    win1.document.writeln('</body>');
    win1.document.writeln('</html>');
}

