//load the variables from the cookies if the respective cookie was set, use default values if not set
//we'll initialize the cookies later, if need be.
//also, since cookies get stored as string, we need to do some casting.
var chain = (getCookie(CHAINC) == "") ? 0 : Number(getCookie(CHAINC));
var fastMusic = (getCookie(FASTMUSICC) == "") ? 0 : Number(getCookie(FASTMUSICC)); //since booleans are very much like numbers in JS, this works.
var shinyCharm = (getCookie(SHINYCHARMC) == "") ? 0 : Number(getCookie(SHINYCHARMC));
var chainBroken = 0; //we don't need to store this with a cookie.
var version = (getCookie(VERSIONC) == "") ? "ORAS" : getCookie(VERSIONC);
var mode = (getCookie(MODEC) == "") ? "DEXNAV" : getCookie(MODEC);
var chances = [8192,7282,7282,7282,7282,6554,6554,6554,6554,5958,5958,5958,5461,5461,5041,5041,4681,4681,4369,4369,4096,3855,3641,3449,3277,3121,2979,2731,2521,2341,2185,1986,1771,1598,1394,1192,993,799,596,400,200]
var chances = [8192,7282,7282,7282,7282,6554,6554,6554,6554,5958,5958,5958,5461,5461,5041,5041,4681,4681,4369,4369,4096,3855,3641,3449,3277,3121,2979,2731,2521,2341,2185,1986,1771,1598,1394,1192,993,799,596,400,200]
initialize();
//after loading from the cookies, we need to update the respective elements