Good and Nice JavaScripts

AutoScroll DIV script

Another script to create a auto scrolling message which move depend on scrollbars.... detail at - 2.000+ free JavaScript codes

How to setup

Step 1: Place JavaScript below in your HEAD section
<script type="text/javascript">
	var useWidth = "400px";
	var speed = 250 // greater is slower;

	var message = "Now is the time for all good men to come to the aid of their country. That's one small step for man, one giant leap for mankind. Ask not what your country can do for you, ask what you can do for your country. | ";

	// Remember to include the vertical bar | at the end of the message(s);

	var mContainer = "";
	var circleMsg = "";
	var prevMsg =  "";
	var useFloat = "";
	var xV = 0;
	var xL = 0;
	var msgLength = 0;
	function updateMessage(){
		if (circleMsg == ""){circleMsg =}
		else {circleMsg = prevMsg}
		var separatorIdx = circleMsg.lastIndexOf('|');
		if (separatorIdx == -1){separatorIdx = msgLength}
		circleMsg = circleMsg.substring(1,separatorIdx);
		var spliceStr = message.substring(0,msgLength-separatorIdx-1);
		var dispMsg = circleMsg+spliceStr;
		prevMsg = circleMsg+'|'+spliceStr;

	function startCrawl(){

		setTimeout("updateMessage()",3000);  // delay before crawl start;

	function stayHome(){

		var nV = 0;
		var nL = 0;
			 nV = document.documentElement.scrollTop;
			 nL = document.documentElement.scrollLeft;
		else	{
			 nV = document.body.scrollTop;
			 nL = document.body.scrollLeft;
		if (nV == 0){window.scrollBy(0,1)} = nV+xV+"px"; = nL+xL+"px";


		mContainer = document.getElementById('crawl');
		document.getElementById('isFloat').style.width = useWidth;
		msgLength = message.length;
		useFloat = document.getElementById('isFloat'); = ((screen.width-30)/2)-(parseInt(useWidth)/2)+"px";
		xV = useFloat.offsetTop;
		xL = useFloat.offsetLeft;

    	This script downloaded from
    	Come to view and download over 2000+ free javascript at
Step 2: Place HTML below in your BODY section
<Div id='isFloat' style='position:absolute;bottom:20px;overflow:hidden;height:28px;border:solid black 1px;font-size:14pt;background-color:lightyellow;color:darkblue'>

<Div id='crawl' style='padding:3px;white-space:nowrap'></Div>

    	This script downloaded from
    	Come to view and download over 2000+ free javascript at

Javascript floating message - Javascript multi level drop down menu - JavaScript in_array()
Quote Originally Posted by Copyright
The Site may provide, or third parties may provide, links to Internet World Wide Web sites or resources. Because has no control over such sites and resources, you acknowledge and agree that is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.