<!--
//info.js

// Client Modifiable Vars
var br_mid         				= 371;            //change to clients mid
var br_domain      				= '.officemax.com';   //change to clients top-level domain (i.e. domain='.clientdomain.com') **NOTE: no port numbers!!
var br_all						= 1;				//invite may be spawned off ANY site page (not just shopcart)
var br_pitch_frequency_cookie 	= 0;				//days until cookie expires and consumer can be pitched again
var br_pitch_possibility_random = 0;				//chance percentage to receive the invite (set to 100 would pitch to 100% of consumers on exit)
var br_invite_delay				= 1000;				//delay in milliseconds (1000 ms = 1 sec) before showing the invite
var br_cart_expire				= 20;				//minutes until shopping cart expires
var br_friendly 				= 0;				//friendly.js - suppress exit invite for links on ALL pages

// System Vars
var br_ExitPop;
var br_dontshow = 0;
var br_rdm = Math.round(Math.random() * 99); 		//create random # from 0-99
var br_blocked = br_GetCookie("br_blocked");
var br_invited = br_GetCookie("br_invited");
var br_shopcart = br_GetCookie("br_shopcart");
var br_inviteURL = 'http://eval.bizrate.com/popup_exit.xpml';
var br_inviteWidth = 450;
var br_inviteHeight = 400;
var br_indomain_delay = 1000;
var br_indomain_timeout;

// Shared funtions
function br_GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return br_getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return 0;
}
function br_getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1) endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function br_write_cookie (arg, value) {
  //alert (arg + " Adding " + value);
  var expires = (br_pitch_frequency_cookie * 24 * 60 * 60 * 1000);	//pitch_frequency_cookie - cookie expiration
  if (arg == 'br_shopcart' || arg == 'br_blocked') { expires = (br_cart_expire * 60 * 1000); }	//cart_expire - minutes until cart expires
  if (arg == 'br_indomain') { expires = (60 * 60 * 1000); }	//HTTPS session workaround
  if (arg == 'br_timerpop') { expires = (24 * 60 * 60 * 1000); }	//New Code
  if (arg == 'br_invited') { expires = (24 * 60 * 60 * 1000); }	//New Code
  var exp = new Date();  var someday = exp.getTime() + expires;
  exp.setTime(someday);
  document.cookie = arg + "=" + value + "; expires=" + exp.toGMTString() + ";path=/;domain=" + br_domain;
  //alert(arg + " " + value + " expires " + exp.toGMTString() + " domain " + br_domain);
}
function br_friendly_links () {
  if (document.links) {
    for (var i = 0; i < document.links.length; i++) {
	  var stmt = "var oldClickLoop" + i + " = (document.links[i].onclick) ? document.links[i].onclick : function() {}; document.links[i].onclick = function() { br_dontshow=1; oldClickLoop" + i + "(); }"
      eval(stmt);
    }
  }
}
//-->
