//******************************************************************************


function GetXmlHttpObject()
{ 
	var objXMLHttp=null;
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
}


function selectstatehere(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='state_select.php?countryid='+id;
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('country_state').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function selectstatecontact(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='state_select_contact.php?countrycontactid='+id;
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('country_state_contact').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function selectsubcategory(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='subcat_select.php?maincatid='+id;
	xmlHttp.onreadystatechange=function(){
	
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			//document.getElementById('subcat_busi_here').innerHTML=result;
				var result	=	xmlHttp.responseText;
				document.getElementById('subcat_busi_here').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function selectsubcategoryedit(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='edit_subcat_select.php?maincatid='+id;
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		document.getElementById('subcat_busi_here234').innerHTML=result;
		/*if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('subcat_busi_here').innerHTML=result;
		}*/
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function businesspackage()
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='package_select.php';
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('business_packge_select').style.display = "block";
			document.getElementById('business_packge_select').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}

function getbusinesssubcat(id,divId)
{
	
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='userclass.php?action=getSubcat&id='+id+'&divId='+divId;
	
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('business_packge_select').style.display = "block";
			document.getElementById('business_packge_select').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}

function getcounty(id)
{
	
	
	var xmlHttp;
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='userclass.php?action=getCounty&id='+id;
	xmlHttp.onreadystatechange=function(){
		
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			var result	=	xmlHttp.responseText;
			
			document.getElementById('sel_county').style.display="";
			document.getElementById('sel_county').innerHTML="";
			document.getElementById('sel_county').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}

function getcountyfran(id)
{
	
	
	var xmlHttp;
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='userclass.php?action=getCountyFran&id='+id;
	xmlHttp.onreadystatechange=function(){
		
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			var result	=	xmlHttp.responseText;
			
			document.getElementById('sel_county').style.display="";
			document.getElementById('sel_county').innerHTML="";
			document.getElementById('sel_county').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function getbussubCat(id)
{
	
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='userclass.php?action=getbussubCat&id='+id;
	xmlHttp.onreadystatechange=function(){
		
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			var result	=	xmlHttp.responseText;
			
			document.getElementById('sel_subcat').style.display="";
			document.getElementById('sel_subcat').innerHTML="";
			document.getElementById('sel_subcat').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function selectsubcategorysearch(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='subcat_select_search.php?maincatid='+id;
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		document.getElementById('subcat_busi_here_search').innerHTML=result;
		/*if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('subcat_busi_here').innerHTML=result;
		}*/
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}


function selectstateheresearch(id)
{
	var xmlHttp
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url='state_select_search.php?countryid='+id;
	xmlHttp.onreadystatechange=function(){
		var result	=	xmlHttp.responseText;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 			
			document.getElementById('country_state_search').innerHTML=result;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);		
}

