function vleSave(whichChecked){
    var saveData = {};
    if(JSON.stringify(whichChecked)!=="" && typeof whichChecked !=="undefined"){
        saveData.whichChecked=JSON.stringify(whichChecked);
    }
    VLE.set_server_data(true, saveData, function () {
        console.log("set_server_data was successful");
    }, function (msg) {
        console.log("set_server_data has failed");
        if (msg !== null) {
            console.log(msg);
        }
    });
}
function vleOpen(){
    var array = [];
    array.push("whichChecked");
    VLE.get_server_data(true, array, function (saveData) {
        if (saveData) {
            var whichCheckedOpen;
            if (saveData.whichChecked) {
                whichCheckedOpen=JSON.parse(saveData.whichChecked);
            }
            if(whichCheckedOpen!=="" && typeof whichCheckedOpen!=="undefined") {
                afterVleOpen(whichCheckedOpen);
            }
        }
    }, function (msg) {
        console.log("Failed to get server data.");
        if (msg !== null) {
            console.log(msg);
        }
    });
}
function afterVleOpen(obj){
    for(var i=0; i<obj.length; i++){
        for (var key in obj[i]){
            document.getElementById(key).checked=obj[i][key];
        }
    }
    checkAllChecks();
}