﻿/// <reference path="../../../Js/jquery-1.2.6-vsdoc.js" />
function OnDocumentReady() {

    $("#TekenenPanel").hide()
    $("#BerichtenPanel").show()
    $("#NieuwBerichtPanel").show()

    $("#BerichtenTableHead").show()

}

function ToonPagina(Pagina) {
    ToonBerichten(Pagina, "WebMethod_VerkrijgBerichtenEnPaging");
}

function BerichtToegevoegd() {
    $.ajax({
        type: "POST",
        url: "/Modules/Gastenboek/Front/BerichtWebService.asmx/WebMethod_VerkrijgAantalPaginas",
        data: "{AantalBerichtenPerPagina:'" + AantalBerichtenPerPagina + "', ItemId:'" + ItemId + "', ItemType:'" + ItemType + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            if (msg.d != null) {
                ToonPagina(msg.d)
            }
        }

    })
}

function TekenLinkClick() {
}

function pageload(hash) {
    // hash doesn't contain the first # character.

    if (hash) {
        // restore ajax loaded state

        if (!isNaN(hash)) {
            ToonPagina(hash)
        }

    } else {
        // start page
        OnDocumentReady()
        ToonPagina(1)
    }
}

