isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isMSIE=document.all && document.all.item //MSIE 4+
isNetscape4=document.layers //Netscape 4.*
isOpera=window.opera //Opera
isOpera5=isOpera && isDOM //Opera 5+
isMSIE5=isDOM && isMSIE && !isOpera //MSIE 5+
isMozilla=isNetscape6=isDOM && !isMSIE && !isOpera


var idGlb = new Array();
var flagSub;

function openW(urlW, nameW, W, H)
{
  W = (!W) ? 200 : W + 100;
  H = (!H) ? 200 : H + 150;
  
  window.open(urlW, nameW, 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width='+W+',height='+H);
}


function getLayer(layerName)
{
  if (!layerName)
  {
    return false;
  }
  
  if (isDOM)
  {
    return document.getElementById(layerName);
  }
  if (isMSIE)
  {
    return document.all[layerName];
  }
  if (isNetscape4)
  {
    return eval('document.layers[layerName]');
  }
  
  return false;
}


function setStyle(idSct)
{
  var sLayer;
  var tLayer;
  var subLayer;
  
  sLayer = getLayer(idSct);

  if (sLayer)
  {
    if (idGlb[idSct])
    {
      tLayer = getLayer(idGlb[idSct]);
      tLayer.style.display = 'none';
      delete(idGlb[idSct]);
    }
    else
    {
      idGlb[idSct] = idSct;
      sLayer.style.display = isMSIE5 ? 'block' : 'table-row';
    }
  }

  return false;
}