function fillTheme()
{
	var getdata="";
	showBslLoader('themeD');
	xmlHttp_html=GetXmlHttpObject();
	xmlHttp_html.open("GET","toursearchphp/fillthemebyajax.php",true);
	xmlHttp_html.onreadystatechange=sendRequest;
	xmlHttp_html.send(null); 
}
function showBslLoader(divId)
{
	
	var oldDiv=document.getElementById(divId);
	 newDiv = document.createElement("div");
	 newDiv.className="loading";
	 newDiv.setAttribute('id','loaderDiv');

	 newDiv.innerHTML = "<b>Loading</b>...";
	 oldDiv.appendChild(newDiv);
	// document.parentWindow.document.getElementById(divId).appendChild(newDiv);
}


function hideBslLoader(divId)
{
	var oldDiv=document.getElementById(divId);
	var newdiv = document.getElementById('loaderDiv');
		oldDiv.removeChild(newdiv);
}
function sendRequest()
{
	if(xmlHttp_html.readyState==4)
	{
		if(xmlHttp_html.status==200)
		{
			getdata=xmlHttp_html.responseText;
			splitData(getdata);
		}
	}
}
function splitData(string)
{
		var themeArray="";
		var strwtype="";
		var strutype="";
		var obj = new Option('-----Select Your Travel Theme----','-----Select Your Travel Theme----');
		document.forms[1].theme.options[0]=obj;
		document.forms[1].theme.options.length=1;
	
		themeArray=string.split("~");
		
		var i=0;
		for(i=0;i<themeArray.length;i++)
		{
			var str=themeArray[i];
			var arr=str.split("#");
			var obj = new Option(arr[1],arr[0]);
			document.forms[1].theme.options[document.forms[1].theme.options.length]=obj;
		}
	 hideBslLoader('themeD');	
	return true;
}

function selectTheme()
{
	frmsearch.themeid.value=frmsearch.theme.options[frmsearch.theme.selectedIndex].value;
	frmsearch.themename.value=frmsearch.theme.options[frmsearch.theme.selectedIndex].text;
	
	return true;
}