function pageLoad(sender, e) {
    ReadFile("header", "/inc/header.html");
    ReadFile("sidebar", "/inc/sidebar.html");
    ReadFile("content", "/inc/about.html");
    ReadFile("footer", "/inc/footer.html");
}
function about_click() { ReadFile('content', "/inc/about.html"); }
function ministries_click() { ReadFile('content', "/inc/ministries.html"); }
function giving_click() { ReadFile('content', "/inc/giving.html"); }
function times_click() { ReadFile('content', "/inc/times.html"); }
function staff_click() { ReadFile('content', "/inc/staff.html"); }
function news_click() { ReadFile('content', "/inc/news.html"); }
function outreach_click() { ReadFile('content', "/inc/outreach.html"); }
function events_click() { ReadFile('content', "/inc/events.html"); }
function photos_click() { ReadFile('content', "/inc/photos.html"); }
function mural_click() { window.open("/inc/mural.pdf"); }
function inflatables_click() { ReadFile('content', "/inc/inflatables.html"); }
function daycamp_click() { window.open("./DayCamp/index.html"); }
function bday_click() { ReadFile('content', "/inc/bday.html"); }
function video_click() { ReadFile('content', "/inc/video.html"); }


function ReadFile(targetDiv, strFileName) {
    var oRequest = new XMLHttpRequest();
    var sURL = "http://" + self.location.hostname + strFileName;

    oRequest.open("GET", sURL, false);
    oRequest.setRequestHeader("User-Agent", navigator.userAgent);
    oRequest.send(null)

    if (oRequest.status == 200) {
        document.getElementById(targetDiv).innerHTML = oRequest.responseText;
    }
    else {
        //alert("Error executing XMLHttpRequest call!");
    }
}

