function showstate()
{ 
//	alert("'"+document.form1.country2.value+"'");
	if(document.form1.country2.value != "India")
	{
		document.form1.state.selectedIndex = -1;
		document.form1.state.disabled = "disabled";
		
		document.form1.city1.disabled = "disabled";
		document.form1.city.selectedIndex = -1;
		document.form1.city.disabled = "disabled";
		document.form1.othercity.disabled = "";
		document.form1.othercity.focus();
	}
	else
	{
		document.form1.state.disabled = "";
		document.form1.state.selectedIndex = 0;
		document.form1.state.focus();
	}
}
function showcity()
{ 
	if(document.form1.country2.value != "India")
	{
		document.form1.city1.disabled = "disabled";
		document.form1.city.selectedIndex = -1;
		document.form1.city.disabled = "disabled";
		document.form1.othercity.disabled = "";
		document.form1.othercity.focus();
	}
	else
	{
		document.form1.city1.disabled = "";
		document.form1.city.disabled = "";
		document.form1.city.selectedIndex = 0;
		document.form1.othercity.disabled = "disabled";
	}
}
function chkForm()
{
	flg = 0;
	flg1 = 0;
	for(var j=0;j<document.form1.elements.length;j++)
	{ 
		if(document.form1.elements[j].name=="gender")
		{
			if(document.form1.elements[j].checked == true)
				flg1 = 1;
		}
	}
	if(flg1 == 0)
	{	flg = 1;
		alert("Please choose GENDER.");
		return false;
	}
	if(document.form1.minAge.value >= document.form1.maxAge.value)
	{
		alert("Please select valid AGE RANGE.");
		document.form1.maxAge.focus()
		flg = 1;
		return false;
	}
	flg1 = 0;
	for(var j=0;j<document.form1.elements.length;j++)
	{ 	
		if(document.form1.elements[j].name.substring(0,13)=="lookingStatus")
		{
			if(document.form1.elements[j].checked == true)
				flg1 = 1;
		}
	}
	if(flg1 == 0)
	{	flg = 1;
		alert("Please choose MARITAL STATUS.");
		document.form1.lookingStatus0.focus();
		return false;
	}
	if(document.form1.othercity.disabled != true && document.form1.othercity.value == "")
	{	flg = 1;
		alert("Please enter name of CITIES for search.");
		document.form1.othercity.focus();
		return false;
	}
	else
	{
		if(document.form1.city1.length == 0)
		{
			flg = 1;
			alert("Please select name of CITIES for search.");
			document.form1.city.focus();
			return false;
		}
	}
	if(flg == 1)
		return false;
	if(flg == 0)
		return true;
}
