function marquee(x,typ,p){
// Marquee script written by blue
// licensed under Creative Common license
// http://creativecommons.org/licenses/by-sa/2.5/pl/
        typ={
            'up':[-1,'top','offsetHeight'],
            'down':[1,'top','offsetHeight'],
            'left':[-1,'left','offsetWidth'],
            'right':[1,'left','offsetWidth']
        }[typ];
        var m=this,mOut,mIn,turlaj,T,i=typ[0],j=0,p=p||20;
        (mOut=document.getElementById(x)).onmouseover=function(){T=clearInterval(T);T=setInterval(turlaj,40)};
            mOut.appendChild((mIn=mOut.childNodes)[0].cloneNode(1));
            mOut.onmouseout=function(e){
                e=e||event;e=e.toElement||e.relatedTarget;
                if(e)do{if(e==this)return!1}while(e=e.parentNode)
                T=clearInterval(T);T=setInterval(turlaj,20)
            };
        mOut=mIn[0][typ[2]];
        turlaj=function(){
            mIn[0].style[typ[1]]=(-2*i*(j+=i)<(i-1)*mOut?(j=(-i-1)/2*mOut+i):j)+'px';
            mIn[1].style[typ[1]]=j+mOut+'px';
        }
        T=setInterval(turlaj,p);   
    }

