function ResetPage() {
    setTimeout("document.location=document.location", 1500);
}

function ReturnPage() {
    setTimeout("document.location=document.referrer", 1500);
}


function AddPrikbord() {
    SendRequest('/Ajax/Prikbord/PrikbordVoegtoe.aspx');
}

function SavePrikbord(p_intId) {
    DHTMLAreaToTextArea();
    var l_blnError = false;
    
    if(document.getElementById ('PrikbordTitel').value == '') {
        alert ('De titel is verplicht!');
        document.getElementById ('PrikbordTitel').focus();
        l_blnError = true;
    }
    
    if(document.getElementById ('PrikbordType').selectedIndex == 0) {
        alert ('De categorie is verplicht!');
        document.getElementById ('PrikbordType').focus();
        l_blnError = true;
    }
    
    if(!l_blnError) {
        SendRequestFunction('/Ajax/Prikbord/PrikbordVoegtoe.aspx', GetAllValues('FormPrikbordUpload'), ResetPage);
    }
}

function EditPrikbord(p_strId) {
    SendRequest('/Ajax/Prikbord/PrikbordEdit.aspx', 'rId=' + p_strId);
}

function SaveEditPrikbord(p_intId) {
    DHTMLAreaToTextArea();
    var l_blnError = false;
    
    if(document.getElementById ('PrikbordTitel').value == '') {
        alert ('De titel is verplicht!');
        document.getElementById ('PrikbordTitel').focus();
        l_blnError = true;
    }
    
    if(!l_blnError) {
        SendRequestFunction('/Ajax/Prikbord/PrikbordEdit.aspx', GetAllValues('FormPrikbordUpload') + '&rId=' + p_intId, ResetPage);
    }
}