jQuery(function(){var n;(n=jQuery).extend({stringifyXX:function(r){encodeParam=function(n,r){return r?(n=n.replace(/&/g,"%26"),encodeURI(n)):n},enc=function(n){return n=(n=n.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')};var e=typeof r;if("object"!=e||null===r)return"string"==e&&(r='"'+r+'"'),encodeParam(String(r));var t,c,i=[],o=r&&r.constructor==Array;for(t in r)"function"!=(e=typeof(c=r[t]))&&("string"==e?c='"'+enc(c)+'"':"object"==e&&null!==c&&(c=n.stringifyXX(c)),i.push((o?"":'"'+t+'":')+String(c)));return encodeParam(o?"[":"{")+String(i)+(o?"]":"}")}})}); jQuery(window).on("load",function(){!function($){$.fn.CFTEfbuilder=function(options){var opt=$.extend({},{typeList:new Array({id:"ftext",name:"Single Line"},{id:"fnumber",name:"Number"},{id:"femail",name:"Email"},{id:"fdate",name:"Date Time"},{id:"ftextarea",name:"Text Area"},{id:"fcurrency",name:"Currency"},{id:"fcheck",name:"Checkboxes"},{id:"fradio",name:"Radio Buttons"},{id:"fdropdown",name:"Dropdown"},{id:"ffile",name:"Upload File"},{id:"fpassword",name:"Password"},{id:"fPhone",name:"Phone field"},{id:"fCommentArea",name:"Instruct. Text"},{id:"fhidden",name:"Hidden"},{id:"fSectionBreak",name:"Section break"},{id:"fPageBreak",name:"Page break"},{id:"fsummary",name:"Summary"},{id:"fMedia",name:"Media"},{id:"fButton",name:"Button"},{id:"fhtml",name:"HTML content"},{id:"facceptance",name:"Accept / GDPR"},{id:"category",name:"Container Controls"},{id:"ffieldset",name:"Fieldset"},{id:"fdiv",name:"Div"},{id:"category",name:"Form Controls with Datasource Connection"},{id:"ftextds",name:"Line Text DS"},{id:"femailds",name:"Email DS"},{id:"ftextareads",name:"Text Area DS"},{id:"fcheckds",name:"Checkboxes DS"},{id:"fradiods",name:"Radio Btns DS"},{id:"fPhoneds",name:"Phone DS"},{id:"fdropdownds",name:"Dropdown DS"},{id:"fhiddends",name:"Hidden DS"},{id:"fnumberds",name:"Number DS"},{id:"fcurrencyds",name:"Currency DS"}),pub:!1,identifier:"",title:""},options,!0);if(opt.pub&&(opt.messages=$.extend({previous:"Previous",next:"Next",page:"Page",of:"of",required:"This field is required.",email:"Please enter a valid email address.",datemmddyyyy:"Please enter a valid date with this format(mm/dd/yyyy)",dateddmmyyyy:"Please enter a valid date with this format(dd/mm/yyyy)",number:"Please enter a valid number.",digits:"Please enter only digits.",maxlength:$.validator.format("Please enter no more than {0} characters"),minlength:$.validator.format("Please enter at least {0} characters."),equalTo:"Please enter the same value again.",max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},opt.messages),opt.messages.max=$.validator.format(opt.messages.max),opt.messages.min=$.validator.format(opt.messages.min),$.extend($.validator.messages,opt.messages)),getNameByIdFromType=function(e){for(var i=0;i
'+opt.typeList[i].name+"

"):$("#tabs-1").append('
'+opt.typeList[i].name+"
");$("#tabs-1").append('
')}opt.pub||$(".button").button();var items=new Array,itemSelected=-2;function htmlDecode(e){return/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/gi.test(e)&&(e=$("
").html(e).text()),e}function htmlEncode(e){return e=(e=$("
").text(e).html()).replace(/"/g,""")}function showHideDep(){function e(e,i){for(var t=0;t"),reloadItems()}),$("#sName").keyup(function(){items[e].name=$(this).val(),reloadItems()}),$("#sShortlabel").keyup(function(){items[e].shortlabel=$(this).val(),reloadItems()}),$("#sPredefined").keyup(function(){items[e].predefined=$(this).val(),reloadItems()}),$("#sPredefinedClick").click(function(){items[e].predefinedClick=$(this).is(":checked"),reloadItems()}),$("#sEq").keyup(function(){items[e].eq=$(this).val(),reloadItems()}),$("#sSuffix").keyup(function(){items[e].suffix=$(this).val(),reloadItems()}),$("#sPrefix").keyup(function(){items[e].prefix=$(this).val(),reloadItems()}),$("#sDecimalSymbol").keyup(function(){items[e].decimalsymbol=$(this).val(),reloadItems()}),$("#sGroupingSymbol").keyup(function(){items[e].groupingsymbol=$(this).val(),reloadItems()}),$("#sDropdownRange").keyup(function(){items[e].dropdownRange=$(this).val(),reloadItems()}),$("#sRequired").click(function(){items[e].required=$(this).is(":checked"),reloadItems()}),$("#sReadOnly").click(function(){items[e].readonly=$(this).is(":checked"),reloadItems()}),$("#sShowDropdown").click(function(){items[e].showDropdown=$(this).is(":checked"),$(this).is(":checked")?$("#divdropdownRange").css("display",""):$("#divdropdownRange").css("display","none"),reloadItems()}),$("#sSize").change(function(){items[e].size=$(this).val(),reloadItems()}),$("#sFormat").change(function(){items[e].dformat=$(this).val(),reloadItems()}),$("#sLayout").change(function(){items[e].layout=$(this).val(),reloadItems()}),$("#sMin").change(function(){items[e].min=$(this).val(),reloadItems()}),$("#sMax").change(function(){items[e].max=$(this).val(),reloadItems()}),$("#sMinlength").change(function(){items[e].minlength=$(this).val(),reloadItems()}),$("#sMaxlength").change(function(){items[e].maxlength=$(this).val(),reloadItems()}),$("#sEqualTo").change(function(){items[e].equalTo=$(this).val(),reloadItems()}),$(".showHideDependencies").click(function(){return items[e].showDep?($(this).parent().removeClass("show"),$(this).parent().addClass("hide"),$(this).html("Show Dependencies"),items[e].showDep=!1):($(this).parent().addClass("show"),$(this).parent().removeClass("hide"),$(this).html("Hide Dependencies"),items[e].showDep=!0),!1}),$(".choice_remove").click(function(){1==items[e].choices.length?(items[e].choices[0]="",items[e].choicesVal[0]="",items[e].choicesDep[0]=new Array):(items[e].choices.splice($(this).attr("i"),1),items[e].choicesVal.splice($(this).attr("i"),1),items[e].choicesDep.splice($(this).attr("i"),1)),"fcheck"==items[e].ftype&&(1==items[e].choiceSelected.length?items[e].choiceSelected[0]="":items[e].choiceSelected.splice($(this).attr("i"),1)),editItem(e),reloadItems()}),$(".choice_add").click(function(){items[e].choices.splice(1*$(this).attr("i")+1,0,""),items[e].choicesVal.splice(1*$(this).attr("i")+1,0,""),items[e].choicesDep.splice(1*$(this).attr("i")+1,0,new Array),"fcheck"==items[e].ftype&&items[e].choiceSelected.splice(1*$(this).attr("i")+1,0,!1),editItem(e),reloadItems()}),$(".choice_text").keyup(function(){items[e].choices[$(this).attr("i")]==items[e].choicesVal[$(this).attr("i")]&&($("#"+$(this).attr("id")+"V"+$(this).attr("i")).val($(this).val()),items[e].choicesVal[$(this).attr("i")]=$(this).val()),items[e].choices[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_value").keyup(function(){items[e].choicesVal[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_radio").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_select").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_check").click(function(){$(this).is(":checked")?items[e].choiceSelected[$(this).attr("i")]=!0:items[e].choiceSelected[$(this).attr("i")]=!1,reloadItems()}),$("#sUserhelp").keyup(function(){items[e].userhelp=$(this).val(),reloadItems()}),$("#sUserhelpTooltip").click(function(){items[e].userhelpTooltip=$(this).is(":checked"),reloadItems()}),$("#sCsslayout").keyup(function(){items[e].csslayout=$(this).val(),reloadItems()}),$(".equalTo").each(function(){for(var e='",i=0;i"+items[i].title+"");$(this).html(e)}),$(".dependencies").each(function(){for(var e='",i=0;i"+items[i].title+"");$(this).html(e)}),$(".dependencies").change(function(){items[e].choicesDep[$(this).attr("i")][$(this).attr("j")]=$(this).val(),reloadItems()}),$(".choice_removeDep").click(function(){1==items[e].choices.length?items[e].choicesDep[$(this).attr("i")][0]="":items[e].choicesDep[$(this).attr("i")].splice($(this).attr("j"),1),editItem(e),reloadItems()}),$(".choice_addDep").click(function(){items[e].choicesDep[$(this).attr("i")].splice(1*$(this).attr("j")+1,0,""),editItem(e),reloadItems()})},editForm=function(){$("#tabs-3").html(theForm.showAllSettings()),itemSelected=-1,$("#fTitle").keyup(function(){theForm.title=$(this).val(),reloadItems()}),$("#fDescription").keyup(function(){theForm.description=$(this).val(),reloadItems()}),$("#fLayout").change(function(){theForm.formlayout=$(this).val(),reloadItems()})},removeItem=function(e){items.splice(e,1);for(var i=0;i"+items[e].title+"");if($("#cu_user_email_field").html(i),$("#request_cost").length>0&&$("#request_cost").is("select")){for(i="",e=0;e"+items[e].name+"("+items[e].title+")";$("#request_cost").html(i)}if($("#paypal_price_field").length>0){for(i='",e=0;e"+items[e].title+"";$("#paypal_price_field").html(i)}},reloadItemsPublic=function(){for(var e=0;e
');var t=new Array;for(e=0;e
');else{if($("#fieldlist"+opt.identifier+" .pb"+i).append(items[e].show()),items[e].predefinedClick){var s=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class")+" predefinedClick";$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class",s),$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("predefined",items[e].predefined)}if(items[e].userhelpTooltip){var a=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).parents(".fields");a.find(".uh").css("display","none"),""!=a.find(".uh").text()&&a.attr("uh",a.find(".uh").text())}}$(".fields").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){editItem($(this).attr("id").replace("field"+opt.identifier+"-","")),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),"fdate"==items[e].ftype&&(t[t.length]=items[e])}if(i>0?($("#fieldlist"+opt.identifier+" .pb"+i).addClass("pbEnd"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb0").find(".field").removeClass("ignore").removeClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pbreak").each(function(e){var t=$(this).html(),s="";e==i&&($("#cpcaptchalayer"+opt.identifier).html()&&(t+='
'+$("#cpcaptchalayer"+opt.identifier).html()+"
",$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&(s='
'+$("#cp_subbtn"+opt.identifier).html()+"
")),$(this).html("
"+opt.messages.page+" "+(e+1)+" "+opt.messages.of+" "+(i+1)+""+t+'
'+opt.messages.previous+'
'+opt.messages.next+"
"+s+'
')}),$(".pbPrevious,.pbNext").bind("click",function(){if($(this).parents("form").valid()){var e=parseInt($(this).parents(".pbreak").attr("page"));$(this).hasClass("pbPrevious")?e--:e++,$("#fieldlist"+opt.identifier+" .pbreak").css("display","none"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb"+e).css("display","block"),$("#fieldlist"+opt.identifier+" .pb"+e).find(".field").removeClass("ignore").removeClass("ignorepb"),showHideDep()}return!1})):($("#cpcaptchalayer"+opt.identifier).html()&&($("#fieldlist"+opt.identifier+" .pb"+i).append('
'+$("#cpcaptchalayer"+opt.identifier).html()+"
"),$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&$("#fieldlist"+opt.identifier+" .pb"+i).append('
'+$("#cp_subbtn"+opt.identifier).html()+"
")),$(".pbSubmit").bind("click",function(){$(this).parents("#fieldlist"+opt.identifier).parents("form").submit()}),$("#fieldlist"+opt.identifier+" .predefinedClick").bind("click",function(){$(this).attr("predefined")==$(this).val()&&$(this).val("")}),$("#fieldlist"+opt.identifier+" .predefinedClick").blur("click",function(){""==$(this).val()&&$(this).val($(this).attr("predefined"))}),e>0){for(var n=0;n";return"Page Break"==i&&(t=""),"

"+t},showName:function(e,i){return'
'},showPredefined:function(e,i){return'

Hide predefined value on click.
'},showEqualTo:function(e,i){return'

'},showRequired:function(e){return'
"},showSize:function(e){for(var i="",t=0;t"+this.sizeList[t].name+"";return'
"},showLayout:function(e){for(var i="",t=0;t"+this.layoutList[t].name+"";return'
"},showUserhelp:function(e,i){return'

Show as floating tooltip.
'},showCsslayout:function(e){return''}},fform=function(){};$.extend(fform.prototype,{title:"Untitled Form",description:"This is my form. Please fill it out. It's awesome!",formlayout:"top_aligned",display:function(){return'
'+(""!=this.title?"

"+this.title+"

":"")+(""!=this.description?""+this.description+"":"")+"
"},show:function(){var e="";return""!=this.title&&(e+="

"+this.title+"

"),""!=this.description&&(e+=""+this.description+""),'
'+e+"
"},showAllSettings:function(){for(var e="",i=0;i"+showSettings.formlayoutList[i].name+"";return'

"}});var theForm=new fform,ffields=function(){};$.extend(ffields.prototype,{name:"",shortlabel:"",index:-1,ftype:"",userhelp:"",userhelpTooltip:!1,csslayout:"",init:function(){},after_show:function(){},showSpecialData:function(){return void 0!==this.showSpecialDataInstance?this.showSpecialDataInstance():""},showEqualTo:function(){return void 0!==this.equalTo?showSettings.showEqualTo(this.equalTo,this.name):""},showPredefined:function(){return void 0!==this.predefined?showSettings.showPredefined(this.predefined,this.predefinedClick):""},showRequired:function(){return void 0!==this.required?showSettings.showRequired(this.required):""},showSize:function(){return void 0!==this.size?showSettings.showSize(this.size):""},showLayout:function(){return void 0!==this.layout?showSettings.showLayout(this.layout):""},showRange:function(){return void 0!==this.min?this.showRangeIntance():""},showFormat:function(){if(void 0===this.dformat)return"";try{return this.showFormatIntance()}catch(e){return""}},showChoice:function(){return void 0!==this.choices?this.showChoiceIntance():""},showUserhelp:function(){return"fPageBreak"!=this.ftype?showSettings.showUserhelp(this.userhelp,this.userhelpTooltip):""},showCsslayout:function(){return"fPageBreak"!=this.ftype?showSettings.showCsslayout(this.csslayout):""},showAllSettings:function(){return this.showTitle()+this.showName()+this.showSize()+this.showLayout()+this.showFormat()+this.showRange()+this.showRequired()+this.showSpecialData()+this.showEqualTo()+this.showPredefined()+this.showChoice()+this.showUserhelp()+this.showCsslayout()},showTitle:function(){return showSettings.showTitle(this.ftype,this.title)},showName:function(){return"fPageBreak"!=this.ftype?showSettings.showName(this.name,this.shortlabel):""},display:function(){return"Not available yet"},show:function(){return"Not available yet"},toJSON:function(){return str="",$.each(this,function(e,i){"function"!=typeof i&&(""!=str&&(str+=","),str+='"'+e+'":'+i)}),str}});var ftext=function(){};$.extend(ftext.prototype,ffields.prototype,{title:"Untitled",ftype:"ftext",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'
'+this.userhelp+'
'},show:function(){return'
'+this.userhelp+'
'},showSpecialDataInstance:function(){return'


'}});var facceptance=function(){};$.extend(facceptance.prototype,ffields.prototype,{title:"Accept terms and conditions",ftype:"facceptance",value:"I accept",required:!0,url:"",message:"",display:function(){return'
'+this.title+(this.required?"*":"")+''+this.userhelp+'
'},show:function(){var e=this,i="",t=e.title;return/^\s*$/.test(e.url)?/^\s*$/.test(e.message)||(t=''+t+"",i+='
'+e.message+"
"):t=''+t+"",'
"+i+'
'},after_show:function(){$(document).on("click",".cff-open-dlg",function(){var e=$(this).closest(".fields").find(".cff-dialog"),i=e.data("width"),t=e.data("height");e.removeClass("hide"),void 0===i&&(i=Math.min($(this).closest("form").width(),$(window).width(),e.width())),void 0===t&&(t=Math.min($(this).closest("form").height(),$(window).height(),e.height())),e.data("width",i),e.data("height",t),e.css({width:i+"px",height:t+"px","margin-top":-1*t/2+"px","margin-left":-1*i/2+"px"})}),$(document).on("click",".cff-close-dlg",function(){$(this).closest(".cff-dialog").addClass("hide")})},showSpecialDataInstance:function(){return'
"}});var fpassword=function(){};$.extend(fpassword.prototype,ffields.prototype,{title:"Untitled",ftype:"fpassword",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'},showSpecialDataInstance:function(){return"Not available in free version"}});var femail=function(){};$.extend(femail.prototype,ffields.prototype,{title:"Email",ftype:"femail",predefined:"",predefinedClick:!1,required:!1,size:"medium",equalTo:"",display:function(){return'
'+this.userhelp+'
'},show:function(){return'
'+this.userhelp+'
'},showSpecialDataInstance:function(){return""}});var fnumber=function(){};$.extend(fnumber.prototype,ffields.prototype,{title:"Number",ftype:"fnumber",predefined:"",predefinedClick:!1,required:!1,size:"small",min:"",max:"",dformat:"digits",formats:new Array("digits","number"),display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'},showFormatIntance:function(){return"
Not available in free version
"},showRangeIntance:function(){return"Not available in free version"}});var fdate=function(){};$.extend(fdate.prototype,ffields.prototype,{title:"Date",ftype:"fdate",predefined:"",predefinedClick:!1,size:"medium",required:!1,dformat:"mm/dd/yyyy",showDropdown:!1,dropdownRange:"-10:+10",minDate:"",maxDate:"",defaultDate:"",formats:new Array("mm/dd/yyyy","dd/mm/yyyy"),display:function(){return""},show:function(){return""},showFormatIntance:function(){return"
Not available in free version
"},showSpecialDataInstance:function(){return"Not available in free version"}});var ftextarea=function(){};$.extend(ftextarea.prototype,ffields.prototype,{title:"Untitled",ftype:"ftextarea",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",display:function(){return'
'+this.userhelp+'
'},show:function(){return'
'+this.userhelp+'
'},showSpecialDataInstance:function(){return'


'}});var ffile=function(){};$.extend(ffile.prototype,ffields.prototype,{title:"Untitled",ftype:"ffile",required:!1,size:"medium",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'}});var fSectionBreak=function(){};$.extend(fSectionBreak.prototype,ffields.prototype,{title:"Section Break",ftype:"fSectionBreak",userhelp:"A description of the section goes here.",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'}});var fPageBreak=function(){};$.extend(fPageBreak.prototype,ffields.prototype,{title:"Page Break",ftype:"fPageBreak",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'}});var fPhone=function(){};$.extend(fPhone.prototype,ffields.prototype,{title:"Phone",ftype:"fPhone",required:!1,dformat:"### ### ####",predefined:"888 888 8888",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'},showFormatIntance:function(){return"
Not available in free version
"}});var fCommentArea=function(){};$.extend(fCommentArea.prototype,ffields.prototype,{title:"Comments here",ftype:"fCommentArea",userhelp:"A description of the section goes here.",display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'}});var fcheck=function(){};$.extend(fcheck.prototype,ffields.prototype,{title:"Check All That Apply",ftype:"fcheck",layout:"one_column",required:!1,showDep:!1,init:function(){},display:function(){return'
Not available in free version
'},show:function(){return'
Not available in free version
'},showChoiceIntance:function(){return'
Not available in free version
'+str+""}});var fradio=function(){};$.extend(fradio.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fradio",layout:"one_column",required:!1,choiceSelected:null,showDep:!1,init:function(){},display:function(){return'
'+str+''+this.userhelp+'
'},show:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e="";if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var i=0;i0){t=" depItem";for(var n=0;n "+this.choices[i]+""}return'
'+e+''+this.userhelp+'
'},showChoiceIntance:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e=this.choices,i=this.choicesVal;this.choiceSelected;if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var t=0;t';for(var n=0;nIf selected show: ';0==s[t].length&&(a+='
If selected show:
')}return'"}});var fdropdown=function(){};$.extend(fdropdown.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fdropdown",size:"medium",required:!1,choiceSelected:"",showDep:!1,init:function(){},display:function(){return this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0),'
Not available in free version
'},show:function(){return'
Not available in free version
'},showChoiceIntance:function(){return'
Not available in free version
'+str+""}}),opt.pub||$("#fieldlist"+opt.identifier).sortable({start:function(e,i){var t=i.item.index();i.item.data("start_pos",t)},stop:function(e,i){var t=parseInt(i.item.index()),s=parseInt(i.item.data("start_pos")),a=items[s];if(t>s)for(var n=s;nt;n--)items[n]=items[n-1];items[t]=a,reloadItems()}}),opt.pub||$("#tabs").tabs({activate:function(e,i){1!=$(this).tabs("option","active")?($(".fields").removeClass("ui-selected"),itemSelected=-2,2==$(this).tabs("option","active")?($(".fform").addClass("ui-selected"),editForm()):$(".fform").removeClass("ui-selected")):($(".fform").removeClass("ui-selected"),itemSelected<0&&$("#tabs-2").html("No Field Selected
Please click on a field in the form preview on the right to change its properties."))}}),loadtmp=function(p){if((d=$.parseJSON(p))&&2==d.length){items=new Array;for(var i=0;in&&(n=n1);$.extend(obj,{name:"fieldname"+(n+1)}),items[items.length]=obj,reloadItems()},saveData:function(e){""!=e?$("#"+e).val("["+$.stringifyXX(items,!1)+",["+$.stringifyXX(theForm,!1)+"]]"):$.ajax({type:"POST",url:"process.php?act=save",data:"items="+$.stringifyXX(items,!0)+"&theForm="+$.stringifyXX(theForm,!0),dataType:"json",success:function(e){alert("The form has been saved!!!")}})},loadData:function(e){""!=e?loadtmp($("#"+e).val()):$.ajax({async:!1,url:"process.php?act=load",success:function(e){loadtmp(e.toString())}})},removeItem:removeItem,editItem:editItem};return this.fBuild=ffunct,this};for(var fcount=1,fnum="_"+fcount;10>fcount||eval("typeof cp_contactformtoemail_fbuilder_config"+fnum+" != 'undefined'");){try{var cp_contactformtoemail_fbuilder_config=eval("cp_contactformtoemail_fbuilder_config"+fnum),f=$("#fbuilder"+fnum).CFTEfbuilder($.parseJSON(cp_contactformtoemail_fbuilder_config.obj));f.fBuild.loadData("form_structure"+fnum),$("#cp_contactformtoemail_pform"+fnum).validate({ignore:".ignore",errorElement:"div",errorPlacement:function(e,i){i.hasClass("group")&&(i=i.parent()),e.insertBefore(i),e.addClass("message"),e.css("position","absolute"),e.css("left",0),e.css("top",i.parent().outerHeight(!0))}}),$(document).trigger("showHideDepEvent",fnum)}catch(e){}fcount++,fnum="_"+fcount}}(jQuery)});