function _getStyleIndex()
{
   var selected_index = document.forms[formName][sType].selectedIndex;
   return document.forms[formName][sType].options[selected_index].value;
}

// *****************************************************
// Event handlers
// *****************************************************

function fillOption()
{
   document.forms[formName][sType].options.length = aType.length + 1;
   document.forms[formName][sType].options[0] = new Option(sChoose, -1, true, true);
   for (i = 0; i < aType.length; i++)
   {
      document.forms[formName][sType].options[i+1] = new Option(aType[i], i, false, false);
   }
   document.forms[formName][sSize].options.length = 1;
   document.forms[formName][sSize].options[0] = new Option(sChoose, -1, true, true);

   _reset();
}

function changeType()
{
   var arr = _getStyleArray();
   if (arr == null)
   {
      return;
   }
   if (document.forms[formName][sType].options[0].value == -1)
   {
      // clear out the "Choose" option from "type"
      document.forms[formName][sType].options[0] = null;
   }

   // fill in the products (sizes) available to this style
   _setProductList(arr);
}


