   var bGood;
   var sName = navigator.appName;
   var sAppVersion = parseInt(navigator.appVersion);

   if (sName == "Netscape" && sAppVersion >= 4)
      bGood = true;
   else if (sName == "Microsoft Internet Explorer" && sAppVersion >= 4)
      bGood = true;
   else if ((sName == "WebTV Plus Receiver") ||
            (sName == "WEB TV PLUS RECEIVER"))
      bGood = true;
   else
      bGood = false;

   // If browser is no good alert
   if (bGood == false) {

      alert("Our shopping cart system was designed with IE 4.0 or later and Netscape 4.0 " +
            "or later browsers in mind. You may not be able to shop " +
            "on this site with your current browser.  It is recommended that " +
            "obtain one of these or later browsers.  Thank you.");

   }

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

   function OpenSwatches() {
      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");
   }

   function AddToCart(poColor, poStyle, poSize, poHeight) {

      // Get value
      var lsColorText = poColor.options[poColor.selectedIndex].text;
      var lsColor = poColor.options[poColor.selectedIndex].value;
      var lsSize = poSize.options[poSize.selectedIndex].value;
      var lsSizeText = poSize.options[poSize.selectedIndex].text;
      var lsStyle = poStyle.options[poStyle.selectedIndex].value;
      var lsStyleText = poStyle.options[poStyle.selectedIndex].text;
      var lsHeight = poHeight.options[poHeight.selectedIndex].value;
      var lsHeightText = poHeight.options[poHeight.selectedIndex].text;

      // Check if nothing selected
      if (lsColor == "none" && lsStyle == "none" && lsSize == "none")
         alert("You did not select a color, style, or size.");         
      else if (lsColor == "none" && lsStyle == "none" && lsSize != "none")
         alert("You did not select a color or style.");
      else if (lsColor == "none" && lsStyle != "none" && lsSize == "none")
         alert("You did not select a color or size.");
      else if (lsColor == "none" && lsStyle != "none" && lsSize != "none")
         alert("You did not select a color.");
      else if (lsColor != "none" && lsStyle == "none" && lsSize == "none")
         alert("You did not select a style or size.");
      else if (lsColor != "none" && lsStyle == "none" && lsSize != "none")
         alert("You did not select a style.");
      else if (lsColor != "none" && lsStyle != "none" && lsSize == "none")
         alert("You did not select a size.");
      else {
         AddItem(GetGaryMattressCode(lsColor, lsStyle , lsSize, lsHeight), "Mattress Cover " + lsStyleText + " " + lsColorText + " (" + lsSizeText + " / " + lsHeight + ")", GetGaryMattressPrice(lsColor, lsStyle, lsSize, lsHeight));
         window.location.href = "/cart/";
      }
   }   
