<!--
var days = new Array("Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat");
var months = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

function getDate()
{
	var now = new Date();
	var theDay = days[now.getDay()];
	var theDate = now.getDate();
	var theMonth = months[now.getMonth()];
	var theYear = now.getFullYear();
	var theHour = (now.getHours() < 10) ? "0" + now.getHours() : now.getHours();
	var theMinutes = (now.getMinutes() < 10) ? "0" + now.getMinutes() : now.getMinutes();
	var theSeconds = (now.getSeconds() < 10) ? "0" + now.getSeconds() : now.getSeconds();

	return theDay + ", " + theDate + " " + theMonth + " " + theYear + " - " + theHour + ":" + theMinutes; // + ":" + theSeconds;
}

//retrieves the parameters from the current window address if any
function getAddressParameters()
{
  var address = window.location.href; //get address
  var paramList = address.substring(address.indexOf("?") + 1, address.length);  //separate params from address
  
  if (paramList.indexOf("#") != -1)
  {
	paramList = paramList.substring(0, paramList.indexOf("#")) ; //separate any # hrefs within the page
  }

  var paramarray = paramList.split("&");  //separate individul parameter pairs
  var parameters = new Array();
  for (var i=0; i<paramarray.length; i++)
  {
	//taken out so that parameters are no longer stored as [paramname, paramvalue]
    //parameters[i] = new Array();
    //parameters[i][0] = paramarray[i].split("=")[0];
    //parameters[i][1] = paramarray[i].split("=")[1];
		
    //added in so that params are now stored as parameters[name] = val
    parameters[paramarray[i].split("=")[0]] = paramarray[i].split("=")[1];
  }
  
  return parameters;
}

//closes down a child window and resets focus to the parent if one exists
function closedownChildWindow()
{
  if (opener)
  {
    opener.focus();
  }
  
  window.close();
}

//closes down a window
function closedownWindow()
{
  window.close();
}

//retreive the object on the page if it exists
function findObj(obj)
{
	if (navigator.appName.indexOf("Microsoft") != -1) 
	{
        return window[obj];
    }
    else 
	{
        return document.getElementById(obj);
	}
}

/////////////////////////////////////////////////////
//// HIGHLIGHT FUNCTIONS
/////////////////////////////////////////////////////

var lastSelectedLink = null;

//used to highlight a passed in link and unhighlight a previously highlighted one
function highlightLink(linkObj)
{
	if (linkObj)
	{
		if (linkObj.className == "Sidemenu")
		{
		  linkObj.className = "Sidemenuselected";
		}
		else
		{
		  linkObj.className = "Submenuselected";
		}
	
		if ((lastSelectedLink != null) && (lastSelectedLink != linkObj))
		{
			if (lastSelectedLink.className == "Sidemenuselected")
			{
				lastSelectedLink.className = 'Sidemenu';
			}
			else
			{
				lastSelectedLink.className = 'Submenu';
			}
		}

		lastSelectedLink = linkObj;
	}
}

//used to unselected the currently selected link
function unhighlightSelectedLink()
{
	if (lastSelectedLink)
	{
		if (lastSelectedLink.className == "Sidemenuselected")
		{
			lastSelectedLink.className = 'Sidemenu';
		}
		else
		{
			lastSelectedLink.className = 'Submenu';
		}

		lastSelectedLink = null;
	}
}

function isInArray(arr, search)
{
	for (var i=0; i<arr.length; i++)
	{
		if (arr[i] == search)
		{
			return true;
		}
	}

	return false;
}

//-->
