// JScript File
var obj;
function AjaxFunction()
{
       if(window.ActiveXObject)
        {    
	        try
	        {
		        obj = new ActiveXObject("Msxml2.XMLHTTP");
	        }
	        catch(e)
	        {
		        try
		        {
			        obj = new ActiveXObject("Microsoft.XMLHTTP");
		        }
		        catch(e1)
		        {
			        obj = null;
		        }
	        }
        }  
         else if(window.XMLHttpRequest)
         {
	        try
	        {
		        obj = new XMLHttpRequest("Msxml2.XMLHTTP");
	        }
	        catch(e)
	        {
		        try
		        {
			        obj = new XMLHttpRequest("Microsoft.XMLHTTP");
		        }
		        catch(e1)
		        {
			        obj = null;
		        }
	        }
        }
//	try
//	{
//		obj = new XmlHttpRequest();
//	}
//	catch(e)
//	{
//		try
//		{
//			obj = new ActiveXObject("Microsoft.XMLHTTP");
//		}
//		catch(e1)
//		{
//			obj = new ActiveXObject("Msxml2.XMLHTTP");
//		}
//	}
	if(obj != null)
	{
		var link = "Default3.aspx?";
		link = link + "UserGroup=" + document.getElementById('txt_UserGroup').value ;
		if(window.ActiveXObject)
        {
		    obj.onreadystatechange = ProcessTheResponse;		
		    obj.open("GET", link, true);
		    obj.send(null);
		}
		else if(window.XMLHttpRequest)
        {
		    obj.open("GET", link, false);
		    obj.send(null);
		    obj.onreadystatechange = ProcessTheResponse;		
        }
	}
	return false;
}
function ProcessTheResponse()
{
	if (obj.readyState == 4)
	{
		if(obj.status == 200)
		{
          var response=obj.responseText;
         location.href='Masters/TA_UI_Master_UserGroups.aspx';
		}
	}
}