// Source var txSrc = txSrc || 'https://white.tariffuxx.de'; // Create/Get Object var txData = txData || {}; txData.txfestnetz = txData.txfestnetz || {tariffuxx1682 : {}}; // Create Data Structure with table settings txData.txfestnetz.tariffuxx1682 = createTxData('txfestnetz', {"txkd":"450","txproj":"547","all":"1","txtarife":"10","txspeed":"30"}, {"grok_site_id":null,"country_code_id":"1","bgcolor":"","fontcolor":"","theadcolor":"","tevencolor":"","toddcolor":"","thighlight":"","hifontcolor":"#006699","bgabutton":"#006699","coabutton":"#FFFFFF","bgbutton":"","cobutton":"#666666","bgtariftipp":"#FAF0E6","coaktion":"#FFFFFF","bgaktion":"#006699","boraktion":"#80b3cd","customcss":""}); // Create Data Structure with default settings function createTxData (cmp, opt, pc){ var txCleanKd = parseInt(opt.txkd) if (isNaN(txCleanKd)) { txCleanKd = parseInt(opt.txKd) } if (isNaN(txCleanKd)) { txCleanKd = 1 } txDataStructure = { pref : { kd : txCleanKd, hnb : 14 || '', filter : parseInt(opt.txfilter) || 0, subid : opt.subid || '', start : opt.txstart || 0, tarifcount : parseInt(opt.txtarife) || 20, txlabel : opt.txlabel || '', txsublabel : opt.txsublabel || '', txBxMin : 2, txBxMax : 7, track : 0, initialized : false, ttseen : false, phoneData : '', overlayFlag : '', showfilter : 0, fixFilterTop : opt.txfiltertop || 0, txhdis : opt.txhdis || 0, width : 0, bannerWidth: 0, globalWidth: 0, handyShopHeight: 0, tarife : {}, tarifCountLive : 0, nameInet : {0: 'keine', 10: '500 MB', 20: '1 GB', 30: '2 GB', 40: '3 GB', 50: '5 GB', 60: '8 GB', 70: '10 GB', 80: '15 GB', 90: '20 GB', 100: 'Flat'}, valInet : {0: '0', 10: '500', 20: '1000', 30: '2000', 40: '3000', 50: '5000', 60: '8000', 70: '10000', 80: '15000', 90: '20000', 100: '99999'}, nameSpeed : {0: '7 Mbit/s', 10: '21 Mbit/s', 20: '42 Mbit/s', 30: '50 Mbit/s', 40: '150 Mbit/s', 50: '300+ Mbit/s'}, valSpeed : {0: '7.0', 10: '21.0', 20: '42.0', 30: '50.0', 40: '150.0', 50: '300.0'}, nameFestSpeed : {0: '10 Mbit/s', 10: '25 Mbit/s', 20: '50 Mbit/s', 30: '100 Mbit/s', 40: '200 Mbit/s', 50: '300+ Mbit/s'}, valFestSpeed : {0: '10.0', 10: '25.0', 20: '50.0', 30: '100.0', 40: '200.0', 50: '300.0'}, namePhonePrice : {0: '1 €', 10: '50 €', 20: '100 €', 30: '150 €', 40: '200 €', 50: 'Alle'}, valPhonePrice : {0: '1', 10: '50', 20: '100', 30: '150', 40: '200', 50: '0'}, }, prms : { txtid : 1682, txtable : cmp, proj : parseInt(opt.txproj) || 0, button : opt.txbutton || '', aff : opt.affilid || '', afftarife : opt.txafftarife || 0, affop : opt.txaffop || 0, all: opt.all || 0, provider : opt.provider || '', tarif : opt.tarif || '', eff : opt.txeff || 0, ap : opt.ap || -1, hardware : opt.txhrd || '', hardwareid : opt.txhrdid || '', hrdid : opt.txhrdid || '', phone : opt.txphone || '', phoneprice : opt.txphnprc || 50, hspeicher : '', hfarbe : '', plz : opt.txplz || 0, hrdwifi : opt.txhrdwifi || 0, tel : opt.txtel || 0, mobil : opt.txmobil || 0, tv : opt.txtv || 0, type : opt.txtype || 0, newc : opt.txnewc || 0, swtchc : opt.txswtchc || 0, chpst : opt.txchpst || 0, internetopt : opt.txinetflat || 0, vol : opt.inet || 10, speed : opt.speed || 0, netlte : opt.lte || 0, netlteplus : opt.lteplus || 0, dataauto : opt.txdataauto || 1, telopt : 50, smsopt : opt.sms || 0, laufzeit : opt.laufzeit || 24, typ : opt.txtyp || '', zahlart : opt.art || '', net1 : 'td1', net2 : 'vd2', net3 : 'o2', net4 : '', esim : opt.esim || 0, multisim : opt.multisim || 0, rnmn : opt.rnmn || 1, music : opt.music || 0, audience : opt.audience || 0, ccid : 1 }, clrs : { bg : pc.bgcolor || '', fc : pc.fontcolor || '', th : pc.theadcolor || '', thc : pc.toddcolor || '', tre : pc.tevencolor || '', thf : pc.hifontcolor || '', abg : pc.bgabutton || '', abgh : '', afc : pc.coabutton || '', bbg : pc.bgbutton || '', bbgh : '', bfc : pc.cobutton || '', tbg : pc.bgtariftipp || '', tbb : pc.bgaktion || '', tbbh : '', tfc : pc.coaktion || '', tcss : pc.customcss || '' } } /*** Handle dependencies ***/ // Handle Table specific Colors txDataStructure.clrs.bg = (opt.bg) ? '#' + opt.bg : txDataStructure.clrs.bg; txDataStructure.clrs.fc = (opt.fc) ? '#' + opt.fc : txDataStructure.clrs.fc; txDataStructure.clrs.th = (opt.th) ? '#' + opt.th : txDataStructure.clrs.th; txDataStructure.clrs.thc = (opt.thc) ? '#' + opt.thc : txDataStructure.clrs.thc; txDataStructure.clrs.tre = (opt.tre) ? '#' + opt.tre : txDataStructure.clrs.tre; txDataStructure.clrs.thf = (opt.thf) ? '#' + opt.thf : txDataStructure.clrs.thf; txDataStructure.clrs.abg = (opt.abg) ? '#' + opt.abg : txDataStructure.clrs.abg; txDataStructure.clrs.afc = (opt.afc) ? '#' + opt.afc : txDataStructure.clrs.afc; txDataStructure.clrs.bbg = (opt.bbg) ? '#' + opt.bbg : txDataStructure.clrs.bbg; txDataStructure.clrs.bfc = (opt.bfc) ? '#' + opt.bfc : txDataStructure.clrs.bfc; txDataStructure.clrs.tbg = (opt.tbg) ? '#' + opt.tbg : txDataStructure.clrs.tbg; txDataStructure.clrs.tbb = (opt.tbb) ? '#' + opt.tbb : txDataStructure.clrs.tbb; txDataStructure.clrs.tfc = (opt.tfc) ? '#' + opt.tfc : txDataStructure.clrs.tfc; // Handle hover color if (txDataStructure.clrs.abg) { txDataStructure.clrs.abgh = change_brightness(txDataStructure.clrs.abg, -25); } if (txDataStructure.clrs.bbg) { txDataStructure.clrs.bbgh = change_brightness(txDataStructure.clrs.bbg, -25); } if (txDataStructure.clrs.tbb) { txDataStructure.clrs.tbbh = change_brightness(txDataStructure.clrs.tbb, 50); } // affilinet partner id if (opt.affilid && !isNaN(opt.affilid)) { txDataStructure.pref.kd = 41; txDataStructure.prms.aff = txDataStructure.prms.aff + '|hnb=14'; } // subid if (opt.subid && opt.subid.length <= 64) { txDataStructure.pref.subid = opt.subid.replace(/[\W_]+/g, ''); if (txDataStructure.pref.kd == 41) txDataStructure.prms.aff += '|'; txDataStructure.prms.aff += opt.subid.replace(/[\W_]+/g, ""); } // tarif counter if (txDataStructure.pref.tarifcount != 20 && opt.txtarife && !isNaN(opt.txtarife)) { if (opt.txtarife < 3) { txDataStructure.pref.tarifcount = 3; } else if (opt.txtarife > 20) { txDataStructure.pref.tarifcount = 20; } } // telephone costs unity if (opt.tel) { if (opt.tel < 500) { txDataStructure.prms.telopt = (Math.round(opt.tel / 100 * 4)) / 4 * 100; } else { txDataStructure.prms.telopt = 500; } } // net preselection if (opt.net1 || opt.net2 || opt.net3) { if (!opt.net1 || opt.net1 != 'td1') txDataStructure.prms.net1 = ''; if (!opt.net2 || opt.net2 != 'vd2') txDataStructure.prms.net2 = ''; if (!opt.net3 || opt.net3 != 'o2') txDataStructure.prms.net3 = ''; } // Check if Provider tariff overview if (txDataStructure.prms.provider != '' && txDataStructure.prms.provider.search('-') == -1) { txDataStructure.prms.eff = opt.txeff || 0; txDataStructure.prms.phone = ''; txDataStructure.prms.hspeicher = ''; txDataStructure.prms.hfarbe = ''; txDataStructure.prms.internetopt = opt.txinetflat || 0; txDataStructure.prms.vol = opt.inet || 0; txDataStructure.prms.speed = opt.speed || 0; txDataStructure.prms.netlte = opt.lte || 0; txDataStructure.prms.dataauto = opt.txdataauto || 1; txDataStructure.prms.telopt = 0; txDataStructure.prms.smsopt = 0; txDataStructure.prms.laufzeit = opt.laufzeit || 24; txDataStructure.prms.zahlart = opt.art || ''; txDataStructure.prms.net1 = 'td1'; txDataStructure.prms.net2 = 'vd2'; txDataStructure.prms.net3 = 'o2'; txDataStructure.prms.esim = opt.esim || 0; txDataStructure.prms.multisim = opt.multisim || 0; txDataStructure.prms.rnmn = opt.rnmn || 0; txDataStructure.prms.music = opt.music || 0; txDataStructure.prms.audience = opt.audience || 0; } // Allnet Table default specifications if (cmp == 'txhandyallnettarife') { txDataStructure.pref.start = 1; txDataStructure.prms.telopt = 1; } // Prepaid Table default specifications if (cmp == 'txhandyprepaidtarife') { txDataStructure.pref.start = 1; txDataStructure.prms.telopt = 0; txDataStructure.prms.laufzeit = 24; txDataStructure.prms.zahlart = 'prepaid'; } // Smartphone Bundle table default specifications if ((cmp == 'txhandyshop' || cmp == 'txhandygalery') && isNaN(txDataStructure.prms.phone)) { console.log('test'); txDataStructure.pref.start = 1; } // Tarifrechner default specifications if (cmp == 'txhandytarifrechner' && txDataStructure.prms.phone !== '') { //txDataStructure.pref.start = 1; } // Banner table default specifications if (cmp == 'txhandybanner') { txDataStructure.pref.start = 1; } // Data Flat Table default specification if (cmp == 'txdatentarife') { txDataStructure.pref.start = 1; txDataStructure.prms.typ = 'Flatrate'; } if (cmp == 'txSurfPrepaidTarife') { txDataStructure.pref.start = 1; txDataStructure.prms.typ = 'Flatrate-Tagesflatrate-Surf+Pakete'; txDataStructure.prms.zahlart = 'prepaid'; } if (cmp == 'txfestnetz') { txDataStructure.pref.start = 1; txDataStructure.prms.eff = 0; txDataStructure.prms.speed = opt.txspeed || 0; } return txDataStructure; } // Create container var scriptTag = document.getElementsByTagName('script'); var s = scriptTag.length, f = 0; while (s--) { if (scriptTag[s].src.indexOf('tables/view/1682') >= 0) { f = s; break; } } scriptTag = scriptTag[f]; var parentTag = scriptTag.parentNode; var container = document.createElement("div") container.id = "f-tariffuxx1682"; container.setAttribute('cmpid', 'txfestnetz'); container.classList.add("tariffuxx"); container.innerHTML = '
'; parentTag.appendChild(container); var list = document.getElementsByTagName('script'); var i = list.length, flag = false; while (i--) { if (list[i].src === 'http://white.tariffuxx.de/services/php/txfesttarifs.php?v=3.3.17') { flag = true; } if (list[i].src === 'https://white.tariffuxx.de/services/php/txfesttarifs.php?v=3.3.17') { flag = true; } if (flag === true) { break; } } if (!flag) { var txHLoadingCss = document.createElement("link"); txHLoadingCss.setAttribute("rel", "stylesheet"); txHLoadingCss.setAttribute("type", "text/css"); txHLoadingCss.setAttribute("href", txSrc + "/css/loading.min.css?v=3.3.17"); document.getElementsByTagName("head")[0].appendChild(txHLoadingCss); var uri = "https://white.tariffuxx.de/services/php/txfesttarifs.php?v=3.3.17"; var txTableScript = document.createElement("script") txTableScript.type = "text/javascript"; txTableScript.src = uri; document.getElementsByTagName("head")[0].appendChild(txTableScript); var txStartTable = 'tariffuxx1682'; } txData.txfestnetz.tariffuxx1682.pref.track = 1; function change_brightness(hex, percent){ // strip the leading # if it's there hex = hex.replace(/^\s*#|\s*$/g, ''); // convert 3 char codes --> 6, e.g. `E0F` --> `EE00FF` if(hex.length == 3){ hex = hex.replace(/(.)/g, '$1$1'); } // reverse brigthness if black or white if (hex === '000000') percent = percent * -1; if (hex === 'ffffff') percent = percent * -1; var r = parseInt(hex.substr(0, 2), 16), g = parseInt(hex.substr(2, 2), 16), b = parseInt(hex.substr(4, 2), 16); if (percent > 0) { return '#' + ((0|(1<<8) + r + (256 - r) * percent / 100).toString(16)).substr(1) + ((0|(1<<8) + g + (256 - g) * percent / 100).toString(16)).substr(1) + ((0|(1<<8) + b + (256 - b) * percent / 100).toString(16)).substr(1); } else { percent = percent * -1; return '#' + ((0|(1<<8) + r * (100 - percent) / 100).toString(16)).substr(1) + ((0|(1<<8) + g * (100 - percent) / 100).toString(16)).substr(1) + ((0|(1<<8) + b * (100 - percent) / 100).toString(16)).substr(1); } } // Tooltip /* tooltip.init = function() { if (!t) var t = "tx-qtip"; var e, o, i, n = document.getElementById(t); if ((n || ((n = document.createElementNS ? document.createElementNS("http://www.w3.org/1999/xhtml", "div") : document.createElement("div")).setAttribute("id", t), document.getElementsByTagName("body").item(0).appendChild(n)), document.getElementById) && (this.tip = document.getElementById(this.name), this.tip && (document.onmousemove = function(t) { tooltip.move(t) }), i = document.getElementsByClassName('tx-tip'))) for (var l = 0; l < i.length; l++)(o = (e = i[l]).getAttribute("tx-tiptitle")) && (e.setAttribute("tx-tiptitle", o), e.removeAttribute("title"), e.removeAttribute("alt"), e.onmouseover = function() { tooltip.show(this.getAttribute("tx-tiptitle")) }, e.onmouseout = function() { tooltip.hide() }) }, tooltip.move = function(t) { var e = 0, o = 0; document.all ? (e = document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft, o = document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop, e += window.event.clientX, o += window.event.clientY) : (e = t.pageX, o = t.pageY), document.body.getBoundingClientRect() - e < 260 && (e -= 280 - (document.body.getBoundingClientRect() - e)), this.tip.style.left = e + "px", this.tip.style.top = o + this.offsetY + "px", this.tip.style.zIndex = "2147483647" }, tooltip.show = function(t) { this.tip && (this.tip.innerHTML = t, this.tip.style.display = "block") }, tooltip.hide = function() { this.tip && (this.tip.innerHTML = "", this.tip.style.display = "none") */ var qTipX = 0, qTipY = 20; tooltip = { name: "tx-qtip", offsetX: qTipX, offsetY: qTipY, tip: null }; tooltip.init = function () { var a = 'http://www.w3.org/1999/xhtml'; if (!b) { var b = "tx-qtip" } var c = document.getElementById(b); if (!c) { c = document.createElementNS ? document.createElementNS(a, "div") : document.createElement("div"); c.setAttribute("id", b); document.getElementsByTagName("body").item(0).appendChild(c) } if (!document.getElementById) return; this.tip = document.getElementById(this.name); if (this.tip) document.onmousemove = function (a) { tooltip.move(a) }; var d, e, f; f = document.getElementsByClassName('tx-tip'); if (f) { for (var i = 0; i < f.length; i++) { d = f[i]; e = d.getAttribute("tx-tiptitle"); if (e) { d.setAttribute("tx-tiptitle", e); d.removeAttribute("title"); d.removeAttribute("alt"); d.onmouseover = function () { tooltip.show(this.getAttribute("tx-tiptitle")) }; d.onmouseout = function () { tooltip.hide() } } } } }; tooltip.move = function (a) { var b = 0, c = 0; if (document.all) { b = document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft; c = document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; b += window.event.clientX; c += window.event.clientY } else { b = a.pageX; c = a.pageY } if (document.body.offsetWidth - b < 285) { b = b - (285 - (document.body.offsetWidth - b)); } this.tip.style.left = b + "px"; this.tip.style.top = c + this.offsetY + "px" }; tooltip.show = function (txt) { if (!this.tip) return; this.tip.innerHTML = txt; this.tip.style.display = "block" }; tooltip.hide = function () { if (!this.tip) return; this.tip.innerHTML = ""; this.tip.style.display = "none" };