function searchOption()
{
	if(document.frmRTISearchDept.search_type.value == "")
	{
		alert("Please enter your keyword.");
		document.frmRTISearchDept.search_type.focus();
		return;
	}
	
   for(var i=0; i < document.frmRTISearchDept.check.length; i++)
   {
	      if (document.frmRTISearchDept.check[i].checked)
	      {
	          var rad_val = document.frmRTISearchDept.check[i].value;
	      }
   }
	//document.frmRTISearchDept.action = "Search/"+rad_val;
	document.frmRTISearchDept.action = 'search_result.php?opt='+rad_val;
	document.frmRTISearchDept.submit();
}

function validateSuggestion()
{
	//trimFields();
	
	if(document.getElementById('full_name').value == "")	{
		alert("Please enter your  Name.");
		document.getElementById('full_name').focus();
		return false;
	}
	
	if(!chkName(document.getElementById('full_name').value))
	{
		alert("Invalid Name ! Please Enter Valid Name .");
		document.getElementById('full_name').focus();
		return false;
	}
	if(document.getElementById('email').value != "")
	{
		
		if(!chkEmail(document.getElementById('email').value))
		{
			alert("Invalid Email!Please review and correct it.");
			document.getElementById('email').focus();
			document.getElementById('email').select();
			return false;
		}
	}
	
	if(document.getElementById('comments').value == "")
	{
		alert("Please enter your Comments.");
		document.getElementById('comments').focus();
		return false;
	}
	if(document.getElementById('code'))
	{
		if(document.getElementById('code').value == "")
		{
			alert("Please enter security code.");
			document.getElementById('code').focus();
			return false;
		}  
	}	
}
function setVisibility(id,visible,msg)
{
	
	if(visible == 'none')
	{
		
		document.getElementById(id).style.display = visible;
	}
	else
	{
		
		document.getElementById(id).style.display = visible;
		document.getElementById(id).innerHTML = msg;
	}
}
