
var xmlhttp;

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;
}


function find_loc(toshow, id1)
{		
		var url="ajax-left.php?country="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById(id1+"-loc").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}
//************************************* State leftnav ******************************
function find_state_leftnav(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_laftnav="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("left-state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}
//************************************* City leftnav ******************************
function find_city_leftnav(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_leftnav="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("left-city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}
//************************************* State Homevenue ******************************
function find_state_homevenue(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_homevenue="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("vanue-state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Homevenue ******************************
function find_city_homevenue(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_homevenue="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("venue-city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Homecaterer ******************************
function find_state_homecaterer(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_homecaterer="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("caterer-state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Homecaterer ******************************
function find_city_homecaterer(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_homecaterer="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("caterer-city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Myaccount-user ******************************
function find_state_myaccountvenue(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_myaccountvenue="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("myaccountvenue-state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Myaccount-user ******************************
function find_city_myaccountvenue(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_myaccountvenue="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("myaccountvenue-city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Mydetail User ******************************
function find_state_mydetailuser(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_mydetailuser="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("st1-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Mydetail User ******************************
function find_city_mydetailuser(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_mydetailuser="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ct1-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Mydetail User C ******************************
function find_state_mydetailuser_c(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_mydetailuser_c="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("st2-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Mydetail User C ******************************
function find_city_mydetailuser_c(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_mydetailuser_c="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ct2-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Venue Search ******************************
function find_state_venuesearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_venuesearch="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("stat").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Venue Search ******************************
function find_city_venuesearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_venuesearch="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("cit").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Caterer Search ******************************
function find_state_caterersearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_caterersearch="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Caterer Search ******************************
function find_city_caterersearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_caterersearch="+encodeURIComponent(toshow);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State User Register ******************************
function find_state_userreg(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_userreg="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("prestate-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City User Register ******************************
function find_city_userreg(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_userreg="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("precity-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Caterer Provider ******************************
function find_state_caterer_pro(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_caterer_pro="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("state-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Caterer Provider ******************************
function find_city_caterer_pro(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_caterer_pro="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("city-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Caterer Provider C ******************************
function find_state_caterer_pro_c(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_caterer_pro_c="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("prestate_c").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Caterer Provider C ******************************
function find_city_caterer_pro_c(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_caterer_pro_c="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("precity-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}





function plan(toshow){
	var url="plan.php?q="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("plan").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);		
	
}

function check1(){
	var toshow=document.getElementById("email").value;
	if(toshow!=''){
	var url="checkmail.php?q="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("show").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);		
	}
}

function show_sub_cat1(val){
	var url="sub-cat1.php?q="+val;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("category-div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}

function show_sub_cat(val){
	var url="sub-cat.php?q="+val;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				if(xmlHttp.responseText=='false'){
				alert("You can no select this category, To select this category contact administratior!");
				refresh_cat();
				return false;
				}else{
				document.getElementById("sub_category").innerHTML=xmlHttp.responseText;
				}
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
function refresh_cat(){
		var ele = document.getElementById("main_category");
		ele[ele.selectedIndex].selected=false;
		document.getElementById("sub_category").innerHTML = '<select name="sub_category[]" multiple="multiple" id="sub_cat" onchange="return validate_category(this);"><option value="">Select Sub Category</option></select>';
	}
	
//************************************* State Venue Search ******************************
function find_state_dirsearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_dirsearch="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("stat").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Venue Search ******************************
function find_city_dirsearch(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_dirsearch="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("cit").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State User Register ******************************
function find_state_user(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_user="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("state_user").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State User Tick Register ******************************
function find_state_user_tick(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_user_tick="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("prestate_user").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City User Tick Register ******************************
function find_city_user_tick(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_user_tick="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("precity_user").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Directory ******************************
function find_state_directory(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_directory="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("state_div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Directory ******************************
function find_city_directory(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_directory="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("city_div").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* State Directory Tick ******************************
function find_state_directory_tick(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?location_directory_tick="+toshow;
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("state_div_tick").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* City Directory Tick ******************************
function find_city_directory_tick(toshow)
{		
		//alert(toshow+" "+id1)
		var url="ajax-left.php?state_directory_tick="+encodeURIComponent(toshow);
		//alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("city_div_tick").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

//************************************* Approved Caterers Leftnav *********************************

function show_caterer_left(toshow){
		var url="show-caterer.php?q="+toshow;
        //alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("app_caterer_left").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}

//************************************* Approved Caterers home *********************************

function show_caterer_home(toshow){
		var url="show-caterer.php?home="+toshow;
        //alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("app_caterer_home").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}

//*************************************** Approved Caterer Myaccount *******************************

function show_caterer_myaccount(toshow){
	var url="show-caterer.php?myaccount="+toshow;
        //alert(url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("app_caterer_myaccount").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
