function openChildB(file,window) {
    childWindow=open(file,window,'resizable=no,width=420,height=328,scrollbars=1');
    if (childWindow.opener == null) childWindow.opener = self;
}

var topCookie = 0;
var jumpBrent = 0;
var maxMyBrent = 10;
var i=0;
var titleValue = "";
var dominoPath;
function setBrentCookie()
{
	topCookie=0;
 	for (var i = 1; i <= maxMyBrent; i++)
	{ 
		if (document.cookie.indexOf("MyEGR" + i) >= 0)
		{
			topCookie = i;
		}
	}
  
  if (topCookie >= maxMyBrent)
  {
  	alert('You\'ve already added ' + maxMyBrent + ' pages to My EGR - please remove some entries before adding any more ...');
  }
  else
  {
  	jumpBrent = (topCookie + 1);
  	document.cookie="MyEGR" + jumpBrent + "=" + location.href + "|||" + document.title + "; expires=Monday, 04-Apr-2040 05:00:00 GMT; path=/";
  	urlstring=window.location.pathname.slice(0,window.location.pathname.lastIndexOf('nsf'));
  	openChildB(urlstring+'nsf/MyEGR?OpenForm', 'myEGRWin');
  }
}

