function createAjax() {
  var ajax = false;

  if(window.XMLHttpRequest) {
    ajax = new XMLHttpRequest();
  } else if(window.ActiveXObject) {
    ajax = new ActiveXObject("Microsoft.XMLHTTP");
  }

  return ajax;
}

function isAjaxReady(ajax) {
  if (ajax.readyState == 4) {
    return true;
  } else {
    return false;
  }
}
