//=====================================================================
// Javascript library to handle instantiation of HTTP object
//=====================================================================

function get_http_object(mime_type) {

	var xhr = false; 

	if(window.XMLHttpRequest){

		xhr = new XMLHttpRequest();
		if (xhr.overrideMimeType){
			xhr.overrideMimeType(mime_type);
		}
	} 
	else if (window.ActiveXObject) {

		try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e)	{
			
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				xhr = false;	
			}
		}
	}
	
	return xhr;
}

