<!--
//Determine Live State Buttons
var aryNavImg                         = new Array('repository','hot_topic','events','announcements','subscribe','faculty','staff','contact_us','course_list','courses','registration_payment','regional','links','video','guidelines','continuing_ed','consultation');

//Live State Color
var strLiveColor                      = "#FFFFFF";

//Get page name
var sPath                             = window.location.pathname;
var sPage                             = sPath.substring(sPath.lastIndexOf('/') + 1);


function toggleLayer(whichLayer)
{
  aryWhichLayer                       = whichLayer.split(",");

  if (document.getElementById)
  {
  // this is the way the standards work
//    var style2                        = document.getElementById(whichLayer).style;
    var style2                        = document.getElementById(aryWhichLayer[0]).style;
//    style2.display                    = style2.display ? "" : "none";
    style2.display                    = style2.display ? "" : "";
  }
  else if (document.all)
  {
  // this is the way old msie versions work
//    var style2                        = document.all[whichLayer].style;
    var style2                        = document.all[aryWhichLayer[0]].style;
//    style2.display                    = style2.display ? "" : "none";
    style2.display                    = style2.display ? "" : "";
  }
  else if (document.layers)
  {
  // this is the way nn4 works
//    var style2                        = document.layers[whichLayer].style;
    var style2                        = document.layers[aryWhichLayer[0]].style;
//    style2.display                    = style2.display ? "" : "none";
    style2.display                    = style2.display ? "" : "";
  }

  for (i=1;i<aryWhichLayer.length;i++)
  {
    var navStyle                      = document.getElementById(aryWhichLayer[i]).style;
    navStyle.display                  = "none";
  }
}

function liveState(whichLayer)
{
  if (document.getElementById)
  {
  // this is the way the standards work
    var objStyle                        = document.getElementById(whichLayer).style;
    objStyle.display                    = objStyle.display ? "" : "";
    //objStyle.color                      = objStyle.color ? "#FFFFFF" : "#FFFFFF";
  }
  else if (document.all)
  {
  // this is the way old msie versions work
    var objStyle                        = document.all[whichLayer].style;
    objStyle.display                    = objStyle.display ? "" : "";
    //objStyle.color                      = objStyle.color ? "#FFFFFF" : "#FFFFFF";
  }
  else if (document.layers)
  {
  // this is the way nn4 works
    var objStyle                        = document.layers[whichLayer].style;
    objStyle.display                    = objStyle.display ? "" : "";
    //objStyle.color                      = objStyle.color ? "#FFFFFF" : "#FFFFFF";
  }
}

function getElementObj(whichLayer)
{
  if (document.getElementById)
  {
  // this is the way the standards work
    var objStyle                      = document.getElementById(whichLayer).style;
  }
  else if (document.all)
  {
  // this is the way old msie versions work
    var objStyle                      = document.all[whichLayer].style;
  }
  else if (document.layers)
  {
  // this is the way nn4 works
    var objStyle                      = document.layers[whichLayer].style;
  }
  return objStyle;
}

function liveStateColor(objStyle,strColor)
{
  objStyle.color                      = "#FFFFFF";
}

function liveStateDisplay(objStyle)
{
  objStyle.display                    = "";
}


var isNav4, isNav6, isIE4;

function setBrowser()
	{
		if (navigator.appVersion.charAt(0) == "4")
		{
			if (navigator.appName.indexOf("Explorer") >= 0)
			{
				isIE4 = true;
			}
			else
			{
				isNav4 = true;
			}
		}
		else if (navigator.appVersion.charAt(0) > "4")
		{
			isNav6 = true;
		}
	}

function getStyleBySelector( selector )
	{
		var sheetList = document.styleSheets;
		var ruleList;
		var i, j;
	
		/* look through stylesheets in reverse order that
		   they appear in the document */
		for (i=sheetList.length-1; i >= 0; i--)
		{
			ruleList = sheetList[i].cssRules;
			for (j=0; j<ruleList.length; j++)
			{
				if (ruleList[j].type == CSSRule.STYLE_RULE &&
					ruleList[j].selectorText == selector)
				{
					return ruleList[j].style;
					alert(ruleList[j].style);
				}   
			}
		}
		return null;
	}

setBrowser();   // do this before body loads!

// -->
