﻿SWStorage = function () { }
SWStorage.data = {};

SWStorage.setValue = function (key, val) {
    this.data[key] = val;
    try {
        localStorage.setItem(key, val);
    }
    catch (error) {
        //Doe niets
    }
}

SWStorage.getValue = function (key) {
    if (this.data[key] != undefined) {
        return this.data[key];
    }
    else {
        val = localStorage.getItem(key);
        this.data[key] = val;
        return val;
    }
}