var settings = {
                 loginUsernameText : 'email address',
                 loginFormId       : 'login-form'
               };

window.onload = function() {
    P7_initPM(1,6,1,-20,10);
    loadLoginBox(settings.loginFormId);
}

function loadLoginBox(id)
{
    var frm = document.getElementById(id);
    if (!frm)
        return;

    var elt = frm.username;
    if (!elt)
        return;

    elt.emptyLabel = settings.loginUsernameText;

    elt.onfocus = function() {
        if (!this.bEntered)
            this.value = '';
        this.bEntered = true;
    }

    elt.onblur = function() {
        if (this.value.length == 0) {
            this.value = this.emptyLabel;
            this.bEntered = false;
        }
    }

    elt.onblur();

    frm.onsubmit = function() {
        this.username.onfocus();
    }

}

function MM_jumpMenu(targ,selObj,restore)
{
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}

function toggleLayer(whichLayer)
{
    if (document.getElementById) {
        // this is the way the standards work
        var style2 = document.getElementById(whichLayer).style;
        style2.display = style2.display? "":"block";
    }
    else if (document.all) {
        // this is the way old msie versions work
        var style2 = document.all[whichLayer].style;
        style2.display = style2.display? "":"block";
    }
    else if (document.layers) {
        // this is the way nn4 works
        var style2 = document.layers[whichLayer].style;
        style2.display = style2.display? "":"block";
    }
}

function wndpop(location, width, height, scrolls) {

    day = new Date();
    id  = day.getTime();

    left = (screen.width - width) / 2;
    thetop  = (screen.height - height) / 2;

    eval("page" + id + " = window.open(location, '" + id + "', 'toolbar=0,scrollbars=" + scrolls + ",location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left = ' + left + ',top = ' + thetop);");
}

