

			//Gets the browser specific XmlHttpRequest Object

			//First thing to do is thing to ge tth xmlhttprequest object

			var glidingid;

			var static_div;

			function getXmlHttpRequestObject() {

				if (window.XMLHttpRequest) {

					return new XMLHttpRequest(); //Not IE

				} else if(window.ActiveXObject) {

					return new ActiveXObject("Microsoft.XMLHTTP"); //IE

				} else {

					//Display your error message here. 

					//and inform the user they might want to upgrade

					//their browser.

					alert("Your browser doesn't support the XmlHttpRequest object.  Better upgrade to Firefox.");

				}

				}			

			//Get our browser specific XmlHttpRequest object.

			//this isthe http object we use for the request and response sending and receiving purpose

			var receiveReq = getXmlHttpRequestObject();		

				//Initiate the asyncronous request.

				//If our XmlHttpRequest object is not in the middle of a request, start the new asyncronous call.

				//state 0 -- initializing

						/*    *  0 (uninitialized)

			    * 1 (loading)

			    * 2 (loaded)

			    * 3 (interactive)

			    * 4 (complete) */

			   // alert("here this comes");

						//also see .status usually 200 why i don't know.

				//Called every time our XmlHttpRequest objects state changes.

				//first i should make a function to fetch data asnychronously to a particular div

			function fetchData(url,divId){


			$(divId).innerHTML="<img src='ajax/loading.gif' alt='Loading..'> Loading...";

			if (receiveReq.readyState==4 ||receiveReq.readyState==0)

			{static_div=divId;

			//console.info(divId);

				receiveReq.open("GET",url,true);//load the given url output

				receiveReq.onreadystatechange=handleFetchData;

				receiveReq.send(null);//as it is a get method null is sent

			}

			

			}

			

			

			function handleFetchData(){

			odiv=$(static_div);

			if (receiveReq.readyState==4){

		//confirm("oki do ki");

	

	//	console.info("ok");

			

			odiv.innerHTML=receiveReq.responseText;

			}

			else

			{

			//confirm("else condition is fired");

			}

				}

		

					function fetchDataPro(url,divId){

			$(divId).innerHTML="<img src='ajax/loading.gif' alt='Loading..'> Loading...";

			new Ajax.Updater(divId, url, {
method:'get',
evalScripts: true
});
			

			}

			

	

		

		