function DisableButton(){$j("input[name$='SendButton']").prop("disabled",!0)}function init_qtSelect(n){var t=$j(n).find(":selected"),o=t.attr("data-showplatformoptions"),i,r,u,f,e;o==1?$j("#accountinformation").show():$j("#accountinformation").hide(),i=t.attr("data-showtransactionsoptions"),i==1?$j("#transactionsInformation").show():$j("#transactionsInformation").hide(),r=t.attr("data-showcompanyaddress"),r==1?$j("#companyAddress").show():$j("#companyAddress").hide(),u=t.attr("data-showmessage"),u==1?($j("#messagebox").show(),$j("#messagebox div[id$='message']").hide(),f="#messagebox div."+t.val(),$j(f).show()):$j("#messagebox").hide(),t.is("#QuestionTypeDiv *")&&($j("#subquestionbox").find(".field[data-parent]").hide(),e=$j("#subquestionbox").find(".field[data-parent="+t.val()+"]"),e.show())}var trValidate={},trForm,$j;trValidate={hasValue:function(n){return $(n).val()?!0:!1},evaluateField:function(n){var t=n.baseEvaluationFunction(n);return t?trValidate.clearError(n):trValidate.setError(n),t},setError:function(n){var t=$("#"+n.id),i=t.closest("div.form-item");i.addClass("error")},clearError:function(n){var t=$("#"+n.id),u=t.parent(".msg:first"),f=u.children().not("#"+n.id),i=!0,r;$.each(f,function(){$(this).css("visibility")!="hidden"&&$(this).css("display")!="none"&&(i=!1)}),i&&(r=t.closest("div.form-item"),r.removeClass("error"))}},trForm={},trForm={initValidation:function(){if(window.Page_Validators!=undefined)for(var n=0;n<window.Page_Validators.length;n++)window.Page_Validators[n].baseEvaluationFunction==undefined&&(window.Page_Validators[n].baseEvaluationFunction=window.Page_Validators[n].evaluationfunction),window.Page_Validators[n].evaluationfunction=trValidate.evaluateField}},$j=jQuery.noConflict(),$j(document).bind("ready",function(){$j("input[name$='ContactDateTextBox']").datepicker({minDate:0});var n=$j("select[name$='Languages']").val();n?n=="en"&&(n=""):n="",$j("input[name$='ContactDateTextBox']").datepicker("option",$j.datepicker.regional[n])}),$j=jQuery.noConflict(),window.onbeforeunload=DisableButton,$j(document).bind("ready",function(){init_qtSelect($j("select[name$='QuestionTypeSelect']"));var n=$j("select[name$='ChildQuestionTypeSelect']:visible");n.length>0&&n.val()&&init_qtSelect(n),$j("select[name$='QuestionTypeSelect']").live("change",function(){init_qtSelect(this)}),$j("input[name$='ExistingCustomerRadioButtons']").live("change",function(){var n=$j(this).val();n==1?($j("#pspid").show(),$j("#platform").show()):($j("#pspid").hide(),$j("#platform").hide())})})