﻿/// <reference path="../../../Js/jquery-1.2.6-vsdoc.js" />

function OnDocumentReady() {

    $("#TekenenPanel").show()
    $("#BerichtenPanel").show()
    $("#NieuwBerichtPanel").hide()

}

function ToonPagina(Pagina) {
    ToonBerichten(Pagina, "WebMethod_VerkrijgBerichtenEnPaging");
}

function BerichtToegevoegd() {
    ToonPagina(1)

    $("#TekenenPanel").show()
    $("#BerichtenPanel").show()
    $("#NieuwBerichtPanel").hide()
}

/*============================================================
Plugin is for Ajax-driven pages to have back/forward navigation 
and to allow bookmarking.
============================================================*/

// PageLoad function
// This function is called when:
// 1. after calling $.historyInit();
// 2. after calling $.historyLoad();
// 3. after pushing "Go Back" button of a browser
function pageload(hash) {
    // hash doesn't contain the first # character.

    if (hash) {
        // restore ajax loaded state

        if (hash == "TekenGastenboek") {
            $("#TekenenPanel").hide()
            $("#BerichtenPanel").hide()
            $("#NieuwBerichtPanel").show()
        }

        if(!isNaN(hash)){
            ToonPagina(hash)
        }
        
    } else {
        // start page
        OnDocumentReady()
        ToonPagina(1)
    }
}


/*==========================================================*/
