Text ve stavovΘm °ßdku prohlφ₧eΦe








<body onLoad="doCool(); return true;">

<SCRIPT LANGUAGE="JavaScript">
<!--

var theString = "Vφtejte|" +
"na|" +
"strßnkßch|" +
"Java Script Library !|" +
"|" +
"http://java.tatousek.cz|" +
"|"
var width = 125;
var speed = 10;
var len = theString.length;
var start = 0;
var end=findIndex(start);
var scroll=0;
var displayStr = "";
var thisStr = theString.substring(start,end-1);
var thisLen = thisStr.length;
var thisHalf = Math.ceil(thisLen/2);
var x=0;
function findIndex(x) {
if (x>=len)
return -1;
if (theString.charAt(x) == '|')
return x+1;
else
return findIndex(x+1);
}
function addSpaces(x) {
for (var i=0; i<x; i++)
displayStr = displayStr + " ";
return true;
}
function doCool() {
scroll+= speed;
if (thisLen + 2*scroll > width) {
displayStr = "";
addSpaces(scroll);
displayStr = displayStr + thisStr;
window.status = displayStr;
start = end;
end = findIndex(end);
if (end!=-1) {
scroll = 0;
thisStr = theString.substring(start,end-1);
thisLen = thisStr.length;
thisHalf = Math.ceil(thisLen/2);
setTimeout("doCool()",1500);
}
else
setTimeout("doCool()",1500);
}
else {
displayStr = "";
addSpaces(scroll);
displayStr = displayStr + thisStr.substring(0,thisHalf);
addSpaces(width-thisLen-2*scroll);
displayStr = displayStr + thisStr.substring(thisHalf,thisLen);
window.status = displayStr;
setTimeout("doCool()",0);
}
}

//-->
</SCRIPT>