// A function to build a javascript window containing a
// graphic image and a caption consisting of itemcode and item name.

// Rev 03/25/2009 MMG
// Begun 02/12/2003

 // GetFigure assembles an image, an item code, and
 // a caption line consisting of item name into a new
 // window. The parameters govern (1) raw Itemcode
 // to be displayed;
 // (2) ItemCode converted to lowercase, used to assemble
 // the filename for an image file; (3) fixed length
 // (41-char max) item description converted to uppercase,
 // used as caption for the image; (4) window properties; and 
 // (5) 3-char file extension for the image file (e.g. 'jpg' or 'gif').
 function GetFigure (lcItemCode,lcLowCode,lcUpItemDesc,lcWfeatures,lcFtype) {
 
  var w = window.open("",      // URL ( none specified)
         "item_" + lcItemCode, // Name (should be unique)
         lcWfeatures); // Features (e.g.,'resizable,status,width=320,height=400')
  var d = w.document;     // We use this variable to save typing    
 
 // Output an HTML document into the new window
 d.write('<IMG SRC = "images/'+ lcLowCode +'.'+ lcFtype +'">')
 d.write('<BR>')
 d.write(lcItemCode)
 d.write('<BR><strong>')
 d.write(lcUpItemDesc)
 d.write('</strong><BR>')
 // Remember to close the document when we're done
  d.close();
  }

