// JavaScript Document

// 
var xmlRequest = false;

if (window.XMLHttpRequest) 
{
    xmlRequest = new XMLHttpRequest();
} 
else if (window.ActiveXObject)
{
    xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
} 

function getBulletinData(source, divID)
{
    if (xmlRequest)
    {
        var obj = document.getElementById(divID);
        xmlRequest.open("GET", source);
        
        xmlRequest.onreadystatechange = function()
        {
            if (xmlRequest.readyState == 4 && xmlRequest.status == 200)
            {
                obj.innerHTML = xmlRequest.responseText;
            }
        }
        xmlRequest.send(null);
    }
}

// request calls for page init
function showAll() 
{
    getBulletinData('/announcements/announcements.aspx','bulletinContent');
}

function showMin(minID, maxID, action)
{
    if (action=="hide") {
            document.getElementById(maxID).style.display = "none";
            document.getElementById(minID).style.display = "block";
       } else {
            document.getElementById(maxID).style.display = "block";
            document.getElementById(minID).style.display = "none";
       }
}
function showMax(maxID, minID, action)
{   
    if (action=="hide") {
            document.getElementById(minID).style.display = "none";
            document.getElementById(maxID).style.display = "block";
       } else {
            document.getElementById(minID).style.display = "block";
            document.getElementById(maxID).style.display = "none";
       }
}

// page load event
window.onload = showAll;