var storePageNumber
//menubar=no, scrollbars=no, resizable=no, status=no, toolbar=no
function routerOpener(storePage) {
	storePageNumber = storePage;
	writeCookie('celsPage', storePage, '1')
    win = window.open('http://www.silverspringfoods.com/store2/','Router','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600')
	var hPos = top.screen.width/2 - 320;
	var vPos = top.screen.height/2 - 240;
	win.moveTo(hPos, vPos);
	win.focus();
}





function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}


function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

