var JsonHelper=JsonHelper||{};JsonHelper.prefix="/main/json/";JsonHelper.getChildFields=function(b,a,e,c,d){this.request("getChildFields",d,{entityId:b,fieldId:a,parentDicTypeId:e},c)};JsonHelper.getFieldById=function(c,a,b){this.request("getFieldById",b,{id:c},a)};JsonHelper.getFieldsByEntityId=function(a,b,c){this.request("getFieldsByEntityId",c,{entityId:a},b)};JsonHelper.getFieldsByEntityIdAndTypeId=function(a,c,b,d){this.request("getFieldsByEntityIdAndTypeId",d,{entityId:a,typeId:c},b)};JsonHelper.getDictionaryItemsByTypeId=function(b,a,c){this.request("getDictionaryItemsByTypeId",c,{typeId:b},a)};JsonHelper.getDictionaryItemsByFieldId=function(a,b,c){this.request("getDictionaryItemsByFieldId",c,{fieldId:a},b)};JsonHelper.getDictionaryItemsByOwnerIds=function(b,a,c,d){this.request("getDictionaryItemsByOwnerIds",d,{childFieldId:b,ownerIds:a},c)};JsonHelper.getChildCriteria=function(e,d,a,b,c){this.request("getChildCriteria",c,{searchId:e,criterionId:d,fieldId:a},b)};JsonHelper.getSearchDictionaryItemsByOwnerIds=function(d,a,b,c){this.request("getSearchDictionaryItemsByOwnerIds",c,{childCriterionId:d,ownerIds:a},b)};JsonHelper.setSessionAttribute=function(a,d,b,c){this.request("setSessionAttribute",c,{attrName:a,attrValue:d},b)};JsonHelper.removeSessionAttribute=function(a,b,c){this.request("removeSessionAttribute",c,{attrName:a},b)};JsonHelper.appendToSessionList=function(a,d,b,c){this.request("appendToSessionList",c,{listName:a,value:d},b)};JsonHelper.removeFromSessionList=function(a,d,b,c){this.request("removeFromSessionList",c,{listName:a,value:d},b)};JsonHelper.clearSessionList=function(a,b,c){this.request("clearSessionList",c,{listName:a},b)};JsonHelper.checkUserPermissions=function(c,a,b){this.request("checkUserPermissions",b,{paidItemType:c},a)};JsonHelper.checkVacancyPostingPermissions=function(c,a,b){this.request("checkVacancyPostingPermissions",b,{vacancyIds:c},a)};JsonHelper.getAjaxDataTableBeanFromSession=function(c,a,b){this.request("getAjaxDataTableBeanFromSession",b,{sessionAtributeName:c},a)};JsonHelper.isExternalJobsLoaded=function(a,d,e,b,c){this.request("isExternalJobsLoaded",c,{enableSimplyHiredJobs:a,enableIndeedJobs:d,page:e},b)};JsonHelper.request=function(c,b,d,a){var f="";if(d){var e=new Hash(d);e.each(function(h,g){if(h!="undefined"&&h!=null){if(h instanceof Array){h.each(function(i){f+=g+"="+escape(i)+"&"})}else{f+=g+"="+escape(h)+"&"}}})}new Request.JSON({url:this.prefix+c,noCache:true,headers:{SpecialAjaxRequest:"true"},method:"get",data:f,async:a,onSuccess:function(g){if(b){b(g?g.data:null)}}}).send()};