
// constructor for glass objects
function glass (id, desc, image, number, width, height,  price, colors) {
  this.id = id;
  this.desc = desc;
  this.image = image;
  this.number = number;
  this.height = height;
  this.width = width;
  this.price = price;
  this.colors = colors; 

  function getDesc( ) {
    return this.desc;
  }
  
  function getPrice(  ) {
    return "$ " + this.price;
  }

  function getSmallImage(  ) {

    var img = "<img alt='" + this.desc + "' src='" + 
  	  this.image + "_sm.jpg' height='" +
	    this.height[0] + "' width='" + 
  	  this.width[0] +"'>";
//  alert(glassNum + " - " + img);
    return img;
  }

  function getMediumImage(  ) {

    var img = "<img alt='" + this.desc + "' src='" + 
  	  this.image + "_med.jpg' height='" +
	    this.height[1] + "' width='" + 
  	  this.width[1] +"'>";
//  alert(glassNum + " - " + img);
    return img;
  }

  function getColors(  ) {
    var clr = this.colors;
    var xx = "<select name='colors' title='Glass color selection' >" ;
  
    if (clr.length > 1) {
      xx += "<option value=''>-- Select Color --</option>" ;
    }

    for (var yy = 0; yy < clr.length; yy++ ) {
     xx += "<option value='" + clr[yy] + "'>" + clr[yy] + "</option>";
    }
    xx += "</select>";
    return xx;
  }  
  this.getColors = getColors;
  this.getMediumImage = getMediumImage;
  this.getSmallImage = getSmallImage;
  this.getPrice = getPrice;
  this.getDesc = getDesc;      
}

var nofGlass = 10;
var gArray = new Array(nofGlass);

gArray[0] = new glass("05", "13 oz. Classic Coffee Mug", "graphics/coffee_mug_3", 
  1, new Array(150, 250), new Array(61, 101), "13.50", new Array("Cobalt", "Juniper", "Clear"));

gArray[1] = new glass("02", "Goblets 16 oz.", "graphics/goblets_3", 
  1, new Array(100, 250), new Array(73, 183), "16.95", new Array("Cobalt", "Juniper", "Clear"));
  
gArray[2] = new glass("04", "15 oz. Chalice", "graphics/chalice", 
  1, new Array(100, 250), new Array(87, 218), "16.95", new Array("Mist Blue", "Moss Green"));


gArray[3] = new glass("06", "11.5 oz. Wine", "graphics/3wine", 
  1, new Array(125, 250), new Array(100, 199), "14.50", new Array("Cobalt", "Juniper", "Clear"));

gArray[4] = new glass("06", "15 oz. Tankard", "graphics/tankard", 
  1, new Array(100, 250), new Array(134, 333), "14.50", new Array("Clear Only"));
  
gArray[5] = new glass("07", "15 oz. Mariner's Mug", "graphics/mariner_clear", 
1, new Array(100, 250), new Array(112, 281), "14.50", new Array("Clear Only"));

gArray[6] = new glass("08", "6 oz. Tall Flute", "graphics/tall_flute2", 
  1, new Array(100, 250), new Array(149, 372), "15.95", new Array("Cobalt", "Clear"));
  
gArray[7] = new glass("09", "12 oz. Teardrop", "graphics/teardrop_2", 
  1, new Array(100, 250), new Array(111, 277), "15.95", new Array("Cobalt", "Clear"));
  
gArray[8] = new glass("10", "17 oz. Beaker", "graphics/beaker", 
  1, new Array(100, 250), new Array(101, 251), "14.50", new Array("Moss Green", "Cobalt"));
  
gArray[9] = new glass("11", "67 oz. Pitcher", "graphics/pitcher_clear", 
  1, new Array(100, 250), new Array(92, 231), "35.00", new Array("Clear Only"));
  
gArray[10] = new glass("12", "1.5 oz. Shot Glasses", "graphics/shots4", 
  1, new Array(150, 300), new Array(49, 98), "6.00", new Array("Black", "Cobalt", "Juniper", "Clear"));




