﻿/* HM_Loader.js
*  HierMenus Version 6
*  Copyright 2004 Jupitermedia Corporation
*/

HM_UserAgent = navigator.userAgent;
      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_IsSafari = ((HM_DOM)&&
               (parseInt(navigator.productSub)>=20020000)&&
               (navigator.vendor.indexOf("Apple Computer")!=-1));
if(HM_IsSafari) {
	HM_BrowserPattern = /Safari\/(\d+)/;
	HM_Matches = HM_UserAgent.match(HM_BrowserPattern);
	if (HM_Matches&&HM_Matches[1]) HM_BrowserVersion = (HM_Matches[1]-0);
	else HM_BrowserVersion = 0;
}

HM_Opera = (window.opera) ? true : false;
if(HM_IsSafari||HM_Opera) {
	HM_IE=HM_NS4=HM_IE4=HM_IE4M=false;
	if(HM_IsSafari) HM_Mac=true;
}
HM_IE5M = (HM_IE&&HM_Mac&&HM_DOM);

if(HM_Opera) {
    HM_BrowserPattern = /Opera(\/| )(\d+.*)/;
    HM_VersionSupported = 7;
}

HM_Konqueror = (HM_UserAgent.indexOf("Konqueror")!=-1);
if(HM_Konqueror) {
    HM_BrowserPattern = /(Konqueror\/)(\d+.*)/;
    HM_VersionSupported = 3.2;
}

if(HM_Opera || HM_Konqueror) {
    if (HM_UserAgent.match) {
       HM_Matches = HM_UserAgent.match(HM_BrowserPattern);
       if (HM_Matches&&HM_Matches[2]) {
          HM_BrowserVersion = parseFloat(HM_Matches[2]);
       } else HM_BrowserVersion = 0;
       HM_IsMenu = (HM_BrowserVersion >= HM_VersionSupported);
    } else {
       HM_BrowserVersion = 0;
       HM_IsMenu = false;
    }
} else {
    HM_BrowserVersion = 0;
    HM_IsMenu = !HM_IE4M && !HM_IE5M && (HM_DOM || HM_NS4 || HM_IE4 );
}

if(window.event + "" == "undefined") event = null;
// function HM_f_PopUp(){return false};
// function HM_f_PopDown(){return false};


// Configuration block. The following 6 variables should be configured 
// to match your default preferences. You can then override the settings
// on a page by page basis by providing values for the variables in any
// JavaScript segment that is loaded BEFORE this one. These variables 
// are the ONLY variables you should alter in this file. 

if(typeof(window.HM_ScriptDir)=="undefined")
	HM_ScriptDir = "http://www.ilovesmart.com/menu/";
if(typeof(window.HM_ImageDir)=="undefined")
	HM_ImageDir = "http://www.ilovesmart.com/menu/";
if(typeof(window.HM_ConfigDir)=="undefined")
	HM_ConfigDir = "http://www.ilovesmart.com/menu/";
if(typeof(window.HM_ConfigFiles)=="undefined")
	HM_ConfigFiles = "sitemap_e.js,search_bfj.js,mn_bfj.js";
if(typeof(window.HM_ConfigType)=="undefined")
	HM_ConfigType = "default";
if(typeof(window.HM_FramesEnabled)!="boolean")
	HM_FramesEnabled = false;


HM_IsMenu=(HM_Konqueror&&HM_FramesEnabled)?false:HM_IsMenu;
if(HM_IsMenu) {
	HM_BrowserString = HM_NS4 ? "NS4" : HM_Opera ? "OPR" : HM_DOM ? "DOM" : "IE4";
	HM_aConfigs = HM_ConfigFiles.split(',');
	HM_WriteString = '<scr'+'ipt src="' + HM_ScriptDir + 'HM_Script' + HM_BrowserString + '.js" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n";
	document.write(HM_WriteString);
	for(var i=0; i<HM_aConfigs.length; i++) {
		HM_WriteString = '<scr'+'ipt src="' + HM_ConfigDir + HM_aConfigs[i] + '" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n";
		if(HM_aConfigs[i]) document.write(HM_WriteString);
	}
	if(HM_ConfigType=="arrays") {
		HM_WriteString = '<scr'+'ipt src="' + HM_ScriptDir + 'HM_ConvertArrays.js" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n"
		document.write(HM_WriteString);
	}
}
