﻿/* Varibales */
var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );

var is_gecko = (agt.indexOf('gecko') != -1);
var is_opera = (agt.indexOf("opera") != -1);


function doAJAX(a,b){
    document.getElementById(a).style.display = "none";
    document.getElementById(b).style.display = "block";
}

function owin(url, w, h) {
    if(w == 'undefined') window.open(url);
    else window.open(url, "showwin", "width=" + w + ",height=" + h);
    return false;
}


/* Menu Fixes  ------------------------------------------------- */

menuHover = function() {   
    if(document.getElementById("BAMMenu") != undefined) {
        var mnME = document.getElementById("BAMMenu").getElementsByTagName("li");     
        for (var i=0; i<mnME.length; i++) {               
            mnME[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp(" over\\b"), "");
            }     
        } 
    }
} 

function doOL() {menuHover();}
if(window.attachEvent) window.attachEvent("onload", doOL);
else if (window.addEventListener) window.addEventListener("load", doOL, false);
else if (window.onload) window.onload = doOL();