

// Note, the following functions MUST be in this file.  It will not work correctly
// if moved to another file.

function DetectBrowser(HTTPUserAgent) {

    if (HTTPUserAgent.indexOf("opera") != -1) {
        if (HTTPUserAgent.indexOf("windows") != -1) {
            return "OPERA";
        } else if (HTTPUserAgent.indexOf("linux") != -1) {
            return "OPERA_LINUX";
        } else if (HTTPUserAgent.indexOf("mac") != -1) {
            return "OPERA_MAC";
        } else {
            return "OPERA";
        }
    } else if (HTTPUserAgent.indexOf("msie") != -1) {
        if (HTTPUserAgent.indexOf("windows") != -1) {
            return "MSIE";
        } else if (HTTPUserAgent.indexOf("mac") != -1) {
            return "MSIE_MAC";
        } else {
            return "MSIE";
        }
    } else if (HTTPUserAgent.indexOf("gecko") != -1) {
        if (HTTPUserAgent.indexOf("windows") != -1) {
            return "GECKO";
        } else if (HTTPUserAgent.indexOf("linux") != -1) {
            return "GECKO_LINUX";
        } else if (HTTPUserAgent.indexOf("mac") != -1) {
            return "GECKO_MAC";
        } else {
            return "GECKO";
        }
    } else if (HTTPUserAgent.indexOf("mozilla") != -1) {
        if (HTTPUserAgent.indexOf("windows") != -1) {
            return "MOZILLA";
        } else if (HTTPUserAgent.indexOf("linux") != -1) {
            return "MOZILLA_LINUX";
        } else if (HTTPUserAgent.indexOf("mac") != -1) {
            return "MOZILLA_MAC";
        } else {
            return "MOZILLA";
        }
    } else {
        return "DEFAULT";
    }
}

browserType = DetectBrowser(navigator.userAgent.toLowerCase());

switch (browserType) {
    case "MSIE" :
    case "MSIE_MAC" :
    case "GECKO" :
    case "GECKO_LINUX" :
    case "GECKO_MAC" :
    case "MOZILLA" :
    case "MOZILLA_LINUX" :
    case "MOZILLA_MAC" :
    case "OPERA" :
        bln_loadMMenus = true;
        break;
    default : 
        bln_loadMMenus = false;
}


function showMMenu(mn,mXpos, mYpos) {
    if (bln_loadMMenus) {
		//if (eval("x" + mn)) popup(mn,mpos); 
		//var mYpos = 125;
		//var mXpos = mpos;
		if (eval("x" + mn)) popupXY(mn,mXpos, mYpos);
		
	}else return false;
}

function hideMMenu() {
    if (bln_loadMMenus) popdn(); else return false;
}

if (bln_loadMMenus) {
    menunum=0;
    menus=new Array();
    _d=document;
    function addmenu(){
    	menunum++;
    	menus[menunum]=menu;
    }
    function dumpmenus(){
    	mt="<scri" + "pt type=\"text\/javascript\">";
    	for(a=1;a<menus.length;a++){
    		mt+=" menu"+a+"=menus["+a+"];"
    	}
    	mt+="<\/script>";
    	_d.write(mt)
    }
    
}


////////////////////////////////////
// Editable properties START here //
////////////////////////////////////

// Special effect string for IE5.5 or above please visit http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
	effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
	effect = "Shadow(color='#777777', Direction=135, Strength=5)" // Stop IE5.5 bug when using more than one filter
}


timegap=900			// The time delay for menus to remain visible
followspeed=5		// Follow Scrolling speed - was 5
followrate=40		// Follow Scrolling Rate - was 40
suboffset_top=0;	// Sub menu offset Top position 
suboffset_left=0;	// Sub menu offset Left position
menu_border_width   = 1;


    menu_style_1 = [
        "#ffffff", // Mouse Off Font Color
        "#004177", // Mouse Off Background Color

        "#ffffff", // Mouse On Font Color
        "#F68C1F", // Mouse On Background Color
        
        "#ffffff", // Menu Border Color 
        12,		   // Font Size in pixels
        "normal",  // Font Style (italic or normal)
        "normal",  // Font Weight (bold or normal)
        "arial, helvetica, sans-serif",
        12,		   // Menu Item Padding
        "/images/arrow_r_000.gif",
        0,			// 3D Border & Separator bar
        "#89A5D7",	// 3D High Color
        "#89A5D7",	// 3D Low Color
        ,,,,,,
    ];   



xmenu_style_1=[			// style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"navy",				// Mouse Off Font Color
"ccccff",			// Mouse Off Background Color
"ffebdc",			// Mouse On Font Color
"4b0082",			// Mouse On Background Color
"000000",			// Menu Border Color 
12,					// Font Size in pixels
"normal",			// Font Style (italic or normal)
"bold",				// Font Weight (bold or normal)
"Verdana, Arial",	// Font Name
4,					// Menu Item Padding
"arrow.gif",		// Sub Menu Image (Leave this blank if not needed)
,					// 3D Border & Separator bar
"66ffff",			// 3D High Color
"000099",			// 3D Low Color
"Purple",			// Current Page Item Font Color (leave this blank to disable)
"pink",				// Current Page Item Background Color (leave this blank to disable)
"arrowdn.gif",		// Top Bar image (Leave this blank to disable)
"ffffff",			// Menu Header Font Color (Leave blank if headers are not needed)
"000099",			// Menu Header Background Color (Leave blank if headers are not needed)
"navy",			// Menu Item Separator Color
]

