﻿function $(str){
	return document.getElementById(str);
}
function text_move(div1,div2){
if ($(div1).offsetHeight < $(div2).offsetHeight){
    var bool = true; 
    function marQuee(){
        if($(div1).scrollTop < ($(div2).offsetHeight - $(div1).offsetHeight)&&bool){
            $(div1).scrollTop++;}
        else{
            $(div1).scrollTop --;
            bool = false;
            if($(div1).scrollTop <= 0 ){
                bool = true;
              }
            }
       }

        var quee = setInterval(marQuee, 100);
        $(div1).onmouseover = function(){
            clearInterval(quee);
        } 
        $(div1).onmouseout = function(){
            quee = setInterval(marQuee, 100);
        } 
    }
}