
function setCookie (name, value, expires, path, domain, secure)
{
  var curCookie = name + "=" + escape(value) + (expires ? "; expires=" + expires : "") + (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "secure" : "");
  document.cookie = curCookie;
}
function getCookie (name) 
{
  var prefix = name + "=";
  var c = document.cookie;
  var nullstring = ""
  var cookieStartIndex = c.indexOf(prefix);
  if (cookieStartIndex == -1)
    return nullstring;
  var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
  if (cookieEndIndex == -1)
    cookieEndIndex = c.length;
  return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
function fixDate (date) 
{
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}
var width = screen.width;
var height = screen.height;
var t_strCookie = "sr-n"+width+"x"+height;
var t_strVal = getCookie(t_strCookie);
var t_bCookieSet = 0;
if ( "" == t_strVal || !t_strVal )
{
  var now = new Date();
  fixDate(now);
  now.setTime(now.getTime() + 30 * 24 * 60 * 60 * 1000);
  now = now.toGMTString();
  setCookie(t_strCookie, 1, now, "/", 0, 0);
  t_bCookieSet = 1;
}
document.write("<img src='http://stats.screenresolution.org/get.php?q=w"+width+"h"+height+"c"+t_bCookieSet+"s1' height=1 width=1 border=0>");
