function esIE (){
    if (navigator.appName == 'Microsoft Internet Explorer') return true;
    else return false;
}

VMarquee=function (id, speed, pause, HeightForIE) {
	var container=document.getElementById(id);
	//if (container.offsetWidth<parseInt(container.scrollWidth)){
	    var _timer;
	    var Height=parseInt(container.scrollHeight);
	    if (esIE()) Height=HeightForIE;
	    //container.innerHTML=container.innerHTML+container.innerHTML; 
	    var scrollSpeed=(parseInt(speed)>0)?speed:30;
    	var Pause=(parseInt(pause)>0)?pause:scrollSpeed;
	//}    	
    Down=function() { 
	    if(container.scrollTop>Height) {
		    stop();
		    window.setTimeout(Down, Pause);
		    container.scrollTop=0;
	    } else container.scrollTop+=1;
    }
	Up=function() { 
	    if(container.scrollTop<=0) {
		    stop();
		    window.setTimeout(Up, Pause);
		    container.scrollTop=1;
	    } else container.scrollTop-=1;
    }
    goUp=function() {
	    _timer=window.setInterval(Up, scrollSpeed); 
    }
	goDown=function() {
	    _timer=window.setInterval(Down, scrollSpeed);
    }
    stop=function() { 
	    if (_timer) window.clearInterval(_timer);
    }
}

