function initUpScroll(mydiv,step,myheight,scrolltime1,scrolltime2)
{var myDiv=$(mydiv);var initHeight=myDiv.scrollHeight;if(initHeight<=myheight) return;var childDiv1=myDiv.firstChild;childDiv1.innerHTML+=childDiv1.innerHTML;var timer1=null;var timer2=null;function contentMarquee()
{myDiv.scrollTop+=step;if(myDiv.scrollTop>=initHeight)
{myDiv.scrollTop=0;}if(myDiv.scrollTop%myheight==0)
{if(timer1!=null)
{clearInterval(timer1);timer1=null;}
clearTimeout(timer2);
timer2=setTimeout(setScrollInterval,scrolltime2);}}
function setScrollInterval()
{clearInterval(timer1);timer1=setInterval(contentMarquee,scrolltime1);}
myDiv.onmouseover=function()
{if(timer1!=null)
{clearInterval(timer1);timer1=null;}
if(timer2!=null)
{clearTimeout(timer2);timer2=null;}}
myDiv.onmouseout=function()
{setScrollInterval();}
myDiv.scrollTop=0;setScrollInterval();}
function initLeftScroll(mydiv,childDiv1,childDiv2,step,mywidth,scrolltime1,scrolltime2)
{var myDiv=$(mydiv);var childDiv1=$(childDiv1);var childDiv2=$(childDiv2);childDiv2.innerHTML=childDiv1.innerHTML;var timer1=null;var timer2=null;function contentMarquee()
{myDiv.scrollLeft+=step;if(myDiv.scrollLeft%mywidth==0)
{if(timer1!=null)
{clearInterval(timer1);timer1=null;}
if(childDiv2.offsetWidth-myDiv.scrollLeft<=0)
{myDiv.scrollLeft-=childDiv1.offsetWidth;}
timer2=setTimeout(setScrollInterval,scrolltime2);}}
function setScrollInterval()
{timer1=setInterval(contentMarquee,scrolltime1);}
myDiv.onmouseover=function()
{if(myDiv.scrollLeft%mywidth==0)
{if(timer1!=null)
{clearInterval(timer1);timer1=null;}
if(timer2!=null)
{clearTimeout(timer2);timer2=null;}}}
myDiv.onmouseout=function()
{if(myDiv.scrollLeft%mywidth==0)
{setScrollInterval();}}
myDiv.scrollTop=0;setScrollInterval();}