function createXMLHttpRequest() { try { var xhttp = new XMLHttpRequest(); } catch(e1) { try { var xhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e2) { try { var xhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e3) { xhttp = false; } } } return xhttp; }