/*
 * MCC Generic Javascript functions
 * Author: Matt Scales
 */
function DoNothing()
{}

function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function CheckForTitleBar()
{
document.writeln("hhh                                ");
if (parent.location.href.indexOf("bbdev") == -1)
{
document.writeln("hhh                                ");

document.writeln("  ");

document.writeln("                                                            ");

document.writeln("                                                             ");

document.writeln("                                                             ");

document.writeln("                                               ");	

}
}

/*
 * menuExpandable3.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 */

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId, Lev) {
    var menu = document.getElementById(menuId);

    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    //if (window.opera) return; // I'm too tired



if (Lev == "1"){
  actuator.parentNode.style.backgroundImage = "url(/images/menu/lg_on.gif)";
  actuator.onclick = function() {
        var display = menu.style.display;

        this.parentNode.style.backgroundImage =
            (display == "block") ? "url(/images/menu/lg_on.gif)" : "url(/images/menu/lg_off.gif)";

        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

if (Lev == "2"){
  actuator.parentNode.style.backgroundImage = "url(/images/menu/md_on.gif)";
  actuator.onclick = function() {
        var display = menu.style.display;

        this.parentNode.style.backgroundImage =
            (display == "block") ? "url(/images/menu/md_on.gif)" : "url(/images/menu/md_off.gif)";

        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

}



