/*HM_Loader.js
* by Peter Belesis. v4.0.11 010529
* Copyright (c) 2001 Peter Belesis. All Rights Reserved.
*/

/*
DHTML
bgcolor = "#FFFFCC"  light yellow
bordercolor ="#999966"  dark tan
text color = "#003366"   dark blue
rollover bgcolor ="003366"  dark blue	
rollover text ="#FFFFFF"    white
*/

   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_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;

function FindPosition(image_name){
    if(!document.images[image_name]){
        return;
    }
    this.image_name = image_name;
    this.xPos = 500;
    this.yPos = 500;
    this.ref_image = document.images[image_name];
    this.getRealLeft = getRealLeft;
    this.getRealTop = getRealTop;
    this.getRealLeft();
    this.getRealTop();
}

function getRealLeft(move) {
   if(!move){
        move = 0;
    }
   if(document.layers){
     this.xPos = this.ref_image.x + move;    
     return this.xPos;
   }
	this.xPos = this.ref_image.offsetLeft;
	tempEl = this.ref_image.offsetParent;
  	while (tempEl != null) {
  		this.xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
    this.xPos = this.xPos + move;
	return this.xPos;
}

function getRealTop(move) {
    if(!move){
        move = 0;
    }
    if(document.layers){
     this.yPos = this.ref_image.y + move; 
     return this.yPos
   }
	this.yPos = this.ref_image.offsetTop;
	tempEl = this.ref_image.offsetParent;
	while (tempEl != null) {
  		this.yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
    this.yPos = this.yPos + move;
	return this.yPos;
}

var joining_image = new  FindPosition("joining");
var volunteers_image = new FindPosition("volunteers");
var savings_image = new  FindPosition("savings");
var investments_image = new  FindPosition("investments");
var checking_image = new  FindPosition("checking");
var loan_image = new  FindPosition("loan");
var insurance_image = new FindPosition("insurance");
var online_image = new  FindPosition("online");
var remote_image = new  FindPosition("remoteaccess");
var other_image = new  FindPosition("other");
var contact_image = new  FindPosition("contact");

HM_GL_MenuWidth          = 195;
HM_GL_FontFamily         = "Verdana, Arial, Helvetica, sans-serif";
HM_GL_FontSize           = 8;
HM_GL_FontBold           = false;
HM_GL_FontItalic         = false;
HM_GL_FontColor          = "#000066";
HM_GL_FontColorOver      = "#FFFFFF";
HM_GL_BGColor            = "#F3F1E4";
HM_GL_BGColorOver        = "#FF6600";
HM_GL_ItemPadding        = 3;

HM_GL_BorderWidth        = 1;
HM_GL_BorderColor        = "#FF6600";
HM_GL_BorderStyle        = "solid";
HM_GL_SeparatorSize      = 1;
HM_GL_SeparatorColor     = "#BEB9A6";
HM_GL_ImageSrc           = imgdir + "tri.gif";
HM_GL_ImageSrcLeft       = imgdir + "triL.gif";
HM_GL_ImageSize          = 7;
HM_GL_ImageHorizSpace    = 5;
HM_GL_ImageVertSpace     = 3;

HM_GL_KeepHilite         = false;
HM_GL_ClickStart         = false;
HM_GL_ClickKill          = 0;
HM_GL_ChildOverlap       = 5;
HM_GL_ChildOffset        = 5;
HM_GL_ChildPerCentOver   = null;
HM_GL_TopSecondsVisible  = 1;
HM_GL_StatusDisplayBuild = 0;
HM_GL_StatusDisplayLink  = 1;
HM_GL_UponDisplay        = null;
HM_GL_UponHide           = null;

//HM_GL_RightToLeft      = true;
HM_GL_CreateTopOnly      = HM_NS4 ? true : false;
HM_GL_ShowLinkCursor     = true;

// the following function is included to illustrate the improved JS expression handling of
// the left_position and top_position parameters
// you may delete if you have no use for it

function HM_f_CenterMenu(topmenuid) {
	var TheMenu = HM_DOM ? document.getElementById(topmenuid) : HM_IE4 ? document.all(topmenuid) : eval("window." + topmenuid);
	var TheMenuWidth = HM_DOM ? parseInt(TheMenu.style.width) : HM_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width;
	var TheWindowWidth = HM_IE ? document.body.clientWidth : window.innerWidth;
	return ((TheWindowWidth-TheMenuWidth) / 2);
}


if(HM_IsMenu) {
	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + securedir + "HM_Arrays.js' TYPE='text/javascript'><\/SCR" + "IPT>");
	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + securedir + "HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");
}


