//This Page is used return the subsection with respect to the sections.
//Created By Trupti Rane
//Date: 6/25/2009
// Create a XML Variable
	var xmlHttp;
	function getCity(str,blk)
	{
		xmlHttp=GetXmlHttpObject();
		var url="http://www.wellbeing.com.au/getCity.php";
		url=url+"?state="+str;

		if(blk==1)
		{

			xmlHttp.onreadystatechange=pracTab;
		}
		if(blk==2)
		{

			xmlHttp.onreadystatechange=spaTab;
		}
		if(blk==3)
		{

			xmlHttp.onreadystatechange=CoursesTab;
		}
		if(blk==4)
		{

			xmlHttp.onreadystatechange=productsTab;
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);


	}

function pracTab()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("city1").style.display="block";
			document.getElementById("city1").innerHTML=xmlHttp.responseText;
		}

	}
function spaTab()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("city2").style.display="block";
			document.getElementById("city2").innerHTML=xmlHttp.responseText;
		}

	}
function CoursesTab()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("city3").style.display="block";
			document.getElementById("city3").innerHTML=xmlHttp.responseText;
		}

	}
function productsTab()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("city4").style.display="block";
			document.getElementById("city4").innerHTML=xmlHttp.responseText;
		}

	}
function getStateDrp(country)
{
		xmlHttp=GetXmlHttpObject();
		var url="http://www.wellbeing.com.au/getState.php";
		url=url+"?country="+country;
		xmlHttp.onreadystatechange=stateDrp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);

}
function stateDrp()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("state").innerHTML=xmlHttp.responseText;
		}

	}
function getCityDrp(State)
{
	xmlHttp=GetXmlHttpObject();
		var url="http://www.wellbeing.com.au/getCity.php";
		url=url+"?state="+State;

		xmlHttp.onreadystatechange=cityDrp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}
function cityDrp()
	{

		if (xmlHttp.readyState==4)
		{
			document.getElementById("city").innerHTML=xmlHttp.responseText;
		}

	}
// GetXmlHttpObject function
	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;
	}
	// End Of GetXmlHttpObject
