// Function to call a php file using ajax
function attach_file(p_script_url)
{
	alert(p_script_url)
      // create new script element, set its relative URL, and load it<br />
      script = document.createElement('script');
      script.src = p_script_url;
	  alert(script.src);
  	  document.getElementsByTagName('head').item(0).appendChild(script);
	  alert(document.getElementsByTagName('head').item(0).appendChild(script));
}

function callFile(filename,querystring)
{
	alert("hai");
	attach_file(filename+"?"+querystring);
}

function getHTTPObject() 
{
  var xmlhttp;

  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }

}
  return xmlhttp;
}

var http = getHTTPObject(); // We create the HTTP Object
