
// <![CDATA[

// Need to make an object of XMLHttpRequest Type.
function createRequestObject() {
    var ro;
    if (navigator.appName == "Microsoft Internet Explorer") {
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        ro = new XMLHttpRequest();
    }
    return ro;
}
var http = createRequestObject();

// Function that calls the PHP script:
function sendRequest(qc) {
	// Call the script.
	// Use the GET method.
	// Pass the data in the URL.
    qc = qc + '&px=' + tempX + '&py=' + tempY;
    http.open('get', 'minicalendar.php?' + qc); 
    http.onreadystatechange = handleResponse;
    http.send(null);
}

// Function handles the response from the PHP script.
function handleResponse() {
	// If everything's okay:
    if(http.readyState == 4){
    	// Assign the returned value to the document object.
        document.getElementById('answer').innerHTML = http.responseText;
    }
}
// ]]>
