/*HM_Loader.js
* by Peter Belesis. v4.2.2 020307
* Copyright (c) 2002 Peter Belesis. All Rights Reserved.
*/

   HM_DOM = (document.getElementById) ? true : false;
   HM_NS4 = (document.layers) ? true : false;
    HM_IE = (document.all) ? true : false;
   HM_IE4 = HM_IE && !HM_DOM;
   HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
  HM_IE4M = HM_IE4 && HM_Mac;

 HM_Opera = (navigator.userAgent.indexOf("Opera")!=-1);
 HM_Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);

HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M));

HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";

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;

//global variables
HM_GL_MenuWidth          = 130;
HM_GL_FontFamily         = "Verdana,Arial,Helvetica,sans-serif";
HM_GL_FontSize           = 11;
HM_GL_FontBold           = true;
HM_GL_FontItalic         = false;
HM_GL_FontColor          = "#800000";
HM_GL_FontColorOver      = "#800000";	//fontcolor on mouseover
HM_GL_BGColor            = "#FFFFCC";	//background color was cccc99
HM_GL_BGColorOver        = "#FFFFFF";	//background color on mouseover
HM_GL_ItemPadding        = 4;		//distance from menu edge to text

HM_GL_BorderWidth        = 1;
HM_GL_BorderColor        = "black";
HM_GL_BorderStyle        = "solid";
HM_GL_SeparatorSize      = 0;		//lines between menu items
HM_GL_SeparatorColor     = "black";
HM_GL_ImageSrc = "http://www.union.edu/images/navigation/triangle_right.gif";  	//used to denote child menu

//HM_GL_ImageSrcLeft = "HM_More_black_left.gif";
//HM_GL_ImageSrcOver = "HM_More_white_right.gif";
//HM_GL_ImageSrcLeftOver = "HM_More_white_left.gif";

HM_GL_ImageSize          = 9; 
HM_GL_ImageHorizSpace    = 5;
HM_GL_ImageVertSpace     = 3;

HM_GL_KeepHilite         = true;	//parent menu item remains highlighted
					// when move to child
HM_GL_ClickStart         = false;	//whether mouseclick or mouseover
					// reveals menu
HM_GL_ClickKill          = 0;		//whether click or mouseover hides menus
					// when user moves to main page
HM_GL_ChildOverlap       = 20;		//horizontal distance a child menu
					// overlaps its parent 
HM_GL_ChildOffset        = 5;		//vertical distance from the top of a menu
					// item to the top of the corresponding
					// pop-up child 
HM_GL_ChildPerCentOver   = null;	//horizontal distance a child menu 
					//overlaps its parent menu, as a percentage
					// of the parent menu's width. If this
					// parameter is omitted, the
					// HM_PG_ChildOverlap parameter is used
HM_GL_TopSecondsVisible  = .5;		//If clickKill is false, the value of this
					// variable determines the time in seconds
					// that the top-level menu of the menu tree
					// remains visible after the user mouses
					// out of the menu tree
HM_GL_ChildSecondsVisible = .5;		//If clickKill is false, the value of this
					// variable determines the time in seconds
					// that the child-level menu of the menu
					// tree remains visible after the user
					// mouses out of the menu tree
HM_GL_StatusDisplayBuild = 0;		//Causes a message to be displayed in the
					// browser status bar every time a menu
					// element is created and upon completion
					// of menu creation
HM_GL_StatusDisplayLink  = 1;		//Causes the link URL associated with a menu
					// item to display in the status bar when
					// the user moves the mouse over the item
HM_GL_UponDisplay        = null;	//Specifies a JavaScript statement to be
					// evaluated when a menu tree is made visible
HM_GL_UponHide           = null;	//Specifies a JavaScript statement to be
					// evaluated when a menu tree is hidden

HM_GL_RightToLeft      = false;		//If true, menus are displayed from right to
					// left, instead of the normal left-to-right behavior
HM_GL_CreateTopOnly      = HM_NS4 ? true : false;	//If true, only the top level menu(s)
					// is/are created when the initial page loads; child
					// menus are created dynamically when the user
					// activates (rolls over or clicks) a menu item. Can
					// be used to speed the display of the initial menus
					// on the page
HM_GL_ShowLinkCursor     = true;	//If true, the typical mouse pointer is changed
					// to a "link pointer" when the user rolls over
					// an item element with a link.

HM_GL_ScrollEnabled = false;	//If true, tall child menus that do not fit within
				// the browser window will be scroll-enabled. If
				// omitted or false, no scrolling is enabled
HM_GL_ScrollBarHeight = 14;	//The vertical height of the scroll elements. The
				// "scroll" image will automatically be centered,
				// both horizontally and vertically
HM_GL_ScrollBarColor = "lightgrey";	//The background color for the scroll image
					// box at the top/bottom of scroll enabled menus
 //HM_GL_ScrollImgSrcTop = "HM_More_black_top.gif";	//filename of the image to be used
							// in the top scroll element on
							// scroll-enabled menus
 //HM_GL_ScrollImgSrcBot = "HM_More_black_bot.gif";	//filename of the image to be used
							// in the bottom scroll element on
							// scroll-enabled menus
HM_GL_ScrollImgWidth = 9;	// width of the image displayed in the scroll elements.
				// This value is used to position the image horizontally
HM_GL_ScrollImgHeight = 5;	//height of the image displayed in the scroll elements.
				// This value is used to position the image vertically

//4.2.2
HM_GL_ScrollBothBars = true;	//If true, the scroll element is always visible on both
				// the top and bottom of tall, scroll-enabled menus.
				// If omitted or false, the top and bottom scroll bars
				// only appear when there are hidden elements in the menu
				// that can be scrolled to (i.e., elements that are outside
				// the visible edges of the menus).

// the following function is included to illustrate the improved JS expression handling of
// the left_position and top_position parameters introduced in 4.0.9
// and modified in 4.1.3 to account for IE6 standards-compliance mode
// you may delete if you have no use for it

function HM_f_CenterMenu(topmenuid) {
    var MinimumPixelLeft = 0;
    var TheMenu = HM_DOM ? document.getElementById(topmenuid) : window[topmenuid];
    var TheMenuWidth = HM_DOM ? parseInt(TheMenu.style.width) : HM_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width;
    var TheWindowWidth = HM_IE ? (HM_DOM ? HM_IEcanvas.clientWidth : document.body.clientWidth) : window.innerWidth;
    return Math.max(parseInt((TheWindowWidth-TheMenuWidth) / 2),MinimumPixelLeft);
}

if(HM_IsMenu) {
    document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Arrays.js' TYPE='text/javascript'><\/SCR" + "IPT>");
    document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");
}

//end

