with (quadIx_onet) { trace('initializing intertext static'); static.fstarts = []; try {x.x.x} catch(e) {static.fstarts.push(['conf', e.lineNumber, 0])}; conf.ctr_url = 'http://emisja.onet.ns.adkontekst.pl/c/c/?d=_D_&u=_UE_&e=_E_'; if (true) {//deprecated //conf.intertext_file_prefix = 'http://emisja.onet.ns.adkontekst.pl/_/static/akon/igr2/_FILE_?no_cache=1312233622142_3d97a5fa229c26806695a8c61c5dd25288e51db0'; conf.intertext_file_prefix = 'http://emisja.onet.ns.adkontekst.pl/_/static/onet/igr2/_FILE_/?no_cache=1312233622142_3d97a5fa229c26806695a8c61c5dd25288e51db0'; conf.oldIx = true; } else { conf.intertext_file_prefix = 'http://emisja.onet.ns.adkontekst.pl/_/getBaloon/?_FILE_&no_cache=1312233622142_3d97a5fa229c26806695a8c61c5dd25288e51db0'; conf.oldIx = false; } conf.intertext_other_prefix = 'http://emisja.onet.ns.adkontekst.pl/_/static/onet/igr2/_FILE_/?no_cache=1312233622142_3d97a5fa229c26806695a8c61c5dd25288e51db0'; conf.spliter2Url = 'http://emisja.onet.ns.adkontekst.pl/quad/intext_spliter/?prid=_PRID_&caid=_CAID_' + '&nc=_NC_&cc=_CC_&form=_FORM_&content=_CONTENT_&extra='; conf.spliterViewUrl = 'http://emisja.onet.ns.adkontekst.pl/quad/intext_spliter/?prid=_PRID_&caid=_CAID_&vcount=_E_&nc=_NC_'; conf.adtesterUrl = 'http://adtester-front'; conf.raportUrl = 'http://emisja.onet.ns.adkontekst.pl/_/raport/?ft=ix&'; conf.imager_url = 'http://emisja.onet.ns.adkontekst.pl/_/img/imager/?_ID_&nc=_NC_'; conf.f_imager_url = 'http://emisja.onet.ns.adkontekst.pl/akon/f_imager/?_ID_&nc=_NC_'; conf.nf_imager_url = 'http://emisja.onet.ns.adkontekst.pl/akon/nf_imager/?_ID_&nc=_NC_'; conf.gsp_imager_url = 'http://emisja.onet.ns.adkontekst.pl/_/getImage?vid=_ID_&typ=imgSP&nc=_NC_'; //***************************************************************************** conf.prefix = 'onet'; conf.version = '56'; conf.enableRaports = true; conf.raportLimit = 10; conf.coile = 100; conf.mod100 = 55; conf.tag_boost = {h1: 2, h2: 2, h3: 2, h4: 2, h5: 2, h6: 2, bold: 2, strong: 2, em: 2, i: 2, u: 2}; conf.whiteChars_str = '!@#$$%^&*()_+-=[]{};\':",/?\\|<>\n\t\r ' + unescape('%u201C%u201D'); conf.adc_skip_tags = ['SCRIPT', 'STYLE', 'SELECT', 'A', 'NOSCRIPT', 'TEXTAREA']; conf.trim_chars = '.'; conf.max_ad_count = 20; conf.def_ad_count = 4; conf.xAdRq = 0; conf.defaultTimeout = 400; conf.init_step = 7; conf.min_step = 7; conf.word_id_prefix = 'nsitsp_'; conf.a_prefix = 'a_'; conf.z0 = 1000000; conf.z_baloon = 0; conf.z_a = 3; conf.z_dbg = 10; conf.croneSpeed = 250; conf.baloon_hide_timeout = 2; conf.max_offset_error = 25; conf.max_err = 1000000; conf.min_err = 0.001; conf.different_ads_for_same_word = true; conf.different_ads = true; conf.different_words = false; conf.cacheTime = 900; //? conf.enableFlash = false; conf.deault_highlight_color = 'blue'; conf.minClickTime = 200; conf.longTimeout = 15000; conf.twoLetterWords = ''; conf.label_url = 'http://intext.onet.pl'; conf.label_href = 'http://intext.onet.pl'; conf.titleTxtFs = 13; conf.localDbg = false; conf.allowOnlyMeta = 0; conf.minSpanLength = 6; conf.minWordLength = 4; conf.c2aText = unescape(''); conf.enableC2a = false; conf.encoding = 'UTF-8'; conf.cssclass = ''; conf.enableCusomColors = false; conf.addCssClassName = false; conf.enders = []; conf.enders_no = []; conf.enders_ne = []; conf.boldIx = false; conf.enableWordClick = true; conf.dragDropClick = false; conf.maxSameWords = 1000000; conf.flashvars = function(rurl) { return {click: rurl, clickTag: rurl, clickTAG: rurl, clickthru: rurl}; } conf.adTypes = { T: {name: 'box', imagers: {}}, F: {name: 'flash', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=flash&element=image&nc=_TS_', flash: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=flash&element=flash&nc=_TS_'}}, L: {name: 'largeFlash', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=largeFlash&element=image&nc=_TS_', flash: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=largeFlash&element=flash&nc=_TS_'}}, A: {name: 'awatar', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=awatar&element=image&nc=_TS_'}}, E: {name: 'exclusive', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=exclusive&element=image&nc=_TS_'}}, E: {name: 'exclusive_normal', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=exclusive_normal&element=image&nc=_TS_'}}, S: {name: 'exclusive_sky', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=exclusive_sky&element=image&nc=_TS_'}}, Z: {name: 'imgK', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=imgK&element=image&nc=_TS_'}}, Y: {name: 'imgSP', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=imgSP&element=image&nc=_TS_'}}, X: {name: 'imgDP', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=imgDP&element=image&nc=_TS_'}}, W: {name: 'imgDB', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=imgDB&element=image&nc=_TS_'}}, V: {name: 'imgSW', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=imgSW&element=image&nc=_TS_'}}, D: {name: 'csAvatar', imagers: {}}, C: {name: 'csFavico', imagers: {}}, N: {name: 'nkbox', imagers: {image: 'http://emisja.onet.ns.adkontekst.pl/_/getImage/?vid=_ID_&typ=nkbox&element=image&nc=_TS_'}} }; conf.adTypes.G = { imagers: conf.adTypes.E.imagers, name: 'exclusive' } try {x.x.x} catch(e) {static.fstarts.push(['utils', e.lineNumber, 0])}; Utils = function(conf, options) { var that = this; this.options = options; if (!options) this.options = function() {return false}; conf.get = function(str, def) { if (conf[str] != undefined) return conf[str]; if (def != undefined) return def; if (that.busy) return; that.busy = true; that.raport('J3', 'No required configuration paramerer', str); that.busy = false; throw str; } this.duzo = 1000000000; this.sendstatlimit = 100; this.errors = []; this.raportLimit = conf.get('raportLimit', 5); this.version = conf.get('version'); this.rndId = Math.floor(this.duzo * Math.random()); this.errcnt = 0; this.stageNo = 0; this.notDone = true; this.timeArr = {}; this.lastTime = 0; this.currTask = null; this._dbg_ = {}; this._dbgc_ = {}; this.trash = []; this.fstarts = []; this.excList = []; this.tmp_state = {}; this.busy_f = {}; this.s1cache = {}; this.reportsByType = {}; this.todo = []; this.evlog = {s:'0'}; this.ie = navigator.appVersion.indexOf('MSIE') >= 0; this.ie6 = navigator.appVersion.indexOf('MSIE 6') >= 0; this.adTypes = { text: 'T', box: 'T', skyscraper: 'S', exclusive_sky: 'S', rectangle: 'E', billboard: 'E', exclusive: 'G', exclusive_normal: 'E', flash: 'F', avatar: 'A', awatar: 'A', imgK: 'Z', imgSP: 'Y', imgsp: 'Y', imgDP: 'X', imgDB: 'W', imgSW: 'V', imgMP: 'U', imgMF: 'M', csAvatar: 'D', csFavico: 'C', csavatar: 'D', csfavico: 'C', nkbox: 'N', largeflash: 'L' }; var ats = conf.get('adTypes'); for (var at in ats) { this.adTypes[ats[at].name] = at; } this.show_rect = function() {}; this.show_point = function() {}; this.printRect = function() {}; this.show_tmp_state = function() {}; this.insert_ix_dbg = function() {}; this.printTimes = function() {}; this.dbgAlterForms = function() {}; this.addBoxDbg1 = function() {}; this.replaceAds = function() {}; this.getImager = function(box, ktory) { ktory = that.ifnull(ktory, 'image'); if (box[ktory]) return box[ktory].replace('_MOD3_', Math.floor(Math.random() * 3)); var typ = that.ifnull(that.adTypes[box.typ], box.typ); typ = conf.get('adTypes')[typ]; if (!typ || !typ.imagers[ktory]) { that.raport('S1-', 'unknown imager', box.typ + '.' + ktory); return null; } return typ.imagers[ktory] .replace(/_ID_/g, box.id) .replace(/_TYP_/g, box.typ) .replace(/_ELEMENT_/g, ktory) .replace(/_TS_/g, box.timestamp) + (options('no_cache') ? '&nc2=' + that.now() : ''); } this.emptyAd = function() { return {title: '', desc: '', url: '', opis1: '', opis2: ''}; } this.co100 = function(coile) { var sto = that.ifnull(coile, conf.get('coile')); return that.rndId % sto === conf.get('mod100') % sto; } this.syso1 = function(str) { if (that.s1cache[str]) return trace(str); that.s1cache[str] = true; syso(str); } this.now = function() { return (new Date()).getTime(); } this.byId = function(id) { return document.getElementById(id); } this.cel = function(par, tag) { var el = document.createElement(tag); if (par) par.appendChild(el); return el; } this.cel_back = function(par, tag) { if (!par.firstChild) return that.cel(par, tag); var el = document.createElement(tag); par.insertBefore(el, par.firstChild); return el; } this.ctn = function(par, txt) { par.appendChild(document.createTextNode(txt)); } this.rm = function(node) { node.parentNode.removeChild(node); } this.clr = function(node) { while (node.firstChild) node.removeChild(node.firstChild); } this.createIframe = function(node, x, y, src) { if (that.ie && src) { for (var i=0; i= 0) return 'dbg_utils ' + lno; } catch(e) {} try { if (that.fstarts_closed === undefined) { that.fstarts_closed = true; that.fstarts.push('end', 100000, 0); syso('no line number table'); return '-'; } for (var i=0; i 0) && (exc === 'retry')) { return setTimeout(function() { that.syso1('retrying: ' + str); ret(rt - 1, a, b, c, d, e, false); }, firsttry ? 0 : utils.ifnull(to, conf.get('defaultTimeout'))); } else if (rt > 0) { that.ftry(str + '_failed', that.apply(oncomplete, false, a, b, c, d, e))(); that.errors.push(exc); that.exc(str, exc); } else { that.ftry(str + '_timeout', that.apply(oncomplete, null, a, b, c, d, e))(); that.raport('J1-', 'all tries failed', str); } } } return function(a, b, c, d, e) { return ret(retries, a, b, c, d, e, true); }; } this.onlyOnce = function(f, name, uniqParams) { if (name === undefined) name = f+''; return function(p1, p2, p3, p4, p5) { if (uniqParams) name += ' - ' + p1 + ',' + p2 + ',' + p3 + ',' + p4 + ',' + p5; if (that.busy_f[name]) return trace('not invoking: ' + name); that.busy_f[name] = true; setTimeout(function() { that.busy_f[name] = false; }, 0); f(p1, p2, p3, p4, p5); } } this.sendstat = function(str) { if (that.sendstatlimit-- < 0) return syso('reporting failed: ' + str, 'pink'); if (conf.get('enableRaports') === false) return syso('not reporting: ' + str); if (document.readyState === 'loading' || document.readyState === 'interactive') { return setTimeout(that.apply(that.sendstat, str), conf.get('defaultTimeout')); } if (that.raportLimit < 0) return syso('raport limit exceeded: ' + str); var logImage = that.byId('nsc_log_img_'+conf.get('prefix')+'_'+that.rndId+'_'+that.sendstatlimit); if (logImage === null) { logImage = new Image(1, 1); logImage.id = 'nsc_log_img_'+conf.get('prefix'); logImage.style.position = 'absolute'; logImage.style.left = '0px'; logImage.style.top = '0px'; document.body.appendChild(logImage); } else if (!logImage.complete) { syso('cannot happen', 'red'); return setTimeout(that.apply(that.sendstat, str), conf.get('defaultTimeout')); } that.raportLimit--; str = str.replace(/\s/g, '_').replace(/\{.*\}/g, '[...]').substring(0, 200); logImage.src = conf.get('raportUrl') + 'version=' + that.version + '&rnd=' + that.rndId + (that.prid ? ('&prid='+that.prid) : '') + (that.caid ? ('&caid='+that.caid) : '') + (that.plid ? ('&plid='+that.plid) : '') + '&ie=' + (that.ie ? (that.ie6 ? '6' : 'T') : 'F') + '&evlog=' + (that.evlog.s.length <= 100 ? that.evlog.s.replace(/ /g, '_') : '-') + str; syso('reporting: ' + str.substring(1), 'white'); } this.exc = function(fname, exc, param) { try { if (that.fstarts.length > 0) { syso('reporting exception at: ' + that.getLno(exc) + ' (' + exc.lineNumber + ')', 'red'); } that.excList.push(exc); if (param === undefined) param = '-'; that.sendstat('&type=exception' + '&c=' + that.errcnt++ + '&fname=' + fname + '&e=' + that.ifnull(exc.message, '-') + '&lno=' + that.getLno(exc) + '¶m=' + param ); } catch(e) { syso('raporting failed: ' + e.lineNumber); } } this.raportParams = function(all, msg, param) { all = all.toLowerCase(); ret = {msg: msg, param: param}; if (all.indexOf('s') >= 0) ret.cause = 'server'; if (all.indexOf('j') >= 0) ret.cause = 'js'; if (all.indexOf('p') >= 0) ret.cause = 'placement'; if (all.indexOf('1') >= 0) ret.sev = 1; if (all.indexOf('2') >= 0) ret.sev = 2; if (all.indexOf('3') >= 0) ret.sev = 3; if (all.indexOf('4') >= 0) ret.sev = 4; if (all.indexOf('o') >= 0) ret.old = true; if (all.indexOf('-') >= 0) ret.co100 = true; if (all.indexOf('f') >= 0) ret.c0 = true; return ret; } this.report_prv = function(all, msg, param, stray) { try { if (stray != undefined) { syso('stray params: ' + msg); that.later('stray', function() { that.raport('J1', 'stray raport params', msg); }); } if (typeof(all) === 'string') all = that.raportParams(all, msg, param); if (all.msg === undefined) all.msg = '-'; if (all.param === undefined) all.param = '-'; if (all.old === undefined) all.old = false; if (all.co100 === undefined) all.co100 = false; if (all.sev === undefined) all.sev = 0; if (all.cause === undefined) all.cause = 'unknown'; if (that.reportsByType[all.msg]) return trace(all.msg + ' - again'); that.reportsByType[all.msg] = all.param; var sysostr = all.msg + ': ' + all.param; var sysocolor = all.co100 ? 'navy' : ['yellow', 'gold', '#f50', 'red', '#70f'][all.sev]; if (all.co100 && !that.co100()) { return syso('not reporting - ' + sysostr, sysocolor); } syso('reporting - ' + sysostr, sysocolor); that.sendstat('&type=msg' + '&sev=' + all.sev + '&cause=' + all.cause + '&coile=' + (all.co100 ? conf.get('coile') : 1) + '&e=' + all.msg + '¶m=' + all.param + '&old=' + all.old + '&c=' + (all.c0 ? 0 : that.errcnt) ); if (all.sev > 0) that.errcnt++; } catch(e) { syso('reporting failed! ' + e.lineNumber, 'pink'); try { console.error(e); } catch(e1) {}; } } this.raport = this.report = this.report_prv; this.error = function(msg, param, old, co100) {//deprecated that.report_prv({sev: 2, msg: msg, param: param, old: old, co100: co100}); } this.warning = function(msg, param, old, co100) {//deprecated that.report_prv({sev: 1, msg: msg, param: param, old: old, co100: co100}); } this.placement = function(msg, param, old, co100) {//deprecated if (co100 === undefined) co100 = true; that.report_prv({sev: 2, msg: msg, param: param, old: old, co100: co100}); } this.info = function(msg, param, old, co100) {//deprecated that.report_prv({sev: 0, msg: msg, param: param, old: old, co100: co100}); } this.unknown = function(msg, param) {//deprecated that.report_prv({sev: 2, msg: msg, param: param}); } this.noAds = this.noAds0 = function(co100) { that.raport(co100 ? 'S3-o' : 'S3o', 'no ads'); that.stageNo = -1; } this.loadsc = function(href, nohead, enc) { if (!href) return that.raport('J2', 'no href'); if (that.options('no_cache')) href += '&noc=' + that.now(); syso('loading: ' + href.split('?')[0]); trace('params: ' + href); var sc = document.createElement('SCRIPT'); sc.src = href; sc.type = 'text/javascript'; sc.defer = false; sc.charset = that.ifnull(enc, conf.get('encoding')); var adc_head = document.getElementsByTagName('head'); if (adc_head[0] && !nohead) { adc_head[0].appendChild(sc); } else { that.raport('J1-', 'No head for document'); var where = document.body; if (typeof(nohead) === 'object') { if (nohead.parentNode) { where = nohead; } } where.appendChild(sc); } } this.start = function(taskName, nr) { var now = that.now(); if (that.currTask) { that.timeArr[that.currTask] += now - that.lastTime; } that.lastTime = now; that.currTask = taskName; if (taskName != null && that.timeArr[taskName] === undefined) { that.timeArr[taskName] = 0; } if (that.notDone && (nr === undefined || nr === 0)) { that.stageNo++; trace('stage ' + that.stageNo + ': ' + taskName); } } this.done = function(stats, type, coile) { if (coile === undefined) coile = conf.get('coile'); that.notDone = false; that.start(null); that.printTimes(); var msg = '&type=' + that.ifnull(type, 'done'); var total = 0; for (var i in that.timeArr) { if (i === 'null') continue; msg += '&'+i+'='+that.timeArr[i]; total += that.timeArr[i]; } for (var i in stats) { msg += '&'+i+'='+stats[i]; } if (that.co100(coile)) that.sendstat('&coile=' + coile + msg + '&total=' + total); } this.stages = function(n) { that.start('spliter1'); setTimeout(function() { if (that.evlog.s.split('BGI').length > 2) return that.raport('J2-', 'stray spliter call'); if (that.stageNo === n || that.stageNo === -1) return; if (that.stageNo > n) return syso('skipping script timeout check'); that.raport('S3-o', 'script died at stage', that.stageNo); }, conf.get('longTimeout')); if (!that.co100()) return; var to = Math.floor(that.rndId / that.duzo * conf.get('longTimeout')); setTimeout(function() { that.sendstat('&type=ok&t=' + to + '&max=' + conf.get('longTimeout')); syso('ok'); }, to); } this.checkVersion = function(co, v) { if (that.version+'' === v+'') return; if (that.version === '_' || v === '_') { return syso(co + ': skipping version chcek'); } that.raport('S1-', co + ' version mismach', v); } this.later = function(name, f) { if (that.todo.length === 0) { setTimeout(that.ftry('later - ' + name, function() { syso('invoking ' + that.todo.length + ' delayed functions'); var todo = []; for (var i=0; i 0) { var arr = x.split(','); var ret = []; for (var i=0; i is released under the MIT License */ this.swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("unknown: adContext.http.scripts.SWFO@5e725967( No field version (or public geter) in class adContext.http.scripts.SWFO)");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){ ag=[10,0,1]; for (var iii=3; iii<10; ++iii) try {new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash.' + iii)} catch(e) {syso("iii=" + iii); ag=[0,0,0]; break;} }}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){/*broken*/}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X 0) { if (that.trimArr[word.charAt(0)]) { word = word.substring(1); o.begin++; } else if (that.trimArr[word.charAt(word.length - 1)]) { word = word.substring(0, word.length - 1); } else { break; } } var ok = true; for (var ch in that.trimArr) if (word.indexOf(ch) >= 0) ok = false; if (!ok) { trace('skipping word: ' + word); word = ''; continue; } if(ch === '<' && noTags !== true) tag = true; o.orgin=word; o.content=that.ecapeNationalLowerCase(word); o.set=0; if (word.length > 1) array.push(o); word = ''; } } else { if(ch === '>' && !quotes && !apostrof) { tag=false; } else if(ch === '"' && !apostrof) { quotes=!quotes; } else if(ch === "'" && !quotes) { apostrof=!apostrof; } } } return array; } this.copy = function(obj) { var ret = {}; for (var i in obj) ret[i] = obj[i]; return ret; } this.printObj = function(obj) { var ret = ''; for (var i in obj) ret += ', ' + i + '=' + obj[i]; return ret.substring(2); } this.walk = function(node, state, onTextNode, onEnter, onExit, onLeaf) { if ((node.nodeType === 3) && (node.nodeValue) && (node.nodeValue.length > 2) && (node.nodeValue[0] != '<')) { return onTextNode(node, state); } var ch = node.childNodes; var tag = 'unknown tag'; if (node.tagName != undefined) tag = node.tagName.toLowerCase(); if ((ch.length === 0) && onLeaf) return onLeaf(tag, node, state); if (onEnter) { try { state = onEnter(tag, node, state); } catch(e) { if (typeof(e) === 'object') utils.exc('walk', e); return; } } for (var i=0; i 1) color = ['#00a', '#22f']; that.mark(node, color[0], color[1], 'text node'); that.spans.push(s); }, function(tag, node, state) { if ((new Date()).getTime() > that.timeEnd) { throw that.mark(node, '#000', '#222', 'timeout'); } for (var t=0; t that.maxWordLength) continue; that.addWord(hashArr, content, that.spans[t].contextBust, 1, arr.length); } } } this.addWord = function(hashArr, word, bust, only, msl) { word = word.toLowerCase(); if (word.length === 2 && that.twoLetterWords[word] === undefined) return; if (bust === undefined) bust = 1; var o = that.getBaseForm(word); if (o === null) return; if (hashArr[o.bform]) { hashArr[o.bform].only |= only; hashArr[o.bform].msl = Math.max(hashArr[o.bform].msl, msl); hashArr[o.bform].count++; hashArr[o.bform].words += ',' + word; hashArr[o.bform].totalbust += bust; hashArr[o.bform].bust = hashArr[o.bform].totalbust * hashArr[o.bform].origBust / hashArr[o.bform].count; hashArr[o.bform].busts.push(bust); return; } o.only = only;//przynajmniej jedno wystapienie w kontencie dla Ix o.msl = msl;//max. span length o.count = 1; o.words = word; if (that.impWords[word] !== undefined) { o.important = that.impWords[word];//dbg o.bust *= that.impWords[word]; } o.origBust = o.bust; o.busts = [o.bust];//dbg o.bust = o.bust * bust; o.totalbust = bust; hashArr[o.bform] = o; } this.getReturnStr = function(hashArr) { var array_tmp = []; for(var key in hashArr) { if ({}[key] === undefined) { var val = hashArr[key]; if (typeof(val) != 'object') continue; if ((!val.only) || (val.so <= 0)) continue; array_tmp.push(val); } } if (array_tmp.length === 0) { utils.raport('P1-o', 'no content', undefined); return ''; } else if (array_tmp.length < 30) { utils.raport('P0-o', 'low content', array_tmp.length); } for (var i=0; ithat.max_url) break; content += escape(array_tmp[p].word); content += '+'; array_tmp[p].normal_val = c_val; trace(c_val + ' ---> ' + array_tmp[p].word + ' (' + array_tmp[p].bform + ', ' + hashArr[array_tmp[p].bform].val + ')'); } return content; } this.addWords = function(hashArr, words, bust, only) { var arr = that.nsSplit(words); for (var i=0; i= that.minWordLength && content.length <= that.maxWordLength) { that.addWord(hashArr, arr[i].content, bust, only, arr.length); } } } this.getInputContent = function(hashArr) { var m = document.getElementsByTagName('input'); for (var i=0;i= 0) { that.addWords(hashArr, m[i].content, that.desc_boost, that.allowOnlyMeta); } else if (d.indexOf('keywords') >= 0) { that.addWords(hashArr, m[i].content, that.kw_boost, that.allowOnlyMeta); } } var t = document.getElementsByTagName('title'); for (var i=0; i= 0) that.getMetaContent(that.content); if (co.indexOf('I') >= 0) that.getInputContent(that.content); if (co.indexOf('C') >= 0) that.getSpansAndTexts(that.content, params); var ret = that.getReturnStr(that.content); var exceeded = (new Date()).getTime() - that.timeEnd; trace('parsing time='+(exceeded+that.timeout)); if (exceeded >= 0) utils.raport('P1-o', 'timeout exceeded', exceeded); syso('parsing completed'); return ret; } } try {x.x.x} catch(e) {static.fstarts.push(['writer', e.lineNumber, 0])}; IxWriter = function(conf, utils, cookie_params, host, prid, caid, version, events, ref) { this.baloon = document.createElement('div'); this.window_status = ''; this.croneId = 0; this.divsCache = {}; this.click_disabled = false; this.stats = {cnt: 0}; this.counter = 0; this.underlined = {}; this.aaa = !conf.get('dragDropClick') || (utils.ie === cookie_params('mclick')); this.aarr = []; this.ixForms = {}; this.startDef = [0, 4, 8, 12, 16, 22]; this.closeBtnBg = function(name) { var url = conf.get('intertext_other_prefix').replace(/_FILE_/g, name); if (cookie_params('no_cache')) { url += '&nc2=' + utils.now(); } return 'transparent url(' + url + ') no-repeat scroll'; } var that = this; var fire = utils.ifnull(events, function() {}); this.init_imgs = function() { var imgs = that.imgs = []; if (conf.get('oldIx')) { that.imgs = [ [282, 131, -18, -131, 'intertext_back.png', [nsa_r(3, 3, 246, 96), nsa_t({x:24,y:99},{x:14,y:125},{x:49,y:99}), nsa_l(250, 22, 264, 80)], 0], [284, 136, -18, -5, 'intertext_back2.png', [nsa_r(3, 30, 246, 124), nsa_t({x:15,y:0},{x:26,y:28},{x:51,y:28}), nsa_l(251, 48, 265, 107)], 1], [283, 134, -236, -5, 'intertext_back3.png', [nsa_r(3, 29, 246, 122), nsa_t({x:202,y:26},{x:229,y:27},{x:237,y:1}), nsa_l(250, 47, 264, 106)], 2], [281, 129, -236, -133, 'intertext_back4.png', [nsa_r(3, 3, 246, 96), nsa_t({x:204,y:96},{x:230,y:96},{x:241,y:124}), nsa_l(249, 22, 265, 79)], 3], [274, 232, -18, -4, 'it-tl.png', [nsa_r(4, 26, 247, 218), nsa_t({x:17,y:0},{x:21,y:24},{x:50,y:23}), nsa_l(251, 144, 264, 204)], 1], [274, 232, -231, -5, 'it-tr.png', [nsa_r(4, 26, 247, 218), nsa_t({x:234,y:1},{x:200,y:24},{x:229,y:24}), nsa_l(251, 144, 264, 203)], 2], [274, 232, -19, -228, 'it-bl.png', [nsa_r(4, 3, 246, 195), nsa_t({x:15,y:222},{x:22,y:197},{x:53,y:197}), nsa_l(251, 122, 264, 179)], 0], [274, 232, -230, -226, 'it-br.png', [nsa_r(3, 2, 247, 197), nsa_t({x:199,y:199},{x:234,y:222},{x:228,y:199}), nsa_l(251, 122, 265, 179)], 3], [324, 338, -21, -5, 'itf-tl.png', [nsa_r(2, 35, 300, 329, false), nsa_t({x:19,y:0},{x:26,y:33},{x:60,y:33}, false), nsa_l(303, 235, 316, 294), nsa_a(280, 40, 300, 60), nsa_l(2, 35, 100, 60)], 1], [324, 338, -279, -4, 'itf-tr.png', [nsa_r(2, 35, 299, 327, false), nsa_t({x:241,y:32},{x:277,y:34},{x:283,y:2}, false), nsa_l(302, 236, 317, 294), nsa_a(280, 40, 300, 60), nsa_l(2, 35, 100, 60)], 2], [324, 338, -21, -326, 'itf-bl.png', [nsa_r(2, 3, 299, 296, false), nsa_t({x:25,y:298},{x:18,y:332},{x:61,y:298}, false), nsa_l(303, 203, 316, 262), nsa_a(280, 5, 300, 25), nsa_l(2, 2, 100, 34)], 0], [324, 338, -280, -327, 'itf-br.png', [nsa_r(3, 4, 299, 296, false), nsa_t({x:283,y:331},{x:241,y:297},{x:276,y:298}, false), nsa_l(303, 203, 316, 262), nsa_a(280, 5, 300, 25), nsa_l(2, 2, 100, 34)], 3], [324, 338, -21, -5, 'itf-tl_v2.png', [nsa_r(2, 35, 300, 329, false), nsa_t({x:19,y:0},{x:26,y:33},{x:60,y:33}, false), nsa_l(303, 235, 316, 294), nsa_a(280, 40, 300, 60), nsa_l(2, 35, 100, 60)], 1], [324, 338, -279, -4, 'itf-tr_v2.png', [nsa_r(2, 35, 299, 327, false), nsa_t({x:241,y:32},{x:277,y:34},{x:283,y:2}, false), nsa_l(302, 236, 317, 294), nsa_a(280, 40, 300, 60), nsa_l(2, 35, 100, 60)], 2], [324, 338, -21, -326, 'itf-bl_v2.png', [nsa_r(2, 3, 299, 296, false), nsa_t({x:25,y:298},{x:18,y:332},{x:61,y:298}, false), nsa_l(303, 203, 316, 262), nsa_a(280, 5, 300, 25), nsa_l(2, 2, 100, 34)], 0], [324, 338, -280, -327, 'itf-br_v2.png', [nsa_r(3, 4, 299, 296, false), nsa_t({x:283,y:331},{x:241,y:297},{x:276,y:298}, false), nsa_l(303, 203, 316, 262), nsa_a(280, 5, 300, 25), nsa_l(2, 2, 100, 34)], 3], [594, 394, -580, 10, null, [nsa_r(0, 0, 594, 394, false)], 2, 10], [594, 394, -300, 10, null, [nsa_r(0, 0, 594, 394, false)], 5], [594, 394, 15, 10, null, [nsa_r(0, 0, 594, 394, false)], 1, 10], [594, 394, -580, -440, null, [nsa_r(0, 0, 594, 394, false)], 3, 10], [594, 394, -300, -440, null, [nsa_r(0, 0, 594, 394, false)], 4], [594, 394, 15, -440, null, [nsa_r(0, 0, 594, 394, false)], 0, 10] ]; } else { for (var s=0; s<20; s+=4) { var params = [ {w: 320, h: 160}, {w: 334, h: 292}, {w: 364, h: 368, x: true}, {w: 364, h: 356, x: true} //TODO ][s>>2]; for (var i=s; i#orig#'; this.highlighter = function(orig, mysp_id, color) { var b = that.params.bold || conf.get('boldIx') && that.params.bold !== false; var bold = b === undefined ? '' : ('font-weight: ' + (b+'' === 'true' ? 'bold;' : 'normal;')); return that.highlight_str .replace(/#CSS#/g, conf.get('cssclass')) .replace(/#id#/g, mysp_id) .replace(/#bold#/g, bold) .replace(/#color#/g, color) .replace(/#orig#/g, orig); } var nsa_r = that.nsa_r = function(x1, y1, x2, y2, cc) { if (cc === undefined) cc = true; if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; } var ret = {}; ret.beforeclick = function() {}; ret.onmousemove = utils.onlyOnce(function(box) { if (cc && !utils.ie6) that.baloon.style.cursor = 'pointer'; that.window_status = box.url; }, 'windowstatus'); ret.onclick = function(box, extra) { var from = 'W'; if (y2-y1 > 50) from='R'+(x2-x1)+'x'+(y2-y1); if (cc) that.mainaction(box.aa, extra, from); } ret.inside = function(x, y) { return (x+1 >= x1) && (y+1 >= y1) && (x-1 <= x2) && (y-1 <= y2); } ret.x1 = x1; ret.y1 = y1; ret.x2 = x2; ret.y2 = y2; ret.w = x2-x1; ret.h = y2-y1; return ret; } var nsa_a = that.nsa_a = function(x1, y1, x2, y2) { var ret = nsa_r(x1, y1, x2, y2, false); ret.onmousemove = function() { trace('over'); if (that.curr_a) { that.curr_a.style.backgroundPosition = '0 0'; that.curr_a.style.cursor = 'pointer'; } else { if (!utils.ie6) that.baloon.style.cursor = 'pointer'; } that.window_status = 'X'; ret.onmouseout = function() { trace('out'); if (that.curr_a) { that.curr_a.style.backgroundPosition = '-100px 0'; that.curr_a.style.cursor = ''; } else { if (!utils.ie6) that.baloon.style.cursor = ''; } ret.onmouseout = null; that.window_status = ''; }; }; ret.onclick = function() { that.baloon.style.display = 'none'; that.onAdOut(); } return ret; } var nsa_r1 = that.nsa_r1 = function(r, cc) { return nsa_r(r.x, r.y, r.x+r.w, r.y+r.h, cc); } var nsa_n = that.nsa_n = function(x1, y1, x2, y2) { var ret = nsa_r(x1, y1, x2, y2, false); ret.beforeclick = function(x, y) { if (ret.inside(x, y)) { syso('unclickable area'); that.dont_click(); } } return ret; } var nsa_l = that.nsa_l = function(x1, y1, x2, y2) { var ret = nsa_r(x1, y1, x2, y2, true); ret.onmousemove = utils.onlyOnce(function() { that.baloon.style.cursor = 'pointer'; that.window_status = conf.get('label_url'); }, 'windowstatus'); ret.onclick = function(_, extra) { extra.label = true; that.mainaction(conf.get('label_href').replace(/_EREF_/g, escape(escape(ref))), extra, 'L'); } return ret; } var nsa_t = that.nsa_t = function(p1, p2, p3, cc) { if (cc === undefined) cc = true; var ret = nsa_r(0, 0, 0, 0, cc); var sqr = function(x) { return x*x; } var d = function(p1, p2) { return Math.sqrt(sqr(p1.x - p2.x) + sqr(p1.y - p2.y)); } var a = d(p1, p2); var b = d(p2, p3); var c = d(p3, p1); var pt = function(a, b, c) { var p = (a + b + c) / 2; return Math.sqrt(p*(p-a)*(p-b)*(p-c)); } var p = pt(a, b, c); ret.inside = function(x, y) { var s = {x:x, y:y}; var sa = d(s, p3); var sb = d(s, p1); var sc = d(s, p2); var val = pt(sa, sb, c) + pt(sb, sc, a) + pt(sc, sa, b); return p * 1.01 > val; } ret.onclick = function(box, extra) { if (cc) that.mainaction(box.aa, extra, 'T'); } return ret; } this.setImg = function(n) { if (that.imgs[n][4] === null) { syso('showing no baloon'); that.baloon.style.background = 'transparent'; return; } var gdzie = conf.get('intertext_file_prefix') .replace(/_FILE_/g, that.imgs[n][4]) if (utils.ie6) { that.baloon.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader (src=' + gdzie + ',sizingMethod="image")'; } else { that.baloon.style.background = 'transparent url('+gdzie+') no-repeat'; } } this.cachedDiv = function(div, key) { var ky = ''+key; var d = that.divsCache[key]; var off = that.offset(div); if (d === undefined) { d = utils.cel(document.body, 'div'); d.style.width = off.w + 'px'; d.style.height = off.h + 'px'; d.style.position = 'absolute'; d.style.zIndex = div.style.zIndex ? div.style.zIndex + 1 : 1;//XXX d.oldIndex = d.style.zIndex; d.old = false; that.divsCache[key] = d; } else { d.old = true; d.style.zIndex = d.oldIndex; d.style.display = ''; } d.style.left = off.x + 'px'; d.style.top = off.y + 'px'; return d; } this.setz = function(el, confPos) { el.style.zIndex = conf.get('z0') + conf.get(confPos); } this.style = function(el, st) { var a = st.replace(/: /g, ':').replace(/; /g, ';').split(';'); for (var i=0; i= r.x - e) && (p.x <= r.x + r.w + e) && (p.y >= r.y - e) && (p.y <= r.y + r.h + e); } this.extend_rect = function(rect, point) { rect.w = Math.max(rect.w, rect.x - point.x + rect.w, point.x - rect.x); rect.h = Math.max(rect.h, rect.y - point.y + rect.h, point.y - rect.y); rect.x = Math.min(rect.x, point.x); rect.y = Math.min(rect.y, point.y); return rect; } that.shift_rect = function(rect, v, mult) { if (mult === undefined) mult = 1; var ret = { x: rect.x + mult * v.x, y: rect.y + mult * v.y } if (rect.w != undefined) { ret.w = rect.w; ret.h = rect.h; } return ret; } this.getWordCoords = function(a, mpos) { var ret = that.offset(a); if (!utils.ie) return ret; if (that.insideR(ret, mpos, conf.get('max_offset_error')) && (ret.w <= 120) && (ret.h <= 40)) { if (utils.ie) { for (var dx=-1; dx<2; dx+=2) { for (var dy=-1; dy<2; dy+=2) { ret = that.extend_rect(ret, { x: mpos.x + 10 * dx, y: mpos.y + 10 * dy }); } } } return ret; } else { return {x: mpos.x - 100, y: mpos.y - 20, w: 200, h: 30} } } this.getAdPos = function(aoff, mpos) { if (that.insideR(aoff, mpos, conf.get('max_offset_error'))) { return {x: aoff.x + aoff.w / 2, y: aoff.y + aoff.h - 3}; } else { return mpos; } } this.onAdOut = function() { utils.foreach(that.divsCache, function(i, v) { v.style.display = 'none'; v.style.zIndex = -utils.duzo; }); if (that.last_a) that.last_a.style.zIndex = 0; } this.mouseOverOut = function(el, evt) { el.onmouseover = utils.apply(evt, true); el.onmouseout = utils.apply(evt, false); return el; } this.dont_click = function() { that.click_disabled = true; utils.later('dontClick', function() { that.click_disabled = false; }); } /******************************************************************************/ this.mainaction = utils.ftry('mainaction', function(aa, extra, from) { if (!conf.get('enableWordClick') && (from === 'W' || from === 'T')) { return syso('word click disabled'); } if (that.click_disabled || that.dont_hide_ix) { return syso("don't click"); } syso(that.aaa ? 'mouse down' : 'click-main'); var aabox = {aa: aa}; fire('onbeforemainaction', aabox, extra, from); aa = aabox.aa; if (!extra.label) { try { var teraz = (new Date()).getTime(); if (teraz - extra.showTime < conf.get('minClickTime')) { that.dont_click(); utils.raport('P1o', 'early click', teraz - extra.showTime); return; } extra.totalTime = utils.ifnull(extra.totalTime, 0) + teraz - extra.showTime; var aaa = '&etag='+version+'&IXRND='+escape(utils.rndId)+'&type=click'; aaa += '&word='+escape(extra.word)+'&shows='+escape(extra.shows); aaa += '&lastTime='+escape(teraz-extra.showTime); aaa += '&totalTime='+escape(extra.totalTime); aaa += '&prid='+escape(prid)+'&caid='+escape(caid); if (from) aaa += '&frm='+from; aa += aaa; syso(aa); extra.showTime = teraz; setTimeout(utils.ftry('afterClick', function() { utils.sendstat('&type=afterClick' + aaa.split('&type=click')[1] + '&c2a=' + that.fromC2a + '&lpm=' + that.lpm); that.oldlpm = that.lpm; that.fromC2a = false; that.lpm = false; }), 500);//XXX } catch(e) { utils.exception('mainaction stats', e); } } if (that.aaa) { for (var i=0; i 20) { url = url.substring(0, 12) + url.substring(12, url.length - 5).replace(/\./g, '.') + url.substring(url.length - 5); } inn.innerHTML = url; return ret; } this.createFlash = utils.ftry('createFlash', function(d, box, x, y, params) { utils.swfo(d, x + 'px', y + 'px', utils.getImager(box, 'flash'), utils.ifnull(params, {}), {}, conf.get('flashvars')(escape(box.aa))); }); this.drawLargeFlashBox = utils.ftry('drawFlashBox', function(box, main, dir, extra) { main.style.background = 'transparent url(' + utils.getImager(box) + ') no-repeat'; main.style.cursor = 'auto'; main.style.position = 'absolute'; var int = that.cel(main, 'div', 'width: 550px; height: 350px; marginLeft: 22px; marginTop: 22px;'); if (!utils.ie6) { int.style.cursor = 'pointer'; } that.createFlash(int, box, 550, 350, {wmode: 'transparent'}); var closeBtn = that.cel(main, 'div', 'right: 3px; top: 3px; width: 19px; height: 19px; position: absolute'); if (!utils.ie6) { closeBtn.style.cursor = 'pointer'; } closeBtn.onmouseover = function() { closeBtn.style.background = that.closeBtnBg('close1.gif'); } closeBtn.onmouseout = function() { closeBtn.style.background = that.closeBtnBg('close2.gif'); } closeBtn.onclick = function() { that.baloon.style.display = 'none'; that.onAdOut(); } closeBtn.onmouseout(); }); this.drawFlashBox = utils.ftry('drawFlashBox', function(box, main, dir, extra) { var extraTop = parseInt(main.parentNode.style.paddingTop); var sp = that.cel(main, 'span', 'height: 338px'); var a = that.cel(sp, 'div', 'right: 26px; height: 19px; width: 19px; position: absolute'); a.style.top = 2 + extraTop + 'px'; a.style.background = that.closeBtnBg('itf-btn-close-a.gif'); a.style.backgroundPosition = '-100px 0'; if (conf.get('noFlashCloseBtn', false)) { a.style.display = 'none'; } var main_sp = that.cel(sp, 'span'); var d = that.cel(main_sp, 'div', 'width: 300px; height: 250px; marginTop: 24px; position: absolute'); that.className(d, 'nsix_noFlash'); d.style.background = 'transparent url(' + utils.getImager(box) + ') no-repeat'; d.onclick = function() { that.mainaction(box.aa, extra, 'F'); } d.style.cursor = 'pointer'; if (box.typ === utils.adTypes.flash) { that.createFlash(d, box, 300, 250); } if (box.typ === utils.adTypes.imgSP) { extraTop -= conf.get('imgSpUrldY', 12); } var urlSp = that.drawUrl(sp, 'span', 'width: 300px; height: 20px; position: absolute;' + ' fontSize: 10px; textAlign: center; fontFamily: Arial; color: blue', box.url); that.style(utils.ie ? urlSp : urlSp.firstChild, 'position: absolute; color: blue; top: ' + (extraTop + 278) + 'px; width: 300px; textAlign: center;'); that.className(urlSp, 'nsix_urlF'); urlSp.style.top = extraTop + 278 + 'px'; that.curr_a = a; that.mouseOverOut(urlSp, function(over) { urlSp.style.fontWeight = over ? 'bold' : 'normal'; urlSp.style.cursor = over ? 'pointer' : ''; }); urlSp.onclick = function() { that.mainaction(box.aa, extra, 'U'); } if (conf.get('enableCusomColors')) { if (that.params.colorUrl) urlSp.style.color = that.params.colorUrl; } }); this.drawExBox = utils.ftry('drawExBox', function(box, main, dir, extra) { main.style.textAlign = 'center'; var imgDiv = that.cel(main, 'div', 'textAlign: center; width: 100%'); that.className(imgDiv, 'nsix_imgE'); var img = that.cel(imgDiv, 'img'); that.style(img, 'margin: 5px; maxWidth: 200px; maxHeight: 200px; display: inline;'); img.src = utils.getImager(box); var udiv = that.pad(that.drawUrl(main, 'div', '', box.url), 10, 3, 10, 15, '85%'); that.className(udiv, 'nsix_urlE'); that.style(udiv, 'font: 12px Arial; color: green; borderBottom: 1px solid #E0E0E0; textAlign: center; marginLeft: 8px'); var tdiv = that.cel(that.pad(that.cel(main, 'div', 'textAlign: center'), 10, 12, 10, 0, '85%'), 'b'); that.className(tdiv, 'nsix_titleE'); that.style(tdiv, 'color: #1C4676; textAlign: center; font: 15px Arial'); that.ctn(tdiv, box.title); var ddiv = that.cel(that.pad(that.cel(main, 'div', 'textAlign: center'), 10, 12, 10, 0, '85%'), 'span'); that.className(ddiv, 'nsix_descE'); that.style(ddiv, 'color: #6E6E6E; textAlign: center; font: 12px Arial'); that.ctn(ddiv, box.desc); if (conf.get('enableCusomColors')) { if (that.params.colorTitle) tdiv.style.color = that.params.colorTitle; if (that.params.colorDesc) ddiv.style.color = that.params.colorDesc; if (that.params.colorUrl) udiv.style.color = that.params.colorUrl; } }); this.drawTextBox = utils.ftry('drawTextBox', function(box, main, dir, extra) { var tdiv = that.pad(that.cel(main, 'div'), 10, 4, 10, 0); that.className(tdiv, 'nsix_titleT'); var _u = that.cel(tdiv, 'u'); that.className(_u, 'nsix_titleTu'); var _b = that.cel(_u, 'b', 'font: ' + conf.get('titleTxtFs') + 'px Arial; fontWeight: bold'); that.className(_b, 'nsix_titleTb'); that.ctn(_b, box.title); var ddiv = that.pad(that.cel(main, 'div'), 10, 4, 10, 0); that.className(ddiv, 'nsix_descT'); ddiv.style.font = '11px Arial'; that.ctn(ddiv, box.desc); var udiv = that.pad(that.drawUrl(main, 'div', '', box.url), 10, 4, 10, 0); that.className(udiv, 'nsix_urlT'); that.style(udiv, 'font: 11px Arial; color: blue'); if (conf.get('enableCusomColors')) { if (that.params.colorTitle) _b.style.color = that.params.colorTitle; if (that.params.colorDesc) ddiv.style.color = that.params.colorDesc; if (that.params.colorUrl) udiv.style.color = that.params.colorUrl; } }); this.drawC2a = function(main, fs, proc) { if (!conf.get('enableC2a', false)) return; var c2adiv = that.cel(main.parentNode, 'div'); that.ctn(c2adiv, conf.get('c2aText')); that.className(c2adiv, 'nsix_c2a'); c2adiv.style.color = 'blue'; c2adiv.style.textAlign = 'right'; c2adiv.style.fontFamily = 'Arial'; c2adiv.style.fontSize = fs + 'px'; c2adiv.style.cursor = 'pointer'; c2adiv.style.marginRight = '5px'; c2adiv.style.width = '100%'; main.style.height = proc; return; } this.draw_ad_content = function(box, main, dir, extra) { if (box.typ === utils.adTypes.flash || box.typ === utils.adTypes.imgSP) { return that.drawFlashBox(box, main, dir, extra); } else if (box.typ === utils.adTypes.largeflash) { return that.drawLargeFlashBox(box, main, dir, extra); } else if (box.typ === utils.adTypes.exclusive || box.typ === utils.adTypes.billboard) { that.drawC2a(main, 12, '90%'); return that.drawExBox(box, main, dir, extra); } else if (box.typ != utils.adTypes.text) { utils.raport('J2', 'unknown ad type', box.typ); } that.drawC2a(main, 11, '80%'); return that.drawTextBox(box, main, dir, extra); } this.showIx = utils.ftry('showIx', function(ev, art, spanId, box, extra, params) { if (that.ads_are_showed === spanId) return; that.ads_are_showed = spanId; syso('showing ad #' + box.box_id + ' ' + box.typ); if (box.shows === 0) { utils.loadsc(conf.get('spliterViewUrl') .replace(/_PRID_/g, prid) .replace(/_CAID_/g, caid) .replace(/_E_/g, box.bcpe) .replace(/_NC_/g, utils.now()) .replace(/_K_/g, escape(box.aa))); if (utils.rndId % conf.coile === conf.get('mod100')) { utils.sendstat('&type=firstshow&box_id=' + box.id + '&word=' + extra.word); } } extra.showTime = (new Date()).getTime(); fire('onbeforeshowix'); that.onAdOut(); utils.clr(that.baloon); that.style(that.baloon, 'display: inline; textAlign: left'); that.setz(that.baloon, 'z_baloon'); var to = conf.get('baloon_hide_timeout'); var prev_status = that.prev_status = that.window_status; extra.shows = box.shows++; var exType = 0; if (box.typ === utils.adTypes.exclusive) exType = 1; if (box.typ === utils.adTypes.billboard) exType = 1; if (box.typ === utils.adTypes.flash) exType = 2; if (box.typ === utils.adTypes.imgSP) exType = 3; if (box.typ === utils.adTypes.largeFlash) exType = 4; var scrol = that.getScroll(); var size = that.getSize(); var mpos = that.mpos = that.mouseCoords(ev); var a = that.aarr[1] = utils.byId(conf.get('a_prefix', 'a_') + spanId); that.last_a = a; that.setz(a, 'z_a'); var arto = that.offset(art); utils.show_rect('article', arto, 'gray'); utils.show_point('mouse_pos', mpos, 'brown', 'z_point'); var aoff = that.getWordCoords(a, mpos); utils.show_rect('aoff', aoff, 'blue'); var off = that.getAdPos(aoff, mpos); utils.show_point('off', off, 'green'); var dir = -1; var minerr = utils.duzo; var adirs = utils.ifnull(params.allow_dirs, [0, 0, 0, 0, 0, 0]); var conferr = conf.get('min_err'); for (d=that.startDef[exType]; d 1) syso('minerr= ' + minerr, '#ff4400'); var img = that.img = that.imgs[dir]; if (img === null) return utils.raport('J2', 'showIx - img is null', dir); utils.tmp_state.img_src = img[4]; that.setImg(dir); var img_pos = { x: off.x + img[2], y: off.y + img[3], w: img[0], h: img[1] } utils.printRect('img_pos', img_pos); utils.show_rect('r00', img_pos, 'green'); var cont0 = img[5][0]; that.baloon.style.left = img_pos.x + 'px'; that.baloon.style.top = img_pos.y + 'px'; that.baloon.style.width = cont0.w + 'px'; that.baloon.style.height = cont0.h + 'px'; if (utils.ie6) that.baloon.style.cursor = 'pointer'; that.pad(that.baloon, cont0.x1, cont0.y1, img_pos.w - cont0.x2, img_pos.h - cont0.y2); var main = that.pad(utils.cel(that.baloon, 'div'), 0, 0, 0, 0, '100%', '100%'); utils.later('fixBaloon', function() { if (that.baloon.offsetWidth === img_pos.w) return; syso('ie width'); that.baloon.style.width = img_pos.w + 'px'; that.baloon.style.height = img_pos.h + 'px'; }); if (cookie_params('adc_dbgL2')) main.style.border = '1px solid olive'; that.draw_ad_content(box, main, dir, extra); var oldmousemove = document.onmousemove; var oldkeypress = document.onkeypress; var oldscroll = document.onscroll; document.onkeypress = document.onscroll = document.onmousemove = function(ev) { if (typeof(oldmousemove) === 'function') oldmousemove(ev); if (ev === undefined) ev = event; if (ev === undefined) return; that.mpos = that.mouseCoords(ev); utils.printRect('cursor', that.mpos); if (that.baloon.style.display != 'none') utils.show_tmp_state(); } if (!img[5].done) img[5].done = img[5].length; img[5][img[5].done] = nsa_r1(that.shift_rect(aoff, img_pos, -1), true); var runf = function(evn) { var x = that.mpos.x - img_pos.x; var y = that.mpos.y - img_pos.y; utils.printRect('pos', {x: x, y: y}); var str = ''; if (evn === 'onclick') { for (var i=0; i=0; --i) { var obj = img[5][i]; if (ch = obj.inside(x, y, img[0], img[1], box)) { utils.show_point('p'+utils.now(), that.mpos, 'black', 'z_point'); obj[evn](box, extra); } else if (typeof(obj.onmouseout) === 'function') { obj.onmouseout(box, extra); } str += ch ? 'X' : 'O'; } utils.tmp_state.inside = str; } var onwhat = that.aaa ? 'onmousedown' : 'onclick' var setLPM = that.baloon.onclick = function() { syso('mouse click'); that.lpm = true; }; that.baloon[onwhat] = utils.apply(runf, 'onclick'); var falseclick = function(where) { return function() { syso('mouse up'); setTimeout(function() { if (that.mainaction_done) return; that.mainaction_done = true; utils.raport('J1o', 'no click ' + where, utils.now()); }, conf.get('dontClickTimeout', 3000)); } } that.baloon.onmouseup = falseclick('b'); a.onclick = setLPM; a[onwhat] = function(ev) { if (conf.get('dragDropClick')) { try { ev.preventDefault(); } catch(e) {}; } that.mainaction(box.aa, extra, 'W') }; a.onmouseup = falseclick('a'); var crone = function(croneId) { if (that.croneId != croneId) return; that.window_status = ''; runf('onmousemove'); if (that.prev_status != that.window_status) { window.status = that.prev_status = that.window_status; } var ok = that.window_status != ''; if (mpos.x < that.baloon.offsetLeft - 75) ok = false; if (mpos.x > that.baloon.offsetLeft + that.baloon.offsetWidth + 75) ok = false; if (mpos.y < that.baloon.offsetTop - 75) ok = false; if (mpos.y > that.baloon.offsetTop + that.baloon.offsetHeight + 75) ok = false; if (!ok && !that.dont_hide_ix) { if (!utils.ie6) that.baloon.style.cursor = ''; to--; if (to < 0) { if (cookie_params('adc_dbgL2')) { if (utils.ieout === undefined) { utils.put_ieout(); } utils.ieout.style.backgroundColor = 'gray'; if (utils.rects) { utils.foreach(utils.rects, function(r, v) { v.parentNode.removeChild(utils.rects[r]); }); utils.rects = {}; } } document.onmousemove = oldmousemove; document.onscroll = oldscroll; document.onkeypress = oldkeypress; window.status = ''; that.baloon.style.display = 'none'; a.style.zIndex = ''; that.ads_are_showed = false; that.onAdOut(); trace('out'); var teraz = (new Date()).getTime(); if (that.aaa && that.oldlpm != undefined) { if (that.oldlpm === true) { utils.raport('P0o', 'return', teraz - extra.showTime); } else { utils.raport('P0o', 'mclick', teraz - extra.showTime); } that.oldlpm = undefined; } extra.totalTime = utils.ifnull(extra.totalTime, 0) + teraz - extra.showTime; extra.showTime = teraz; return; } } else { to = conf.get('baloon_hide_timeout'); } setTimeout(utils.apply(crone, croneId), conf.get('croneSpeed')); } crone(++that.croneId); if (utils.ie && document.readyState === 'complete') { var tomv = that.baloon.parentNode; tomv.style.zIndex = that.baloon.style.zIndex; tomv.parentNode.removeChild(tomv); document.body.appendChild(tomv); } }); this.initIx = utils.ftry('initIx', function() { that.init_imgs(); that.baloon.style.position = 'absolute'; that.baloon.style.display = 'none'; that.baloon.id = 'nsix_baloon'; var dymek_zewn = that.aarr[0] = utils.cel_back(document.body, that.aaa ? 'a' : 'div'); dymek_zewn.style.position = 'absolute'; dymek_zewn.style.padding = dymek_zewn.style.margin = dymek_zewn.style.width = dymek_zewn.style.height = '0'; dymek_zewn.style.top = dymek_zewn.style.left = '0'; dymek_zewn.style.color = ''; dymek_zewn.style.textDecoration = 'none'; dymek_zewn.style.zIndex = conf.get('z0') + conf.get('z_a') + 1; dymek_zewn.appendChild(that.baloon); that.setImg(0); }); this.putIx = utils.ftry('putIx', function(coms, spans, params) { that.params = params; that.counter;//wstawione slowa for (var i=0; i= conf.get('min_step'); krok /= 2) { for (var box_id = 0; box_id < boxes_tmp.length; box_id++) { page_pos = 0; for (var span_id = 0; span_id < spans.length; span_id++) { var span = spans[span_id]; var box = boxes_tmp[box_id]; if (!box) continue; for (var slowo_id = 0; slowo_id < span.text.length; slowo_id++) { if (that.counter === params.ad_count) break; page_pos++; var slowo = span.text[slowo_id]; var tresc = slowo.content.toLowerCase(); if (!any_words[tresc]) continue; var orig = slowo.orgin; if (conf.get('different_words') && used_words[tresc]) continue; if (zajete1[page_pos] < krok) { if (((';'+box.iwords).indexOf(';'+tresc+',') >= 0) && (why_not['#'+box.id] === undefined) && (zajete1[page_pos] > 0)) { why_not['#'+box.id] = {m: 'too near', w: tresc, d: zajete1[page_pos]}; } continue; } if (used_positions['_' + span_id + '_' + slowo_id]) { trace('same ad for word: ' + jej_slowo); if (why_not['#'+box.id] === undefined) { why_not['#'+box.id] = {m: 'same word', w: tresc, d: 0}; } continue; } for (var jej_slowo in box.wordsArr) { if (tresc != box.wordsArr[jej_slowo]) continue; if ({}[jej_slowo] !== undefined) continue; underlined[tresc] = utils.ifnull(underlined[tresc], 0) + 1; if (underlined[tresc] > conf.get('maxSameWords')) { utils.raport('S2o-', 'too many same words'); continue; } trace('added ad: step='+krok+', span_id='+span_id+', slowo_id='+slowo_id+', box_id='+box_id +', begin='+slowo.begin+', tresc='+tresc+', pos='+(page_pos-1)+', old='+zajete1[page_pos-1]); var ind = slowo.begin; var mysp_id = conf.get('word_id_prefix') + that.counter; var newWord = that.highlighter(orig, mysp_id, color); if (span.HTML.substring(ind, ind + orig.length) != orig) { utils.raport('J2', 'putIx - offsetError', span.HTML.substring(ind,ind+orig.length) + ' != ' + orig); continue; } why_not['#'+box.id] = false; box.real_word = tresc; box.shows = 0; to_update[span_id].push({ pos : ind, ow : tresc, nw : newWord, skip : orig.length, spid : conf.get('word_id_prefix') + that.counter, boxId: box.box_id }); used_positions['_' + span_id + '_' + slowo_id] = true; dbg_msg += '\n' + (box_id+1) + ': ' + box.wordsArr[jej_slowo]; that.counter++; if (conf.get('different_ads_for_same_word')) box.wordsArr[jej_slowo] = null; used_words[tresc] = true; for (var k = page_pos - krok; k <= page_pos + krok; k++) { if ((k < 0) || (k >= zajete1.length)) continue; zajete1[k] = Math.min(zajete1[k], Math.abs(page_pos - k)); } if (conf.get('different_ads')) { boxes_tmp[box_id] = null; } else { for (var i=box_id; i to_update[i][b].pos) { var tmp = to_update[i][a]; to_update[i][a] = to_update[i][b]; to_update[i][b] = tmp; } } } var oldHTML = spans[i].HTML; var prev = 0; for (var j=0; j 0) { utils.raport('P3-f', 'wrong script position'); } else { utils.raport('P3-of', 'no content (2)'); } }, conf.get('longTimeout')); return utils.stageNo = -1; } utils.start('other'); spliter.fire('onafterparse'); form_id=utils.ifnull(spliter.form, "-1:").split(":")[0]; var scsrc=conf.get('spliter2Url') .replace(/_HOST_/g, spliter.rqh) .replace(/_PRID_/g, spliter.prid) .replace(/_CAID_/g, spliter.caid) .replace(/_FORM_/g, form_id+':_CC_:'+(params.noEx || spliter.cookie_params('noex') ? 'i' : 'I')) .replace(/_CC_/g, params.ad_count + conf.get('xAdRq', 0)) .replace(/_NC_/g, (new Date()).getTime()) .replace(/_CONTENT_/g, static.content); utils.start('server'); utils.loadsc(scsrc, false, spliter.encoding); }); static.dbg1 = function(){}; static.validateAds = utils.ftry('validateAds', function(ads) { for (var i=0; i= conf.get('minWordLength')) b.wordsArr.push(wo); } } static.dbg1(coms, spliter.cookie_params); static.validateAds(coms); spliter.fire('onbeforewrite'); if (coms.length > 0) { utils.start('other'); static.writer.initIx(); utils.start('putIx'); static.writer.putIx(coms, static.parser.spans, params); } var sws = static.writer.stats; sws.ss_cnt = coms.length; sws.rq_cnt = params.ad_count; sws.rs = static.rstate; utils.evlog.s += ' XD'; utils.done(sws); if (spliter.cookie_params('force_dbg')) { utils.inx_showPopup(); } spliter.fire('onafterwrite'); scripts_sync.busy = false; syso('intertext initialized.'); }); static.rm_itx = utils.ftry('rmitx', function() { var torm = static.writer.ixForms; for (var inn in torm) { var sp = utils.cel(null, 'span'); sp.innerHTML = inn; torm[inn].parentNode.replaceChild(sp, torm[inn]); } static.writer.ixForms = []; static.writer.counter = 0; syso('intertext removed.'); }); static.reload_itx = utils.ftry('reloadItx', function() { static.rm_itx(); static.go2(); utils.raport('P1-', 'reloaded'); }); intertext_onet = { remove: static.rm_itx, reload: static.reload_itx } static.init = utils.ftry('toolkit initialization', function() { if (spliter.cookie_params('co100')) utils.rndId -= utils.rndId % conf.get('coile') - conf.get('mod100'); utils.stages(8); syso('loaded js toolkit v.' + utils.version); static.initialized = true; utils.fstarts_closed = true; }); try {x.x.x} catch(e) {static.fstarts.push(['end', e.lineNumber, -3])}; static.init(); }