function processReqChange()
{
 if (req.readyState == 4 && req.status == 200 && req.responseXML != null) {
 	var cur_bal = document.getElementById('cur_ta_bal');
	var cur_avl = document.getElementById('cur_ta_avl');

	var xmldoc = req.responseXML;

	var bals = xmldoc.getElementsByTagName('balance');
	var fnds = xmldoc.getElementsByTagName('funds');
	if( bals.length > 0 && fnds.length > 0 ){
		cur_bal.innerHTML = '$' + bals.item(0).getAttribute( 'bal' ).toString();
		cur_avl.innerHTML = '$' + fnds.item(0).getAttribute( 'fnd' ).toString();
	}
 }
}

function loadXMLDoc( url ) {
  req = false;
  if(window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
        } catch(e) {
      req = false;
        }
  }
  else if(window.ActiveXObject)
  {
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
    try {
      req = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
      req = false;
    }
  }
  }
  if(req) {
    req.onreadystatechange = processReqChange;
    req.open("GET", url, true);
    req.send("");
  }
}
