if(typeof(CFS_DATA)=="undefined"){var CFS_DATA={}}if(isNumber(CFS_DATA.animationSpeed)){CFS_DATA.animationSpeed=parseInt(CFS_DATA.animationSpeed)}else{if(jQuery.inArray(CFS_DATA.animationSpeed,["fast","slow"])==-1){CFS_DATA.animationSpeed="fast"}}CFS_DATA.showSubscreenOnCenter=parseInt(CFS_DATA.showSubscreenOnCenter);var sdLoaderImgCfs='';var g_cfsAnimationSpeed=300;jQuery.fn.showLoaderCfs=function(){return jQuery(this).html(sdLoaderImgCfs)};jQuery.fn.appendLoaderCfs=function(){jQuery(this).append(sdLoaderImgCfs)};jQuery.sendFormCfs=function(a){return jQuery("
").sendFormCfs(a)};jQuery.fn.sendFormCfs=function(e){var b=null;if(!e){e={fid:false,msgElID:false,onSuccess:false}}if(e.fid){b=jQuery("#"+fid)}else{b=jQuery(this)}var c=(jQuery(b).tagName()=="FORM");var f=new Array();if(e.data){f=e.data}else{if(c){f=jQuery(b).serialize()}}if(e.appendData){var h=typeof(f)=="string";var k=[];for(var g in e.appendData){if(h){k.push(g+"="+e.appendData[g])}else{f[g]=e.appendData[g]}}if(h){f+="&"+k.join("&")}}var d=null;if(e.msgElID){if(e.msgElID=="noMessages"){d=false}else{if(typeof(e.msgElID)=="object"){d=e.msgElID}else{d=jQuery("#"+e.msgElID)}}}if(typeof(e.inputsWraper)=="string"){b=jQuery("#"+e.inputsWraper);c=true}if(c&&b){jQuery(b).find("*").removeClass("cfsInputError")}if(d&&!e.btn){jQuery(d).removeClass("cfsSuccessMsg").removeClass("cfsErrorMsg");if(!e.btn){jQuery(d).showLoaderCfs()}}if(e.btn){jQuery(e.btn).attr("disabled","disabled");e.btnIconElement=jQuery(e.btn).find(".fa").length?jQuery(e.btn).find(".fa"):jQuery(e.btn);if(jQuery(e.btn).find(".fa").length){e.btnIconElement.data("prev-class",e.btnIconElement.attr("class")).attr("class","fa fa-spinner fa-spin")}}var a="";if(typeof(e.url)!="undefined"){a=e.url}else{if(typeof(ajaxurl)=="undefined"){a=CFS_DATA.ajaxurl}else{a=ajaxurl}}jQuery(".cfsErrorForField").hide(CFS_DATA.animationSpeed);var j=e.dataType?e.dataType:"json";if(typeof(f)=="string"){f+="&pl="+CFS_DATA.CFS_CODE;f+="&reqType=ajax"}else{f.pl=CFS_DATA.CFS_CODE;f.reqType="ajax"}jQuery.ajax({url:a,data:f,type:"POST",dataType:j,success:function(i){toeProcessAjaxResponseCfs(i,d,b,c,e);if(e.clearMsg){setTimeout(function(){if(d){jQuery(d).animateClear()}},typeof(e.clearMsg)=="boolean"?5000:e.clearMsg)}}})};jQuery.fn.animateClear=function(){var a=jQuery(""+jQuery(this).html()+"");jQuery(this).html(a);jQuery(a).hide(CFS_DATA.animationSpeed,function(){jQuery(a).remove()})};jQuery.fn.animateRemoveCfs=function(a,b){a=a==undefined?CFS_DATA.animationSpeed:a;jQuery(this).hide(a,function(){jQuery(this).remove();if(typeof(b)==="function"){b()}})};function toeProcessAjaxResponseCfs(h,e,c,d,f){if(typeof(f)=="undefined"){f={}}if(typeof(e)=="string"){e=jQuery("#"+e)}if(e){jQuery(e).html("")}if(f.btn){jQuery(f.btn).removeAttr("disabled");if(f.btnIconElement){f.btnIconElement.attr("class",f.btnIconElement.data("prev-class"))}}if(typeof(h)=="object"){if(h.error){if(e){jQuery(e).removeClass("cfsSuccessMsg").addClass("cfsErrorMsg")}var j=[];for(var a in h.errors){if(d){var b=jQuery(c).find('[name*="'+a+'"]');b.addClass("cfsInputError");if(b.attr("placeholder")){}if(!b.data("keyup-error-remove-binded")){b.keydown(function(){jQuery(this).removeClass("cfsInputError")}).data("keyup-error-remove-binded",1)}}if(jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").exists()){jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").show().html(h.errors[a])}else{if(e){jQuery(e).append(h.errors[a]).append("
")}else{j.push(h.errors[a])}}}if(j.length&&f.btn&&jQuery.fn.dialog&&!e){jQuery('
').html(j.join("
")).appendTo("body").dialog({modal:true,width:"500px"})}}else{if(h.messages.length){if(e){jQuery(e).removeClass("cfsErrorMsg").addClass("cfsSuccessMsg");for(var g=0;g")}}}}}if(f.onSuccess&&typeof(f.onSuccess)=="function"){f.onSuccess(h)}}function getDialogElementCfs(){return jQuery("").appendTo(jQuery("body"))}function toeOptionCfs(a){if(CFS_DATA.options&&CFS_DATA.options[a]){return CFS_DATA.options[a]}return false}function toeLangCfs(a){if(CFS_DATA.siteLang&&CFS_DATA.siteLang[a]){return CFS_DATA.siteLang[a]}return a}function toePagesCfs(a){if(typeof(CFS_DATA)!="undefined"&&CFS_DATA[a]){return CFS_DATA[a]}return false}function toeOptTimeoutHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");setTimeout(function(){if(!jQuery("#cfsOptDescription").attr("toeFixTip")){toeOptHideDescriptionCfs()}},500)}function toeOptShowDescriptionCfs(b,a,d,c){if(typeof(b)!="undefined"&&b!=""){if(!jQuery("#cfsOptDescription").length){jQuery("body").append('')}if(c){jQuery("#cfsOptDescription").css("right",jQuery(window).width()-(a-10))}else{jQuery("#cfsOptDescription").css("left",a+10)}jQuery("#cfsOptDescription").css("top",d);jQuery("#cfsOptDescription").show(200);jQuery("#cfsOptDescription").html(b)}}function toeOptHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");jQuery("#cfsOptDescription").hide(200)}function toeInArrayCfs(c,b){if(b){for(var a in b){if(b[a]==c){return true}}}return false}function toeShowDialogCustomized(b,a){a=jQuery.extend({resizable:false,width:500,height:300,closeOnEscape:true,open:function(c,d){jQuery(".ui-dialog-titlebar").css({"background-color":"#222222","background-image":"none",border:"none",margin:"0",padding:"0","border-radius":"0",color:"#CFCFCF",height:"27px"});jQuery(".ui-dialog-titlebar-close").css({background:'url("'+CFS_DATA.cssPath+'img/tb-close.png") no-repeat scroll 0 0 transparent',border:"0",width:"15px",height:"15px",padding:"0","border-radius":"0",margin:"7px 7px 0"}).html("");jQuery(".ui-dialog").css({"border-radius":"3px","background-color":"#FFFFFF","background-image":"none",padding:"1px","z-index":"300000",position:"fixed",top:"60px"});jQuery(".ui-dialog-buttonpane").css({"background-color":"#FFFFFF"});jQuery(".ui-dialog-title").css({color:"#CFCFCF",font:"12px sans-serif",padding:"6px 10px 0"});if(a.openCallback&&typeof(a.openCallback)=="function"){a.openCallback(c,d)}jQuery(".ui-widget-overlay").css({"z-index":jQuery(c.target).parents(".ui-dialog:first").css("z-index")-1,"background-image":"none"});if(a.modal&&a.closeOnBg){jQuery(".ui-widget-overlay").unbind("click").bind("click",function(){jQuery(b).dialog("close")})}}},a);return jQuery(b).dialog(a)}function toeSliderMove(a,b){var c=jQuery(a.target).attr("id");jQuery("#toeSliderDisplay_"+c).html(b.value);jQuery("#toeSliderInput_"+c).val(b.value).change()}function cfsCorrectJqueryUsed(){return(typeof(jQuery.fn.sendFormCfs)==="function")}function cfsReloadCoreJs(d,e){var c="",b=["common.js","core.js"];for(var a=0;a<\/script>'}jQuery("head").append(c);if(d){_cfsRunClbAfterCoreReload(d,e)}}function _cfsRunClbAfterCoreReload(a,b){if(cfsCorrectJqueryUsed()){callUserFuncArray(a,b);return}setTimeout(function(){cfsCorrectJqueryUsed(a,b)},500)}function base64_decode(d){var b="";var l,j,g="";var k,h,f,e="";var c=0;var a=/[^A-Za-z0-9\+\/\=]/g;if(a.exec(d)){alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.")}d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{k=keyStr.indexOf(d.charAt(c++));h=keyStr.indexOf(d.charAt(c++));f=keyStr.indexOf(d.charAt(c++));e=keyStr.indexOf(d.charAt(c++));l=(k<<2)|(h>>4);j=((h&15)<<4)|(f>>2);g=((f&3)<<6)|e;b=b+String.fromCharCode(l);if(f!=64){b=b+String.fromCharCode(j)}if(e!=64){b=b+String.fromCharCode(g)}l=j=g="";k=h=f=e=""}while(c