<SCRIPT LANGUAGE="JavaScript">
<!-- //hides from browser
//by Paul Bilnoski(paul_b8@hotmail.com) 4-17-1999
function todaysdate() {
var dayary = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var monthary = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var now = new Date();
var day = dayary[now.getDay()];
var month = monthary[now.getMonth()];
var date = now.getDate();
var year = "19" + now.getYear();
document.write(day + ", " + month + " " + date + ", " + year);
}
-->
</script>
<font color="#0000FF">
<SCRIPT LANGUAGE=JavaScript>todaysdate();</script>
</font>
<SCRIPT LANGUAGE="JavaScript">
<!-- //hides from browser
hexary = new Array(1,2,3,4,5,6,7,8,9,"a","b","c","d","e","f");
function numbertohex(i) {
if (i <= 0) return "00";
else if (i >= 255) return "ff";
else return "" + hexary[Math.floor(i/16)] + hexary[i%16];
}
function setbgColor(r, g, b) {
var xr = numbertohex(r); var xg = numbertohex(g); var xb = numbertohex(b);
document.bgColor = "#"+xr+xg+xb;
}
function fade(sr, sg, sb, er, eg, eb, step) {
for(var i = 0; i <= step; i++) {
setbgColor(
Math.floor(sr * ((step-i)/step) + er * (i/step)),
Math.floor(sg * ((step-i)/step) + eg * (i/step)),
Math.floor(sb * ((step-i)/step) + eb * (i/step)));
}
}
function fadein() {fade(0,0,0, 250,250,250, 100);}
function fadeout() {fade(250,250,250, 0,0,0, 500);}
function fadefast()
{
fade(0,0,0, 0,0,0, 0);
fade(0,0,0, 0,0,0, 0);
}
-->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- //hides from browser
//by Paul Bilnoski(paul_b8@hotmail.com) 4-15-1999
var graphicArray = new Array()
// don't forget trailing sentinel in info files
// any gif bakcground files
var gifinfo = "gif1 gif2 gif3 gif4 "
var jpginfo = "jpg1 jpg2 jpg3 jpg4 "
var bmpinfo = "bmp1 bmp2 bmp3 bmp4 "
// Initializes the variables before the do-while loop
var str = char = ""
var c = i = 0
// Puts the strings into an array
do {
char = gifinfo.charAt(c)
if (char != " ") { str += char }
else
{
graphicArray[i] = str + ".gif"
i++
str = ""
}
c++
} while (c < gifinfo.length)
// the variable i stays in the right place, make sure to reinitialize the counter
c = 0
do {
char = jpginfo.charAt(c)
if (char != " ") { str += char }
else
{
graphicArray[i] = str + ".jpg"
i++
str = ""
}
c++
} while (c < jpginfo.length)
//after graphicArray is filled
var rndnumber = Math.round(Math.random() * graphicArray.length)
document.body.background = "" + graphicArray[rndnumber]
-->
</script>
info
string is where all the filenames for the images go. Separate each name(without dot or extension) by a space, and leave a trailing space before the end quote mark. Rework the code if they are .jpgs and .gifs, I only allow for .gifs
.gif
to the end of the filenames because I only used gifs. If you use many filetypes, it may be easier to write the entire filename in the info string and take that part from the loop so you only need one loop.