///it is for category and sub category

function districtstatus(product)
{
	country = document.getElementById("country").value;
	//alert(country);
	var no=Math.random()
	var myAjax = new Ajax.Request('../inc/enent/validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&country='+country+'&product='+product+'&do=districtstatus',
			onComplete: disp_districtstatus
		});	
}
function disp_districtstatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("disstatus").innerHTML=str;
	if(document.getElementById("disstatus").style.display=="none")
	{
		document.getElementById("disstatus").style.display=""
	}	
}

////End of the category and subcategory code

//////It is for country ,state and city
function districtstatus1(product)
{
	country = document.getElementById("country1").value;
	//alert(country);
	var no=Math.random()
	var myAjax = new Ajax.Request('../inc/enent/validate-business1.php',
		{
			method: 'get',
			parameters: 'no='+no+'&country='+country+'&product='+product+'&do=districtstatus',
			onComplete: 'disp_districtstatus1'
		});	
}
function disp_districtstatus1(resp)
{
	var str=resp.responseText;	
	document.getElementById("disstatus1").innerHTML=str;
	if(document.getElementById("disstatus1").style.display=="none")
	{
		document.getElementById("disstatus1").style.display=""
	}	
}
/////it is for city///////

function districtstatus2(product)
{
	var state = document.getElementById("state").value;
	//alert(state);
	if(document.getElementById("aa").value!="")
	var product=document.getElementById("aa").value;
	//alert(product);
	var no=Math.random()
	var myAjax = new Ajax.Request('../inc/enent/validate-business2.php',
		{
			method: 'get',
			parameters: 'no='+no+'&state='+state+'&product='+product+'&do=districtstatus_city',
			onComplete: disp_districtstatuscity
		});	
}

function disp_districtstatuscity(resp)
{
	var str=resp.responseText;	
	document.getElementById("city_id").innerHTML=str;
	if(document.getElementById("city_id").style.display=="none")
	{
		document.getElementById("city_id").style.display=""
	}
}
/////it is for zip///////

function districtstatuszip(product)
{
	var state = document.getElementById("city").value;
	//alert(state);
	if(document.getElementById("aa").value!="")
	var product=document.getElementById("aa").value;
	//alert(product);
	var no=Math.random()
	var myAjax = new Ajax.Request('../inc/enent/validate-businesszip.php',
		{
			method: 'get',
			parameters: 'no='+no+'&state='+state+'&product='+product+'&do=districtstatus_zip',
			onComplete: disp_districtstatuszip
		});	
}

function disp_districtstatuszip(resp)
{
	var str=resp.responseText;	
	document.getElementById("zip_id").innerHTML=str;
	if(document.getElementById("zip_id").style.display=="none")
	{
		document.getElementById("zip_id").style.display=""
	}
}