/*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 null;
    }
    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;
    }
	//ie mac?
	if((navigator.userAgent.indexOf("Mac") != -1) && (navigator.userAgent.indexOf("MSIE") != -1)) {
		move = 3;
	}
	//netscape mac?
    if(document.layers){
	 move = -4;
     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;
  	}
	//netscape win?
	if(!document.all){
		move = -3;
	}
    this.yPos = this.yPos + move;
	return this.yPos;
}

var dropmenu1 = new  FindPosition("aboutus");
var dropmenu2 = new  FindPosition("products");
var dropmenu3 = new  FindPosition("rates");
var dropmenu4 = new  FindPosition("help");
var dropmenu5 = new  FindPosition("email");


HM_GL_MenuWidth          = 200;
HM_GL_FontFamily         = "Arial,sans-serif";
HM_GL_FontSize           = 8;
HM_GL_FontBold           = false;
HM_GL_FontItalic         = false;
HM_GL_FontColor          = "#FFFFFF";
HM_GL_FontColorOver      = "#FFFFFF";
HM_GL_BGColor            = "#8097C1";
HM_GL_BGColorOver        = "#003082";
HM_GL_ItemPadding        = 3;

HM_GL_BorderWidth        = 1;
HM_GL_BorderColor        = "#003082";
HM_GL_BorderStyle        = "solid";
HM_GL_SeparatorSize      = 1;
HM_GL_SeparatorColor     = "#FFFFFF";
HM_GL_ImageSrc           = imgdir + "tri.gif";
HM_GL_ImageSrcLeft       = imgdir + "triL.gif";
HM_GL_ImageSize          = 5;
HM_GL_ImageHorizSpace    = 5;
HM_GL_ImageVertSpace     = 5;

HM_GL_KeepHilite         = false;
HM_GL_ClickStart         = false;
HM_GL_ClickKill          = 0;
HM_GL_ChildOverlap       = 0;
HM_GL_ChildOffset        = 0;
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>");
}


//end

