function $(id){
	return document.getElementById(id);
}
function call(url, success, failure){
  var req;
  if (window.XMLHttpRequest){
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }        
  req.open("GET", url, true);
  req.onreadystatechange=function(){
    if(req.readyState == 4){
      if(req.status == 200){
      	success(req);
      }
      else{
          failure(req);
      }
    }               
  };
  req.send(null);
}