function autoScroll(showDivId,contentElementId,intervalTime,scrollPx){
		var showDiv = null;
		var contentElement = null;
		var text = null;
		var divHeight = null;
	this.init = function(){
		 showDiv = document.getElementById(showDivId);
		 contentElement = document.getElementById(contentElementId);
		 text = contentElement.innerHTML;
		 divHeight = showDiv.style.height.substring(0,showDiv.style.height.indexOf("px"));
	}
		var oTime;
	this.startMove =function(){
			oTime = setInterval(function(){playScroll(showDiv,contentElement,text,divHeight,scrollPx);},intervalTime);
		}
	this.stopMove =function(){
			window.clearInterval(oTime);
		}
}
function playScroll(showDiv,contentElement,text,divHeight,scrollPx){

	if(showDiv.scrollHeight - divHeight<=showDiv.scrollTop){
		contentElement.innerHTML += "<div  style='height:"+divHeight+"px;' />" ;
		contentElement.innerHTML += text ;
	}
	showDiv.scrollTop+=scrollPx;
}