// Check for the correct DOM implementation.
	
var ieDOM = (document.all) ? 1 : 0;
var nsDOM = (document.layers) ? 1 : 0;
var ns6DOM = (!document.all && document.getElementById) ? 1 : 0;

// contentReady will be true, when all menus are prepared.
var scrollLayersReady = 0;

function getscrollLayer(layerIndex)
{
  var tCL;
	
	if (nsDOM)
	  tCL = eval('document.scrollLayer'+ layerIndex);
	else if (ns6DOM)
	  tCL = document.getElementById('scrollLayer' + layerIndex);
	else if (ieDOM)
		tCL = eval('scrollLayer' + layerIndex);
		
  return tCL;
}

// NOTE: This should be called AFTER the content layer html has been laid out...
//       In other words, at the end of the page, or at the onLoad event.

function buildscrollLayers()
{
  if (!nsDOM && !ieDOM && !ns6DOM) return;
	scrollLayers = new Array();
	for (i = 0; i < totalscrollLayers; i++)
		scrollLayers[i] = getscrollLayer(i);

	scrollLayersReady = 1;
}

function show(ndx)
{
  scrollLayers[ndx].className = 'collegelayers'; 

  try
	{
    for (i = 0; i < totalscrollLayers; i++)
		  if (i != ndx)
		    scrollLayers[i].className = 'hidden';            			// hide all layers
	}
	catch (Exception) {}
	
	// keep the menu item that was rolled over gold
	try
	{
	  for (j = 0; j < 25; j++)
	  {
		  var tMenuItem = document.getElementById('menu_' + j);
		  var tMenuLi = document.getElementById('menu_li_' + j);
		  if (tMenuItem)
		  {
			  if (j == ndx)
			  {
			    //tMenuItem.className = 'over';
				  tMenuItem.style.backgroundColor = '#';
			    tMenuItem.style.color = '#0000CC';
			  }
			  else
			  {
				  //tMenuItem.className = '';
			    tMenuItem.style.backgroundColor = '#';
				  tMenuItem.style.color = '#0000CC';
			  }
		  }
		  if (tMenuLi)
		  {
			  if (j == ndx)
			  {
			    //tMenuItem.className = 'over';
				  tMenuLi.style.backgroundColor = '#';
			    tMenuLi.style.color = '#0000CC';
			  }
			  else
			  {
				  //tMenuItem.className = '';
			    tMenuLi.style.backgroundColor = '#';
				  tMenuLi.style.color = '#0000CC';
			  }
		  }
	  }
	}
	catch (Exception) {}
}
