/* (c) josh 2006 */

/** GLOBAL DEFINE */

var xcap = {};

/**
 * Page object definitions for Ajax and callback functions. **/

xcap.xmlHttp = null;
xcap.responseHandler = '';

/**
 * HELPER FUNCTIONS - for instance creation and start of callback flow. */
 
function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xcap.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } else if (window.XMLHttpRequest) {
        xcap.xmlHttp = new XMLHttpRequest();
    }
}

function handleStateChanged() {
    if (xcap.xmlHttp.readyState == 4) {
        if (xcap.xmlHttp.status == 200) {
            eval(xcap.responseHandler);
        }
    }
}
