var CU_UNITS = {
0 : {
'url' : 'http://celebixy.pl/t/sex',
'title' : 'Seks - na ostro czy łagodnie?',
'content' : '',
'ico' : 'http://f.o2.pl/f176/b8ae4869000c05704efd31a0/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '82362',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
},
1 : {
'url' : 'http://www.demoty.pl/dla-doroslych',
'title' : 'Demoty dla dorosłych! (18+)',
'content' : '',
'ico' : 'http://f.o2.pl/f485/27d468c50029638a4f21a338/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '78465',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
},
2 : {
'url' : 'http://ryjbuk.pl/kobieta-278434',
'title' : 'Piękne zdjęcie! (18+)',
'content' : '',
'ico' : 'http://f.o2.pl/f555/b8a6bb3d001627f84f219682/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '78215',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
},
3 : {
'url' : 'http://ryjbuk.pl/uwodzicielskie-kobiety-278164',
'title' : 'Nagie kobiety - erotyka! (18+)',
'content' : '',
'ico' : 'http://f.o2.pl/f276/ca3e19700017e2f04f219a57/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '78216',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
},
4 : {
'url' : 'http://www.najpraca.pl/wyszukaj/ogloszenia/ogl_850313/data/desc',
'title' : 'Dyskretna i pożądana (SPRAWDŹ)',
'content' : '',
'ico' : 'http://f.o2.pl/f676/dd1fcfa2000686d94f15597f/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '79182',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
},
5 : {
'url' : 'http://www.fejsik.pl/Przeciwnicy-ACTA-beda-sprzedani-a2733',
'title' : 'Jak zarobić na przeciwnikach ACTA?',
'content' : '',
'ico' : 'http://f.o2.pl/f446/a25de604000ab6724f21c0dc/',
'ico_w' : '140',
'ico_h' : '105',
'id' : '77955',
'site' : '3',
'site_name' : 'Format 152x114 (Pudelek+)'
}
};
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
Object.extend = function(destination, source) {
for (property in source) {
destination[property] = source[property];
}
return destination;
}
var Cads = Class.create();
Cads.prototype = {
initialize: function(dArray) {
this.dataArray = dArray;
},
iterator: function() {
return new Iterator(this.dataArray);
}
}
var Iterator = Class.create();
Iterator.prototype = {
initialize: function(dArray) {
this.position = 0;
this.iterArray = new Array();
var i = 0;
for (k in dArray) {
this.iterArray[i++] = k;
}
this.dataArray = dArray;
},
hasNext: function() {
return (this.iterArray.length >= this.position + 1);
},
next: function() {
return new Content(this.iterArray[this.position], this.dataArray[this.iterArray[this.position++]]);
},
get: function(id) {
return new Content(id, this.dataArray[id]);
}
}
var Content = Class.create();
Content.prototype = {
initialize: function(id, cont) {
this.id = id;
this.content = cont;
this.mode = 'object';
this.blank = false;
},
isEmptyUrl: function() {
return (this.content['url'] == '');
},
setMode: function(mode) {
if ((mode != 'text') && (mode != 'object'))
return;
this.mode = mode;
},
setBlank: function(type) {
this.blank = (typeof(type) == 'boolean') && (type);
},
_build: function(text, isHref, className, type) {
var result = text;
if (this.mode == 'text') {
if (typeof(isHref) == 'boolean') {
result = ''+result+'';
}
} else {
if (typeof(isHref) == 'boolean') {
var a = document.createElement('A');
a.href = this.content['url'];
a.id = 'cu-' + type + '-' + this.content['id'] + '-' + this.content['site'];
a.appendChild(result);
if (typeof(className) == 'string') {
a.className = className + ' cu-click-link';
}
if (this.blank) {
a.target = "_blank";
}
result = a;
}
}
return result;
},
title: function(isHref, className) {
var result = this.content['title'];
if (this.mode == 'object') {
var span = document.createElement('SPAN');
span.innerHTML = result;
result = span;
//result = document.createTextNode(result);
}
return this._build(result, isHref, className, 'title');
},
desc: function(isHref, className) {
var result = this.content['content'];
if (this.mode == 'object') {
var span = document.createElement('SPAN');
span.innerHTML = result;
result = span;
//result = document.createTextNode(result);
}
return this._build(result, isHref, className, 'desc');
},
ico: function(isHref, className) {
var result = this.content['ico'];
if (this.mode == 'text') {
result = '
';
} else {
var img = document.createElement('img');
img.src = result;
img.width = this.content['ico_w'];
img.height = this.content['ico_h'];
img.border = 0;
img.alt = this.content['title'];
result = img;
}
return this._build(result, isHref, className, 'ico');
}
}
try {
var CU = new Cads(CU_UNITS);
} catch (e) { alert(e); }
function gElem(id) { return document.getElementById(id); }
function prt(t) { document.write(t); }
function addHandler(name, handler) {
if (window.addEventListener) {
window.addEventListener(name, handler, false);
} else if (window.attachEvent) {
window.attachEvent("on"+name, handler);
} else {
if (eval("window.on"+name)) {
var oldHandler = eval("window.on"+name);
eval("window.on"+name+" = function(e) { oldHandler(e); handler(e); }");
} else {
eval("window.on"+name+" = handler");
}
}
}
function clickTracker(event) {
if(event.preventDefault) { // FF and others
var url = encodeURIComponent(this.href);
var id = parseInt(this.id.split('-')[2]);
var site = parseInt(this.id.split('-')[3]);
} else { // IE
var url = encodeURIComponent(event.srcElement.parentNode);
var id = parseInt(event.srcElement.parentNode.id.split('-')[2]);
var site = parseInt(event.srcElement.parentNode.id.split('-')[3]);
}
if (id && site && url) {
var tracker_image = document.getElementById('tracker_image');
if (!tracker_image) {
var tracker_image = document.createElement('img');
tracker_image.setAttribute('id', 'tracker_image');
tracker_image.style.display = 'none';
tracker_image.setAttribute('src', 'http://spot.o2.pl/content/click?id=' + id + '&site=' + site + '&url=' + url + '&t=' + Number(new Date()) );
document.body.appendChild(tracker_image);
} else {
tracker_image.src = 'http://spot.o2.pl/content/click?id=' + id + '&site=' + site + '&url=' + url + '&t=' + Number(new Date());
}
}
}
window.onload = function()
{
if (document.getElementsByClassName == undefined) {
document.getElementsByClassName = function(className)
{
var hasClassName = new RegExp("(?:^|\\s)" + className + "(?:$|\\s)");
var allElements = document.getElementsByTagName("*");
var results = [];
var element;
for (var i = 0; (element = allElements[i]) != null; i++) {
var elementClass = element.className;
if (elementClass && elementClass.indexOf(className) != -1 && hasClassName.test(elementClass))
results.push(element);
}
return results;
}
}
var el = document.getElementsByClassName("cu-click-link");
for (var i=0;i\n#cuSrod a:hover { text-decoration: ';
ads += 'none; border: none; background: white; color: black; }\n#cuS';
ads += 'rod { width: 950px; background: white; overflow: hidden; cle';
ads += 'ar: both; position: relative; }\n#cuSrod .cub-box { width: 1';
ads += '46px; float: left; margin-top: 3px; overflow: hidden; margin';
ads += '-right: 12px; }\n#cuSrod .cub-ico { display: block; text-ali';
ads += 'gn: center; }\n#cuSrod .cub-ico img { border: 1px solid #BDB';
ads += 'DBD; padding: 2px; }\n#cuSrod .cub-title { display: block; t';
ads += 'ext-align: center; font-family: \'Trebuchet MS\'; font-size: 1';
ads += '.2em; font-weight: normal; line-height: 1.2; color: black; m';
ads += 'argin: 1px 0; padding: 0; }\n#cuSrod .cub-title:hover { text';
ads += '-decoration: underline; }\n#cuSrod .cub-title span.raq { fon';
ads += 't-weight: bold; font-family: Verdana; color: red; }\n<'+'/style';
ads += '>\n\n<'+'script type="text/javascript" language="JavaScript" ch';
ads += 'arset="iso-8859-2">\n/*<'+'![CDATA[*/\n\nvar CU_plota = new Cad';
ads += 's(CU_UNITS);\nfunction startplotacu() {\ntry {\nvar divC ';
ads += '= document.createElement(\'DIV\');\n\nvar div = document.cre';
ads += 'ateElement(\'DIV\');\ndiv.id = \'cuSrod\';\ndivC.appendChild';
ads += '(div);\n\nvar count = 0;\nvar iter = CU_plota.iterator()';
ads += ';\nwhile (iter.hasNext() && count <'+' 6) {\nvar content =';
ads += ' iter.next();\n\n content.setBlank(true);\nvar';
ads += ' dBox = document.createElement(\'DIV\');\ndBox.className = ';
ads += '\'cub-box\';\ndBox.appendChild(content.ico(true, \'cub-ico\')';
ads += ');\n var title = content.title(true, \'cub-title\')';
ads += ';\n title.innerHTML = title.innerHTML + \' <'+'s';
ads += 'pan class="raq">»<'+'/span>\';\ndBox.appendChild(title)';
ads += ';\ndiv.appendChild(dBox);\n\ncount++;\n}\n\n ';
ads += 'document.write(divC.innerHTML + \'<'+'div style="height:1px;over';
ads += 'flow:hidden;clear:both;"><'+'/div>\');\n} catch (e) { /*alert(e';
ads += ');*/ }\n}\nstartplotacu();\n\n/*]]>*/\n<'+'/script>';
document.write(ads);