var XmlHttp8;

function CreateXmlHttp8()
{
	//Creating object of XMLHTTP in IE
	try
	{
		XmlHttp8 = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			XmlHttp8 = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(oc)
		{
			XmlHttp8 = null;
		}
	}
	//Creating object of XmlHttp8 in Mozilla and Safari 
	if(!XmlHttp8 && typeof XMLHttpRequest != "undefined")
	{
		XmlHttp8 = new XMLHttpRequest();
	}
}

function FilterTab3(svID, ocID)
{
	// URL to get states for a given client
	var requestURL = FilterTab3AjaxUrl;
	CreateXmlHttp8();
	// If browser supports XmlHttp8Request object
	if(XmlHttp8)
	{
		//Setting the event handler for the response
		XmlHttp8.onreadystatechange = HandleFilterTab3Lookup;

		//Initializes the request object with POST (METHOD of posting),
		//Request URL and sets the request as asynchronous.
		XmlHttp8.open("POST", requestURL,  true);
			
		// send header for post
		XmlHttp8.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		
		//Sends the request to server
		var querystring = "svID="+ svID + "&ocID="+ ocID;
		XmlHttp8.send(querystring);
	}
}

function HandleFilterTab3Lookup()
{
	// To make sure receiving response data from server is completed
	if(XmlHttp8.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttp8.status == 200)
		{
			if(XmlHttp8.responseXML != null){
				DisableRadiosTab('rdoBandwidths', XmlHttp8.responseXML.documentElement);
			}else{
				alert("There was a problem retrieving data from the server (responseXML == null)");
			}
		}
		else
		{
			alert("There was a problem retrieving data from the server (status = " + XmlHttp8.status + ")");
		}
	}
}