<!--
// set expiration to 3 minutes
var expiration = new Date(); expiration.setTime(expiration.getTime() + 50000);

function getCookie(name){
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length != 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}

function setCookie(name, value, expires) {
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  "; path=/";
}
var xtpop;

function popWin() {
setCookie('Visits2', 1, expiration);
xtpop = window.open("http://www3.discovercanada.com/affiliate/amazon/index.cfm","xtpop","width=640,height=400,scrollbars,resizable,top=100,left=100");
xtpop.blur();
setTimeout("xtpop.blur();",1000);
setTimeout("xtpop.blur();",500);
setTimeout("xtpop.blur();",100);
setTimeout("xtpop.blur();",10);
setTimeout("self.focus();",10);
setTimeout("self.focus();",100);
self.focus();
}

var visitsCookie = getCookie('Visits2');
if (visitsCookie == null) popWin();

// -->
