//v1.0 23 aug 2002 chris bassett

var theObjects = document.getElementsByTagName("object");

for (var i = 0; i < theObjects.length; i++)
{
	theObjects[i].outerHTML = theObjects[i].outerHTML;
}

if (window.event + "" == "undefined") {
	event = null;
}

function HM_f_PopUp() {
	return false;
}

function HM_f_PopDown() {
	return false;
}

popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

HM_PG_MenuWidth = 134;
HM_PG_FontFamily = "verdana, arial, helvetica, sans-serif;";
HM_PG_FontSize = 8;
HM_PG_FontBold = 0;
HM_PG_FontItalic = 0;
HM_PG_FontColor = "#666666";
HM_PG_FontColorOver = "#990000";
HM_PG_BGColor = "#e0e0e0";
HM_PG_BGColorOver = "#f0f0f0";
HM_PG_ItemPadding = 3;
HM_PG_BorderWidth = 1;
HM_PG_BorderColor = "#cccccc";
HM_PG_BorderStyle = "solid";
HM_PG_SeparatorSize = 1;
HM_PG_SeparatorColor = "#cccccc";
HM_PG_ImageSrc = "";
HM_PG_ImageSrcLeft = "";
HM_PG_ImageSrcOver = "";
HM_PG_ImageSrcLeftOver = "";
HM_PG_ImageSize = 6;
HM_PG_ImageHorizSpace = 0;
HM_PG_ImageVertSpace = 3;
HM_PG_KeepHilite = true; 
HM_PG_ClickStart = 0;
HM_PG_ClickKill = false;
HM_PG_ChildOverlap = 20;
HM_PG_ChildOffset = 10;
HM_PG_ChildPerCentOver = null;
HM_PG_TopSecondsVisible = .5;
HM_PG_StatusDisplayBuild = 0;
HM_PG_StatusDisplayLink = 0;
HM_PG_UponDisplay = null;
HM_PG_UponHide = null;
HM_PG_RightToLeft = 0;
HM_PG_CreateTopOnly = 0;
HM_PG_ShowLinkCursor = 1;
HM_PG_NSFontOver = true;

// Resets nav rollovers to off state. No return value.
// v2.0 13 aug 2002 chris bassett
// now without switch statement
function BI_reset(intCurrentMenu) { //as void
	
	if (intCurrentMenu > 0){
		
		if (Math.floor(intCurrentMenu) == Math.ceil(intCurrentMenu)){
			
			var strNav = 'nav' + (intCurrentMenu);
			var intOriginalImage = 2 * (intCurrentMenu - 1);
			
			document.images[strNav].src = menuImages[intOriginalImage];
			
		}
		
	}

}

function BI_setAll(strNavPrefix, intNewMenu)
{
	for (i = 1; i <= (menuImages.length / 2); i++)
	{
		var strNavToCall = strNavPrefix + i;
		
		if (i == eval(intNewMenu))
		{
			var intImageSet = (2 * i) - 1;
		}
		else
		{
			var intImageSet = 2 * (i -1);
		}
		
		if (document.images[strNavToCall] != null)
		{
			document.images[strNavToCall].src = menuImages[intImageSet];
		}
	}
}

//handles the multiple calls for mouseout actions
// v 1.0 13 aug 2002 chris bassett
function BI_HM_out(intCurrentMenu, strMenuPrefix){ //as void
	
	var strMenuToCall = strMenuPrefix + intCurrentMenu;
	
	currentMenu = intCurrentMenu;
	popDown(strMenuToCall);
	
}

//handles the multiple calls for mouseover actions
//v 1.0 13 aug 2002 chris bassett
function BI_HM_over(intCurrentMenu, intNewMenu, strNavPrefix, strMenuPrefix, strPassThrough){ //as void
	
	var strMenuToCall = strMenuPrefix + intNewMenu;
	
	currentMenu = intCurrentMenu;
	popUp(strMenuToCall, strPassThrough);
	BI_setAll(strNavPrefix, intNewMenu);
	
}

//handles simple single rollovers
//v3.0 23 aug 2002 chris bassett
function BI_singleroll(strName, strImage, strPath){ //as void
	
	//set the default image directory if we didn't get one
	if (strPath == ''){
		strPath = '/images/';
	}
	
	var strMyImage = strPath + strImage;
	document.images[strName].src = strMyImage;
	
}

function openWindow(page) {
	picWindow = window.open( page, 'openWindow', 'toolbar=no,location=no,scrollbars=yes,status=0,width=600,height=450')
}

function openWindow2(page) {
	picWindow = window.open( page, 'openWindow2', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=800,height=500')
}

function openWindow3(page) {
	picWindow = window.open( page, 'openWindow3', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=450,height=400')
}

function openWindow4(page) {
	picWindow = window.open( page, 'openWindow4', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=700,height=500')
}

function openAgenda(page) {
	picWindow = window.open( page, 'openAgenda', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=715,height=500')
}

function openAgendaBM(page) {
	picWindow = window.open( page, 'openAgendaBM', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=715,height=500')
}

function openAgendaKN(page) {
	picWindow = window.open( page, 'openAgendaKN', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=715,height=500')
}

function openFullWindow(page)
{
	picWindow = window.open( page, 'openFullWindow', 'toolbar=yes,location=no,scrollbars=yes,status=0,width=820,height=600')
}

function printWindow() {	
	if (window.print) {
	  window.print();
	} else { 
		alert("Your browser does not support this feature. Use command-p or ctrl-p to print this page.");
	}
}

var logosDelay = 2000;
var logosDuration = 1000;

$(document).ready(function ()
{
	$("div.logos").each(function (index)
	{
		var id = "logos-" + index;
		
		$(this).attr("id", id).attr("rel", "0");
		
		var images = $(this).children("img").show().fadeOut(0);
		images.first().fadeIn(0);
		
		var timeout = setTimeout("nextLogo(\"" + id + "\");", logosDelay);
	});
	
	$("#nav li").mouseover(function ()
	{
		var parent = $(this).addClass("hover");
		
		$(this).children("ul").each(function ()
		{
			var width = parent.width();
			
			if ($(this).width() == width)
			{
				$(this).width(width + 2);
			}
			
			$(this).css("left", "-1px");
		});
	})
	.mouseout(function ()
	{
		$(this).removeClass("hover");
	});
	
	$("#nav ul").each(function ()
	{
		$(this).children().last().addClass("last");
	});
});

function nextLogo(id)
{
	var wrapper = $("#" + id);
	
	if (wrapper.length > 0)
	{
		var rel = wrapper.attr("rel");
		
		if (rel && rel != "")
		{
			var images = wrapper.children("img");
			var previous = parseInt(rel);
			var next = parseInt(rel) + 1;
			
			if (next >= images.length)
			{
				next = 0;
			}
			
			wrapper.attr("rel", next);
			
			images.eq(previous).fadeOut(logosDuration);
			images.eq(next).fadeIn(logosDuration);
			
			var timeout = setTimeout("nextLogo(\"" + id + "\");", logosDelay);
		}
	}
}

