/**
* x-core Javascript http functions
*
* @version 1.0
**/
/**
* returns the xml connector available, depending on browser
*
* @access private
* @return xml connection ahndler
**/
function _getXmlConnector()
{
	var xmlhttp=false;
	/*@cc_on @*/
	//@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}
	/*@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		//mozilla case
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
/**
* loops while the response comes to avoid UI lock
*
* @access private
* @return string the call result
**/
function _onreadystatechange()
{
	if (httpXmlHandler.readyState==4) {
		//alert(httpXmlHandler.responseText);
		//we're done :)
		return;
	}

}
//global http handler
var httpXmlHandler;
function httpConnector()
{
	this._getXmlConnector = _getXmlConnector;
	httpXmlHandler = this._getXmlConnector();
	/**
	* makes an async connection and returns the result
	*
	* @access public
	* @param string target (can be GET, HEAD, POST)
	* @param string url
	* @return string the call result
	**/
	this.getResponse = function(target, url)
	{
		httpXmlHandler.open(target, url,false);
		//httpXmlHandler.onreadystatechange= _onreadystatechange
		httpXmlHandler.setRequestHeader('Accept','message/x-jl-formresult')
		httpXmlHandler.send(null)
		return httpXmlHandler.responseText;
	}
}
