<!--// Begin Javascript
function oei_preloadImages() {
  var d=document; if(d.images){ if(!d.oei_p) d.oei_p=new Array();
    var i,j=d.oei_p.length,a=oei_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.oei_p[j]=new Image; d.oei_p[j++].src=a[i];}}
}

function oei_rollImageOff() {
  var i,x,a=document.oei_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function oei_locateObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=oei_locateObj(n,d.layers[i].document); return x;
}

function oei_rollImage() {
  var i,j=0,x,a=oei_rollImage.arguments; document.oei_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=oei_locateObj(a[i]))!=null){document.oei_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// Browser variables that help us to determine what to write out to the browser

var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);

// getRefId returns the id property of elements based on the browser type detected.
function getRef(id) 
	{
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
	}
// getSty - Returns the style properties of the element.
function getSty(id)
	{
	return (isNS4 ? getRef(id) : getRef(id).style);
	}
	
var popTimer = 0;			// Hide timeout.
var litNow = new Array();	// Array showing highlighted menu items.

function popOver(menuNum, itemNum) 
	{
	clearTimeout(popTimer);
	hideAllBut(menuNum);
	litNow = getTree(menuNum, itemNum);
	changeCol(litNow, true);
	targetNum = menu[menuNum][itemNum].target;
	if (targetNum > 0) 
		{
		thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
		thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
		with (menu[targetNum][0].ref) 
			{
			left = parseInt(thisX + menu[targetNum][0].x);
			top = parseInt(thisY + menu[targetNum][0].y);
			visibility = 'visible';
			}
		}
	}
	
function popOut(menuNum, itemNum) 
	{
	if ((menuNum == 0) && !menu[menuNum][itemNum].target)
		hideAllBut(0)
	else
		popTimer = setTimeout('hideAllBut(0)', 500);
	}

function getTree(menuNum, itemNum) 
	{
	// Array index is the menu number. The contents are null (if that menu is not a parent)
	// or the item number in that menu that is an ancestor (to light it up).
	itemArray = new Array(menu.length);
	while(1) 
	  {
	  itemArray[menuNum] = itemNum;
	  // If we've reached the top of the hierarchy, return.
	  if (menuNum == 0) return itemArray;
		itemNum = menu[menuNum][0].parentItem;
		menuNum = menu[menuNum][0].parentMenu;
   	  }
	}

// Pass an array and a boolean to specify color change, true = over color.
function changeCol(changeArray, isOver) 
	{
	for (menuCount = 0; menuCount < changeArray.length; menuCount++) 
		{
		if (changeArray[menuCount]) 
			{
			newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
			// Change the colors of the div/layer background.
			with (menu[menuCount][changeArray[menuCount]].ref) 
				{
//				if (isNS4) bgColor = newCol;
//				else backgroundColor = newCol;
				if (!isNS4) backgroundColor = newCol;
				}
			}
		}
	}
function hideAllBut(menuNum) 
	{
	var keepMenus = getTree(menuNum, 1);
	for (count = 0; count < menu.length; count++)
	if (!keepMenus[count])
	menu[count][0].ref.visibility = 'hidden';
	changeCol(litNow, false);
	}

// *** MENU CONSTRUCTION FUNCTIONS ***

function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass)
	{
	this.isVert = isVert;				// True or false - a vertical menu?
	this.popInd = popInd;				// The popout indicator used (if any) for this menu.
	this.x = x;							// Position and size settings.
	this.y = y;
	this.width = width;
	this.overCol = overCol;				// colors of menu and items.
	this.backCol = backCol;
	this.borderClass = borderClass; 	// The stylesheet class used for item borders and the text within items.
	this.textClass = textClass;
	this.parentMenu = null;				// Parent menu and item numbers, indexed later.
	this.parentItem = null;
	this.ref = null;					// Reference to the object's style properties (set later).
	}

function oei_Item(isImg, text, href, frame, length, spacing, zindex, target) 
	{
	this.isImg = isImg;		// True or False - an image is used and should include a rollover.
	this.text = text;		// what will be shown as the link.
	this.href = href;		// anchor
	this.frame = frame;		// frame
	this.length = length;	// length
	this.spacing = spacing;	// spacing between elements
	this.target = target;	// anchor target
	this.zindex = zindex;	// z-index for the layer
	this.ref = null;		// Reference to the object's style properties (set later).
	}
//--->