function AJAX(url, fx){
  var XMLHTTP = null;
  if (window.XMLHttpRequest){
    XMLHTTP = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    try {
      XMLHTTP = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (ex){
      try {
        XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch (ex){ }
    }
  }

  XMLHTTP.open("GET", url);
  XMLHTTP.onreadystatechange = function(){
    if (XMLHTTP.readyState == 4){
      fx(XMLHTTP.responseText);
    }
  }
  XMLHTTP.send(null);
}


info = null;
document.onmousemove = updateInfo;
function updateInfo(e) {
  var scrTop  = (document.documentElement && document.documentElement.scrollTop ) ? document.documentElement.scrollTop  : document.body.scrollTop;
  var scrLeft = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
/*@cc_on
  if (@_jscript_version >= 5.8 && !navigator.userAgent.match(/msie 7.*trident/i)) // fix for IE8+
  {
    scrTop = 0;
    scrLeft = 0;
  }
@*/
  var x = (document.all) ? window.event.x + scrLeft : e.pageX;
  var y = (document.all) ? window.event.y + scrTop  : e.pageY;
  if (info != null) {
    info.style.left = (x + 20) + "px";
    info.style.top  = (y + 20) + "px";
  }
}
function showInfo(id) {
  info = document.getElementById(id);
  info.style.display = "block"
}
function hideInfo() {
  info.style.display = "none";
  info = null;
}


function ShowHide(objId){
  var obj = document.getElementById(objId);
  obj.style.display = (obj.style.display == 'none') ? 'block' : 'none';
}

function displaySpoiler(oLink){
  var oPar  = oLink.parentNode.parentNode;
  var oCont = oPar.getElementsByTagName("div")[1];
  oCont.style.display = "block";
  oLink.style.display = "none";
}

function activateNoadmin(act){
  if (act != 0 && act != 1) return;

  var a = new Date();
  a = new Date(a.getTime() + 60*60*24*365*100);
  document.cookie = 'noadmin='+act+'; expires='+a.toGMTString()+';';
  location.reload();
}

