PageSourceSearch

https://philkotse.com/js/scriptsGetPromoPopupWeb?v=EX4HKkVe-6XeDEn7TLCVsHm_wpy2fUwupN0SH1RRGVM1

js philkotse.com collected 2026-10-02 06:20:22 UTC 13,835 bytes, 1 lines download raw bytes

1function RemoveHashTag(){if(window.location.hash="",window.history.pushState){let n=document.location.href.replace("#","");window.history.replaceState(null,null,n)}}var GetPromo={boxForm:"#popupGetPromo",init:function(){try{$("#feedbackDealer #txtFbPreferredDate").length>0&&$("#feedbackDealer #txtFbPreferredDate").is(":visible")&&typeof $.fn.datepicker!="undefined"&&$("#feedbackDealer #txtFbPreferredDate").datepicker({dateFormat:"M dd, yy",changeMonth:!0,changeYear:!0,yearRange:"c-40:c+30"});typeof $.fn.trimSpace!="undefined"&&$("#feedbackDealer input.form-control,#feedbackDealer textarea").trimSpace()}catch(n){console.error("Exception : GetPromo.init() => "+n)}},showPopupFeedback:function(n,t,i,r,u){var e,f;t!=1||u||(e=$(n).attr("data-page"),!isNaN(e)&&e>0&&(u=e));f="";i?(f+="?modelId="+i,!r||(f+="&variant="+r),!u||(f+="&PageTypeId="+u)):!u||(f+="?PageTypeId="+u);let o=parseInt($(n).attr("data-promo-id"));!o||(f+=f?"&PromoId="+o:"?PromoId="+o);$("#popup").html("");PostForm.LoadPopupFromUrl("/Subscribe/GetPromo"+f,null,function(){var i;if(t==feedbackDealerTypeEnum.getQuote)$("#desFeedback").text("Fill in the form below to get your quote"),$("#feedbackDealer .list-form li.test-driver").addClass("hidden");else if(t==feedbackDealerTypeEnum.inquire)$("#desFeedback").html('Fill in the form below to request information about <span class="blue-clr">'+$("#titDetail").text()+"<\/a>"),$("#feedbackDealer .list-form li.test-driver").addClass("hidden");else if(t==feedbackDealerTypeEnum.requestTestDrive){$("#desFeedback").text("Fill in the form below to request a test drive");$("#feedbackDealer .list-form li.test-driver").removeClass("hidden");i=$(window).height();$("#feedbackDealer .close-popupx, #feedbackDealer .btn-cancel").on("click",function(){try{typeof $.fn.getNiceScroll!="undefined"&&$("#feedbackDealer .box-form").getNiceScroll().remove()}catch(n){console.error("Exception : GetPromo.showPopupFeedback() => "+n)}CommonsEvent.ClosePopup()})}else if(t==feedbackDealerTypeEnum.availPromo)$("#desFeedback").text("Fill in the form below to request information about get promo"),$("#feedbackDealer .list-form li.test-driver").addClass("hidden");else if(t==feedbackDealerTypeEnum.bookAnAppointment){$("#desFeedback").text("Fill in the form below to book an appointment with dealership");$("#feedbackDealer .list-form li.test-driver").removeClass("hidden");i=$(window).height();$("#feedbackDealer .close-popupx, #feedbackDealer .btn-cancel").on("click",function(){try{typeof $.fn.getNiceScroll!="undefined"&&$("#feedbackDealer .box-form").getNiceScroll().remove()}catch(n){console.error("Exception : GetPromo.showPopupFeedback() => "+n)}CommonsEvent.ClosePopup()})}$("#txtFeedbackType").val(t);$(".brand-title").length>0||(t==feedbackDealerTypeEnum.getQuote?$("#titFeedback").text("Get Quote"):t==feedbackDealerTypeEnum.inquire?$("#titFeedback").text("Inquire"):t==feedbackDealerTypeEnum.requestTestDrive?$("#titFeedback").text("Request Test Drive"):t==feedbackDealerTypeEnum.availPromo?$("#titFeedback").text("Get Promo"):t==feedbackDealerTypeEnum.bookAnAppointment?$("#titFeedback").text("Book an appointment"):$("#titFeedback").text($(n).text()));$("#feedbackDealer .chosen-select:not(.disable_search)").chosen({disable_search_threshold:10});$("#feedbackDealer .disable_search").chosen({disable_search:!0});typeof Location!="undefined"&&Location.InitLocationEvent();try{if(typeof $.fn.datepicker!="undefined"&&$("#feedbackDealer #txtFbPreferredDate").length>0&&$("#feedbackDealer #txtFbPreferredDate").is(":visible")&&$("#feedbackDealer #txtFbPreferredDate").datepicker({dateFormat:"M dd, yy",changeMonth:!0,changeYear:!0,yearRange:"c-40:c+30"}),t==feedbackDealerTypeEnum.getQuote||t==feedbackDealerTypeEnum.availPromo){let n="Other";location.pathname.indexOf("-dpid")>-1?n="Detail":(location.pathname.indexOf("-promotions-in-the-philippines")>-1||location.pathname.indexOf("search-car-promos")>-1)&&(n="List");let i=$("#cboModelPopup option:selected").closest("optgroup").attr("label"),r=$("#cboModelPopup option:selected").text(),e=$("#cboCityPopup option:selected").text(),u="";i||(i="");r||(r="");t==feedbackDealerTypeEnum.getQuote?u="actionNewCarQuote":t==feedbackDealerTypeEnum.availPromo&&(u="actionNewCarPromo");let f=$("#hddUserId").val();f||(f=0);let o={event:u,action:"click",model:i+" "+r,city:e,pageType:n,userID:f};typeof GtmUtils!="undefined"&&GtmUtils.pushDataEvent(o);$("#feedbackDealer .close").on("click",function(){let t={event:u,action:"close",model:i+" "+r,city:e,pageType:n,userID:f};typeof GtmUtils!="undefined"&&GtmUtils.pushDataEvent(t)})}}catch(r){console.error("Exception : GetPromo.showPopupFeedback() => "+r)}CommonsEvent.AddNoScroll();self.checkTermAndConditionPopup("#btnFeedback");(t==feedbackDealerTypeEnum.availPromo||t==feedbackDealerTypeEnum.promoRequest)&&($("#hddGetPromoPopupHighlight").val($(n).attr("data-promo-highlight")),$("#hddGetPromoPopupDealerName").val($(n).attr("data-promo-dealer-name")))})},closePopupFeedback:function(){$("#feedbackDealer .close-popupx").click()},sendFeedback:function(){var o,a;const n=this;let p=$("#hddDealerId"),c=$("#txtFeedbackType"),t=$("#txtFbFullName"),i=$("#txtFbEmail"),r=$("#txtFbPhone"),nt=$("#txtFbVersion"),l=$("#txtFbPreferredDate"),tt=$("#txtFbPreferredTime"),it=$("#txtFbMessage"),f=$("#cboBrandFeedback"),e=$("#cboModelFeedback"),w=$("#feedbackDealer #cboRegion"),b=$("#feedbackDealer #cboCity"),u=$("#hddGetPromoPopupPromoId").val();if((typeof u=="undefined"||u=="")&&(u=0),!t.val().trim()){n.createMessageFeedbackError("Please enter your full name");t.val("");t.focus();return}if(o=new RegExp(/<([^>]+)>/ig),o.test(t.val())){n.createMessageFeedbackError("Incorrect full name format");t.focus();return}if(!i.val()){n.createMessageFeedbackError("Please enter your email");i.focus();return}if(a=/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/,!a.test(i.val())){n.createMessageFeedbackError("Incorrect email format");i.focus();return}if(!r.val()||!r.val().trim()){n.createMessageFeedbackError("Please enter your phone");r.focus();return}if(!Location.ValidateRegion("#feedbackDealer ","#cboRegion")){n.createMessageFeedbackError("Please choose a Region");return}if(!Location.ValidateCity("#feedbackDealer ","#cboCity")){n.createMessageFeedbackError("Please choose a City");return}if(f.val()=="0"){n.createMessageFeedbackError("Please select a brand");f.focus();return}if(e.val()=="0"){n.createMessageFeedbackError("Please select a model");e.focus();return}if(o.test($("#txtFbMessage").val())){n.createMessageFeedbackError("Incorrect message format");$("#txtFbMessage").focus();return}var k=$("#txtFbPreferredDate").datepicker("getDate"),v=$.datepicker.formatDate("mm/dd/yy",k),y=parseInt(c.val());
1if(y==3||y===7){if(!l.val()){n.createMessageFeedbackError("Please select preferred date");l.focus();return}var s=$("#txtDatetimeNow").val().split("/"),d=new Date(s[2],s[0],s[1]).getTime(),h=v.split("/"),g=new Date(h[2],h[0],h[1]).getTime();if(d>g){n.createMessageFeedbackError("The preferred date must not be in the past");return}}if($("#CaptchaFeedbackDealer").val()==""){n.createMessageFeedbackError("Please input your Captcha");$("#CaptchaFeedbackDealer").focus();return}$.ajax({type:"POST",cache:!1,url:"/Subscribe/GetPromo/",data:{DealerId:p.val(),Fullname:t.val(),Email:i.val(),Phone:r.val(),BrandId:f.val(),ModelId:e.val(),Variant:$("#txtFbVersion").val(),Message:$("#txtFbMessage").val(),PreferredDate:v,PreferredTime:$("#txtFbPreferredTime").val(),Type:c.val(),RegionId:w.val(),CityId:b.val(),CaptchaFeedbackDealer:$("#CaptchaFeedbackDealer").val(),PromoId:u},beforeSend:function(){CommonsEvent.Loading()},success:function(t){t.Error?(n.createMessageFeedbackError(t.Title),CommonsEvent.Loaded()):(typeof callBackFunctionsWeb!="undefined"&&callBackFunctionsWeb.getPromoCallback(),n.clearInputFeedback(),CommonsEvent.Loaded(),n.createMessageFeedbackError("Your feedback was sent successfully"),setTimeout(function(){n.closePopupFeedback()},3e3))},complete:function(){}})},generateModel:function(n){const i=this;let t=null;$("body").data("GetListModel_"+n)!=null&&(t=$("body").data("GetListModel_"+n));t==null?$.ajax({type:"POST",cache:!1,url:"/Model/GetListAllByBrandId",data:{brandId:n},success:function(i){t=i;$("body").data("GetListModel_"+n,t)},timeout:5e3,complete:function(){i.bindModel(0,t)},error:function(){}}):i.bindModel(0,t)},bindModel:function(n,t){$("#cboModelFeedback").find("option:gt(0)").remove();var i=$("#cboModelFeedback").html();t!=undefined&&$.each(t,function(t,r){i+=n==r.ModelId?'<option value="'+r.ModelId+'" selected="selected">'+r.ModelName+"<\/option>":'<option value="'+r.ModelId+'">'+r.ModelName+"<\/option>"});$("#cboModelFeedback").html(i).trigger("chosen:updated")},createMessageFeedbackError:function(n,t){t||(t="#lblFeedbackMessage");let i=$(t,DealerShips.boxForm);i.html('<div class="field-validation-error">'+n+"<\/div>")},clearInputFeedback:function(){$("#cboBrandFeedback option").removeAttr("selected");$("#cboModelFeedback option").removeAttr("selected");$("#txtFbMessage").val("");$("#txtFbVersion").val("");$("#txtFbPreferredTime").val("");$("#cboBrandFeedback, #cboModelFeedback").trigger("chosen:updated");$("#lblFeedbackMessage").empty()},initPopup:function(){const t=this;let n="#frmGetPromo",i=!1;$("#subGetPromo",n).on("click",function(){i=t.validateForm();i&&$("#subFormGetPromo",n).click()});$("#popup #btnContinueSubmitGetpromo").on("click",function(){i&&$("#subFormGetPromo",n).click()});$("#popupModel .head-collapse").on("click",function(){$(this).parent().hasClass("open")?$(this).parent().removeClass("open"):$(this).parent().addClass("open")});t.checkRegionMatchPromo();$("#cboCityPopup",n).on("change",function(){t.checkRegionMatchPromo()});$(".chosen-select",n).chosen()},showPopupGetPromo:function(n,t,i,r,u){var e,f;const s=this;t!=1||u||(e=$(n).attr("data-page"),!isNaN(e)&&e>0&&(u=e));f="";i?(f+="?modelId="+i,!r||(f+="&variant="+r),!u||(f+="&PageTypeId="+u)):!u||(f+="?PageTypeId="+u);let o=parseInt($(n).attr("data-promo-id"));!o||(f+=f?"&PromoId="+o:"?PromoId="+o);$("#popup").html("");PostForm.LoadPopupFromUrl("/Subscribe/GetPromoMembership"+f,null,function(){$("#desFeedback").text("Fill in the form below to request information about get promo");$("#feedbackDealer .test-driver").addClass("hidden");$("#txtFeedbackType").val(t);$("#titFeedback").text("Get Promo");typeof Location!="undefined"&&Location.InitLocationEvent();$("#subGetPromo").length>0&&s.checkTermAndConditionPopup("#subGetPromo");s.initPopup();var n=$("#feedbackDealer #hddCallBackCityName").val();typeof n!="undefined"&&n!=""&&$("#feedbackDealer #cboCityTextPopup").empty().text(n);try{let n="Other";location.pathname.indexOf("-dpid")>-1?n="Detail":(location.pathname.indexOf("-promotions-in-the-philippines")>-1||location.pathname.indexOf("search-car-promos")>-1)&&(n="List");let i=$("#cboModelPopup option:selected").closest("optgroup").attr("label"),r=$("#cboModelPopup option:selected").text(),e=$("#cboCityPopup o
1ption:selected").text(),u="";i||(i="");r||(r="");t==feedbackDealerTypeEnum.getQuote?u="actionNewCarQuote":t==feedbackDealerTypeEnum.availPromo&&(u="actionNewCarPromo");let f=$("#hddUserId").val();f||(f=0);let o={event:u,action:"click",model:i+" "+r,city:e,pageType:n,userID:f};typeof GtmUtils!="undefined"&&GtmUtils.pushDataEvent(o);$("#popup .close").on("click",function(){let t={event:u,action:"close",model:i+" "+r,city:e,pageType:n,userID:f};typeof GtmUtils!="undefined"&&GtmUtils.pushDataEvent(t)})}catch(i){console.error("Exception : GetPromo.showPopupFeedback() => "+i)}})},checkTermAndConditionPopup:function(n){if(typeof n!="undefined"&&n!=""&&$("#popup").length>0)$("#popup").on("change","#termsAgreedPopup",function(){$(this).is(":checked")?$(n,"#popup").removeClass("readonly-btn"):$(n,"#popup").addClass("readonly-btn")})},validateForm:function(){var n="#frmGetPromo",r=$("#FullName",n),t=$("#Email",n),i=$("#Phone",n);if($("#lblMessage",n).empty(),r.val()&&r.val().trim())$("#lblMessage",n).empty().text("");else return $("#lblMessage",n).empty().text("Please enter your full name"),r.focus(),!1;if(t.val()&&t.val().trim())if(emailValidate.isValidEmail(t.val()))$("#lblMessage").empty().text("");else return $("#lblMessage").empty().text("Invalid email address format"),t.focus(),!1;else return $("#lblMessage",n).empty().text("Please enter your full name"),t.focus(),!1;if(i.val()&&i.val().trim()){let t=i.val().replace(/\s+/g,"");if(t.length>9&&t.match(/^(09|08)\d{9}$/))$("#lblMessage",n).empty().text("");else return $("#lblMessage",n).empty().text("Phone Message: eg: 09012345678 | 08112345678"),i.focus(),!1}else return $("#lblMessage",n).empty().text("Please enter your phone number"),i.focus(),!1;return!0},checkRegionMatchPromo:function(){if($("#hddListRegionIds").val()!=0){const u=this,r="#frmGetPromo";let t=$("#hddListRegionIds").val().split(","),i=parseInt($("#cboCityPopup",r).val()),n=0;$("#cboCityPopup",r).val()==""||i==0||t.includes("0")?($("#checkMatchRegion").addClass("hidden"),$("#checkMatchRegion_Suitable").removeClass("hidden")):(isNaN(i)&&(i=0),$.ajax({type:"GET",cache:!1,url:"/Region/GetRegionByCityId/",data:{cityId:i},success:function(i){if(i!=null&&(n=i.Id,!!t&&t!=""&&!!n&&n>0)){var r=t.includes(n.toString());r==!0?($("#checkMatchRegion").addClass("hidden"),$("#checkMatchRegion_Suitable").addClass("hidden")):u.showWarningLocation(n,i.Name)}}}))}},showWarningLocation:function(n,t){let i={BrandId:0,ModelId:0,RegionId:n,CityId:0,DealershipId:0,PaymentType:0};$.ajax({type:"POST",cache:!1,url:"/DealerPromos/GetSearchLinkJson/",data:i,success:function(n){$("#regionTextSelected").text(t);$(".regionTextSelected").text(t);$("#urlRedirectToRegionSelected").attr("href",n);$("#checkMatchRegion").removeClass("hidden");$("#checkMatchRegion_Suitable").addClass("hidden")}})}}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.