Version: 2.0

Type: Full Script

Category: HTML

License: GNU General Public License

Description: Have a random splash page at the entrance of your website. See an example at http://www.taffysmack.com



<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var howMany = 7;  // max number of items listed below not counting 0
var page = new Array(howMany+1);

page[0]="folder/filename.html";
page[1]="folder/filename.html";
page[2]="folder/filename.html";
page[3]="folder/filename.html"; 
page[4]="folder/filename.html";
page[5]="folder/filename.html";
page[6]="folder/filename.html";
page[7]="folder/filename.html";
page[8]="folder/filename.html";

function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
// End -->