var speed = 20 var pause = 1500 var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Bienvenue sur mon site du Stade Rennais"
ar[1] = "un site pour tous les supporters du Stade Rennais."
ar[2] = "Résultats, news, photos, archives, ... "
ar[3] = "tout sur le Stade Rennais."
var message = 0
var state = ""
clearState()
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
bannerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function clearState() {
state = ""
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}
function showBanner() {
if (getString()) {
message++
if (ar.length <= message)
message = 0
clearState()
timerID = setTimeout("showBanner()", pause)
bannerRunning = true
} else {
var str = ""
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1" ) ? ar[message].charAt(j) : " "
}
window.status = str
timerID = setTimeout("showBanner()", speed)
bannerRunning = true
}
}
function getString() {
var full = true
for (var j = 0; j < state.length; ++j) {
if (state.charAt(j) == 0)
full = false
}
if (full)
return true
while (1) {
var num = getRandom(ar[message].length)
if (state.charAt(num) == "0" )
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}
function getRandom(max) {
return Math.round((max - 1) * Math.random())
}
// -- End Hiding Here -->
</script>
<script language=JavaScript>
<!-- debut du script
function VersionNavigateur(Netscape, Explorer) {
if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||
(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
return true;
else return false;
}
// Fin du script -->
|