function homePageValidation()
{
var username=document.profileSearch.username.value
//alert(username)
	if(username=="" || username=="Search by Profile ID" || username=="Enter Profile ID" || username=="Invalid Profile ID")
	{
	document.profileSearch.username.value="Enter Profile ID";
	return false
	}
	/*else
	if(!username.match(/^[^\s]+$/))
	{
	document.profileSearch.username.value="Invalid Profile ID";
	return false
	}*/
document.profileSearch.submit()
}

function selectGender(genderType)
{
 if(genderType=="male")
	{
	document.rsearch.fage.selectedIndex=3
	}
	else
	{
	document.rsearch.fage.selectedIndex=0
	}
}
function SearchFormValidation()
{
var sex=document.rsearch.gender.selectedIndex
var fage=document.rsearch.fage.value
var tage=document.rsearch.tage.value
if(sex=="1")		
var sexage=20;
 else
var sexage=17;
		if(parseInt(fage)<=0 || parseInt(fage)<=sexage )
		{	
			 if(sex=="1")	
			 {
			 alert("Valid age for male (Min. age is 21. Max. age is 99).")
			 return false
			 }
			 else
			 {
			 alert("Valid age for female (Min. age is 18. Max. age is 99).")
			 return false
			 }
		}
		else
		if(parseInt(fage) >parseInt(tage))
		{	
			 if(sex=="1")	
			 {
			 alert("Valid age for male (Min. age is 21. Max. age is 99).")
			 return false
			 }
			 else
			 {
			 alert("Valid age for female (Min. age is 18. Max. age is 99).")
			 return false
			 }
		}
	document.rsearch.submit()
}