/*window.onload = function() {
window.onscroll = function() {
var bg = document.getElementsByTagName('BODY')[0];
var posY = (document.documentElement.scrollTop) ? document.documentElement.scrollTop : window.pageYOffset;
var bgPosY = 0;
bgPosY += 2*(posY - bgPosY);
bg.style.backgroundPosition = bgPosY ? ("0 -" + bgPosY +"px") : ("0 0");
}
}*/
var bgPosY = 0;
var yTimeout1;
var yTimeout2;
window.onload = function() {
window.onscroll = function() {
clearTimeout(yTimeout1);
clearTimeout(yTimeout2);
var bg = document.getElementsByTagName('BODY')[0];
var posY = (document.documentElement.scrollTop) ? document.documentElement.scrollTop : window.pageYOffset;
var diff = 0.025*(posY - bgPosY);
var i=0;
yTimeout1 = setTimeout(function() {
bgPosY += diff;
i++;
bg.style.backgroundPosition = bgPosY ? ("0 -" + bgPosY +"px") : ("0 0");
if (i<40) yTimeout2 = setTimeout(arguments.callee, 25);
}, 0);
}
}
var bzzTimeout1;
var bzzTimeout2;
function bzz(){
var el_bzz = document.getElementById('bzz');
var bzzPosY = 0;
var i = 5;
clearTimeout(bzzTimeout1);
clearTimeout(bzzTimeout2);
bzzTimeout1 = setTimeout(function() {
bzzPosY = (i % 2) ? 35+1*i : 35-1*i;
i--;
el_bzz.style.backgroundPosition = bzzPosY ? ("266px " + bzzPosY +"px") : ("266px 35px");
if (i>=0) bzzTimeout2 = setTimeout(arguments.callee, 50);
}, 0);
}
// Ajax //////////////////////////////////////////////////////
function getXmlHttp(){
var xmlhttp
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e1) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function getMore(id_div){
var req = getXmlHttp()
req.open('GET', 'application/views/ajax.php', true)
req.send(null)
req.onreadystatechange = function() {
if (req.readyState == 4) {
if(req.status == 200) {
//alert(req.responseText)
if (req.responseText!=""){
document.getElementById(id_div).innerHTML = req.responseText;
}
}
}
}
}

