// 読み込み時
function CallerOnLoad()
{
    SetLogin();
    SetEvent();
    SetReserveInformation();
    SetHomeInformation();
}

// イベント情報の内容セット
function SetEvent(year, month)
{
    var baseURL = document.form_hidden.base_url.value;
    
    httpObj_event_top = createXMLHttpRequest(displayData);
    
    if (httpObj_event_top)
    {
        httpObj_event_top.open("GET", baseURL + "/common/event_top.php?year=" + year + "&month=" + month, true);
        httpObj_event_top.send(null);
    }

    function displayData()
    {
        if ((httpObj_event_top.readyState == 4) && 
            (httpObj_event_top.status == 200))
        {  
            $('event_top').innerHTML = httpObj_event_top.responseText;
        }
    }
}

// カレンダーナビで月移動
function SetMonth(year, month)
{
    SetEvent(year, month);
}

// 施設からのお知らせ内容セット
function SetReserveInformation()
{
    var baseURL = document.form_hidden.base_url.value;
    
    httpObj_reserve_info = createXMLHttpRequest(displayData);
    
    if (httpObj_reserve_info)
    {
        httpObj_reserve_info.open("GET", baseURL + "/common/information.php?type=F&limit=2&new=1", true);
        httpObj_reserve_info.send(null);
    }

    function displayData()
    {
        if ((httpObj_reserve_info.readyState == 4) && 
            (httpObj_reserve_info.status == 200))
        {  
            $('reserve_information').innerHTML = httpObj_reserve_info.responseText;
        }
    }
}

// お知らせ内容セット
function SetHomeInformation()
{
    var baseURL = document.form_hidden.base_url.value;
    
    httpObj_home_info = createXMLHttpRequest(displayData);
    
    if (httpObj_home_info)
    {
        httpObj_home_info.open("GET", baseURL + "/common/information.php?type=S&limit=2&new=1", true);
        httpObj_home_info.send(null);
    }

    function displayData()
    {
        if ((httpObj_home_info.readyState == 4) && 
            (httpObj_home_info.status == 200))
        {  
            $('home_information').innerHTML = httpObj_home_info.responseText;
        }
    }
}
