Mitteilungen
kreuzen das Fenster. Das Script eignet sich besonders als Intro, während
im Hintergrund Inhalte vorgeladen werden. (Preloading ist im Script NICHT
enthalten)
[ zwischen
<BODY> und </BODY>]
<script>
<!--
// Hide
var isDOM
= false, isNS4 = false;
if (document.all)
var isDOM = true, docObj = 'document.all.', styObj = '.style';
else if
(document.layers) var isNS4 = true, docObj = 'document.', styObj = '';
var quotes
= new Array(); c = 0;
quotes[c]
= 'Bitte warten, Inhalte werden geladen ';
c++;
quotes[c]
= 'Geduld bitte... ';
c++;
quotes[c]
= 'LOADING...please wait... ';
c++;
quotes[c]
= 'mmmm... einen kleinen Moment noch... ';
c++;
quotes[c]
= 'Optimiert für Computer mit Monitor ';
c++;
quotes[c]
= 'Welcome to Nightfire ';
c++;
quotes[c]
= 'jetzt mit noch längeren Ladezeiten ';
c++;
quotes[c]
= 'www.nightfire.ch ';
c++;
quotes[c]
= 'Nightfire Net ';
c++;
quotes[c]
= 'Willkommen bei Nightfire! ';
c++;
quotes[c]
= 'please be patient ';
c++;
quotes[c]
= '...drei Stunden später... "';
c++;
quotes[c]
= 'stay tuned... ';
c++;
quotes[c]
= 'Java Applets ';
c++;
quotes[c]
= 'Java Script ';
c++;
quotes[c]
= 'Inhalte werden geladen, bitte gedulden
Sie sich einen Moment '; c++;
quotes[c]
= 'DHTML - dynamische Webseiten ';
c++;
quotes[c]
= 'Tips und Tricks nicht nur für Profis ';
c++;
var visQuotes
= 10; // Maximum onscreen at once.
var sDivSty
= new Array(visQuotes);
var sDivRef
= new Array(visQuotes);
var speed
= new Array(visQuotes);
//
Left: Low speed colours (lighter) .... Right: High speed colours (darker).
var colours
= new Array('B2C7DE','A4BCD8','96B2D2','88A8CC','7A9EC6','6C94C0','5E89BA');
function
checkDivs()
{
for
(i = 0; i < visQuotes; i++)
{
// If it's moved offscreen to the left (or starting), set things in motion...
if (parseInt(sDivSty[i].left) < (0 - (isDOM ? sDivRef[i].clientWidth
: sDivSty[i].clip.width)))
{
speed[i] = Math.floor(Math.random() * 56) + 8; // Varies: 8 to 63.
// Off to the right it goes.
sDivSty[i].left = (isDOM ? document.body.clientWidth : window.innerWidth)
+ Math.random() * 50;
// Write a quote in a colour that depends on the speed.
/*
Stylesheets - guess which browser has bugs :)
*
*
divText = '<nobr><span style="font: ' + speed[i] + 'px Arial, Helvetica;
' +
*
'color: #' + colours[Math.floor(speed[i] / 8) - 1] + '">' +
*
quotes[Math.floor(Math.random() * quotes.length)] + '</span></nobr>';
*/
fontSize = Math.floor(speed[i] / 8) - 1;
divText = '<nobr><font face="Arial, Helvetica" size="' + fontSize
+ '" color="#' +
colours[fontSize] + '">' + quotes[Math.floor(Math.random() * quotes.length)]
+
'</font></nobr>';
if (isDOM) sDivRef[i].innerHTML = divText;
if (isNS4)
{
sDivRef[i].document.write(divText);
sDivRef[i].document.close();
}
// Position and layer it according to its speed (faster = higher).
sDivSty[i].zIndex = speed[i];
topMax = (isDOM ? document.body.clientHeight : innerHeight) - speed[i];
sDivSty[i].top = topMax * Math.random();
}
// All items: Keep 'em moving left.
sDivSty[i].left = parseInt(sDivSty[i].left) - (speed[i] / 4);
}
}
function
initDivs()
{
for
(i = 0; i < visQuotes; i++)
{
divID = 'sDiv' + i.toString();
if (isDOM) document.write('<div id="' + divID + '" style="position:
absolute; left: -1000"> </div>');
// Have to use layers, divs are buggy as..... in NS. Again.
if (isNS4) document.write('<layer id="' + divID + '" left="-1000"> z</layer>');
sDivRef[i] = eval(docObj + 'sDiv' + i);
sDivSty[i] = eval(docObj + 'sDiv' + i + styObj);
}
setInterval('checkDivs()',
50);
}
if (isDOM
|| isNS4) initDivs();
// End Hide
-->
</script>