var CU_UNITS = {
41426 : {
'url' : 'http://www.mtv.pl/mini/my-own-formularz',
'title' : 'Której gwiazdy SOBOWTÓREM jeste¶?',
'content' : '',
'ico' : 'http://f.o2.pl/f588/7f68e198001121794ba08953/',
'ico_w' : '140',
'ico_h' : '100'
},
41589 : {
'url' : 'http://www.pardon.pl/artykul/11141/naga_pupa_prezydentowej_zobacz',
'title' : 'NAGA PUPA prezydentowej (ZOBACZ)',
'content' : '',
'ico' : 'http://f.o2.pl/f547/2ba931ea000f28ff4ba3dadc/',
'ico_w' : '140',
'ico_h' : '100'
},
41603 : {
'url' : 'http://www.ekspert.pl/p/internet-potrzebny-do-zycia-jak-woda-2227',
'title' : 'Internet potrzebny do życia jak woda?',
'content' : '',
'ico' : 'http://f.o2.pl/f679/f5f55d52000544234ba49a5e/',
'ico_w' : '140',
'ico_h' : '100'
},
41609 : {
'url' : 'http://www.kowbojki.pl/pokaz/co-mam-robic-jak-pokazac-by-mi-zaufal-38446',
'title' : 'Co mam zrobić by mi zaufał!? (PORAD¬CIE)',
'content' : '',
'ico' : 'http://f.o2.pl/f969/87371476000e48874ba4a118/',
'ico_w' : '140',
'ico_h' : '100'
},
41617 : {
'url' : 'http://sharm.frix.pl/',
'title' : 'Wybierasz się do Egiptu? SprawdĽ! (FORUM)',
'content' : '',
'ico' : 'http://f.o2.pl/f648/816988f80027da3e4ba4a68e/',
'ico_w' : '140',
'ico_h' : '100'
},
41646 : {
'url' : 'http://www.dobramama.pl/pokaz/29904/dziecko_z_duzo_mlodszym_facetem_czy_to_ma_szanse',
'title' : 'Dziecko z dużo młodszym facetem... ma sens?',
'content' : '',
'ico' : 'http://f.o2.pl/f7/2522bef6001f21b74ba5e97c/',
'ico_w' : '140',
'ico_h' : '100'
}
};
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) {
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.appendChild(result);
if (typeof(className) == 'string') {
a.className = className;
}
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);
},
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);
},
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);
}
}
try {
var CU = new Cads(CU_UNITS);
} catch (e) { alert(e); }
function $(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");
}
}
}
var ads = '';
ads += '<'+'style type="text/css">\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);