// 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 contentLayersReady = 0;

function getContentLayer(layerIndex)
{
  var tCL;
	
	if (nsDOM)
	  tCL = eval('document.contentLayer'+ layerIndex);
	else if (ns6DOM)
	  tCL = document.getElementById('contentLayer' + layerIndex);
	else if (ieDOM)
		tCL = eval('contentLayer' + 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 buildContentLayers()
{
  if (!nsDOM && !ieDOM && !ns6DOM) return;
	contentLayers = new Array();

	for (i = 0; i < totalContentLayers; i++)
		contentLayers[i] = getContentLayer(i);

	contentLayersReady = 1;
}

function show(ndx)
{
  contentLayers[ndx].className = 'collegelayers'; 

  try
	{
    for (i = 0; i < totalContentLayers; i++)
		  if (i != ndx)
		    contentLayers[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 = '#fff2bf';//CHANGED
			    tMenuItem.style.color = '#004b8d';
			  }
			  else
			  {
				  //tMenuItem.className = '';
			    tMenuItem.style.backgroundColor = '#004b8d';
				  tMenuItem.style.color = '#ffffff';
			  }
		  }
		  if (tMenuLi)
		  {
			  if (j == ndx)
			  {
			    //tMenuItem.className = 'over';
				  tMenuLi.style.backgroundColor = '#fff2bf'; //CHANGED
			    tMenuLi.style.color = '#004b8d';
			  }
			  else
			  {
				  //tMenuItem.className = '';
			    tMenuLi.style.backgroundColor = '#004b8d';
				  tMenuLi.style.color = '#ffffff';
			  }
		  }
	  }
	}
	catch (Exception) {}
}
