<!--
var inventory = new Array();
inventory[0] = new Array("Zip Jacket", "Small", "Black", 2);
inventory[1] = new Array("Zip Jacket", "Small", "White", 2);
inventory[2] = new Array("Zip Jacket", "Large", "White", 0);
inventory[3] = new Array("Hooded Jacket", "Small", "Classic Red", 0);
inventory[4] = new Array("Hooded Jacket", "Large", "Classic Red", 0);
inventory[5] = new Array("Hooded Jacket", "Small", "Dusk Blue", 2);
inventory[6] = new Array("Hooded Jacket", "Large", "Dusk Blue", 2);
inventory[7] = new Array("Tie Top", "Large", "Black", 0);
inventory[8] = new Array("Tie Top", "Small", "Dusk Blue", 0);
inventory[9] = new Array("Tie Top", "Large", "Dusk Blue", 0);
inventory[10] = new Array("Tie Top", "Small", "Classic Red", 0);
inventory[11] = new Array("Tie Top", "Medium", "Classic Red", 0);
inventory[12] = new Array("Tie Top", "Large", "Classic Red", 0);
inventory[13] = new Array("Print Tank", "Small", "Pink", 0);
inventory[14] = new Array("Print Tank", "Medium", "Pink", 2);
inventory[15] = new Array("Print Tank", "Large","Pink", 0);
inventory[16] = new Array("Print Tank", "Small", "Blue", 0);
inventory[17] = new Array("Print Tank", "Large", "Blue", 0);
inventory[18] = new Array("Structured Tank", "Small", "Black", 0);
inventory[19] = new Array("Structured Tank", "Large", "Black", 0);
inventory[20] = new Array("Structured Tank", "Small", "White", 0);
inventory[21] = new Array("Structured Tank", "Large", "White", 0);
inventory[22] = new Array("Scoop Tank", "Small", "Dusk Blue", 2);
inventory[23] = new Array("Scoop Tank", "Large", "Dusk Blue", 0);
inventory[24] = new Array("Scoop Tank", "Small", "Sunny Lime", 0);
inventory[25] = new Array("Scoop Tank", "Large", "Sunny Lime", 1);
inventory[26] = new Array("Scoop Tank", "Small", "Pesto", 1);
inventory[27] = new Array("Scoop Tank", "Large", "Pesto", 1);
inventory[28] = new Array("Scoop Tank", "Large", "Classic Red", 0);
inventory[29] = new Array("Scoop Tank", "Small", "Pumpkin", 2);
inventory[30] = new Array("Scoop Tank", "Large", "Pumpkin", 0);
inventory[31] = new Array("Structured Pant", "Small", "Black", 0);
inventory[32] = new Array("Fitted Capri", "Small", "Black", 0);
inventory[33] = new Array("Fitted Capri", "Small", "Sable", 0);
inventory[34] = new Array("Fitted Capri", "Medium", "Sable", 0);
inventory[35] = new Array("Fitted Capri", "Large", "Sable", 0);


function blockError(){return true;}
window.onerror = blockError;

function setDefaultColor(id, color) {
frontpopup="gallery/"+id+color+".jpg";
backpopup="gallery/"+id+color+"back.jpg";
}

function changeColor(id, color) {
//alert("gallery/"+id+color+"-s.jpg");
document[id].src="gallery/"+id+color+"-s.jpg";
setDefaultColor(id, color);
}

function checkInv(item) {
   var color=document.itemform.Color[document.itemform.Color.selectedIndex].text;
   var size=document.itemform.Size[document.itemform.Size.selectedIndex].text;
   var qty=document.itemform.qty[document.itemform.qty.selectedIndex].text;
   for (x=0; x<inventory.length; x++) {
      if (item==inventory[x][0] && 
          size==inventory[x][1] &&
          color==inventory[x][2] &&
          qty>inventory[x][3]) {
         alert ("Sorry, there's only " + inventory[x][3] + " " + inventory[x][1] +
                    ", " + inventory[x][2] + " " + item + 
                    " in stock. Please select another color or, if possible, reduce your requested quantity");
         return false;
      }
   }
   return true;
}


// -->
