function geteventsignup()
{
cat11 = document.getElementById("cat1").value;
country = document.getElementById("country").value;
region = document.getElementById("region").value;
b_name = document.getElementById("b_name").value;
address = document.getElementById("address").value;
street = document.getElementById("street").value;
zip_code = document.getElementById("zip_code").value;
phone = document.getElementById("phone").value;

if((region == "") || (country == "") || (b_name == "") || (address == "") || (street == "") || (zip_code == "") || (phone == ""))
	{
	catfirstvstatus();
	districtvstatus();
	districtvstatus1();
businessnamestatus();
	addressstatus();
	streetstatus();
	zipcodestatus();
	phonestatus();
	return false;
	}
	else
	{
}
if(cat11 == "")
	{
	catfirstvstatus();
	return false;
	}
if(country == "")
	{
	districtvstatus();
	return false;
	}	
if(region == "")
	{
	districtvstatus1();
	return false;
	}	
if(b_name == "")
	{
	businessnamestatus();
	return false;
	}
if(address == "")
	{
	addressstatus();
	return false;
	}
if(street == "")
	{
	streetstatus();
	return false;
	}
if(zipcode == "")
	{
	zipcodestatus();
	return false;
	}
if(phone == "")
	{
	phonestatus();
	return false;
	}	
}

function catfirststatus()
{
	cat1 = document.getElementById("cat1").value;
	var no=Math.random()
	var myAjax = new Ajax.Request('validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&cat1='+cat1+'&do=catfirststatus',
			onComplete: disp_catfirststatus
		});	
}

function disp_catfirststatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("cat1status").innerHTML=str;
	if(document.getElementById("cat1status").style.display=="none")
	{
		document.getElementById("cat1status").style.display=""
	}	
}
function catsecondstatus()
{
	cat2 = document.getElementById("cat2").value;
	var no=Math.random()
	var myAjax = new Ajax.Request('../business/validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&cat2='+cat2+'&do=catsecondstatus',
			onComplete: disp_catsecondstatus
		});	
}

function disp_catsecondstatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("cat2status").innerHTML=str;
	if(document.getElementById("cat2status").style.display=="none")
	{
		document.getElementById("cat2status").style.display=""
	}	
}
function catthierdstatus()
{
	cat3 = document.getElementById("cat3").value;
	var no=Math.random()
	var myAjax = new Ajax.Request('../business/validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&cat3='+cat3+'&do=catthierdstatus',
			onComplete: disp_catthierdstatus
		});	
}

function disp_catthierdstatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("cat3status").innerHTML=str;
	if(document.getElementById("cat3status").style.display=="none")
	{
		document.getElementById("cat3status").style.display=""
	}	
}
function catfourthstatus()
{
	cat4 = document.getElementById("cat4").value;
	var no=Math.random()
	var myAjax = new Ajax.Request('../business/validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&cat4='+cat4+'&do=catfourthstatus',
			onComplete: disp_catfourthstatus
		});	
}

function disp_catfourthstatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("cat4status").innerHTML=str;
	if(document.getElementById("cat4status").style.display=="none")
	{
		document.getElementById("cat4status").style.display=""
	}	
}
function catfifthstatus()
{
	cat5 = document.getElementById("cat5").value;
	var no=Math.random()
	var myAjax = new Ajax.Request('../business/validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&cat5='+cat5+'&do=catfifthstatus',
			onComplete: disp_catfifthstatus
		});	
}

function disp_catfifthstatus(resp)
{
	var str=resp.responseText;	
	document.getElementById("cat5status").innerHTML=str;
	if(document.getElementById("cat5status").style.display=="none")
	{
		document.getElementById("cat5status").style.display=""
	}	
}
function districtstatus()
{
	country = document.getElementById("country").value;
	//alert(country);
	var no=Math.random()
	var myAjax = new Ajax.Request('validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&country='+country+'&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=""
	}	
}

///////////////////for model///////////////
function districtstatus1()
{
	region = document.getElementById("region").value;
	//alert(region);
	var no=Math.random()
	var myAjax = new Ajax.Request('validate-business.php',
		{
			method: 'get',
			parameters: 'no='+no+'&region='+region+'&do=districtstatus1',
			onComplete: disp_districtstatus1
		});	
}

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

///////////////////////////////////////////////////////////////////////////////
function businessnamestatus()
{
	b_name = document.getElementById("b_name").value;
	if(b_name == "")
	{
	document.getElementById("businessstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("businessstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("businessstatus").style.display=="none")
	{
		document.getElementById("businessstatus").style.display=""
	}	
}
function addressstatus()
{
	address = document.getElementById("address").value;
	if(address == "")
	{
	document.getElementById("addstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("addstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("addstatus").style.display=="none")
	{
		document.getElementById("addstatus").style.display=""
	}	
}
function streetstatus()
{
	street = document.getElementById("street").value;
	if(street == "")
	{
	document.getElementById("strrstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("strrstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("strrstatus").style.display=="none")
	{
		document.getElementById("strrstatus").style.display=""
	}	
}

function zipcodestatus()
{
	zip_code = document.getElementById("zip_code").value;
	if(zip_code == "")
	{
	document.getElementById("zipestatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("zipestatus").innerHTML='';
	return true;
	}
	if(document.getElementById("zipestatus").style.display=="none")
	{
		document.getElementById("zipestatus").style.display=""
	}	
}
function phonestatus()
{
	phone = document.getElementById("phone").value;
	if(phone == "")
	{
	document.getElementById("phnstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("phnstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("phnstatus").style.display=="none")
	{
		document.getElementById("phnstatus").style.display=""
	}	
}
function catfirstvstatus()
{
	cat11 = document.getElementById("cat1").value;
	if(cat11 == "")
	{
	document.getElementById("cat1vstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("cat1vstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("cat1vstatus").style.display=="none")
	{
		document.getElementById("cat1vstatus").style.display=""
	}	
}
function districtvstatus()
{
	dist11 = document.getElementById("country").value;
	if(dist11 == "")
	{
	document.getElementById("disvstatus").innerHTML='<table></tr></td class="a12red" valign="middle" >Required </td></tr></table>';
	return false;
	}
	else
	{
	document.getElementById("disvstatus").innerHTML='';
	return true;
	}
	if(document.getElementById("disvstatus").style.display=="none")
	{
		document.getElementById("disvstatus").style.display=""
	}	
}

