// XMLHttpRequest Wrapper
// By Josh Kearney
// 20051220

// Create the object
var http;
if(navigator.appName=="Microsoft Internet Explorer") {
	http=new ActiveXObject("Microsoft.XMLHTTP");
} else {
	http=new XMLHttpRequest();
}

// Send the HTTP request
function sndReq(val,func) {
    http.open("get",'?action=view&section=info&id='+val);
    http.onreadystatechange=func;
    http.send(null);
}

// Update element with requested data
function showSection() {
    if(http.readyState==4) {
        document.getElementById("info").innerHTML=http.responseText;
    } else if(http.readyState==1) {
        document.getElementById("info").innerHTML="Loading...";
    }
}
