function advsearch1()
{
			if (!document.MatriForm.GENDER[0].checked && !document.MatriForm.GENDER[1].checked)
			{alert("please select gender");document.MatriForm.GENDER[0].focus();return false;}

			if (IsEmpty(document.MatriForm.STAGE,'text'))
			{alert("please enter age range");document.MatriForm.STAGE.focus();return false;}

			if (!ValidateNo(document.MatriForm.STAGE.value,"1234567890"))
			{alert ("invalid age");document.MatriForm.STAGE.focus();return false;}

			if (document.MatriForm.STAGE.value<18)
			{alert ("you should be 18 years or above to register");document.MatriForm.STAGE.focus();return false;}

			if (IsEmpty(document.MatriForm.ENDAGE,'text'))
			{alert("please enter age range");document.MatriForm.ENDAGE.focus();return false;}			

			if (!ValidateNo(document.MatriForm.ENDAGE.value,"1234567890"))
			{alert ("invalid age");document.MatriForm.ENDAGE.focus();return false;}

			if (document.MatriForm.ENDAGE.value < document.MatriForm.STAGE.value)
			{alert ("invalid age range");document.MatriForm.ENDAGE.focus();return false;}

			if(!document.MatriForm.MARITAL_STATUS0.checked && !document.MatriForm.MARITAL_STATUS1.checked && !document.MatriForm.MARITAL_STATUS2.checked && !document.MatriForm.MARITAL_STATUS3.checked && !document.MatriForm.MARITAL_STATUS4.checked)
			{alert ("please select marital status");document.MatriForm.MARITAL_STATUS0.focus();return false;}

			return true;
}

function advsearch()
{
	if(advsearch1()==true)
	{
		selectall(document.MatriForm.RELIGION1);
		//alert("religion selected");
		selectall(document.MatriForm.CASTE1);
		selectall(document.MatriForm.CITY1);
		selectall(document.MatriForm.EDUCATION1);
		selectall(document.MatriForm.PROFESSION1);

		document.MatriForm.action="/matrimony/dosearch.php";
		document.MatriForm.submit();

		return true
	}
	else
	{return false;}
}

function mstatusany()
{
	document.MatriForm.MARITAL_STATUS1.checked=false;
	document.MatriForm.MARITAL_STATUS2.checked=false;
	document.MatriForm.MARITAL_STATUS3.checked=false;
	document.MatriForm.MARITAL_STATUS4.checked=false;
}

function mstatus()
{
document.MatriForm.MARITAL_STATUS0.checked=false;
}