function ResetPage() {
    setTimeout("document.location=document.location", 1500);
}

function ReturnPage() {
    setTimeout("document.location=document.referrer", 1500);
}


function UploadFoto() {
    SendRequest('/Ajax/Foto/FotoVoegtoe.aspx');
}

function UploadGroepFoto(p_intId) {
    SendRequest('/Ajax/Foto/FotoGroepVoegtoe.aspx', 'GroepId=' + p_intId);
}

function SaveFoto() {
    SendRequestFunction('/Ajax/Foto/FotoVoegtoe.aspx', GetAllValues('FormFotoUpload'), ResetPage);
}

function SaveGroepFoto(p_intId) {
    SendRequestFunction('/Ajax/Foto/FotoGroepVoegtoe.aspx', GetAllValues('FormFotoUpload') + '&GroepId=' + p_intId, ResetPage);
}


function UploadAlbum() {
     SendRequest('/Ajax/Foto/AlbumVoegtoe.aspx');
}

function SaveAlbum() {
    SendRequestFunction('/Ajax/Foto/AlbumVoegtoe.aspx', GetAllValues('FormAlbumUpload'), ResetPage);
}

function EditFoto(p_strId) {
    SendRequest('/Ajax/Foto/FotoEdit.aspx', 'rId=' + p_strId);
}

function EditGroepFoto(p_strId) {
    SendRequest('/Ajax/Foto/FotoGroepEdit.aspx', 'rId=' + p_strId);
}

function SaveEditFoto(p_strId) {
    if(document.getElementById('FotoDelete').checked) {
        SendRequestFunction('/Ajax/Foto/FotoEdit.aspx', GetAllValues('FormFotoUpload') + '&rId=' + p_strId, ReturnPage);
    } else {
        SendRequestFunction('/Ajax/Foto/FotoEdit.aspx', GetAllValues('FormFotoUpload') + '&rId=' + p_strId, ResetPage);
    }
}

function SaveEditGroepFoto(p_strId) {
    if(document.getElementById('FotoDelete').checked) {
        SendRequestFunction('/Ajax/Foto/FotoGroepEdit.aspx', GetAllValues('FormFotoUpload') + '&rId=' + p_strId, ReturnPage);
    } else {
        SendRequestFunction('/Ajax/Foto/FotoGroepEdit.aspx', GetAllValues('FormFotoUpload') + '&rId=' + p_strId, ResetPage);
    }
}

function EditAlbum(p_strId) {
    SendRequest('/Ajax/Foto/AlbumEdit.aspx', 'fId=' + p_strId);
}

function SaveEditAlbum(p_strId) {
    if(document.getElementById('AlbumDelete').checked) {
        SendRequestFunction('/Ajax/Foto/AlbumEdit.aspx', GetAllValues('FormAlbumUpload') + '&fId=' + p_strId, ReturnPage);
    } else {
        SendRequestFunction('/Ajax/Foto/AlbumEdit.aspx', GetAllValues('FormAlbumUpload') + '&fId=' + p_strId, ResetPage);
    }
}



