var pagepopup = null;
var cookiesData = null;
var shadowpage = null;

function webStart(thisElem) {
  cookiesData = restoreCookies();
  if (pagepopup) {
    if (!cookiesData["pagePopup"] || cookiesData["pagePopup"]!=1) {
      pagepopup.className = "";
    }
  }
  if (shadowpage) shadowPageMake();
}

function storePopupCookies() {
  document.cookie = "pagePopup=1;";
}

function restoreCookies() {
  var temp1 = Array();
  var temp2 = Array();
  var cookiesData = Array();
  temp1 = document.cookie.split('; ');
  for (var i=0;i<temp1.length;i++) {
    temp2 = temp1[i].split('=');
    if (temp2[0] && temp2[1]) {
      cookiesData[temp2[0]] = temp2[1];
    }
  }
  return cookiesData;
}

function shadowPageMake() {
  shadowpage.style.width = document.body.offsetWidth+'px';
  shadowpage.style.height = document.body.offsetHeight+'px';
}
