var xmlHttp
var str
function get_subcategories(str1,str2,str3){

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="show_specialties.php"
	if(!str2){
		str1="";
	}
	url=url+"?category_id="+str1+"&category_name="+str3
	str=str3
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true) 
	xmlHttp.send(null)
}

function htmlData(qStr){
     xmlHttp=GetXmlHttpObject()
	 if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
		return
	 }
	 var url="show_subcategories.php"
     str="sub"
     url=url+"?category_id="+qStr
     xmlHttp.onreadystatechange=stateChanged;
     xmlHttp.open("GET",url,true) ;
     xmlHttp.send(null);
}

function stateChanged(){
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById(str).innerHTML=xmlHttp.responseText
	}
}

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