﻿// JScript File

function newHttpRequest(url,bAsync)
{		
	var xmlhttp = getXMLHttpObj();
	if( xmlhttp==null ) return null;
	xmlhttp.open('GET',url,bAsync);
	xmlhttp.setRequestHeader("Cache-Control", "no-cache");
	return xmlhttp;
}
function getXMLHttpObj()// Get the XMLHttpRequest object
{
	if(window.widget) return new XMLHttpRequest(); // for nokia widget

    var xmlhttp=null;
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
		try {
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
          xmlhttp = null;
        }
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  	  try {
		xmlhttp = new XMLHttpRequest();
	  } catch (e) {
        xmlhttp=null;
	  }
	}
	return xmlhttp;
}

