﻿function ShowLargeWindow(myImage, mywidth, myheight) {
    leftPos = 20;   // set defaults
    topPos = 20;

mywidth = mywidth + 40;
myheight = myheight + 40;

    //Shauns code - automatically gets size requirements for image to fix window
    /*
    var img = new Image();
    img.src = myImage;

    mywidth = img.width + 40;
    myheight = img.height + 40; */ 

 //   alert('Width =' + mywidth + '   height = ' + myheight);
    if (screen) {
        leftPos = screen.width / 2 - 450;
        topPos = screen.height / 2 - 300;
    }
    myWindow = window.open(myImage, 'ImageWindow', 'toolbar=no;statusbar=no,menubar=no,titlebar=no,location=no,scrollbars=no,resizable=no,width=' + mywidth + ',height=' + myheight +',left=' + leftPos + ',top=' + topPos + '');
    myWindow.focus();
}    

