var ns4, ie4, layerRef, linkRef, styleRef, pxRef, visibleRef;

function initGlobals()
   /*
   ** init() initialises the global variables used for
   ** cross-browser compatability.
   */
   {
      ns4 = (document.layers) ? true : false;
      ie4 = (document.all || document.getElementById()) ? true : false;
		
      if (ns4) {
         layerRef   = "document.layers";
         linkRef    = "document.anchors";
         styleRef   = "";
         pxRef      = "";
         visibleRef = "show";
      } else if (ie4) {
         layerRef   = "document.all";
         linkRef    = "document.all";
         styleRef   = ".style";
         pxRef      = "px";
         visibleRef = "visible";
      } else {
         document.write('<html>\n<head>\n<title>Incompatible Browser</title>\n</head>\n\n<body>\n<h1>Incompatible Browser</h1>\n\n<p>\nThe browser you are using does not support DHTML. Please upgrade to <a href="http://www.microsoft.com/windows/ie/default.htm">Microsoft Internet Explorer 4.0</a> or <a href="http://www.netscape.com/browsers/index.html">Netscape Communicator/Navigator 4.0</a>.\n</p>\n</body>\n</html>\n');
      }
   }

function showLayer(layerName)
   /*
   ** showLayer(layerName) makes layerName visible.
   */
   {
      eval(layerRef + '["' + layerName + '"]' + styleRef + '.visibility="visible"');
   }

function hideLayer(layerName)
   /*
   ** hideLayer(layerName) makes layerName hidden.
   */
   {
      eval(layerRef + '["' + layerName + '"]' + styleRef + '.visibility="hidden"');
   }

function toggleLayer(layerName)
   /*
   ** toggleLayer(layerName) toggles layerName between hidden
   ** and visible.
   */
   {
      if (eval(layerRef + '["' + layerName + '"]' + styleRef + '.visibility == visibleRef')) {
         hideLayer(layerName);
      } else { /* eval(layerRef + '["' + layerName + '"]' + styleRef + '.visibility == visibleRef') */
         showLayer(layerName);
      }
   }

function moveLayer(layerName, left, top)
   /*
   ** moveLayer(layerName, left, top) moves layer ????? ?÷????????Name to position
   ** (left, top).
   */
   {
      eval(layerRef + '["' + layerName + '"]' + styleRef + '.top=top');
      eval(layerRef + '["' + layerName + '"]' + styleRef + '.left=left');
   }

function preloadComponents(splashLayer)
   {
      hideLayer(splashLayer);
   }

function heightLayer(layerName,alsada)
   /*
   ** heightLayer(layerName,alsada) modifica l'alçada de la capa.
   */
   {
   	  alsada=parseInt(alsada);
      eval(layerRef + '["' + layerName + '"]' + styleRef + '.height=alsada');
   }