
///////////////////////////////////////////////////////////////////////////////
//show_window javascript 
//
// usage of this script file -> showPicture(pictureURL, Short Caption, desiredWidth, desiredHeight)
//////////////////////////////////////////////////////////////////11

var windowObject

    //Create a window to show picture in
    function showPicture(picture, caption, pWidth, pHeight) {
   
     wHeight = parseInt(pHeight) + 50;
     wWidth  = parseInt(pWidth) + 25;
       
     windowObject = window.open("", "ViewPicture", "toolbar=0,width=wWidth, height=wHeight, resizable=0, scrollbars=1");
     windowObject.document.open();

     windowObject.document.write("<P align= 'center'><BR> " + caption + " <br> <img src= " + '"' +  picture + '"' + " width = '" + pWidth + "' height = '" + pHeight + "'></P>");
     windowObject.document.write("<BR><form><P align = 'center'> <input type = 'button' value = 'Close' onclick = 'javascript:top.close()'></P></form>");

     windowObject.document.close();
    }

    //Close status window if picture window exists
    function closeWindow(){
      if((typeof(windowObject) == "object") && !windowObject.closed){
        windowObject.close();
      }
    }

    function showTrain(picture, caption)
    {

     windowObject = window.open("", "ViewPicture", "toolbar=0,width=500, height=600,resizable=0");
     windowObject.document.open();

     windowObject.document.write(" <BR> " + caption + " <br> <img src= " + '"' +  picture + '"' + " width = '400' height = '490'>");
     windowObject.document.write("<BR><form><P align = 'center'> <input type = 'button' value = 'Close' onclick = 'javascript:top.close()'></P></form>");

     windowObject.document.close();
    }