/*function to validate advance ATM/location search*/
function fnchkadvisorssearch(objFrm,inType)
{

	var stZipcode=trimchar(objFrm.frm_stSearchAdvZipCode.value);
	
	/*if((isNull(stZipcode)) && (!validateSelectBox2(objFrm.frm_inBranchId))){
		alert(Err_BranchZip);
		objFrm.frm_stSearchAdvZipCode.focus();
		return false;
	}*/
	if(inType==2){
		if((validateSelectBox2(objFrm.frm_inMainCatId)) && (!validateSelectBox2(objFrm.frm_inAccountId)))
		{
			alert(Err_AccountType);			
			return false;
		}
	}
	
 return true;	
}
//AJAX functions
	
function getAccounts(objSel,datasource,datauser,datapass)	{
		// send data to CF
		/*DWRUtil.useLoadingMessage();*/
			
			var id=objSel.options[objSel.selectedIndex].value;
			DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'getAccountsList', id,1,datasource,datauser,datapass, doQuery);
	}
	// call back function
	function doQuery(r) {
		
		// evaluate server side JS
		doClear();
		var getValue = function (thisRow) {
			return thisRow.iserviceid_pk;
		}
		var getText = function (thisRow) {
			return thisRow.sservicename;
		}		
		DWRUtil.addOptions("frm_inAccountId", r, [getValue, getText], null);		
	}
	//clear Select Box
	function doClear() {
		DWRUtil.removeAllOptions("frm_inAccountId");
		
	}
