// -----------------------------------------------------------------------
// This JavaScript controls the hiding and displaying of divisions within
// the Products page.

if (gvIE4)
{
   layerRef = "document.all";
   styleRef = ".style.display";
   visibleRef = "";
   hiddenRef = "none";
}
else
{
   layerRef = "document.layers";
   styleRef = ".visibility";
   visibleRef = "show";
   hiddenRef = "hide";
}

/*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Name       :  toggleDiv
' Purpose    :  Used to toggle the display of the specified item.
' Parameters :  pstrDiv - the name of the item to toggle.
' Return val :  none.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
function toggleDiv(pstrDiv) 
{ 
   if (eval(layerRef + '["' + pstrDiv + '"]' + styleRef) == hiddenRef)
   {
      eval(layerRef + '["' + pstrDiv + '"]' + styleRef + ' = "' + visibleRef + '"');
   }
   else
   {
      eval(layerRef + '["' + pstrDiv + '"]' + styleRef + ' = "' + hiddenRef + '"');
   }
}

/*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Name       :  toggleProductDivs
' Purpose    :  Used to toggle the product display divisions.  Only
'		one division can be visible at a time.
' Parameters :  pstrDiv - the name of the division to make visible.
' Return val :  none.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
function toggleProductDivs(pstrDiv)
{
   // Determine division to display and hide all others.  (Always default to the audio division.)
   switch (pstrDiv)
   {
      case "MISC":
         if (eval(layerRef + '["MISC"]' + styleRef) == hiddenRef)
         {
            eval(layerRef + '["AUDIO"]' + styleRef + ' = "' + hiddenRef + '"');
            eval(layerRef + '["MISC"]' + styleRef + ' = "' + visibleRef + '"');
         }
         break;
      default:
         if (eval(layerRef + '["AUDIO"]' + styleRef) == hiddenRef)
         {
            eval(layerRef + '["MISC"]' + styleRef + ' = "' + hiddenRef + '"');
            eval(layerRef + '["AUDIO"]' + styleRef + ' = "' + visibleRef + '"');
         }
         break;
   }
}