function GAEvent(n){var t=getParameterByName("utm_source");t!=""?gtag("event",n,{event_category:"CarInsurance Paid",event_label:t}):gtag("event",n,{event_category:"CarInsurance",event_label:document.referrer})}function parseDate(n){return typeof n=="object"?(dateAr=n,dateObj={day:dateAr.getDate(),month:dateAr.getMonth(),year:dateAr.getFullYear()}):n!=""?(dateAr=n.split("/"),dateObj={day:Number(dateAr[0]),month:Number(dateAr[1])-1,year:Number(dateAr[2])}):(dateAr=new Date,dateObj={day:dateAr.getDate(),month:dateAr.getMonth(),year:dateAr.getFullYear()}),dateObj}function collectUserDetails(){var n="support@supermarker.themarker.com",t=n.split("@")[0];return $("#divBirthDate").calendar(null,$("#txtBirthDate")),birtDate=parseDate($("#txtBirthDate").val()),user.LastName=$("#txtLastName").val()?$("#txtLastName").val():t,user.FirstName=$("#txtFirstName").val()?$("#txtFirstName").val():t,user.BirthDate=new Date(birtDate.year,birtDate.month,birtDate.day,12,0,0,0),user.Email=n,user.City=$("#txtCityOfResidence").val(),user.PostalCode=$("#txtPostalCode").val(),user}function setUser(n){return user={PassportID:n.PassportID,LastName:n.LastName,FirstName:n.FirstName,BirthDate:n.BirthDate,Email:n.Email,Phone:n.Phone,Aprt:n.Aprt,Buil:n.Buil,Street:n.Street,City:n.City,PostalCode:n.PostalCode,FirstNameEng:n.FirstNameEng,LastNameEng:n.LastNameEng,IsTempUser:n.IsTempUser,isRegister:!0,Sex:n.Sex,isAgent:n.IsAgent}}function checkDriverMaxAge(n){var t=parseDate(n),i=((new Date).getTime()-new Date(t.year,t.month,t.day,12,0,0,0).getTime())/(864e5*365.26);return i<=maxDriverYears&&i>=minDriverYears}function setDrivingYears(){$("#ddlIsYoungDriver").val()=="1"?($("#drivingYearsTR").show(),$("#selDrivingYears").removeAttr("invisible")):($("#drivingYearsTR").hide(),$("#selDrivingYears").attr("invisible","invisible"))}function setDrivingYearsSecond(){$("#ddlIsYoungDriverSecond").val()=="1"?($("#blockDrivingYearsSecond").show(),$("#txtExperienceTheLeastExperiencedDriver").removeAttr("invisible")):($("#blockDrivingYearsSecond").hide(),$("#txtExperienceTheLeastExperiencedDriver").attr("invisible","invisible"))}function collectPriceProposalDetails(){return collectUserDetails(),stDate=parseDate($("#txtStartDate").val()),startDate=new Date(stDate.year,stDate.month,stDate.day,12,0,0,0),enDate=parseDate($("#txtEndDate").val()),endDate=new Date(enDate.year,enDate.month,enDate.day,12,0,0,0),transitValues.InsPeriod=dictionary.carWizard.periodFormatted.replace("{startDate}",stDate.day+"/"+(stDate.month+1)+"/"+stDate.year).replace("{endDate}",enDate.day+"/"+(enDate.month+1)+"/"+enDate.year),priceProposal={Id:ppId,StatusId:1,CouponId:"",CreationDateTime:new Date,Fld_StartDate:startDate,Fld_EndDate:endDate,InsuranceProduct_TypeId:Number($("input[name=rbInsType]:checked").val()),Fld_VehicleTypeId:Number($("#ddlModel").val()),Fld_UsageTypeId:Number($("#ddlUsedFor :checked").val()),Fld_OwnerTypeId:Number($("input[name=rbOwner]:checked").val()),Fld_CategoryId:Number($("input[name=rbCarType]:checked").val()),Drivers:[],VehicleProductionYear:$("#vehicleManufactureYear").html()?$("#vehicleManufactureYear").html():$("#ddlYear option:selected").html(),Computed_ProductionYear:$("#vehicleManufactureYear").html()?$("#vehicleManufactureYear").html():$("#ddlYear option:selected").html(),Computed_Manufacture:$("#vehicleManufacture").html()?$("#vehicleManufacture").html():$("#ddlManufacturer option:selected").html(),Computed_EngineSize:$("#txtEngine").val(),Computed_Model:$("#Kinuy_mishari").html()?$("#Kinuy_mishari").html():$("#ddlModel option:selected").html(),Computed_AirBagIncluded:$("#ddlModel option:selected").attr("AirBagIncluded")=="1",Computed_HasAutomaticGearbox:$("#ddlModel option:selected").attr("HasAutomaticGearbox")=="1",Computed_LeviItzhakCode:$("#ddlModel option:selected").attr("LeviItzhakCode"),Fld_LicensePlate:$("#licensePlate").val(),FCWSystem:$("#includeFCWSystem").is(":checked"),LDWSystem:$("#includeLDWSystem").is(":checked")},transitValues.InsType=$("input[name=rbInsType]:checked + label").text(),specText=dictionary.carWizard.insuranceForFormatted[priceProposal.InsuranceProduct_TypeId]?dictionary.carWizard.insuranceForFormatted[priceProposal.InsuranceProduct_TypeId]:dictionary.carWizard.insuranceForFormatted[0],transitValues.CarSpecification=specText.replace("{manufacturer}","").replace("{model}",$("#ddlModel option:selected").html()).replace("{engine}",$("#ddlEngine option:selected").html()).replace("{year}",$("#ddlYear option:selected").html()).replace("{VehiclesInsuranceTypeName}",transitValues.InsType),priceProposal}function collectAdditionalData(){var n=!1,t=!1,i=!0,r=!1,u=!1;return $("#selAdditionalCar").val()==1&&(n=!0),$("#selMainCar").val()==1&&(t=!0),i=$("#rbOnlyDriverGenderMale").is(":checked"),r=$("#includeFCWSystem").is(":checked"),u=$("#includeLDWSystem").is(":checked"),aditionalQuestions={HasAdditionalCar:n,IsCompanyCarMainVehicle:t,GenderMale:i,FCWSystem:r,LDWSystem:u}}function collectPriceProposalMoreDetails(){var i,n,t;collectPriceProposalDetails();with(priceProposal)delete ExtensionData;return PO_ID=null,ppId=priceProposal.Id=-1,priceProposal.Fld_DrivingLicenseRevoced=$("#rbWasYourLicenseTakenYes").is(":checked"),priceProposal.Fld_VehicleAllowedToDriveTypeId=Number($("input[name='rbAllowedToDrive']:checked").val()),priceProposal.Fld_DrivingAtSaturday=$("#rbDrivingOnSatYes").is(":checked"),priceProposal.Fld_OwnerBuildingTypeId=Number($("#selHouseType").val()),birtDate=parseDate($("#txtBirthDate").val()),i=-1*(1970-new Date((new Date).getTime()-new Date(birtDate.year,birtDate.month,birtDate.day).getTime()).getFullYear()),priceProposal.Drivers[0]={Id:1,VehiclePP_Id:-1,VehiclePO_Id:-1,Fld_FirstName:user.FirstName?user.FirstName:$("#txtEmail").val(),Fld_LastName:user.LastName?user.LastName:$("#txtEmail").val(),Fld_Email:$("#txtEmail").val(),Fld_BirthDate:new Date(birtDate.year,birtDate.month,birtDate.day,12,0,0,0),Fld_DrivingExperience_Years:$("#selDrivingYears").val()?Number($("#selDrivingYears").val()):0,Fld_City:$("#txtCityOfResidence").val(),Fld_Sex:$("#rbGenderMale").is(":checked"),Fld_Telephone:user.Phone?user.Phone:"",Fld_PostalCode:user.PostalCode?user.PostalCode:"3000",Fld_IsYoungDriver:$("#selDrivingYears").val()>=2?!1:!0},priceProposal.Fld_LicensePlate=$("#licensePlate").val(),priceProposal.FCW=$("#includeFCWSystem").is(":checked"),priceProposal.LDW=$("#includeLDWSystem").is(":checked"),n=!1,$("#selAdditionalCar").val()==1&&(n=!0),t=!1,$("#selMainCar").val()==1&&(t=!0),priceProposal.AdditionalCompanyCar=n,priceProposal.CompanyCarMainlyUsed=t,priceProposal.Fld_YongestDriverAge=i,transitValues.SecondDriverExperince=priceProposal.Fld_LeastExperiencedDriverSeniority=priceProposal.Fld_VehicleAllowedToDriveTypeId==1?priceProposal.Drivers[0].Fld_DrivingExperience_Years:Number($("#selDrivingYears").val()),priceProposal.Fld_PropertyCliams_1=priceProposal.Fld_PropertyCliams_2=priceProposal.Fld_PropertyCliams_3=priceProposal.Fld_BodyCliams_1=priceProposal.Fld_BodyCliams_2=priceProposal.Fld_BodyCliams_3=0,$("#rbDidYouHaveInsuranceNo").is(":checked")?(priceProposal.Fld_OldInsuranceTypeId_1=Number($("#ddlInsType1").val()),priceProposal.Fld_OldInsuranceTypeId_2=Number($("#ddlInsType2").val()),priceProposal.Fld_OldInsuranceTypeId_3=Number($("#ddlInsType3").val())):(priceProposal.Fld_OldInsuranceTypeId_1=4,priceProposal.Fld_OldInsuranceTypeId_2=4,priceProposal.Fld_OldInsuranceTypeId_3=4),priceProposal.CouponId=$(".lastYearInsurance").val(),$("#rbDidYouHaveInsuranceClaimsYes").is(":checked")&&(priceProposal.Fld_PropertyCliams_1=Number($("#ddlProperty1").val()),priceProposal.Fld_PropertyCliams_2=Number($("#ddlProperty2").val()),priceProposal.Fld_PropertyCliams_3=Number($("#ddlProperty3").val()),priceProposal.Fld_BodyCliams_1=Number($("#ddlBody1").val()),priceProposal.Fld_BodyCliams_2=Number($("#ddlBody2").val()),priceProposal.Fld_BodyCliams_3=Number($("#ddlBody3").val())),priceProposal}function getLead(){var n=$("#txtShemPrati").val(),t=$("#txtEmailLead").val(),i=$("#txtTelephone").val();return obj={FullName:n,Mail:t,Tel:i}}function proposalsOnLoad(){costArray=[];ppCostArray=[];lastCostId=0;costCounter=0;startWizardStep==2?($("#savePPBlock").remove(),systemParameters.VehicleCostRequestNumber=1,getPriceProposalDetails(ppId,function(){updateProposalsTable(ppId)})):ppId==-2||ppId==-1?updateProposalsTable(ppId):($("#wizardProposalsError").hide(),$("#wizardProposals").show(),$("#spanCarInsType").html(transitValues.CarSpecification.replace("{product}","")),$("#spanInsPeriod").html(transitValues.InsPeriod),updateProposalsTable(ppId))}function updateProposalsTable(){var n=collectPriceProposalMoreDetails();$.ajax({url:"/api/products/GetCarInsurancePricesWithTimeout",dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",timeout:5e4,data:JSON.stringify(n),success:function(n){var t=n}}).done(function(n){var t,i;if(n!=null)if(t=n,t.length!=0)for(i in t)obj=t[i],renderCarInsuranseRow(obj);else $("#wizardProposalsError").show(),GAEvent("Empty results");else $("#wizardProposalsError").show(),GAEvent("Empty results");$("#spanCarInsType").html(transitValues.CarSpecification.replace("{product}",""));$("#spanInsPeriod").html(transitValues.InsPeriod);onFinishPriceProposalsLoading()}).fail(function(n,t){t=="timeout"?GAEvent("Get Prices Timeout"):GAEvent("Get Prices Failed");$("#wizardProposalsError").show();onFinishPriceProposalsLoading()})}function onFinishPriceProposalsLoading(){$("#aPrevStep").removeClass("disabled_link").addClass("move_prev");jWin.Modal.close()}function showCovers(){$(".coversBlock").show()}function renderCarInsuranseRow(n){var t,r,u,i;if(n.CompulsoryCost!=0){loadRow=$("#carInsuranceRowTemplate");row=loadRow.clone();covers[n.IC_Id]={name:n.CompanyName,image:n.CompanyIcon_Path,covers:n.Covers};row.attr({id:"carInsuranceRow"+n.IC_Id,cost:n.TotalCost,yatzran:n.Covers[15].Value,"class":"carInsuranceRowTemplate result"});t=row.find(".nameId").attr("name","name"+n.IC_Id).html(n.CompanyName+" - "+n.ProductTypeName);t=row.find(".checkboxCompareCovers").attr("id","cb"+n.IC_Id);t=row.find(".imgCarInsurance").attr({id:"img"+n.IC_Id,alt:"ביטוח רכב "+n.CompanyName,src:n.CompanyIcon_Path,"class":"cellHover"});t=n.CompulsoryCost!=""?row.find(".hovaPrice").html(roundNumber(n.CompulsoryCost)+" ₪"):row.find(".hovaPrice").html("לא התקבל מחיר");t=n.CASCOCost!=""?row.find(".mekifPrice").html(roundNumber(n.CASCOCost)+" ₪"):row.find(".mekifPrice").html("לא התקבל מחיר");n.IC_Id=="1"&&n.CASCOCost=="1"&&row.find(".mekifPrice").html("הנחה של עד 50%");n.CASCODiscount!="0"&&(t=row.find(".discountCost").html("הנחות מיוחדות <br />"+roundNumber(n.CASCODiscount)+" ₪"),row.find("#discount").show(),row.find(".hova").addClass("adjustHova"));t=n.TotalCost!=""?row.find(".totalPrice").html(roundNumber(n.TotalCost)+" ₪"):row.find(".totalPrice").html("צור קשר לקבלת מחיר מלא");n.IC_Id=="1"&&n.CASCOCost=="1"&&row.find(".totalPrice").html("צור קשר");n.CASCODiscount!="0"&&(r=n.CASCODiscount+n.CompulsoryCost,t=row.find(".totalDiscountCost").html("סה'כ אחרי הנחה <br />"+roundNumber(r)+" ₪"),row.find("#totalDiscount").show());t=row.find(".carCoverBtn").attr("onclick","javascript:expandCovers("+n.IC_Id+")");t=row.find(".coversTable").attr("id","coversTable"+n.IC_Id);t=row.find(".polisaDetailsURL").attr({id:"polisa"+n.IC_Id,href:n.ProductTypePolicyFile_Path,"data-mm":n.IC_Id});insertCostRow(row);u=$("#coversTable"+n.IC_Id);for(i in n.Covers)$(u).append("<tr><td>"+dictionary.carWizard.covers[n.Covers[i].Name]+"<\/td><td>"+n.Covers[i].Value+"<\/td><\/tr>")}}function insertCostRow(n){var i=parseFloat(n.attr("cost")),r=$("#proposals div[cost]"),t;r.length==0?$("#proposals").prepend(n):(t=!1,$("#proposals div[cost]").each(function(){if(i<=parseFloat($(this).attr("cost")))return n.insertBefore(this),t=!0,!1}),t||n.insertAfter($("#proposals div[cost]:last")))}function uncheckLead(){$("#yatzranimDiv input:checked").each(function(){$(this).prop("checked",!1)})}function getCompaniesNames(){var n="";return $("#yatzranimDiv input:checked").each(function(){var t=$(this).attr("id");n+=$("label[for='"+t+"']").text()+", "}),n}function sendOffersLead(n){var t=priceProposal,i=getLead(),r=getCosts(),u=n;$.ajax({url:"/CarInsurance/CarModels.asmx/RegisterLeadV2",dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({carInsuranceDetails:t,userDetails:i,costs:r,ids:u}),success:function(n){var t;n.d?(t=getParameterByName("utm_source"),t!=""?gtag("event","Valid",{event_category:"CarInsuranceLead Paid",event_label:t}):gtag("event","Valid",{event_category:"CarInsuranceLead",event_label:document.referrer})):(t=getParameterByName("utm_source"),t!=""?gtag("event","NotValid",{event_category:"CarInsuranceLead Paid",event_label:t}):gtag("event","NotValid",{event_category:"CarInsuranceLead",event_label:document.referrer}))},error:function(n,t,i){console.log(n.statusText);console.log(t);console.log(i);var r=getParameterByName("utm_source");r!=""?gtag("event","NotValid",{event_category:"CarInsuranceLead Paid",event_label:r}):gtag("event","NotValid",{event_category:"CarInsuranceLead",event_label:document.referrer})}})}function sendLead(){var n;if($("#aspnetForm").valid()){n="";n=getCompaniesNames();gtag("event","leadType-CarInsurance",{event_category:"LeadClali",event_label:n});var t=getCosts(),i=$("#txtShemPrati").val(),r=$("#txtEmailLead").val(),u=$("#txtTelephone").val(),f=$("#selectKidomet").val();$("#getOffer").hide();$("#loader").show();RegisterLead.AddLead(priceProposal,i,shemMishpach,r,f,u,t,function(n){n?($("#loader").hide(),$("#successful").show(),$("#errorSending").hide()):($("#loader").hide(),$("#getOffer").show(),$("#errorSending").show())})}return!1}function polisa(n){var t=$("#"+n),n=$(t).attr("data-mm"),i="Company="+$("[name=name"+n+"]").text()+", Product=, ProductName="+$("[name=name"+n+"]").text();GAEvent("Polisa link")}function expandCovers(n){var t=$("#coversTable"+n);t.css("display")=="none"?t.show():t.hide()}function clickToComparisonPanel(n){var t=$("#"+n),i,r;n=n.substring(2);i=$(".comparePanelBox .compareBox");r=i.has("button").length;r==3?t.is(":checked")?(t.prop("checked",!1),alert("ניתן להשוות 3 תוכניות ביטוח בלבד")):RemoveProductFromComparison(n):t.is(":checked")?AddProducTotComparison(n):RemoveProductFromComparison(n)}function AddProducTotComparison(n){$("#comparePanel").show();var t=$("#name"+n).text(),u=$("#img"+n).attr("src"),i=$(".comparePanelBox .compareBox"),f=i.has("button").length,e='<button id="'+n+'" class="close" onclick="javascript:RemoveProductFromComparison('+n+')" causesvalidation="false">×<\/button><img src="'+u+'" alt="'+t+'" width="60" height="60" class="compareImg"><h5 class="dot-dot-dot" style="margin: 2px;" title="'+t+'">'+t+"<\/h5>",r=i[f];$(r).append(e);$(r).removeClass("empty");t=t.substring(0,21)}function RemoveProductFromComparison(n){var i=$("#"+n).parent(),r,u,t;i.html("");i.remove();$(".comparePanelBox").append('<div class="compareBox empty"><\/div>');r=$(".comparePanelBox .compareBox");u=r.has("button").length;u==0&&$(".comparePanelBox").hide("slow");t=$("#cb"+n);t.length!=0&&t.prop("checked",!1)}function RemoveAllComparedProducts(){var n=$(".comparePanelBox .compareBox"),t;for(i=0;i<n.length;i++)n[i]!=""&&(t=$(n[i]).find("button.close"),t.click())}function renderCoversComparison(){var f=$(".comparePanelBox .compareBox"),e=f.has("button").length,n,i,t,r,u;if(e==1){jWin.Alert({html:"יש לבחור לפחות 2 מוצרים להשוואה"});return}n={"&nbsp;":[]};t=0;$("input[type=checkbox].checkboxCompareCovers:checked").each(function(){var e=this.id.substring(2),i=covers[e],r,u,f;n["&nbsp;"].push(renderImage(i.image,i.name));for(r in i.covers){if(name=dictionary.carWizard.covers[i.covers[r].Name],n[name]==undefined)for(n[name]=[],u=0;u<t;u++)n[name].push("-");n[name].push(i.covers[r].Value)}for(f in n)n[f][t]==undefined&&(n[f][t]="-");t++});i="<table border='0' cellspacing='0' cellpadding='0' class='compareCoversTable'>";t=0;for(r in n){for(i+=t==0?"<tr class='insCompany'>":"<tr>",i+="<th class='border_dotted' align='right'>"+r+"<\/th>",u=n[r].length-1;u>=0;u--)i+="<td class='border_dotted'>"+n[r][u]+"<\/td>";i+="<\/tr>";t++}i+="<\/table>";$("#coversComparisonContainer").html(i);CompareEvent("CarInsurance")}function CompareEvent(){var u="",t=$(".comparePanelBox .compareBox"),f=t.has("button").length,r=t.has("button"),n;for(i=0;i<f;i++)u+="Company="+$("[name=name"+r[i].children[0].id+"]").text()+", Product=, ProductName="+$("[name=name"+r[i].children[0].id+"]").text()+" | ";n=getParameterByName("utm_source");n!=""?gtag("event","Compare Policies",{event_category:"CarInsurance Paid",event_label:n}):gtag("event","Compare Policies",{event_category:"CarInsurance",event_label:document.referrer})}function backLink(){RemoveAllComparedProducts();uncheckLead();$.fn.wizard.movePrev()}function renderGoButton(n){var t=$(".checkboxCompareCovers:checked").length;t>systemParameters.VehicleMaxNumberCompareCovers&&(n.checked=!1,jWin.Alert({html:dictionary.apartmentWizard.youCanCompareOnly+" "+systemParameters.VehicleMaxNumberCompareCovers+" "+dictionary.apartmentWizard.companies}));$(".checkboxCompareCovers").siblings("input[type=button]").hide();t>1&&$(".checkboxCompareCovers:checked").siblings("input[type=button]").show()}function renderGoButton(n){var t=$(".checkboxCompareCovers:checked").length;t>systemParameters.VehicleMaxNumberCompareCovers&&(n.checked=!1,jWin.Modal({html:'<div class="comapareCoversError">'+dictionary.apartmentWizard.youCanCompareOnly+" "+systemParameters.VehicleMaxNumberCompareCovers+" "+dictionary.apartmentWizard.companies+'<br/><a class="controlButtonOrange" href="javascript: void(0)" onClick="jWin.Modal.close()">OK<\/a><\/div>'}));$(".checkboxCompareCovers").siblings("input[type=button]").hide();t>1&&$(".checkboxCompareCovers:checked").siblings("input[type=button]").show()}function renderCovers(n){var t=$(n).parents("table:first").find("div.coversContainer");t.css("display")=="none"?(t.show(),$(n).html(dictionary.apartmentWizard.closeDetails)):(t.hide(),$(n).html(dictionary.apartmentWizard.viewCovers))}function closeCovers(n){renderCovers($(n).parents("table:first").find("a.coversOpener"))}function renderPriceProposalCost(n){var i,r,t;covers[n.IC_Id]={name:n.CompanyName,image:n.CompanyIcon_Path,covers:n.Covers};i="<div class='carInsuranceTopOuter' cost='"+n.TotalCost+"'><div id='acoountTop' class='myCorner carInsuranceTopInner' data-corner='top 10px'>&nbsp;<span class='carInsuranceTopTitle'><span id='name"+n.IC_Id+"'>"+n.CompanyName+"<\/span> - "+dictionary.carWizard.productsNames[n.ProductTypeName]+"<\/span><div class='carInsuranceTopCompare'><span>להשוואת ביטוחי רכב<\/span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id='cb"+n.IC_Id+"' type='checkbox' class='checkboxCompareCovers' onclick='clickToComparisonPanel(this.id);'/><input id='hfMezahe' type='hidden'/><\/div><\/div><\/div><div class='carInsuranceButtom'><div class='carInsuranceButtomLogo'><div class='carInsuranceButtomLogoInner'><a rel='nofollow' target='_blank'><img id='img"+n.IC_Id+"' alt='ביטוח רכב "+n.CompanyName+"' src='"+n.CompanyIcon_Path+"' width='110' height='70' /><\/a><\/div><\/div><div style='width: 150px;' class='carInsuranceButtomBox'>"+n.Covers[2].Value+"<\/div><div style='width: 120px;' class='carInsuranceButtomBox'>"+n.Covers[1].Value+"<\/div><div style='width: 105px;' class='carInsuranceButtomBox'>"+n.Covers[0].Value+"<\/div><div class='carInsuranceButtomPrice'>"+(n.IC_Id!=0)?"<span style='display: block;' class='insuranceCost'>"+roundNumber(n.TotalCost)+" ₪<\/span>":"<span style='display: block;' class='insuranceCost'>הצעת מחיר בהתאם להיקף הנסיעה השנתי שלך<\/span><div class='outerIndexButton' style='margin-top: 6px !important; display:none;'><a id='lbApply' class='button button2 indexButton2 indexButton1 ppcButton' rel='nofollow' href='' target='_blank'>קבל הצעה<\/a><\/div><\/div><\/div> <div class='healthInsButtomOuter'><div id='acoountBottomTop' class='myCornerBottom healthInsBottomInner' data-corner='bottom 10px'><div class='polisaDetails'><a href='CompareHealthInsurance.aspx' rel='nofollow'>פרטי פוליסת ביטוח הרכב <img src='/Images/pdficon_small.png' /><\/a><\/div><a onclick='javascript:expandCovers("+n.IC_Id+")' class='carCoverBtn'>כיסוי ביטוחי >><\/a><table id='coversTable"+n.IC_Id+"' class='coversTable' style='display: none;'><tr><td colspan='2' class='coversTableHeader'>כיסוי ביטוחי בביטוח הרכב<\/td><\/tr><\/table><\/div><\/div>";$("#proposals").append(i);r=$("#coversTable"+n.IC_Id);for(t in n.Covers)$(r).append("<tr><td>"+dictionary.carWizard.covers[n.Covers[t].Name]+"<\/td><td>"+n.Covers[t].Value+"<\/td><\/tr>")}function parseGetParams(){for(var i={},r=window.location.search.substring(1).split("&"),t,n=0;n<r.length;n++)t=r[n].split("="),i[t[0]]=typeof t[1]=="undefined"?"":t[1];return i}function parseDate(n){return typeof n=="object"?(dateAr=n,dateObj={day:dateAr.getDate(),month:dateAr.getMonth(),year:dateAr.getFullYear()}):n!=""?(dateAr=n.split("/"),dateObj={day:Number(dateAr[0]),month:Number(dateAr[1])-1,year:Number(dateAr[2])}):(dateAr=new Date,dateObj={day:dateAr.getDate(),month:dateAr.getMonth(),year:dateAr.getFullYear()}),dateObj}function roundNumber(n){var i,r,t;if(typeof n=="number")t=n%1?n.toFixed(2):n;else{if(i=parseFloat(n),isNaN(parseFloat(n)))return n;r=parseInt(i);t=i!=r?i.toFixed(2):r}return t.toString().replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,"$1,")}function getCosts(){var n=[];return $(".result").each(function(){var t=$(this).attr("yatzran"),i=$(this).attr("cost");obj={MezaheYatzran:t,Cost:i};n.push(obj)}),n}function initDetails(){var t=parseGetParams(),n=t.type,i=t.date;typeof n!="undefined"&&$("input[name=rbInsType][data-name='"+n+"']").attr("checked","checked");typeof i!="undefined"&&$("#wizardDetails").find("input[name='txtStartDate']").val(i);index=typeof priceProposal.InsuranceProduct_TypeId!="undefined"?$("[name='rbInsType']").index($("[name='rbInsType'][value="+priceProposal.InsuranceProduct_TypeId+"]")):typeof n!="undefined"?$("input[name=rbInsType]").index($("input[name=rbInsType]:checked")):Number($("#hidInsTypeDefault").val())>0?Number($("#hidInsTypeDefault").val())-1:0;$("#carDetailsTabs").customTabs(index,function(){switch(Number($("input[name=rbInsType]:checked").val())){}})}function initWizard(){$("#ContentTopMenu").css("visibility","hidden");var n=parseGetParams();typeof n.pp_id!="undefined"&&(ppId=Number(n.pp_id),startWizardStep=location.href.indexOf("cars")>-1?3:2);wizardParams.active_index=startWizardStep;$("#wizard").wizard(wizardParams)}function renderImage(n,t){return"<img src='"+n+"'  alt='"+t+"' border='0'/>"}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function showCurrentCoversList(){var n=transitValues.CoversList,t;coversListTemplate=$("#coversListTemplate").clone();transitValues.ProductTypePolicyFile_Path?coversListTemplate.find(".linkPolicyFile_Path").attr("href",transitValues.ProductTypePolicyFile_Path).show():coversListTemplate.find(".linkPolicyFile_Path").hide();transitValues.ProductTypeRidersPolicyFile_Path?coversListTemplate.find(".linkRidersPolicyFile_Path").attr("href",transitValues.ProductTypeRidersPolicyFile_Path).show():coversListTemplate.find(".linkRidersPolicyFile_Path").hide();for(t in n)str="<tr>",str+="<th class='border_dotted' align='right'>"+n[t].Name+"<\/th>",str+="<td class='border_dotted'>"+n[t].Value+"<\/td>",str+="<\/tr>",coversListTemplate.find("tbody").append(str);jWin.Modal({html:coversListTemplate.html()})}function wizardOnLoad(){initWizard()}var dictionary={months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],Completed:"הסתיים",Error:"טעות",None:"אין",days:"ימים",years:"שנים",daysFormated:"{period} ימים",warning:"אזהרה",browserNotSupported:"גרסאת דפדפן לא נתמכת",generalValidationError:"יש למלות/לתקן את השדות המסומנים",youCantPayOrder:"You can`t pay the choosen Order",bitwin:"BITWIN",ok:"OK",Sent:"פנייתך נקלטה בהצלחה",select:"לבחור",calendar:{selectDay:"--יום--",selectMonth:"--חודש--",selectYear:"--שנה--"},carWizard:{detailsTitle:"פרטי ביטוח",moreDetailsTitle:"פרטי נהג",proposalsTitle:"הצעות",proposalsDetailsTitle:"פרטים של הצעות",purchaseTitle:"רכישה",purchaseIsUnavailable:"זמנית לא ניתן לסיים תהליך רכישה באתר.",insuranceForFormatted:['"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>כולל כיסוים הבאים : רכב חילופי,גרירה ושמשות','"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>','"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>כולל כיסוים הבאים : רכב חילופי,גרירה ושמשות','"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>כולל כיסוים הבאים : גרירה ושמשות','"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>כולל כיסוים הבאים : רכב חילופי,גרירה ושמשות','"{VehiclesInsuranceTypeName}" עבור "{model}" שנת {year} <br/>כולל כיסוים הבאים : גרירה ושמשות'],periodFormatted:"מ {startDate} עד {endDate}",covers:{Protectionrequirements:"דרישת מיגון",SelfParticipationCost:"השתתפות עצמית",SelfParticipationCostThirdParty:"גבול אחריות לצד ג",Rider_VehicleTowingAndRescue:"חבילת גרירה וחילוץ",Rider_VehicleReplacement:"שירות רכב חליפי",SelfParticipationVehicleCostReduce:"השתתפות עצמית בירידת ערך",SelfParticipationOnLegalServices:"השתתפות עצמית בהגנה משפטית",LegalServicesCosts:"הגנה משפטית",Rider_RadioReplacement:"כיסוי לרדיו חילופי",Rider_Windshields:"כיסוי לשבר שמשות",CoverOldForNew:"כיסוי חדש תמורת ישן",TotalLossPercentageLimit:"אחוז קביעת נזק טוטלי (טוטלוס)",ThirdPartyClaimsLegalCareService:"שרות טיפול משפטי בתביעות צד ג'",ServiceIndexMekif:"מדד השירות בביטוח מקיף",ServiceIndexHova:"מדד השירות בביטוח חובה"},productsNames:{"Compulsory+Comprehensive Zahir carInsuranceRow1":"אוטו TOP","Compulsory+Comprehensive carInsuranceRow7":"הכשרה מקיף וחובה","Compulsory+Comprehensive carInsuranceRow8":"כלל ראשון לנסיעה בטוחה","COMPULSORY_COMPREHENSIVE_ZAHIR carInsuranceRow9":"אוטוdeal ","PHOENIX_COMPULSORY_COMPREHENSIVE_ZAHIR carInsuranceRow4":"הפניקס זהיר","Compulsory+Comprehensive carInsuranceRow2":"שירביט מקיף","Compulsory+Comprehensive ZAHIR carInsuranceRow3":"שומרה C (כולל חובה)","PHOENIX_COMPULSORY_COMPREHENSIVE_ZAHIR carInsuranceRow0":"הפניקס זהיר סוכנות הדרים"},Mezahe:{"הכשרה     ":"46","שירביט    ":"84","מנורה     ":"18","איילון    ":"16","הפניקס":"12","מגדל     ":"9","הראל     ":"10","כלל       ":"14","שלמה     ":"85","שומרה     ":"86"}}},Policy={},priceProposal={},priceProposalCost={},aditionalQuestions={},paymentPageParameters={},priceOrder={},transitValues={},ppId=-1,startWizardStep=1,PO_ID,wizardParams={items:[{control:"CarDetails",title:dictionary.carWizard.detailsTitle,pre_callback:function(){return initDetails(),startWizardStep==2&&(fillPriceProposalDetails(),startWizardStep=1),!0},back_callback:function(){return GAEvent("Back to Car Details"),$(".wizard_cont").unlockForm(),!0},isCache:!0,index:0},{control:"CarProposals",title:dictionary.carWizard.proposalsTitle,pre_callback:function(){return $("#proposalsTable").unlockForm(),allow_show_savePP=!0,!0},post_callback:function(){return allow_show_savePP=!1,!0},back_callback:function(){return allow_show_savePP=!1,$(".wizard_cont").unlockForm(),$("#proposals").empty(),!0},index:1},{control:"CarSecondDriver",title:dictionary.carWizard.proposalsDetailsTitle,pre_callback:function(){cleanContactForm()},back_callback:function(){return allow_show_savePP=!0,!0},index:2},{control:"CarPurchase",title:dictionary.carWizard.purchaseTitle,pre_callback:function(){cleanContactForm()},back_callback:function(){return $(".wizard_cont").unlockForm(),!0},index:3}],image_class:"car",renderNav:!1},systemParameters={VehicleCostNumberPerPage:3,VehicleMaxCostNumberPerPage:9,VehicleCostRequestNumber:2,VehicleRequestFrequency:4,VehicleMaxNumberCompareCovers:3,DisablePayments:0,VehicleAllowPO:"0",QAVehicleIgnoreList:""},profile,user,covers;$(function(){$(document).tooltip()}),function(n){n.fn.lockForm=function(){n(this).find("input, select, textarea, button").filter(":not([disabled])").attr("locked","locked").attr("disabled","disabled").end().find("a").each(function(){n(this).data("href",n(this).attr("href")).attr("href","javascript: void(0)").attr("locked","locked")})};n.fn.unlockForm=function(){n(this).find("[locked]").removeAttr("disabled").removeAttr("locked");n("a",this).each(function(){n(this).data("href")&&n(this).attr("href",n(this).data("href"))})}}(jQuery),function(n){n.fn.customTabs=function(t,i){var u=this,r=n(this).find("div.tabContent"),f=t?":eq("+t+")":":first";r.hide().filter(f).show();n(u).find("ul.tabNavigation li:has(label[for])").click(function(){r.hide().find("input, select, textarea").attr("invisible","invisible");r.filter(n(this).find("label").attr("for")).show().find("input, select, textarea").filter(":not([staticInvisible])").removeAttr("invisible");n(this).find("input").attr("checked","checked");n(u).find("ul.tabNavigation li").removeClass("selected").filter(this).filter(":not(.inactive)").addClass("selected");typeof i=="function"&&i(r)}).filter(f).click();typeof i=="function"&&i(r)}}(jQuery),function(n){n.fn.calendar=function(t,i){function s(t){var e=r.find("#cDay"),o=t?t:Number(e.val()),s=Number(r.find("#cMonth").val())-1,h=Number(r.find("#cYear").val()),c,f,u;for(n("option:not(:first)",e).remove(),c=[31,0,31,30,31,30,31,31,30,31,30,31],f=c[s],f=f>0?f:h%4==0?29:28,u=1;u<=f;u++)e.append("<option value='"+u+"'"+(o&&o==u?" selected":"")+">"+u+"<\/option>");n(i).val(r.find("#cDay").val()+"/"+(s+1)+"/"+h)}var r,e,u,o,f;for(this.months=dictionary.months,r=n(this),dateY=new Date,e=n(this).find("#cYear"),u=dateY.getFullYear();u>dateY.getFullYear()-100;u--)e.append("<option value='"+u+"'>"+u+"<\/option>");for(t&&e.find("option[value="+t.getFullYear()+"]").attr("selected","selected"),o=n(this).find("#cMonth"),f=0;f<this.months.length;f++)o.append("<option value='"+(f+1)+"'>"+this.months[f]+"<\/option>");return t&&o.find("option[value="+(t.getMonth()+1)+"]").attr("selected","selected"),r.find("#cYear, #cMonth, #cDay").bind("change",function(){s(!1)}),s(t?t.getDate():null),this};n.fn.calendarReload=function(t,i){return n(this).children().remove(),n(this).calendar(t,i),this};n.fn.calendarLock=function(){return n("select",this).attr("disabled","disabled"),this};n.fn.calendarUnlock=function(){return n("select",this).removeAttr("disabled"),this}}(jQuery);$(window).bind("hashchange",function(){$.fn.wizard.onHashChange()}),function(n){n.fn.wizard=function(t){this.options=n.extend({},n.fn.wizard.defaults,t);this.cur_active_index=this.options.active_index;this.cur_active_sub_index=null;this.itemsNumber=this.options.items.length;this.manualChangeHash=!0;this.nav=n("#Steps");$that=this};n.fn.wizard.onHashChange=function(){var i,t,r;if($that.manualChangeHash===!1){i=location.hash.substr(1);for(t in $that.options.items)if($that.options.items[t].control===i&&t<$that.cur_active_index-1){if(r=t,typeof $that.options.items[$that.cur_active_index-1].back_callback=="function"&&!$that.options.items[$that.cur_active_index-1].back_callback())break;curCont=$that.cur_active_index;$that.cur_active_index=Number(r)+1;n.fn.wizard.renderNavigation($that.cur_active_index);n.fn.wizard.reloadContainer($that.options.items[$that.cur_active_index-1],curCont-1);break}}$that.manualChangeHash=!1};n.fn.wizard.renderNavigation=function(t){$that.options.items[t-1].index=t-1;$that.curItem=$that.options.items[t-1];n("#Steps .medium-icon").addClass($that.options.image_class);$that.nav.find("a").removeClass("active");var r=$that.nav.find("a:eq("+(t-1)+")").addClass("active"),i=$that.nav.find("a");location.hash=$that.options.items[$that.cur_active_index-1].control;i.each(function(){var r=i.index(this);n(this).data("tag",$that.options.items[r].control);r<t-1?n(this).css("cursor","pointer").unbind("click").click(function(){location.hash=n(this).data("tag")}):n(this).css("cursor","").unbind("click")});RemoveAllComparedProducts()};n.fn.wizard.renderContainer=function(){n($that).append("<div class='wizard_cont'/>");$that.cont=n($that).find("div.wizard_cont");for(var t=0;t<$that.itemsNumber;t++)$that.cont.append("<div id='cont"+t+"' style='margin 5px; height: 100%; display: none'/>");$that.cont.find(".move_next").live("click",function(){n.fn.wizard.moveNext()});$that.cont.find(".move_prev").live("click",function(){n.fn.wizard.movePrev()});$that.cont.prepend("<input type='button' class='move_next'  value='Next'>");$that.cont.prepend("<input type='button' class='move_prev'  value='Prev'>");n.fn.wizard.reloadContainer($that.curItem,-1)};n.fn.wizard.reloadContainer=function(t,i){function r(){i>=0?$that.cont.find("#cont"+i).fadeOut("normal",f()):f()}function f(){u.fadeIn("normal",function(){typeof $that.options.items[$that.cur_active_index-1].pre_callback=="function"&&$that.options.items[$that.cur_active_index-1].pre_callback()})}var u,e,o;$that.cont=n($that).find("div.wizard_cont");u=$that.cont.find("#cont"+t.index);e=typeof $that.options.items[t.index].isCache=="undefined"?!1:$that.options.items[t.index].isCache;o=t&&typeof t.control=="object"?t.control[$that.cur_active_sub_index]:t&&typeof t.control=="string"?t.control:!1;o&&(!$that.options.items[t.index].isLoad||$that.options.items[t.index].isLoad&&!e&&$that.cur_active_index-2>=i)?t.index==1?(r(),proposalsOnLoad(),$that.options.items[t.index].isLoad=!0):r():r()};n.fn.wizard.moveNext=function(t,i){if($that.manualChangeHash=!0,stepNext=!1,i!==null&&i!==!1&&i!==undefined&&($that.cur_active_sub_index=i),$that.cur_active_sub_index!==null?$that.cur_active_sub_index<$that.options.items[$that.cur_active_index-1].control.length-1?($that.cur_active_sub_index++,i!==null&&i!==!1&&i!==undefined&&(t===null||t===!1||t===undefined)&&(stepNext=!0)):($that.cur_active_sub_index=null,$that.cur_active_index<$that.itemsNumber&&(stepNext=!0)):$that.cur_active_index<$that.itemsNumber&&($that.cur_active_sub_index=typeof $that.options.items[$that.cur_active_index].control=="object"?0:null,stepNext=!0),stepNext){if(typeof $that.options.items[$that.cur_active_index-1].post_callback=="function"&&!$that.options.items[$that.cur_active_index-1].post_callback())return!1;$that.cur_active_index=t===null||t===!1||t===undefined?$that.cur_active_index+1:t}n.fn.wizard.reloadContainer($that.options.items[$that.cur_active_index-1],$that.cur_active_index-2)};n.fn.wizard.movePrev=function(t,i){if($that.manualChangeHash=!0,stepPrev=!1,i!==null&&i!==!1&&i!==undefined&&($that.cur_active_sub_index=i),$that.cur_active_sub_index!==null?$that.cur_active_sub_index>0?($that.cur_active_sub_index--,i!==null&&i!==!1&&i!==undefined&&(t===null||t===!1||t===undefined)&&(stepPrev=!0)):($that.cur_active_sub_index=null,$that.cur_active_index>1&&(stepPrev=!0)):$that.cur_active_index>1&&($that.cur_active_sub_index=typeof $that.options.items[$that.cur_active_index-2].control=="object"?$that.options.items[$that.cur_active_index-2].control.length-1:null,stepPrev=!0),stepPrev){if(typeof $that.options.items[$that.cur_active_index-1].back_callback=="function"&&!$that.options.items[$that.cur_active_index-1].back_callback())return!1;$that.cur_active_index=t===null||t===!1||t===undefined?$that.cur_active_index-1:t}n.fn.wizard.renderNavigation($that.cur_active_index);n.fn.wizard.reloadContainer($that.options.items[$that.cur_active_index-1],$that.cur_active_index)};n.fn.wizard.defaults={items:[{control:null,title:"Text 1"},{control:null,title:"Text 2"},{control:null,title:"Text 3"},{control:null,title:"Text 4"}],active_index:1,image_class:null,width:600,renderNav:!0}}(jQuery);$(function(){function i(){var n=new Date;return n.setMonth(n.getMonth()+1,1),n}function r(){$(".licLoader").hide();$(".carUsage").show();$(".degem").show();$(".step2").show();$("#compareCard").show()}function u(){$("#vehicleManufacture").html("");$("#vehicleManufactureYear").html("");$("#Kinuy_mishari").html("");$("#licensePlate").val("");$(".licBox").hide()}function f(){var n=new Date,t=new Date($("#cYear").val(),$("#cMonth").val()),i=n.getFullYear()-t.getFullYear(),r=n.getMonth()-t.getMonth();return(r<0||r===0&&n.getDate()<t.getDate())&&i--,i}function o(){var n=f(),t=$("#selDrivingYears").val(),i=n-t;return i>=17?!0:!1}function s(){return $("#divBirthDate").calendar(null,$("#txtBirthDate")),$("#ddlModel option:selected").text()+" | "+$("#selOnRoadYear option:selected").text()+" | "+$("input[name=rbInsType]:checked + label").text()+" | InsuranceType =  | BirthDay = "+$("#txtBirthDate").val()+" | "+$("input[name=rbGender]:checked + label").text()+" | "+$("#txtCityOfResidence").val()+" | Additional Car = "+$("#selAdditionalCar option:selected").text()+" | "}var e,n,t;GAEvent("Load");$("input[name=rbInsType]").change(function(){var n=$(":radio[name='rbInsType']").index($(":radio[name='rbInsType']:checked"));n==1?($("#spanCarInsType").text("ביטוח חובה וצד ג"),$(".loaderTitle").text("ביטוח רכב חובה וצד ג "),$(".insuranceType").text("צד ג'").append("<br />")):($("#spanCarInsType").text("ביטוח חובה ומקיף"),$(".loaderTitle").text("ביטוח חובה ומקיף "),$(".insuranceType").text("מקיף").append("<br />"))});$(window).scroll(function(){var n=$(window).scrollTop()-270,t=$(".comparePanel").offset().top;n>270?$(".comparePanel").is(".stick")||($(".comparePanel").addClass("stick"),$("#closeAll").addClass("adjustLeft")):($(".comparePanel").removeClass("stick"),$("#closeAll").removeClass("adjustLeft"))});e={VehicleCostNumberPerPage:3,VehicleMaxCostNumberPerPage:7,VehicleCostRequestNumber:1,VehicleRequestFrequency:4,VehicleMaxNumberCompareCovers:3,DisablePayments:0,VehicleAllowPO:"0",QAVehicleIgnoreList:""};$("body").keydown(function(n){var t,i;n.ctrlKey&&n.shiftKey&&n.keyCode===81&&($("#cont0").is(":visible")?($("#ddlUsedFor option:eq(1)").attr("selected","selected"),$("#ddlManufacturer option:eq(36)").attr("selected","selected"),$("#ddlModel, #ddlEngine").attr("disabled","disabled").find("option:not(:first)").remove(),$("#ddlYear").removeAttr("disabled").find("option:not(:first)").remove(),$("#ddlManufacturer").val()!=""?CarModels.GetYears($("#ddlManufacturer").val(),function(n){for(var t in n)$("#ddlYear").append("<option value='"+n[t]+"'>"+n[t]+"<\/option>");$("#ddlYear option:eq(1)").attr("selected","selected");$("#ddlModel").removeAttr("disabled").find("option:not(:first)").remove();$("#ddlYear").val()!=""?CarModels.GetModels($("#ddlManufacturer").val(),Number($("#ddlYear").val()),function(n){var t;for(t in n)$("#ddlModel").append("<option HasAutomaticGearbox='"+(n[t].HasAutomaticGearbox?1:0)+"' LeviItzhakCode='"+n[t].LeviItzhakCode+"' Engine='"+n[t].VehicleEngine+"' value='"+n[t].LeviItzhakCode+"'>"+n[t].ModelName+"<\/option>");var i=$("#ddlModel"),u=i.val(),r=i.find("option");r.sort(function(n,t){return $(n).text()>$(t).text()?1:-1});i.html("").append(r);i.val(u)}):$("#ddlModel").attr("disabled","disabled")}):$("#ddlYear").attr("disabled","disabled"),t=new Date,$("#txtStartDate").val(t.getDate()+"/"+(t.getMonth()+1)+"/"+t.getFullYear()),dateObj=parseDate($("#txtStartDate").val()),i=new Date(dateObj.year+1,dateObj.month,0).getDate(),$("#txtEndDate").val(i+"/"+dateObj.month+"/"+(dateObj.year+1)),$("#detAgreeTerms").attr("checked","checked")):$("#cont1").is(":visible")&&($("#ddlIsYoungDriver option:eq(1)").attr("selected","selected"),$("#blockDrivingYears").show(),$("#selDrivingYears").val(11).removeAttr("invisible"),$("#selHouseType option:eq(1)").attr("selected","selected"),$("#ddlInsType1 option:eq(1)").attr("selected","selected"),$("#ddlInsType2 option:eq(1)").attr("selected","selected"),$("#ddlInsType3 option:eq(1)").attr("selected","selected")))});$("#CarDetails").lockForm();$("#ddlManufacturer").change(function(){$("#ddlModel, #ddlEngine").attr("disabled","disabled").find("option:not(:first)").remove();$("#ddlYear").removeAttr("disabled").find("option:not(:first)").remove();$(this).val()!=""?CarModels.GetYears($(this).val(),function(n){for(var t in n)$("#ddlYear").append("<option value='"+n[t]+"'>"+n[t]+"<\/option>")}):$("#ddlYear").attr("disabled","disabled")});$("#ddlYear").change(function(){$("#txtEngine").val("");$("#ddlModel").removeAttr("disabled").find("option:not(:first)").remove();$(this).val()!=""?($("#hfYear").val($("option:selected",this).val()),CarModels.GetModels($("#ddlManufacturer").val(),Number($(this).val()),function(n){var t;for(t in n)$("#ddlModel").append("<option HasAutomaticGearbox='"+(n[t].HasAutomaticGearbox?1:0)+"' LeviItzhakCode='"+n[t].LeviItzhakCode+"' Engine='"+n[t].VehicleEngine+"' value='"+n[t].LeviItzhakCode+"'>"+n[t].ModelName+"<\/option>");var i=$("#ddlModel"),u=i.val(),r=i.find("option");r.sort(function(n,t){return $(n).text()>$(t).text()?1:-1});i.html("").append(r);i.val(u)})):$("#ddlModel").removeAttr("disabled").find("option:not(:first)").remove()});$("#ddlModel").change(function(){$("#txtEngine").val($("option:selected",this).attr("Engine"));$("#code").val($("option:selected",this).attr("LeviItzhakCode"))});jQuery(function(n){n.datepicker.regional.he={closeText:"סגור",prevText:"&#x3c;הקודם",nextText:"הבא&#x3e;",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""};n.datepicker.setDefaults(n.datepicker.regional.he)});$.datepicker.setDefaults($.datepicker.regional.he);n=new Date;$(function(){$("#txtStartDate").datepicker({showOn:"both",buttonImage:"../JS/jquery-ui-1.10.4.custom/development-bundle/demos/images/calendar.gif",buttonImageOnly:!0,buttonText:"בחר תאריך",minDate:n,maxDate:"+2m",dateFormat:"dd/mm/yy",isRTL:!0},$.datepicker.regional.he).change(function(){if(this.value=="")$("#txtEndDate").val("");else{dateObj=parseDate(this.value);var n=new Date(dateObj.year+1,dateObj.month,0).getDate();dateObj.month=="0"&&(dateObj.month="12",dateObj.year--);$("#txtEndDate").val(n+"/"+dateObj.month+"/"+(dateObj.year+1));$("#endDate").show()}})});t=parseDate(i());$("label[for='rbPickDateNextMonth']").text("מ 1 ב"+["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"][t.month]);$("input[name='rbPickDate']").change(function(){var t=new Date,n;$(this).val()==1?($("#txtStartDate").datepicker("setDate",i()),dateObj=parseDate($("#txtStartDate").val()),n=new Date(dateObj.year+1,dateObj.month,0).getDate(),$("#txtEndDate").val(n+"/"+dateObj.month+"/"+(dateObj.year+1)),$("#endDate").show()):($("#txtStartDate").datepicker("setDate",t),dateObj=parseDate($("#txtStartDate").val()),n=new Date(dateObj.year+1,dateObj.month,0).getDate(),$("#txtEndDate").val(n+"/"+dateObj.month+"/"+(dateObj.year+1)),$("#endDate").show())});$("#noLic").click(function(){GAEvent("Car Model");$(".licBox").hide();$("#licensePlate").val("");$("#vehicleManufacture").val("");$("#vehicleManufactureYear").val("");$("#hfYear").val("");$(".carUsage, .degem").show("slow");$(".step2").show();$("#compareCard").show()});$("#btnLicensePlate").button().click(function(){if($("#licensePlate").valid()){GAEvent("Get License Number");var n=$("#licensePlate").val();return $(".licLoader").show(),$.ajax({url:"/api/products/SendLicenseNumber",dataType:"json",type:"POST",data:JSON.stringify(n),contentType:"application/json; charset=utf-8",timeout:15e3}).done(function(n){if(n){$(".licLoader").hide();$("#licensePlateDetails").show();$("#vehicleManufacture").html(n.tozeret_nm);$("#vehicleManufactureYear").html(n.shnat_yitzur);$("#hfYear").val(n.shnat_yitzur);$("#Kinuy_mishari").html(n.kinuy_mishari);let t=n.sug_degem;t=="P"?($("#sugDegem").html("פרטי"),$("input[name=rbCarType][value=1]").prop("checked",!0)):($("#sugDegem").html("מסחרי"),$("input[name=rbCarType][value=2]").prop("checked",!0));$("#baalut").html(n.baalut);n.baalut=="פרטי"?$("input[name=rbOwner][value=1]").prop("checked",!0):$("input[name=rbOwner][value=2]").prop("checked",!0);$(".carUsage").show();$(".step2").show();$("#compareCard").show()}else GAEvent("Get License Number Null"),r(),u(),$("#compareCard").show()}).fail(function(n,t){console.log(" license plate error: "+t);t=="timeout"?GAEvent("Get License Number Timeout"):GAEvent("Get License Number Failed");r();u();$("#compareCard").show()}),!1}return!1});$("#btnLicensePlate").button("enable");$("input[name='rbAllowedToDrive']").change(function(){$(this).val()=="1"||$(this).val()=="4"?($("#driverAgeLable").text("תאריך לידה: "),$("#drivingExp").text("ותק נהיגה של הנהג:"),$("#drivingLicenseExp").text("ותק רשיון נהיגה של הנהג:"),$(this).val()=="4"?$("#trOnlyDriver").show():$("#trOnlyDriver").hide()):($("#driverAgeLable").text("תאריך לידה של הנהג הצעיר ביותר: "),$("#drivingExp").text("ותק נהיגה של הנהג החדש ביותר:"),$("#drivingLicenseExp").text("ותק רשיון נהיגה של הנהג החדש ביותר:"),$("#trOnlyDriver").hide())});$("#cYear").change(function(){var t=f(),n;if(yearsOfExperience=t-17,$("#selDrivingYears").empty().append('<option value="">בחר<\/option><option value="0">מתחת לשנה<\/option><option value="1">שנה<\/option><option value="2">שנתיים<\/option>'),yearsOfExperience>2)for(n=3;n<=yearsOfExperience;n++)$("#selDrivingYears").append("<option value='"+n+"'>"+n+" שנים<\/option>")});$("#selDrivingYears").change(function(){});$("[name='rbDidYouHaveInsuranceClaims']").click(function(){$(this).attr("id")=="rbDidYouHaveInsuranceClaimsYes"?($(this).parent().addClass("connector"),$("#tableInsClaims").show(),$("#ddlProperty1, #ddlProperty2, #ddlProperty3, #ddlBody1, #ddlBody2, #ddlBody3").removeAttr("disabled")):($("#tableInsClaims").hide(),$("#ddlProperty1, #ddlProperty2, #ddlProperty3, #ddlBody1, #ddlBody2, #ddlBody3").attr("disabled","disabled"),$(this).parent().siblings().removeClass("connector"))});$("input[name=rbDidYouHaveInsurance]").click(function(){this.id=="rbDidYouHaveInsuranceNo"?($(".insHidden").show(),$("#ddlInsType1, #ddlInsType2, #ddlInsType3").each(function(){$("option:first",this).attr("selected","selected")}),$(this).parent().addClass("connector")):($("#ddlInsType1, #ddlInsType2, #ddlInsType3").each(function(){$("option:eq(1)",this).attr("selected","selected")}),$(".insHidden").hide(),$(this).parent().siblings().removeClass("connector"))});$("#ddlInsType1, #ddlInsType2, #ddlInsType3").each(function(){$("option:eq(1)",this).attr("selected","selected")});$(".insHidden").hide();$("#ddlIsYoungDriver").change(function(){setDrivingYears()});$("#ddlIsYoungDriverSecond").change(function(){setDrivingYearsSecond()});setDrivingYears();setDrivingYearsSecond();jQuery.validator.addMethod("greaterThan",function(n,t,i){return/Invalid|NaN/.test(new Date(n))?isNaN(n)&&isNaN($(i).val())||Number(n)>Number($(i).val()):new Date(n)>new Date($(i).val()-1)},"תאריך חייב להתחיל לפחות מהיום {0}.");$("#aspnetForm").validate({rules:{rbAllowedToDrive:"required",ddlManufacturer:"required",ddlModel:"required",ddlYear:"required",txtStartDate:"required",txtEmail:{required:!0,email:!0},day:"required",month:"required",year:"required",ddlIsYoungDriver:"required",selDrivingYears:"required",txtCityOfResidence:"required",selHouseType:"required",ddlInsType1:"required",ddlInsType2:"required",ddlInsType3:"required",lastYearInsurance:"required",tnaimCB:"required",txtShemPrati:"required",txtEmailLead:{required:!0,email:!0},txtTelephone:{required:!0,digits:!0,minlength:7},selectKidomet:"required",cbTnaim:"required"},messages:{rbAllowedToDrive:"יש לבחור מי ינהג ברכב",ddlManufacturer:"יש לבחור יצרן",ddlModel:"יש לבחור מודל",ddlYear:"יש לבחור שנה",selOnRoadYear:"יש לבחור שנה",selOnRoadMonth:"יש לבחור חודש",txtStartDate:"יש לבחור תאריך",txtEmail:"יש להזין כתובת מייל תקינה",day:"יש לבחור יום",month:"יש לבחור חודש",year:"יש לבחור שנה",ddlIsYoungDriver:"יש לבחור ותק נהיגה",selDrivingYears:"יש להזין שנות ותק משנת הוצאת הרשיון",txtCityOfResidence:"יש להזין עיר",selHouseType:"יש לבחור סוג בניין",ddlInsType1:"יש לבחור סוג ביטוח שנה ראשונה",ddlInsType2:"יש לבחור סוג ביטוח שנה שנייה",ddlInsType3:"יש לבחור סוג ביטוח שנה שלישית",lastYearInsurance:"בחר באיזה חברת ביטוח אתה מבוטח היום",tnaimCB:"יש לאשר את תנאי השימוש",txtShemPrati:"יש להזין שם פרטי",txtEmailLead:"יש להזין כתובת מייל",txtTelephone:"יש להזין מספר טלפון",selectKidomet:"יש לבחור קידומת",cbTnaim:"יש להסכים לתנאי השימוש"},ignore:":hidden",onsubmit:!1});$.validator.addMethod("DrivingExperienceValidation",function(n){return o(n)},"הזן שנות נסיון נהיגה החל משנת הוצאת הרשיון");$("#selAdditionalCar").change(function(){$(this).val()==1?$("#mainCarTD").show():$("#mainCarTD").hide()});Policy={};$("#compare").click(function(){if($("#aspnetForm").valid()){var n=s(),t=getParameterByName("utm_source");t!=""?gtag("event","Compare",{event_category:"CarInsurance Paid",event_label:n}):gtag("event","Compare",{event_category:"CarInsurance",event_label:n});$.fancybox({parent:"form:first",closeBtn:!1,helpers:{overlay:{closeClick:!1}},href:"#wizardBetween"});$("#cont0").lockForm();collectPriceProposalMoreDetails();getLead();ppId=-1;$.fn.wizard.moveNext()}else $("html, body").animate({scrollTop:400},"fast");return!1});initWizard();$(window).bind("hashchange",function(){$.fn.wizard.onHashChange()});index=typeof priceProposal.Fld_VehicleAllowedToDriveTypeId!="undefined"?priceProposal.Fld_VehicleAllowedToDriveTypeId-1:0;$("#carMoreDetailsTabs").customTabs(index);$("#CarDetails").unlockForm()});$(CarModels.GetFilteredCities($("#txtCityOfResidence").val()!=null?$("#txtCityOfResidence").val():"",function(n){$("#txtCityOfResidence").autocomplete({minLength:2,source:n,focus:function(n,t){return $("#txtCityOfResidence").val(t.item.label),!1},select:function(n,t){return $("#txtCityOfResidence").val(t.item.label),$("#txtPostalCode").val(t.item.value),!1}}).data("ui-autocomplete")._renderItem=function(n,t){return $("<li>").append("<a>"+t.label+"<\/a>").appendTo(n)}}));profile={FirstName:$("#txtFirstName").val(),LastName:$("#txtLastName").val(),FirstNameEng:$("#txtFirstNameEng").val(),LastNameEng:$("#txtLastNameEng").val(),BirthDate:$("[id$=_year]").val()+"/"+$("[id$=_month]").val()+"/"+$("[id$=_day]").val(),PassportID:$("#txtID").val(),Phone:$("#txtPhone").val(),Email:$("#txtEmail").val(),Street:$("#txtStreet").val(),City:$("#txtCity").val(),Sex:$("[id$=_selGender]").val(),IsTempUser:0};user={PassportID:"",LastName:"",FirstName:"",BirthDate:"",Email:"",Phone:"",Aprt:"",Buil:"",Street:"",City:"",PostalCode:"",FirstNameEng:"",LastNameEng:"",IsTempUser:"",isRegister:!0,Sex:"",isAgent:""};var lastCostId=0,costCounter=0,ppCostArray=[],allow_show_savePP=!1,progressBar,insCompaniesIgnoreList=[];covers={};$(document).ready(function(){$("body").append("<div style='display: none; padding: 20px' title='' id='jWinObject'><\/div>");jWin={object:$("#jWinObject")};jWin.Alert=function(n){var t=typeof n.object!="undefined"?$(n.object):typeof n.id!="undefined"?$("#"+n.id):jWin.object;t.attr("title",typeof n.title!="undefined"?n.title:t.attr("title")!=""?t.attr("title"):jWin.title);typeof n.html!="undefined"&&t.html(n.html);t.dialog({draggable:!1,resizable:!1,height:"auto",modal:!0,zIndex:9999,buttons:{OK:function(){$(this).dialog("destroy");$(this).dialog("close")}}})};jWin.Confirm=function(n,t){var i;return typeof n!="object"?(i=jWin.object,i.html(n),i.attr("title","Confirm")):(i=typeof n.object!="undefined"?$(n.object):typeof n.id!="undefined"?$("#"+n.id):jWin.object,i.attr("title",typeof n.title!="undefined"?n.title:i.attr("title")!=""?i.attr("title"):jWin.title),typeof n.html!="undefined"&&i.html(n.html)),i.dialog({draggable:!1,resizable:!1,height:"auto",modal:!0,zIndex:9999,position:"center",buttons:{OK:function(){$(this).dialog("destroy");$(this).dialog("close");t(i)},Cancel:function(){$(this).dialog("destroy");$(this).dialog("close")}}}),!1};jWin.Modal=function(n,t){options=n;typeof n.object!="undefined"?(options.content=$(n.object).html(),$(n.object).attr("title")!=""&&(options.title=n.object.attr("title"))):typeof n.id!="undefined"&&(options.content=$("#"+n.id).html(),$("#"+n.id).attr("title")!=""&&(options.title=$("#"+n.id).attr("title")));typeof n.title!="undefined"&&(options.title=n.title);typeof n.html!="undefined"&&(options.content=n.html);typeof n.onCleanup!="undefined"&&(options.onCleanup=n.onCleanup);typeof n.onClosed!="undefined"&&(options.onClosed=n.onClosed);options.hideOnOverlayClick=!0;options.titlePosition="outside";typeof t=="function"&&(options.onComplete=function(){t()});$.fancybox(options)};jWin.Modal.getContainer=function(){return $("#fancybox-content")};jWin.Modal.close=function(){sendOffersLead([]);$.fancybox.close();$("html, body").animate({scrollTop:270},"slow")};jWin.Modal.saveState=function(){$("#fancyboxStorage").remove();$("body").append($("<div>",{id:"fancyboxStorage",css:{display:"none"}}).append(jWin.Modal.getContainer().children().clone(!0)))};jWin.Modal.restore=function(n){$.fancybox.close();setTimeout(function(){jWin.Modal({html:$("#fancyboxStorage").children().html()},function(){jWin.Modal.getContainer().empty().append($("#fancyboxStorage").children().clone(!0));typeof n=="function"&&n(jWin.Modal.getContainer())})},1e3)}})