﻿// JavaScript Document
//Author Ram Krishna
var httpObj;
var url;
var responseHandler;
function setURL(url){
	this.url=url;
}
function doRequest(){
	if(url!=null){
	httpObj=getHttpObject();
	if(httpObj==null){
		alert("AJAX Not Supported");
		return;
		}
		httpObj.onreadystatechange=responseHandler;
		httpObj.open("GET",url,true);
		httpObj.send(null);
	}else{
		alert("Must provide url");
	}
}
function getHttpObject()
	{
	   var httpObj=null;
	   try{
		   httpObj=new XMLHttpRequest();
	   }catch(e){
		   try{
			   httpObj=new ActiveXObject("Msxml2.XMLHTTP");
		   }catch(e){
			   httpObj=new ActiveXObject("Microsoft.XMLHTTP");
			   }
		   }
		   return httpObj;
}

