Scrolling Letters


<html>
<head>
<script language="JavaScript">
function snapIn(jumpSpaces,position) {                
	var msg = "Long live JavaScript!"        
	var out = ""      

        if (killScroll) {return false}        
	for (var i=0; i  3) {
		jumpSpaces *= .75}        
	else {
		jumpSpaces--}        
	if (position != msg.length) {        
		var cmd = "snapIn(" + jumpSpaces + "," + position + ")";        
		scrollID = window.setTimeout(cmd,5);        
	} 
	else {        
		scrolling = false
        	return false         
	}        
	return true
}

function snapSetup() {        
	if (scrolling)           
	if (!confirm('Re-initialize snapIn?'))        
	return false   
	// only way to break the function        
	// if its already running        
	killScroll = true  
	// will cause recursive snapIn to break
        scrolling = true   
	// sets so that this function can't run twice        
	// without breaking the first instance        
	var killID = window.setTimeout('killScroll=false',6)        
	// now that first occurance was killed,        
	// reset it so that this instance can proceed        
	scrollID = window.setTimeout('snapIn(100,0)',10)        
	// make sure it waits until killScroll is reset        
	return true    
	//must return true to comply with above break
}
//-------------------------------------------------------------
        var scrollID = Object
        var scrolling = false        
	var killScroll = false
//-------------------------------------------------------------
</script>
</head>
<body onLoad="snapSetup()">
</body>
</html>