function mouseOver(elId,bg,fg) {
   $(elId).setStyle({background:bg});
   $(elId).setStyle({color:fg});
}
function mouseOut(elId,bg,fg) {
    $(elId).setStyle({background:bg});
    $(elId).setStyle({color:fg});
    $(elId).setStyle({border: '2px silver ridge'});
    $('logo').focus();
}
function mouseUp(elId,bg,fg) {
    $(elId).setStyle({background:bg});
    $(elId).setStyle({color:fg});
    $(elId).setStyle({border: '2px silver ridge'});
}
function mouseDown(elId,bg,fg) {
    $(elId).setStyle({background:bg});
    $(elId).setStyle({color:fg});
    $(elId).setStyle({border: '3px silver inset'});
}

function home(homeId) {
    mouseLM(homeId,'out');
    location.href='http://www.morerevealed.com/';
}
function aadep(aadepId) {
    mouseLM(aadepId,'out');
    location.href='http://www.morerevealed.com/aadep/';
}
function mouseLM(id,what) {
    if(what=='out') {
        mouseOut(id,'#DAA520','black');
    }else if(what=='over') {
        mouseOver(id,'#DEB887','black');
    }else if(what=='down') {
        mouseDown(id,'#FAF0E6','black');
    }else if(what=='up') {
        mouseUp(id,'#DAA520','black');
    }
}
function loadPagePart(where,id,moreQ) {
    url='home/GetPagePart';
    new Ajax.Request(url, {
        parameters: { getwhat : id},
        onSuccess: function(transport) {
            var text=transport.responseText;
            if(moreQ){
                $(where).insert(text);
            }else {
                $(where).innerHTML=text;
            }
        }
    });
}
function loadPageParts(where,what) {
    url='home/GetHome';
new Ajax.Request(url, {
    method:'post',
    parameters: {
        reason:what
    },
    onSuccess: function(transport) {
        var text=transport.responseText;
        var anns=text.split("Þ");
        var annsHTML="<div class='rightsOuter'><div id='announce'>Announcements</div>";
        for(var i=0;i<anns.length; i+=2) {
            annsHTML+="<div class='ann'>";
            annsHTML+="<div class='title'>";
            annsHTML+=anns[i];
            annsHTML+="</div>";
            annsHTML+="<p>" +  anns[i+1] + "</p>";
            annsHTML+="</div>";
        }
        annsHTML+="</div>";
        $(where).innerHTML=annsHTML;
    }
});
}