var xmlHttp;

function showSubCat(str1)
{	
	xmlHttp = GetXmlHttpObject();
	if(xmlHttp == null)
	{
		alert("Browser does not support HTTP REQUEST");
		return;
	}
	
	var url ="/members/contribute/get-sub-category.php";
	url = url+"?parentID="+str1;
	url = url+"&sid="+Math.random();
	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged()
{
	if(xmlHttp.readyState == 4 || xmlHttp.readyState =='complete')
	{
		document.getElementById("subCat").innerHTML = xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
	var xmlHttp = null;
	try{
		xmlHttp = new XMLHttpRequest();
		}
	catch(e)
	{
	try
		{
			xmlHttp = new ActiveXObject("MSxml2.XMLHTTP");
		}
		catch(e)
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
	
}