var request = null;

function createGetRequest() {
    try {
    // Opera 8.0+, Firefox, Safari
    request = new XMLHttpRequest();// The variable that makes Ajax possible!
    //alert(request);
    } catch (trymicrosoft) {
    	try {
    	// Internet Explorer Browsers
    		request = new ActiveXObject("Microsoft.XMLHTTP")
    		//alert("Microsoft.XMLHTTP");
    	} catch (othermicrosoft) {
    		try {
    		request = new ActiveXObject("Msxml2.XMLHTTP");
    		//alert("Msxml2.XMLHTTP");
    		} catch (failed) {
    		// Something went wrong
    		request = null;
    	}
    }
  }

 if (request == null)
   alert("Error creating request object!");
}

function createPostRequest() {
try {
  request = new XMLHttpRequest();
} catch (trymicrosoft) {
  try {
    request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (othermicrosoft) {
    try {
      request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (failed) {
      request = null;
    }
  }
}

if (request == null)
  alert("Error creating request object!");
}
