<!--

// ShowPicture opens a new window and shows the picture in it as a maximised image


function ShowPicture(URL) {

        URL = "highres/" + URL;

        function ImageDimension (evt) {

                PictureWindow = window.open("", "PictureWindow", "menubar,resizable,scrollbars,status");
                PictureWindow.moveTo(screen.availTop,screen.availLeft);
                PictureWindow.resizeTo(screen.availWidth-10,screen.availHeight-10);

                var ie4 = (document.all);
                if (ie4) {
                        // Code works on Internet Explorer
                        WindowWidth  = screen.width-20;
                        WindowHeight = screen.height-20;
                }
                else {
                        // Code works on Netscape
                        WindowWidth  = PictureWindow.innerWidth;
                        WindowHeight = PictureWindow.innerHeight;
                }

                PictureWidth =  TheImage.width;
                PictureHeight = TheImage.height;


                if (PictureHeight / PictureWidth > WindowHeight / WindowWidth)
                        {
                        // Vertical maximisation
                        ScaledHeight = WindowHeight - 20;
                        ScaledWidth  = parseInt(PictureWidth * ScaledHeight / PictureHeight);
                        }
                else
                        {
                        // Horizontal maximisation
                        ScaledWidth  = WindowWidth - 25;
                        ScaledHeight = parseInt(PictureHeight * ScaledWidth / PictureWidth);
                        }

                PictureWindow.document.writeln("<HTML>");
                PictureWindow.document.writeln("<BODY>");
                PictureWindow.document.writeln("<CENTER>");
                PictureWindow.document.writeln("<A HREF='" + URL + "'>");
                PictureWindow.document.writeln("<img src='" + URL + "' width="+(ScaledWidth)+" height="+(ScaledHeight)+"  Border=0>");        
                PictureWindow.document.writeln("</A></CENTER></BODY></HTML>");        
                PictureWindow.document.close();        

                PictureWindow.focus();
                }


        var TheImage = new Image();
        TheImage.onload = ImageDimension;
        TheImage.src = URL;
}

        
//-->


