var i = 0;
var list3 = new Array();
list3[i++] = {html: ' 10:00 Republica Cehă - Indicele preturilor de consum (Februarie): valoare precedenta: 1.2% m/m 0.7% y/y prognoza: 0.2% m/m 0.8% y/y valoare publicata: 0% m/m 0.6% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Ungaria - Productia industriala as - prel (Ianuarie): valoare precedenta: -5.8% m/m valoare publicata: 8.8% m/m ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Slovacia - Productia industriala (Ianuarie): valoare precedenta: 11.9% y/y prognoza: 14% y/y valoare publicata: 19.3% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Ungaria - Productia industriala ns - prel (Ianuarie): valoare precedenta: 1% y/y prognoza: 0.2% y/y valoare publicata: 3.4% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Ungaria - Productia industriala azm - prel (Ianuarie): valoare precedenta: -1.4% y/y valoare publicata: 5.7% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:15 Eleveţia - Indicele preturilor de consum (Februarie): valoare precedenta: -0.1% m/m 1% y/y prognoza: 0.2% m/m 1% y/y valoare publicata: 0.1% m/m 0.9% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 11:30 Marea Britanie - Balanta comerciala (Ianuarie): valoare precedenta: -7.278 mrd. GBP prognoza: -7 mrd. GBP valoare publicata: -7.987 mrd. GBP ;', type: 'bylominelo'};
list3[i++] = {html: ' 09:00 Germania - Indicele preturilor de consum - fin (Februarie): valoare precedenta: -0.6% m/m 0.8% y/y prognoza: 0.2% m/m 0.4% y/y valoare publicata: 0.4% m/m 0.6% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 09:00 Germania - Indicele armonizat al preturilor de consum - fin (Februarie): valoare precedenta: -0.6% m/m 0.8% y/y prognoza: 0.2% m/m 0.3% y/y valoare publicata: 0.4% m/m 0.5% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 09:45 Franţa - Productia industriala (Ianuarie): valoare precedenta: -0.1% m/m -2.3% y/y prognoza: 0.2% m/m valoare publicata: 1.6% m/m 3.5% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Ungaria - PIB as - fin (Trimestrul III): valoare precedenta: -1.2% q/q -7.1% y/y prognoza: -0.4% q/q -5.3% y/y valoare publicata: -0.4% q/q -5.3% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 10:00 Ungaria - PIB ns - fin (Trimestrul III): valoare precedenta: -7.1% y/y prognoza: -4% y/y valoare publicata: -4% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 11:30 Marea Britanie - Productia industriala (Ianuarie): valoare precedenta: 0.5% m/m -3.6% y/y prognoza: 0.2% m/m -0.8% y/y valoare publicata: -0.4% m/m -1.5% y/y ;', type: 'bylominelo'};
list3[i++] = {html: ' 14:00 SUA - Aplicatiile pentru ipoteca: valoare precedenta: 14.6% valoare publicata: 0.5% ;', type: 'bylominelo'};
list3[i++] = {html: ' 17:00 SUA - Inventarele en-gross (Ianuarie): valoare precedenta: -0.8% m/m prognoza: 0.3% m/m;', type: ''};
list3[i++] = {html: ' 17:30 SUA - Modificarea stocurilor de petrol: valoare precedenta: 4 mil. prognoza: 1.6 mil.;', type: ''};
list3[i++] = {html: ' 17:30 SUA - Modificarea stocurilor de benzina: valoare precedenta: 0.77 mil. prognoza: 0.1 mil.;', type: ''};
list3[i++] = {html: ' 17:30 SUA - Modificarea stocurilor de distilate: valoare precedenta: -0.8 mil. prognoza: -1 mil.;', type: ''};
list3[i++] = {html: ' 21:00 SUA - Bugetul Federal (Februarie): valoare precedenta: -193.9 mrd. USD prognoza: -217.5 mrd. USD;', type: ''};
var speedKalendarium = 68;
var scrollKalendarium = 'pasekKalendarium';
// get full width of all children
function getTotalWidth(node) {
var children = node.childNodes;
var result = 0;
for (var i=0; i 0) scroll.removeChild(children[0]);
// add sliding div inside frame //
var innerScroll = document.createElement('div');
innerScroll.style.width = '10000px';
innerScroll.style.marginLeft = (scroll.clientWidth+10)+'px';
scroll.appendChild(innerScroll);
// return on empty list
if (list3.length == 0) {
scroll.style.display = 'none';
return;
}
// second element required for shifting //
if (list3.length == 1) {
list3[1] = list3[0];
}
// add floating div-containers 4 list elements //
for (var j in list3) {
var newDiv = document.createElement('div');
newDiv.className = 'element '+list3[j].type;
newDiv.innerHTML = list3[j].html;
innerScroll.appendChild(newDiv);
}
// duplicate entries until scrollbar is full //
var k = 0;
var totalWidth = getTotalWidth(innerScroll);
while (totalWidth < document.getElementById(scrollKalendarium).clientWidth) {
innerScroll.appendChild(innerScroll.childNodes[k].cloneNode(true));
k++;
totalWidth = getTotalWidth(innerScroll);
}
}
// move first container to the end //
function shiftLeftKalendarium() {
// static frame //
var scroll = document.getElementById(scrollKalendarium);
if (scroll == null) return;
// slider //
var children = scroll.childNodes;
if (children.length == 0) return;
var innerScroll = children[0];
// list of containers //
var floaters = innerScroll.childNodes;
if (floaters.length == 0) return;
// move container to the end //
innerScroll.appendChild(floaters[0]);
}
var timerKalendarium;
// make the world spin :) //
function animateScrollKalendarium() {
// frame //
var scroll = document.getElementById(scrollKalendarium);
if (scroll == null) return;
// slider //
var children = scroll.childNodes;
if (children.length == 0) return;
var innerScroll = children[0];
// the hiding container //
var floaters = innerScroll.childNodes;
if (floaters.length == 0) return;
var runner = floaters[0];
// left margin of the slider //
var marginLeft = innerScroll.style.marginLeft;
if (marginLeft.length) marginLeft = marginLeft.substr(0, marginLeft.length-2);
marginLeft = marginLeft - 3;
// do we shift ? //
if (marginLeft < -runner.clientWidth) {
marginLeft = marginLeft + runner.clientWidth;
shiftLeftKalendarium();
}
// step left //
innerScroll.style.marginLeft = marginLeft+'px';
timerKalendarium = setTimeout(animateScrollKalendarium, speedKalendarium);
}
// make it happen //
function initScrollKalendarium() {
loadStructureKalendarium();
timerKalendarium = setTimeout(animateScrollKalendarium, speedKalendarium);
}
// pause //
scrollK = document.getElementById(scrollKalendarium);
if (scrollK.addEventListener) {
scrollK.addEventListener("mouseover", function() {
clearTimeout(timerKalendarium);
}, false);
} else if (scrollK.attachEvent) {
scrollK.attachEvent("onmouseover", function() {
clearTimeout(timerKalendarium);
});
}
if (scrollK.addEventListener) {
scrollK.addEventListener("mouseout", function() {
timerKalendarium = setTimeout(animateScrollKalendarium, speedKalendarium);
}, false);
} else if (scrollK.attachEvent) {
scrollK.attachEvent("onmouseout", function() {
timerKalendarium = setTimeout(animateScrollKalendarium, speedKalendarium);
});
}
// blink //
var blinking = false;
setInterval(function() {
$(".blisko .opis, .bylominelo .publikacja").each(function() {
if (blinking) {
$(this).css('visibility', 'hidden');
} else {
$(this).css('visibility', 'visible');
}
});
blinking = !blinking;
}, 500);