function startUpScroll() {
    scrollTmr = setTimeout("upScroll()",1);
}
function startDownScroll() {
    scrollTmr = setTimeout("downScroll()",1);
}

function startLeftScroll() {
    scrollTmr = setTimeout("leftScroll()",1);
}

function startRightScroll() {
    scrollTmr = setTimeout("rightScroll()",1);
}

function stopScroll() {
    clearTimeout(scrollTmr);
}

function upScroll () {
    $('text').scrollTop = $('text').scrollTop - 1;
    if($('text').scrollTop < 0) $('text').scrollTop = 0;
    scrollTmr = setTimeout("upScroll()",1);
}

function downScroll () {
    $('text').scrollTop = $('text').scrollTop + 1;
    scrollTmr = setTimeout("downScroll()",1);
}

function leftScroll () {
    $('galery').scrollLeft = $('galery').scrollLeft + 1;
    scrollTmr = setTimeout("leftScroll()",1);
}

function rightScroll () {
    $('galery').scrollLeft = $('galery').scrollLeft - 1;
    scrollTmr = setTimeout("rightScroll()",1);
}

function loadcontent(file,tit) {
    $('content').innerHTML = '<div style="text-align: center; margin-top: 120px;"><img src="image/loading.gif" alt=\"Loading\" /></div>'
    new Ajax.Request('contentAjax.php'+file, {
        method: 'get',
        onSuccess: function(transport) {
            $('content').innerHTML=transport.responseText;
            if(file=='?mid=4')
            {
                $('mp3').innerHTML='';
                videop.write("player");    
            }
            if(!$('mp3Swf') && file!='?mid=4')
            {
                mp3p.write("mp3");
            }
            if(file=='?mid=3')
            {
                reinitlightbox();
            }
            
            document.title= tit + ' | MATTE.HU';
        }
    });
}

function reinitlightbox() {
    if(document.getElementById('lastimg')){
        initLightbox();
        document.getElementById('lastimg').id="";
    }
    else
        setTimeout("reinitlightbox()", 60);

}
