// 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;


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

// NOTE: This should be called AFTER the content layer html has been laid out,
//        and BEFORE the weather include.

function buildContentLayers()
{
  if (!nsDOM && !ieDOM && !ns6DOM)
		return;
	
	for (var i = 0; i < totalContentLayers; i++)
		contentLayers[i] = getContentLayer('contentLayer' + i);

	show(0);
}

function show(ndx)
{
  try { contentLayers[ndx].className = 'collegelayers'; }
	catch (Exception) {}

  try
	{
    for (var 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 (var j = 0; j < 25; j++)
	  {
		  var tMenuItem = getContentLayer('menu_' + j);
		  var tMenuLi = getContentLayer('menu_li_' + j);
		  if (tMenuItem)
		  {
			  if (j == ndx)
			  {
			    //tMenuItem.className = 'over';
				  tMenuItem.style.backgroundColor = '#ffd478';
			    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 = '#ffd478';
			    tMenuLi.style.color = '#004b8d';
			  }
			  else
			  {
				  //tMenuItem.className = '';
			    tMenuLi.style.backgroundColor = '#004b8d';
				  tMenuLi.style.color = '#ffffff';
			  }
		  }
	  }
	}
	catch (Exception) {}
}
