﻿// *******************************
// Admin Library
// 1.0.0
// (C) 2008 DG2
// *******************************

// *******************************
// alSave
// *******************************
function alSave(strGUID, strPictureGUID, strFckName) {

    var oEditor = FCKeditorAPI.GetInstance(strFckName);      
    var strValue = oEditor.GetHTML();
       
    if (strValue == null) return;
    $request('NonVisiblePopDiv', '/apps/api/popup/4/', '&ID='+strGUID+'&PictureGUID='+strPictureGUID+'&Value='+Url.encode(strValue)+'&ProfilePicture='+$get('ProfilePhoto').checked, true);

}

// *******************************
// alDelete
// *******************************
function alDelete(strGUID, strPictureGUID, strImgName) {

    var cDel = confirm('Weet je zeker dat je deze foto wilt verwijderen?');
	
	if (cDel) {
		$get(strImgName).style.display = 'none';
		$request('NonVisiblePopDiv', '/apps/api/popup/5/', '&ID='+strGUID+'&PictureGUID='+strPictureGUID, true);
	}
	
	else {
		return false;
	}   
}

// *******************************
// alReSort
// *******************************
function alReSort(strGUID, straGUID) {
    
    var strList = ToolMan.junkdrawer().serializeList($get('boxes'));
    $request('NonVisiblePopDiv', '/apps/api/popup/6/', '&ID='+strGUID+'&aGUID='+straGUID+'&List='+Url.encode(strList), true);
    
}