if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function() {
  try { return new ActiveXObject("Msxml2.XMLHTTP.6.0") } catch(e) {}
  try { return new ActiveXObject("Msxml2.XMLHTTP.3.0") } catch(e) {}
  try { return new ActiveXObject("Msxml2.XMLHTTP") } catch(e) {}
  try { return new ActiveXObject("Microsoft.XMLHTTP") } catch(e) {}
  throw new Error( "This browser does not support XMLHttpRequest." )
};

function doGetRequest(url)
{
  if(url.indexOf("?") >= 0)
    url += "&rand=" + Math.random();
  else
    url += "?rand=" + Math.random();
  var r = new XMLHttpRequest();
  r.open("GET", url, false);
  r.send(null);
  return r.responseText;
}

function $(x)
{
  return document.getElementById(x);
}

function getBody()
{
  return document.getElementsByTagName("body")[0];
}

function getElementHeight(e) 
{
	return e.offsetHeight;
}

function getElementWidth(e) 
{
	return e.offsetWidth;
}

function getScrollX()
{
  return f_scrollLeft();
}
function getScrollY()
{
  return f_scrollTop();
}

