<!--
function ReadCookie (CookieName) {
  var CookieString = document.cookie;
  var CookieSet = CookieString.split (';');
  var SetSize = CookieSet.length;
  var CookiePieces
  var ReturnValue = "";
  var x = 0;

  for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {

    CookiePieces = CookieSet[x].split ('=');

    if (CookiePieces[0].substring (0,1) == ' ') {
      CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
    }

    if (CookiePieces[0] == CookieName) {
      ReturnValue = CookiePieces[1];
    }
	return ReturnValue;
  }
  document.forms[0].elements[1].value = ReturnValue;

}

function WriteCookie () 
{	
  var oneDay= 1*24*60*60*1000;
  var expDate = new Date();
  expDate.setTime (expDate.getTime() + oneDay);
  var cookieExpires = expDate.toGMTString();

  if (document.cookie.length>0)
  {
	if ((ReadCookie("resolution") == "") || (ReadCookie("resolution") != screen.width))
	{
		var expDate = new Date();
		expDate.setTime (expDate.getTime() + (2678400000));
    	document.cookie = "resolution" + "=" + escape (screen.width) + "; expires=" + expDate.toGMTString();
	}
  }
  else {
	window.location.href="/nocookies.asp";
  }
}

//This executes the WriteCookie function to check the browser has cookies enabled.
WriteCookie();
//-->