if(typeof AU=="undefined"){
  var AU= new Object();
}

AU.innerIDObj = "";

AU.getElementById = function(id) {
	if (document.getElementById) {
		return document.getElementById(id);
	} else {
		return document.all[id];
	}
}

AU.get = function (URL, innerIDObj) {
  document.body.setAttribute("style", "cursor:wait");
  AU.innerIDObj = innerIDObj;
  var obj = YAHOO.util.Connect.asyncRequest('GET', URL, AU.oCallback);
}

AU.getC = function (URL, oCallback) {
  var obj = YAHOO.util.Connect.asyncRequest('GET', URL, oCallback);
}

AU.post = function (URL, innerIDObj, idForm) {
  AU.innerIDObj = innerIDObj;
  YAHOO.util.Connect.setForm(document.getElementById(idForm));
  var obj = YAHOO.util.Connect.asyncRequest('POST', URL, AU.oCallback);
}

AU.postC = function (URL, idForm, oCallback) {
  YAHOO.util.Connect.setForm(document.getElementById(idForm));
  var obj = YAHOO.util.Connect.asyncRequest('POST', URL, oCallback);
}
      
AU.oCallback = {
  success: function (oResponse) {
    document.getElementById(AU.innerIDObj).innerHTML = oResponse.responseText;
    document.body.setAttribute("style", "cursor:default");
  },
  failure: function (oResponse) {
    document.getElementById(AU.innerIDObj).innerHTML = "<b>The request failed. Info error: " + oResponse.statusText + "</b>";
    document.body.setAttribute("style", "cursor:default");
  },
  timeout: 10000
}

