//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 getBannerType(str)
	{
		xmlHttp=GetXmlHttpObject();
		var url="getBannerType.php";
			url=url+"?banner="+str;
			xmlHttp.onreadystatechange=BannerT;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		
		
	}
function getTextCode(str)
	{
		xmlHttp=GetXmlHttpObject();
		var url="getBannerType.php";
			url=url+"?bannertype="+str;
			if(str == "js")
			{
				document.getElementById("ddlUrl").style.visibility="hidden";
				document.getElementById("ddlUrl").style.display="none";
				xmlHttp.onreadystatechange=CodeDiv;
			}else
			{
				document.getElementById("ddlUrl").style.visibility="visible";
				document.getElementById("ddlUrl").style.display="block";
				xmlHttp.onreadystatechange=imageDiv;
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		
		
	}
function updateBannerCount(id)
	{
		
		xmlHttp=GetXmlHttpObject();
		var url="http://dev.wellbeing.com.au/site/banner.php";
			url=url+"?id="+id;
		xmlHttp.onreadystatechange=stateChanged3;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		
		
	}
function BannerT() 
	{ 
		if (xmlHttp.readyState==4)
		{			
			
			document.getElementById("ddlCategory").innerHTML=xmlHttp.responseText;
			
		}
	}
function CodeDiv() 
	{ 
		if (xmlHttp.readyState==4)
		{	
			
			document.getElementById("ddlname").innerHTML="Code";
			document.getElementById("ddlCode").innerHTML=xmlHttp.responseText;
			
		}
	}
	function imageDiv() 
	{ 
		if (xmlHttp.readyState==4)
		{	
			
			document.getElementById("ddlname").innerHTML="Banner File";
			document.getElementById("ddlCode").innerHTML=xmlHttp.responseText;
			
		}
	}
	function stateChanged3() 
	{ 
		if (xmlHttp.readyState==4)
		{			
			
			
		}
	}
// 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
