// If two Ajax Parts going on Same page use these functions for the Second one


function responder2(rdiv2,url2)
{
	respond_div2=rdiv2;
	if (url2.length==0)
	{ 
		document.getElementById(respond_div2).innerHTML="";
		return;
	}
	xmlHttp2=GetXmlHttpObject2();
	url2=url2+"&sid="+Math.random(); // Add Random Value to URL toprevent loading from cache
	xmlHttp2.onreadystatechange=stateChanged2;
	xmlHttp2.open("GET",url2,true);
	xmlHttp2.send(null);
} 

function stateChanged2() 
{ 
	if (xmlHttp2.readyState==4)
	{ 
		document.getElementById(respond_div2).innerHTML=xmlHttp2.responseText;
	}
}

function GetXmlHttpObject2()
{
	try
	{
	  // Firefox, Opera 8.0+, Safari, IE7+
		xmlHttp2=new XMLHttpRequest();
	}
	catch (e)
	{
	  // Internet Explorer
		try
		{
			xmlHttp2=new ActiveXObject("Msxml2.xmlHttp2");
		}
		catch (e)
		{
			try
			{
				xmlHttp2=new ActiveXObject("Microsoft.xmlHttp2");
			}
			catch (e)
			{
				try
				{
					// IE 8 Only
					xmlHttp2= new XDomainRequest();
				}
				catch (e)
				{
					xmlHttp2=null;
				}
				
			}
		}
	}
	if (xmlHttp2==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	return xmlHttp2;
} 

//End Of Second responder


function responder(rdiv,url)
{
	respond_div=rdiv;
	if (url.length==0)
	{ 
		document.getElementById(respond_div).innerHTML="";
		return;
	}
	xmlHttp=GetXmlHttpObject();
	url=url+"&sid="+Math.random(); // Add Random Value to URL toprevent loading from cache
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(respond_div).innerHTML=xmlHttp.responseText;
	}
}


function GetXmlHttpObject()
{
	try
	{
	  // Firefox, Opera 8.0+, Safari, IE7+
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	  // Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					// IE 8 Only
					xmlHttp= new XDomainRequest();
				}
				catch (e)
				{
					xmlHttp=null;
				}
				
			}
		}
	}
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	return xmlHttp;
} 

