lHttp.3.0") || new XMLHttpRequest("MSXML2.XmlHttp.2.0") ||
new XMLHttpRequest("Microsoft.XmlHttp");
} catch ( e ) {}
}
// if xhr object does not supported or url not given, exit
xhr.onreadystatechange = function () {
if ( xhr.readyState != 4 ) return;
if ( xhr_done != null ) xhr_done = true;
callback ? callback( xhr ) : null;
}
xhr.open( method, url, async );
if ( method === 'POST' ) {
xhr.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
xhr.send( data );
} else {
xhr.send( null );
}