function gResolution() {
  var pxxDepth = screen.pixelDepth;
  if (!(pxxDepth > 0)) pxxDepth = screen.colorDepth;
  if (!(pxxDepth > 0)) pxxDepth = 0;
  return screen.width+"x"+screen.height+"x"+pxxDepth;
}

function oGet(name) {
  if (document.getElementById) return document.getElementById(name);
  else if (document.all) return document.all[name];
  else return null;
}

function setCookie(cookieName, cookieValue, days) {
  var ex = new Date();
  ex = new Date(ex.getTime() + 1000 * 60 * 60 * 24 * days);
  document.cookie = escape(cookieName) + '=' + escape(cookieValue)
	+ '; EXPIRES=' + ex.toGMTString() + '; PATH=/';
}

function getCookie(cookieName) {
  var cookieValue = null;
  if (document.cookie) {
    var posName = document.cookie.indexOf(escape(cookieName) + '=');
    if (posName!=-1) {
      var posValue = posName + (escape(cookieName) + '=').length;
      var endPos = document.cookie.indexOf(';', posValue);
      if (endPos!=-1)
        cookieValue = unescape(document.cookie.substring(posValue,endPos));
        else cookieValue = unescape(document.cookie.substring(posValue));
    }
  }
  return cookieValue;
}
