// JavaScript Document
window.onload = function(){
allLists = document.getElementsByTagName("ul");
for (i = 0; i < allLists.length; i++){
	if(allLists[i].parentNode.nodeName == "LI"){
		allLists[i].parentNode.current = i;		
		allLists[i].parentNode.onmouseover = function(){
			allLists[this.current].style.display = "block";}
		allLists[i].status = "out";
		allLists[i].onmouseover = function(){this.status = "over";};
		allLists[i].parentNode.onmouseout = function(){this.status = "out";};
		allLists[i].parentNode.onmouseout = function(){
			allLists[this.current].style.display = "none";}
	}
}

ScrollLinks.start();
initSelect();
}

function initSelect()
{
	var theSelect = document.getElementById("selector");
	
	theSelect.changed = false;
	theSelect.onfocus = selectFocused;
	theSelect.onchange = selectChanged;
	theSelect.onkeydown = selectKeyed;
	theSelect.onclick = selectClicked;
	
	return true;
}




function selectChanged(theElement)
{
	var theSelect;
	
	if (theElement && theElement.value)
	{
		theSelect = theElement;
	}
	else
	{
		theSelect = this;
	}
	
	if (!theSelect.changed)
	{
		return false;
	}

	document.location = theSelect.value;
	
	return true;
}




function selectClicked()
{
	this.changed = true;
}




function selectFocused()
{
	this.initValue = this.value;

	return true;
}




function selectKeyed(e)
{
	var theEvent;
	var keyCodeTab = "9";
	var keyCodeEnter = "13";
	var keyCodeEsc = "27";
	
	if (e)
	{
		theEvent = e;
	}
	else
	{
		theEvent = event;
	}

	if ((theEvent.keyCode == keyCodeEnter || theEvent.keyCode == keyCodeTab) && this.value != this.initValue)
	{
		this.changed = true;
		selectChanged(this);
	}
	else if (theEvent.keyCode == keyCodeEsc)
	{
		this.value = this.initValue;
	}
	else
	{
		this.changed = false;
	}
	
	return true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}