   var loLoadingImg;
   var iHeight = 130;
   var iWidth = 161;

   // Loading... image
   loLoadingImg = new Image(iHeight, iWidth);
   loLoadingImg.src = "/common/images/loading.gif";

   // Check if we should clear the cart
   // (after a submit)
   CheckSubmitted();

   function OpenSwatches() {
      var objWindow = window.open("/common/html/g-swatches.html", "swatches", "width=595,height=550,location=no,resizable=no,menubar=no,scrollbars=yes,titlebar=yes,status=no,toolbar=no");
      objWindow.focus();
   }

   function OpenCareInstructions() {
      var objWindow = window.open("/common/html/g-careinstructions.html#diapers", "careinstructions", "width=595,height=550,location=no,resizable=no,menubar=no,scrollbars=yes,titlebar=yes,status=no,toolbar=no");
      objWindow.focus();
   }

   function AddToCart(poProduct, poColor, poSize) {

      // Get value
      var lsProduct = poProduct.options[poProduct.selectedIndex].value;
      var lsProductText = poProduct.options[poProduct.selectedIndex].text;
      var lsColor = poColor.options[poColor.selectedIndex].value;
      var lsColorText = poColor.options[poColor.selectedIndex].text;
      var lsSize = poSize.options[poSize.selectedIndex].value;

      // Check if nothing selected
      if (lsProduct == "none" && lsColor == "none" && lsSize == "none")
      	  alert("You did not select a product, color, or size.");
      else if (lsProduct == "none" && lsColor == "none" && lsSize != "none")
      	  alert("You did not select a product or color.");
      else if (lsProduct == "none" && lsColor != "none" && lsSize == "none")
      	  alert("You did not select a product or size.");
      else if (lsProduct != "none" && lsColor == "none" && lsSize == "none")
      	  alert("You did not select a color or size.");
      else if (lsProduct == "none" && lsColor != "none" && lsSize != "none")
      	  alert("You did not select a product.");
      else if (lsProduct != "none" && lsColor == "none" && lsSize != "none")
      	  alert("You did not select a color.");
      else if (lsProduct != "none" && lsColor != "none" && lsSize == "none")
      	  alert("You did not select a size.");
      else {

         AddItem(GetGaryPullonFlannelDiaperCode(lsProduct, lsColor, lsSize), lsProductText + " " + lsColorText + " (" + lsSize + ")", GetGaryPullonFlannelDiaperPrice(lsProduct, lsColor, lsSize));
         window.location.href = "/cart/";

      }

   }
   
   function OpenMeasuringInstructions() {
      var objWindow = window.open("/common/html/measuringinstructions.html", "measuringinstructions", "width=595,height=550,location=no,resizable=no,menubar=no,scrollbars=yes,titlebar=yes,status=no,toolbar=no");
      objWindow.focus();
   }


