var lvls = new Array();
var __open = new Array();
var flag = new Array();
var numPlay, money
var obs = new Array();
// Чтение данных из local storage
function readStorage(){
	flag[0] = false;
	__open = JSON.parse(window.localStorage.getItem("__open")) ? JSON.parse(window.localStorage.getItem("__open")) : new Array();
	
	numPlay = window.localStorage.getItem("bs_numPlay") ? +window.localStorage.getItem("bs_numPlay") : 0;
	money = window.localStorage.getItem("bs_money") ? +window.localStorage.getItem("bs_money") : __config.startMoney;
};


function st_getNumPlay(){
	return numPlay
}

function st_getMoney(){
	return money
}

function st_setNumPlay(v){
	numPlay += v
	window.localStorage.setItem("bs_numPlay", numPlay)
}

function st_setMoney(v){
	money += v
	window.localStorage.setItem("bs_money", money)
}
//------ Наблюдатель ------//
function observerStorage(o){
	obs.push(o);
}