var uz_til = { g_cssBasePath: "//cdn.userzoom.com/trueintent/css/", g_basePath: "//server.userzoom.com/trueintent/files/", g_modbasePath: "//server.userzoom.com/trueintent/modules/", g_debug: "", g_preview: false, g_cs: "", g_typestudy: "", g_tipowelcome: "0", g_uid: "", g_userid: "", g_profile: 1, g_desc: "Profile 1", g_ti_one: 1, g_ti_each: 1, g_ti_name: "100", g_delay: 0, g_clicks: 1, g_url: "", g_restdomain: "", g_website: "", g_position: 5, g_size: 50, g_logo: "", g_txt_layertitle: "", g_txt_layertext: "", g_txt_yes: "", g_txt_no: "", g_txt_layerbuttonok: "", g_txt_layerbuttoncancel: "", g_txt_layerinfotext: "", g_txt_privacypolicy: "", g_showed: "", g_manager: "", g_isESPNLayer: false, g_exceptionOldLayer: false, g_posClass: "", g_popupClassName: "", g_samewindow: 0, g_BR_ISIE5_5: false, g_BR_ISIE: false, g_BR_ISIE6UP: false, g_nomcookie: "", g_browser: "", g_lang: "", g_browserLang: "", g_clientIP: "", g_restrictionIPs: "", g_allowIPs: "", g_suid: "", g_expiraCookie: 20, g_skiponready: false, max_z_index: { active: true, FF: 2147483647, IE: 2147483647, Opera: 2147483647, Safari3: 16777271, Safari4: 2147483647, Chrome: 2147483647 }, getHead: function () { var head = document.getElementsByTagName("head"); if (head.length > 0) { return head[0] } else { return null } }, getParent: function () { if (document.body != null) { return document.body } else { if (uz_til.getHead() != null) { return uz_til.getHead() } else { return null } } }, isenterkey: function (e) { var keynum; var keychar; var numcheck; if (window.event) { keynum = window.event.keyCode } else { if (e.which) { keynum = e.which } else { if (e.keyCode) { keynum = e.keyCode } } } return ((keynum == 13) || (keynum == 32)) }, ready: function (action) { if (uz_til.g_skiponready) { if (action) { action() } } else { (function (i) { var u = navigator.userAgent; var e = /*@cc_on!@*/false; var st = setTimeout; if (/webkit/i.test(u)) { st(function () { var dr = document.readyState; if (dr == "loaded" || dr == "complete") { i() } else { st(arguments.callee, 10) } }, 10) } else { if ((/mozilla/i.test(u) && !/(compati)/.test(u)) || (/opera/i.test(u))) { document.addEventListener("DOMContentLoaded", i, false) } else { if (e) { (function () { var t = document.createElement("doc:rdy"); try { t.doScroll("left"); i(); t = null } catch (e) { st(arguments.callee, 0) } })() } else { window.onload = i } } } })(action) } }, initialize: function (pID) { var myhash = document.location.hash; if (myhash == "#previewuxm") { uz_til.g_preview = true } uz_til.g_uid = pID; uz_til.createUserID(); uz_til.g_nomcookie = "UZ_TI_" + uz_til.g_uid; if ((uz_til.uz_readCookie(uz_til.g_nomcookie) == null) || (uz_til.g_debug != "") || (uz_til.g_preview)) { uz_til.ready(function () { var parentElement = uz_til.getParent(); if (parentElement != null) { var script = document.createElement("script"); script.type = "text/javascript"; script.charset = "utf-16"; if (uz_til.g_preview) { script.src = document.location.protocol + uz_til.g_basePath + "til_pID_" + uz_til.g_uid + ".active.js"; uz_til.g_ti_one = 1; uz_til.g_ti_each = 1 } else { script.src = document.location.protocol + uz_til.g_basePath + "til_pID_" + uz_til.g_uid + ".js" } parentElement.appendChild(script) } else { setTimeout(function () { uz_til.initialize(pID) }, 1000) } }) } else { uz_til.g_showed = "1" } }, getClientIP: function () { var script = document.createElement("script"); script.type = "text/javascript"; script.src = document.location.protocol + uz_til.g_modbasePath + "getClientIP.js"; document.body.appendChild(script) }, setClientIP: function (myNewIP) { var skip = false; var xx = 0; if (uz_til.g_allowIPs != "") { skip = true; var myallowips_array = uz_til.g_allowIPs.split(","); for (xx = 0; xx <= myallowips_array.length - 1; xx++) { var rIP = new RegExp(myallowips_array[xx]); if (rIP.test(myNewIP)) { skip = false } } } if (uz_til.g_restrictionIPs != "") { var myips_array = uz_til.g_restrictionIPs.split(","); for (xx = 0; xx <= myips_array.length - 1; xx++) { var rIP = new RegExp(myips_array[xx]); if (rIP.test(myNewIP)) { skip = true } } } var myhash = document.location.hash; if (myhash == "#previewuxm") { uz_til.g_preview = true } if (uz_til.g_preview == true) { uz_til.initialize(uz_til.g_uid); uz_til.processTil() } if (!skip) { uz_til.processTil() } else { } }, domainRestrictionPassed: function () { var aux_result = true; var xx = 0; if (uz_til.g_restdomain != "") { aux_result = false; var mydomains_array = uz_til.g_restdomain.split(","); for (xx = 0; xx <= mydomains_array.length - 1; xx++) { var rDom = new RegExp(mydomains_array[xx].replace(".", "[.]")); if (rDom.test(document.domain)) { aux_result = true } } } return aux_result }, createUserID: function () { if (uz_til.g_userid == "") { var d = new Date(); var cnum = 65 + Math.floor(Math.random() * 26); var mych = String.fromCharCode(cnum); var p1 = Math.floor(Math.random() * 9999).toString(); var p2 = d.getTime().toString(); var p3 = Math.floor(Math.random() * 9999).toString(); uz_til.g_userid = mych + p1 + p2 + p3 } }, processTil: function () { if (!uz_til.g_preview) { var valorCookie = "1"; var expiraCookie = uz_til.g_expiraCookie; if (uz_til.g_typestudy == "ST5") { expiraCookie = 30 } if (!uz_til.isBrowserEnabled()) { uz_til.uz_createCookie(uz_til.g_nomcookie, valorCookie, expiraCookie); return false } if (!uz_til.mustShow()) { uz_til.uz_createCookie(uz_til.g_nomcookie, valorCookie, expiraCookie); return false } if (uz_til.g_typestudy == "ST5") { if (!uz_til.checkLang()) { uz_til.uz_createCookie(uz_til.g_nomcookie, valorCookie, expiraCookie); return false } } if (!uz_til.domainRestrictionPassed()) { uz_til.uz_createCookie(uz_til.g_nomcookie, valorCookie, expiraCookie); return false } uz_til.saveReferrer() } if (uz_til.g_exceptionOldLayer) { uz_til.includeCSS(uz_til.g_cssBasePath + "til.fiat.css") } else { uz_til.includeCSS(uz_til.g_cssBasePath + "til.css") } if (uz_til.g_delay == 0) { uz_til.displaylayer() } else { setTimeout("uz_til.displaylayer();", uz_til.g_delay) } return true }, mustShow: function () { if (uz_til.g_debug != "") { return true } if (uz_til.g_ti_each == uz_til.g_ti_one) { return true } var mynewval = Math.floor(Math.random() * uz_til.g_ti_each) + 1; if (mynewval <= uz_til.g_ti_one) { return true } return false }, checkBrowser: function () { var retorna; try { retorna = uz_til.isBrowserEnabled() } catch (myerror) { retorna = false } return retorna }, checkLang: function () { if (navigator.language) { uz_til.g_browserLang = navigator.language } else { uz_til.g_browserLang = navigator.browserLanguage } uz_til.g_browserLang = uz_til.g_browserLang.substring(0, 2); switch (uz_til.g_browserLang) { case "ca": case "gl": case "eu": uz_til.g_browserLang = "es"; break } if (uz_til.g_browserLang.indexOf(uz_til.g_lang) != -1) { return true } else { return false } return true }, isBrowserEnabled: function () { return false }, includeCSS: function (p_file) { var tag_css = document.createElement("link"); tag_css.rel = "stylesheet"; tag_css.type = "text/css"; tag_css.href = document.location.protocol + p_file; document.getElementsByTagName("head")[0].appendChild(tag_css) }, assignZindex: function (el, dif) { uz_til.isBrowserEnabled(); if (uz_til.max_z_index.active) { if (uz_til.g_browser.isFF) { el.style.zIndex = uz_til.max_z_index.FF + dif } else { if (uz_til.g_browser.isIE) { el.style.zIndex = uz_til.max_z_index.IE + dif } else { if (uz_til.g_browser.isOpera) { el.style.zIndex = uz_til.max_z_index.Opera + dif } else { if (uz_til.g_browser.isSafari) { el.style.zIndex = uz_til.max_z_index.Safari3 + dif } else { if (uz_til.g_browser.isChrome) { el.style.zIndex = uz_til.max_z_index.Chrome + dif } } } } } } }, displaylayer: function () { if (uz_til.ShowLayer()) { var body = document.getElementsByTagName("body")[0]; var uz_popup_container = document.createElement("div"); uz_til.assignZindex(uz_popup_container, -1); uz_popup_container.setAttribute("id", "uz_popup_container"); var div_modal = document.createElement("div"); uz_til.assignZindex(div_modal, -1); div_modal.setAttribute("id", "uz_bg"); div_modal.className = "uz_bg_transparent"; var popup = document.createElement("div"); uz_til.assignZindex(popup, 0); popup.setAttribute("id", "uz_popup_modal"); switch (uz_til.g_position) { case 3: uz_til.g_posClass = "popup_tr"; break; case 1: uz_til.g_posClass = "popup_tl"; break; case 7: uz_til.g_posClass = "popup_bl"; break; case 9: uz_til.g_posClass = "popup_br"; break; default: uz_til.g_posClass = "popup_cc"; break } if (uz_til.g_exceptionOldLayer) { var blankButtonOk = false; var blankButtonCancel = false } else { var blankButtonOk = true; var blankButtonCancel = true } if (uz_til.g_size == 50) { uz_til.g_popupClassName = "uz_popup" } else { uz_til.g_popupClassName = "uz_popup uzp_lite" } popup.className = uz_til.g_popupClassName + " " + uz_til.g_posClass; var div_header = document.createElement("div"); div_header.className = "uz_header"; var logo = document.createElement("div"); logo.className = "uz_til_logo"; if (uz_til.g_logo != "") { img_logo = document.createElement("img"); img_logo.src = uz_til.g_logo; logo.appendChild(img_logo) } var div_close = document.createElement("div"); div_close.className = "btn_close"; div_close.tabIndex = 3; div_close.onclick = function () { uz_til.prepareCloseLayer() }; div_close.onkeypress = function (e) { if (uz_til.isenterkey(e)) { uz_til.prepareCloseLayer() } }; div_close.title = "Close"; var div_clear = document.createElement("div"); div_clear.className = "clear"; var div_clear2 = document.createElement("div"); div_clear2.className = "clear"; var div_containerOut = document.createElement("div"); div_containerOut.className = "containerOut"; var div_containerIn = document.createElement("div"); div_containerIn.className = "containerIn"; var h31 = document.createElement("h3"); var txt_h31 = document.createTextNode(uz_til.g_txt_layertitle); h31.appendChild(txt_h31); var p1 = document.createElement("span"); var txt_p1 = document.createTextNode(uz_til.g_txt_layertext); p1.innerHTML = uz_til.g_txt_layertext; var div_containerButtons = document.createElement("div"); div_containerButtons.className = "containerButtons"; var btncancel = document.createElement("div"); btncancel.className = (blankButtonCancel ? "btnCancelLite" : "btnCancel"); btncancel.tabIndex = 2; btncancel.title = uz_til.g_txt_no; var btncancel_txt = document.createElement("div"); var btncancel_no = document.createElement("div"); btncancel_no.className = "btnCancelNo"; btncancel_no.appendChild(document.createTextNode(uz_til.g_txt_no)); btncancel_txt.className = (blankButtonCancel ? "" : "btnCancelTxt"); if (uz_til.g_exceptionOldLayer) { btncancel_txt.appendChild(document.createTextNode(uz_til.g_txt_layerbuttoncancel)) } btncancel_txt.appendChild(document.createTextNode("")); btncancel.appendChild(btncancel_no); btncancel.appendChild(btncancel_txt); btncancel.setAttribute("id", "idbtnCancel"); btncancel.onclick = function () { uz_til.prepareCloseLayer() }; btncancel.onkeypress = function (e) { if (uz_til.isenterkey(e)) { uz_til.prepareCloseLayer() } }; var btn = document.createElement("div"); btn.className = (blankButtonOk ? "btnOkLite" : "btnOk"); btn.id = "btnOkYes"; btn.tabIndex = 1; btn.title = uz_til.g_txt_yes; var btn_yes = document.createElement("div"); btn_yes.className = "btnOkYes"; btn_yes.appendChild(document.createTextNode(uz_til.g_txt_yes)); var btn_txt = document.createElement("div"); btn_txt.className = (blankButtonCancel ? "" : "btnOkTxt"); if (uz_til.g_exceptionOldLayer) { btn_txt.appendChild(document.createTextNode(uz_til.g_txt_layerbuttonok)) } btn_txt.appendChild(document.createTextNode("")); btn.appendChild(btn_yes); btn.appendChild(btn_txt); btn.onclick = function () { uz_til.prepareOpenStudy() }; btn.onkeypress = function (e) { if (uz_til.isenterkey(e)) { uz_til.prepareOpenStudy() } }; var div_containerButtons_txt = document.createElement("div"); div_containerButtons_txt.className = "containerButtonTxt"; div_containerButtons_txt.innerHTML = uz_til.g_txt_layerinfotext; var div_footer = document.createElement("div"); div_footer.className = "uz_footer"; div_footer.appendChild(document.createTextNode("Powered by UserZoom - ")); var a_privatePolicy = document.createElement("a"); a_privatePolicy.setAttribute("href", "#"); a_privatePolicy.appendChild(document.createTextNode(uz_til.g_txt_privacypolicy)); a_privatePolicy.onclick = function () { var ppurl = "https://server.userzoom.com/uz/ltext.asp?s=" + uz_til.g_cs + "&ltext=ALL"; ppWin = window.open(ppurl, "ALL", "width=700,height=300,scrollbars=yes,location=no,toolbar=no,menubar=no") }; div_footer.appendChild(a_privatePolicy); div_containerButtons.appendChild(btn); div_containerButtons.appendChild(document.createTextNode(" ")); div_containerButtons.appendChild(btncancel); div_containerButtons.appendChild(div_clear2); div_containerIn.appendChild(h31); div_containerIn.appendChild(p1); div_containerIn.appendChild(div_containerButtons); div_containerIn.appendChild(div_containerButtons_txt); div_containerOut.appendChild(div_containerIn); div_header.appendChild(logo); div_header.appendChild(div_close); popup.appendChild(div_header); popup.appendChild(div_clear); popup.appendChild(document.createTextNode(" ")); popup.appendChild(div_containerOut); popup.appendChild(div_footer); uz_popup_container.appendChild(popup); uz_popup_container.appendChild(div_modal); body.appendChild(uz_popup_container); if (document.getElementById) { bg_transparent = document.getElementById("uz_bg"); bg_transparent.style.display = "block"; uz_popup = document.getElementById("uz_popup_modal"); uz_popup.style.display = "block"; uz_til.correctIE() } } }, hidePopupMsg: function (f_popupid1, f_popupid2) { var handlerBg = document.getElementById(f_popupid1); handlerBg.style.display = "none"; var handlerPopup = document.getElementById(f_popupid2); handlerPopup.style.display = "none" }, prepareCloseLayer: function () { if (uz_til.g_sameWindow == 1) { window.close() } else { uz_til.hidePopupMsg("uz_bg", "uz_popup_modal") } }, startTracking: function () { var script = document.createElement("script"); script.type = "text/javascript"; var clicksfile = ""; if (uz_til.g_browser.isFF) { clicksfile = "uzff.js" } else { clicksfile = "uzie.js" } script.src = document.location.protocol + "//server.userzoom.com/c/" + clicksfile; document.body.appendChild(script) }, prepareOpenStudy: function () { var addurl = ""; if (uz_til.g_preview) { addurl = "&puxm=1" } var myurl = "https://server.userzoom.com/uz/index.asp?sp=" + uz_til.g_uid + "&u=" + uz_til.g_userid + addurl; if (uz_til.g_exceptionOldLayer == 1) { var width = 644; var height = 422 } else { var width = 440; var height = 560 } if (uz_til.g_typestudy = "ST5") { _uz_codeuser = this.g_userid; _uz_ismonitor = true } var top = screen.height / 2 - height / 2; var left = screen.width / 2 - width / 2; var sFeatures = "location=no,copyhistory=no,directories=no,minimizable=no,personalbar=no,titlebar=no,dialog=yes,menubar=no,resizable=no"; if (screen.width < 801 || screen.height < 601) { sFeatures += ",scrollbars=yes" } else { sFeatures += ",scrollbars=no" } sFeatures += ",status=no,toolbar=no,top=" + top + ",left=" + left + ",height=" + height + ",width=" + width; if (uz_til.g_sameWindow == "1") { document.location.href = myurl } else { welcomeWin = window.open(myurl, "welcomeWin", sFeatures) } if (uz_til.g_tipowelcome == "2") { uz_til.posicionaVentana() } uz_til.hidePopupMsg("uz_bg", "uz_popup_modal") }, addEvent: function (f_obj, f_type, f_fn) { if (f_obj.addEventListener) { f_obj.addEventListener(f_type, f_fn, false) } else { if (f_obj.attachEvent) { f_obj.attachEvent("on" + f_type, function () { return f_fn.apply(f_obj, new Array(window.event)) }) } } }, correctIE: function () { if (uz_til.g_browser.isIE) { onresize = function () { var pm = document.getElementById("uz_bg"); pm.style.width = document.body.clientWidth + 10; pm.style.height = document.body.clientHeight }; document.onreadystatechange = function () { if (onresize != null) { onresize() } }; try { if (uz_til.g_browser.isIE6) { try { if (document.getElementById("uz_popup_container")) { document.getElementById("uz_popup_container").style.height = uz_til.getinnerDimension("height") + "px" } } catch (err) { } try { if (document.getElementById("uz_bg")) { document.getElementById("uz_bg").style.height = uz_til.getinnerDimension("height") + "px" } } catch (err) { } } } catch (err) { } } document.getElementById("uz_bg").style.display = "block"; if (screen.width < 600) { document.getElementById("uz_popup_modal").style.position = "absolute"; document.getElementById("uz_popup_modal").style.left = "5%"; document.getElementById("uz_popup_modal").style.width = "100%" } if (window.createPopup && document.compatMode && document.compatMode == "CSS1Compat") { var onresize = function () { if (!document.body) { return } onresize = null; document.body.style.height = 0; setTimeout(function () { document.body.style.height = document.documentElement.scrollHeight + "px" }, 1); setTimeout(function () { document.onreadystatechange() }, 100) }; if (onresize != null) { document.onreadystatechange = function () { if (onresize != null) { onresize() } } } } }, ShowLayer: function () { var valorCookie = "1"; var expiraCookie = uz_til.g_expiraCookie; if (uz_til.g_typestudy == "ST5") { expiraCookie = 30 } if ((uz_til.g_debug != "") || (uz_til.g_preview)) { uz_til.uz_eraseCookie(uz_til.g_nomcookie); return true } var MostrarLayer = false; if (uz_til.checkBrowser) { if (uz_til.uz_readCookie(uz_til.g_nomcookie) == null) { uz_til.uz_createCookie(uz_til.g_nomcookie, valorCookie, expiraCookie); MostrarLayer = true } } return MostrarLayer }, isCookieEnabled: function () { var status = navigator.cookieEnabled; var nom_cookie = "uzchkcookie"; uz_til.uz_eraseCookie(nom_cookie); uz_til.uz_createCookie(nom_cookie, nom_cookie, 1); if (uz_til.uz_readCookie(nom_cookie) == null) { status = false } else { status = true } uz_til.uz_eraseCookie(nom_cookie); return status }, uz_createCookie: function (name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString() } else { var expires = "" } document.cookie = name + "=" + value + expires + "; path=/" }, uz_readCookie: function (c_name) { if (document.cookie.length > 0) { c_start = document.cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = document.cookie.indexOf(";", c_start); if (c_end == -1) { c_end = document.cookie.length } return unescape(document.cookie.substring(c_start, c_end)) } } return null }, uz_eraseCookie: function (name) { uz_til.uz_createCookie(name, "", -1) }, posicionaVentana: function () { window.moveTo(0, 0); window.resizeTo(screen.availWidth, screen.availHeight); var max_outerHeight = screen.availHeight; var max_innerHeight = uz_til.getinnerDimension("height"); var min_diff_InnerOuterHeight = max_outerHeight - max_innerHeight; var wcti2_innerHeight = 38; var total_nav_height = uz_til.set_nav_height(max_outerHeight, wcti2_innerHeight); window.resizeTo(screen.availWidth, total_nav_height); window.moveTo(0, 0) }, set_nav_height: function (t_availHeight, wcti2_innerHeight) { var t_status_bar_height = min_diff_InnerOuterHeight; var status_bar_height = 0; if (uz_til.isFirefox == true) { status_bar_height = 30 } if (uz_til.isSafari == true) { status_bar_height = 5 } if (uz_til.isIE6 == true) { status_bar_height = 40 } if (uz_til.isIE7 == true) { status_bar_height = 40 } return t_availHeight - wcti2_innerHeight - status_bar_height }, getinnerDimension: function (tmp) { tmp = tmp.toLowerCase(); var myWidth = 0, myHeight = 0; if (typeof (window.innerWidth) == "number") { myWidth = window.innerWidth; myHeight = window.innerHeight } else { if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight } else { if (document.body && (document.body.clientWidth || document.body.clientHeight)) { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight } } } if (tmp == "width") { return myWidth } if (tmp == "height") { return myHeight } }, saveReferrer: function () { var post_referer = "server.userzoom.com/trueintent/inc/"; var randomnumber = Math.floor(Math.random() * 999999); var uz_JsHost = (("https:" == document.location.protocol) ? "https://" : "http://"); var f_url = uz_JsHost + post_referer + "insert_referrer.asp?p=" + uz_til.g_profile + "&u=" + uz_til.g_userid + "&s=" + uz_til.g_cs + "&referrer=" + encodeURIComponent(document.referrer) + "&interceptURL=" + encodeURIComponent(document.location) + "&" + randomnumber; var l_image = new Image(1, 1); l_image.src = f_url; l_image.onload = function () { l_image.onload = null } } };
