").appendTo("#imgModelImage"),$("#spanModel").text(t),$("#spanBrand").text(LastName),$("#spanType").text(i),$("#divBrandModelArea").show(),$("#divSearchArea").hide(),u==!0)$("#divYesContinueButtonArea").show(),$("#divNotRepairingArea").hide(),$("#pNotRepairingText").text(""),$("#pRepairingNoteText").html(f);else return $("#divNotRepairingArea").show(),$("#pNotRepairingText").html(f),$("#divYesContinueButtonArea").hide(),$("#pRepairingNoteText").text(""),!1;var b="",y="",g="";if(e!=""){if($("#hdnLastDeliveryMethodIds").val()!=""){for(a=$("#hdnLastDeliveryMethodIds").val().split(","),c=e.split(","),s=0;sPlease choose one or more from most common faults below or describe the fault with your own words in the textarea.<\/div>")}),!1;if(u="",$('[name="modelfault"]').each(function(){$(this).prop("checked")==!0&&(u=u==""?$(this).val():u+"-"+$(this).val())}),u==""&&(u="No"),rt="",f="",$("#hdnCustomeAttributeInfo").val()!="")for(d=$("#hdnCustomeAttributeInfo").val().split(","),t=0;t0?$("#divSelectedAreaAddMachineButton").hide():$("#divSelectedAreaAddMachineButton").show();v=$("#txtLongDesc").val();v==""&&(v="NN");y=$("#hdnSaveDataLongDesc").val();y=y==""?v:y+"]"+v;$("#hdnSaveDataLongDesc").val(y);var s="",nt=0,r="";if($("#hdnCustomeAttributeInfo").val()!=""){for(p=$("#hdnCustomeAttributeInfo").val().split(","),t=0;t0)return alert("Sorry but, you can add only upto 2 machines in a one repair service form."),!1;t=0;i="";$("#txtLongDesc").val("");$("input[name='modelfault']:checkbox").prop("checked",!1);$("input[name='modelDeliveryMethod']:radio").prop("checked",!1);$("#SeachModel").val("");$("#divFaultArea").hide();$("#divBrandArea").show();$("#hdnCurrentMachineId").val(0);$("#divDeliveryMethodArea").hide();n=document.getElementsByName("DeliveryMethodVariableContentDiv");$(n).toggle(!1);$("#divSelectedInfoArea").hide();$("#divRepairConsentArea").hide();$("#btnContinueWithCustomerArea").hide();$(".ui-autocomplete").css("display","none");$(".ui-helper-hidden-accessible").text("")}function YesContinue(){$("input[name='modelfault']:checkbox").prop("checked",!1);$("#divFaultArea").show();$("#divBrandModelArea").hide()}function AnothereSearchMachine(){$("#SeachModel").val("");$("#pNotRepairingText").text("");$("#divBrandArea").show();$("#divSearchArea").hide();$("#divBrandModelArea").hide();$(".ui-autocomplete").css("display","none");$(".ui-helper-hidden-accessible").text("")}function NoThanksEnquiryForm(){$("#SeachModel").val("");$("#pNotRepairingText").text("");window.location.href="/contactus"}function BrandSave(n,t){var r,u,f,i;$("#divBrandArea").hide();$("#topText").hide();$("#divSearchArea").show();$("#SeachModel").focus();ascrollto("divSearchArea");LastId!=0&&(r="divBrandImageArea"+LastId,document.getElementById(r).style.display="none");LastId=n;LastName=t;u="divBrandImageArea"+n;f="Selected Brand "+t+"<\/h3>";document.getElementById(u).style.display="block";$(".brandName").html(f);i={BrandId:n};addAntiForgeryToken(i);$.ajax({cache:!1,type:"POST",url:"/CustomerServiceData/SetBrandId",data:i,success:function(n){if(n.Result)return!1},error:function(){}})}function ascrollto(n){var t=$("#"+n).offset().top-100;$("html, body").animate({scrollTop:t},1e3)}!1&&($("#divConfirmArea").hide(),$("#divPersonalDetailArea").show(),$("#hdnSaveData").val("0"),$("#liConfirm").removeClass("inactive-step"),$("#liConfirm").addClass("active-step"),$("#liCoffeeMachine").removeClass("active-step"),$("#liCoffeeMachine").addClass("inactive-step"),$("#hdnSaveDataLongDesc").val("0"),$("#hdnSaveCustomeAttribute").val("0"),$("#divBrandArea").hide(),DisplaySelectedData());var LastId=0,LastName="";$("#divDeliveryMethodArea").click(function(){$(this).removeClass("error")});$("#divRepairConsentArea input").change(function(){$("#divRepairConsentArea input:checkbox:not(:checked)").length==0&&($("#divRepairConsentArea .form-group").removeClass("error"),$("#divRepairConsentArea .form-group .alert").remove())});$("#divDeliveryMethodVariableContentArea3").change(function(){$("#divDeliveryMethodVariableContentArea3 input:checkbox:not(:checked)").length==0&&($("#divDeliveryMethodVariableContentArea3 .form-group").removeClass("error"),$("#divDeliveryMethodVariableContentArea3 .form-group .alert").remove())});$("#divRepairConsentArea").change(function(){$("#divRepairConsentArea input:checkbox:not(:checked)").length==0&&($("#divRepairConsentArea .form-group").removeClass("error"),$("#divRepairConsentArea .form-group .alert").remove())});$("#divFaultArea").bind("input propertychange",function(){($('[name="modelfault"]:checked').length>0||$('[name="txtLongDesc"]').val().length>10)&&($("#divFaultArea .form-group").removeClass("error"),$("#divFaultArea .form-group .alert").remove())})