var xmlHttp

function showsubcat(qtr)
{ 

xmlHttp=GetXmlHttpObjectcurr();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 



if(xmlHttp.readyState==0 || xmlHttp.readyState==4)
  {
	
	  xmlHttp.open("GET",'getsubcategory.php?q='+qtr,true);
	
xmlHttp.onreadystatechange=stateChangedcurr;	  
	
  }

xmlHttp.send(null);

}
function stateChangedcurr() 
{
 
	xmlHttp.onreadystatechange=function()
 		{
			if(xmlHttp.readyState==0 || xmlHttp.readyState==4)
				{ 
				
document.getElementById("divsubcat").innerHTML=xmlHttp.responseText;				  
				   
                  
				}
 		}
}

function GetXmlHttpObjectcurr()
{
var xmlHttp=null;
try
  {
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}