(function () { var func = Math.floor(Math.random() * 9999999999); var ref = document.getElementsByTagName("script"); for (var i = 0, len = ref.length; i < len; i++) { var script = ref[i]; var src = script.getAttribute("src"); if (src) { var matches = src.match(/promo_id=4322/); } if (src && !script.getAttribute("script-initialized") && matches) { script.setAttribute("script-initialized", true); function getParams() { var params = {}; script.src.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { params[key] = value; }); return params; } var widget_src = src; var url_params = getParams(); widget_wrapper = document.createElement("div"); widget_wrapper.id = "myrentacar_searchform_wrapper" + func; script.parentElement.insertBefore(widget_wrapper, script); var js = document.createElement("script"); js.src = "https://static.localrent.com/widget/v3/app.js"; js.charset = 'utf8'; js.dataset.mrc = "true"; js.dataset.affiliate = "634"; js.dataset.trace = "e68ac46f591c48688ff46f2c3-368183"; js.dataset.apikey = "travelpayouts"; js.dataset.apisign = "b1e775d64b7c13c7e655bada6f7072b5"; js.dataset.country = !url_params["country"] ? "124" : parseInt(url_params["country"]); js.dataset.city = !url_params["city"] ? "106531" : parseInt(url_params["city"]); js.dataset.lang = !url_params["lang"] ? "en" : decodeURIComponent(url_params["lang"]); js.dataset.width = (!url_params["width"] ? "100" : decodeURIComponent(url_params["width"])) + "%"; js.dataset.background = !url_params["background"] ? "light" : decodeURIComponent(url_params["background"]); js.dataset.logo = !url_params["logo"] ? "true" : decodeURIComponent(url_params["logo"]); js.dataset.header = !url_params["header"] ? "true" : decodeURIComponent(url_params["header"]); js.dataset.gearbox = !url_params["gearbox"] ? "true" : decodeURIComponent(url_params["gearbox"]); js.dataset.cars = !url_params["cars"] ? "true" : decodeURIComponent(url_params["cars"]); js.dataset.border = !url_params["border"] ? "true" : decodeURIComponent(url_params["border"]); js.dataset.footer = !url_params["footer"] ? "true" : decodeURIComponent(url_params["footer"]); widget_wrapper.appendChild(js); break; } } })();