/*
	This function is used to Create and Send the Request to Server Asynchronously
	inputs: 1: ServerURL to know to where the request is to be sent.
			2: Name of the Container
	OUTPut: Relays the Data accordingly			
*/


function CreateXMLHttpObjectAndProcess(SrvURL,Container)
  {
	var xmlHttp; // Used to store xmlHttp Object
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp	=	new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}//Closing of try
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}//Closing of Catch


	xmlHttp.onreadystatechange=function()
	{
		
		try {
				if(xmlHttp.readyState==4)
				{ 
					//If container is Div
					document.getElementById(Container).innerHTML	=	xmlHttp.responseText;
					
							
				}//Closing of if(xmlHttp.readyState==4)
				else
				{
					document.getElementById(Container).innerHTML	=	"<img src='images/loader.gif' alt='Loading...' border='0' />";
				}
			}//End of try
		catch(e){}		
	}//Closing of Annonymous function
	
	
	var Stamp = new Date();
	
	SrvURL = SrvURL;+ "&TS="+ Stamp;

	//alert(SrvURL);
	//Open the Connection with the Server
	xmlHttp.open("GET",SrvURL,true);
	//Now finally send the Request
	xmlHttp.send(null);

	
  }//Closing of CreateXMLHttpObjectAndProcess()

