//################## For Sub category Selection ##########################
var xmlHttpsc
function getsubcategory(str,page,id)	
{	
	xmlHttpsc=GetXmlHttpObjectsc()
	if (xmlHttpsc==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=page
	url=url+"?p="+str+"&page="+id	
	//url=url+"&sid="+(Math.random()/0.1)    
	
	xmlHttpsc.open("GET",url,true)
	xmlHttpsc.send(null)
	xmlHttpsc.onreadystatechange=stateChangedsc 
}

function stateChangedsc() 
{ 
	if (xmlHttpsc.readyState==4 || xmlHttpsc.readyState=="complete")
	{ 	 
		document.getElementById("subcategory").innerHTML=xmlHttpsc.responseText			
		//alert(document.getElementById("subcategory_td"));
		selt=document.getElementById("subcategory_td").innerHTML;
		var fina=selt.replace(/rahul/, "");
		document.getElementById("subcategory_td").innerHTML=fina; 
		//alert(document.getElementById("subcategory_td"));
	} 	
}

function GetXmlHttpObjectsc()
{
	var xmlHttpsc=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttpsc=new XMLHttpRequest();
	}
	catch (e)
  	{
  // Internet Explorer
		try
		{
			 xmlHttpsc=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttpsc=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
   }

	return xmlHttpsc;
} 

// ############For Sub Sub Category Selection###################################

var xmlHttpssc
function getsubsubcategory(str,page,id)
{ 
	//document.getElementById("state_list_copy").value=str;	 
	xmlHttpssc=GetXmlHttpObjects()
	if (xmlHttpssc==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=page
	url=url+"?r="+str+"&page="+id
	//url=url+"&sid="+(Math.random()/0.1)
	//alert(url)
	xmlHttpssc.open("GET",url,true)
	xmlHttpssc.send(null)
	xmlHttpssc.onreadystatechange=stateChangedssc; 
}

function stateChangedssc() 
{ 
	if (xmlHttpssc.readyState==4 || xmlHttpssc.readyState=="complete")
	{ 	

		document.getElementById("subsubcategory").innerHTML=xmlHttpssc.responseText 		 
		temp=document.getElementById("subsubcategory_td").innerHTML;
		var final=temp.replace(/rahul/, "");
		document.getElementById("subsubcategory_td").innerHTML=final;				 
	} 
}

function GetXmlHttpObjects()
{
	var xmlHttpssc=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttpssc=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttpssc=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttpssc=new ActiveXObject("Microsoft.XMLHTTP");
		}
}
return xmlHttpssc;
}

