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.getSessionAttribute=function(a,b){this.request("getSessionAttribute",b,{attrName:a},false)};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.transliterate=function(b,a){this.request("transliterate",a,{value:b},false)};JsonHelper.facebookCheckUserExists=function(a,b){this.request("facebookCheckUserExists",b,{uid:a},false)};JsonHelper.changeSourceStatus=function(a){this.request("changeSourceStatus",null,{id:a},true)};JsonHelper.saveAppMessageByKey=function(a,b){this.request("admin/saveAppMessageByKey",null,{key:a,value:b},true)};JsonHelper.request=function(c,b,d,a){JsonHelper.requestPrefix(c,b,d,a,true)};JsonHelper.requestPrefix=function(c,b,e,a,d,h){if(!h){h="POST"}var g="";if(e){var f=new Hash(e);f.each(function(j,i){if(j!="undefined"&&j!=null){if(j instanceof Array){j.each(function(k){g+=i+"="+encodeURIComponent(k)+"&"})}else{g+=i+"="+encodeURIComponent(j)+"&"}}})}new Request.JSON({url:(d?this.prefix:"")+c,noCache:true,headers:{SpecialAjaxRequest:"true"},method:h,data:g,async:a,onSuccess:function(i){if(b){b(i?i.data:null)}}}).send()};
