This page is a suicide mix of JavaScript code from various folks and
times gone by. It is for fun and
amusement, and may possibly give
you some ideas about what you can do with a client-side scripting
language. This section will NOT be very useful if you are trying
to learn
JavaScript or just starting out. If this is the case, use the tutorials
linked above to begin
learning JavaScript and come back here later.
Fireworks
Effect
/*Craig - you remember Thirsty Cat? Yup... who could
forget :) ...*/
/*The Thanksgiving we spent together, the Turkey and Giblet juice, one greedy kitty, the morning after... :( */
var ns=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
/*original value was 14*/
amount=28;
if (ns){
for (i=0; i < amount; i++)
document.write("<LAYER NAME='nsstars"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
}
else if (ie4||ns6){
document.write("<div id='ieCov' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
for (i=0; i < amount; i++)
document.write("<div id='iestars"+i+"' style='position:absolute;top:0px;left:0px;width:1;height:1;background:#ffffff;font-size:1;z-index:10'></div>");
document.write("</div></div>");
}
Clrs=new Array('ff0000','00ff00','ffffff','ff00ff','ffa500','ffff00','00ff00','ffffff','ff00ff')
sClrs=new Array('ffa500','00ff00','FFAAFF','fff000','fffffF')
Xpos=300;
Ypos=150;
initialStarColor='00ff00';
/*original yack value was 5*/
step=10;
KittyNowYacking=0;
/*original ThirstyCat vomit was 120*/
ProjectileVomitSize=100;
function ThirstyCat(){
var WinHeight=(ns||ns6)?window.innerHeight-100:window.document.body.clientHeight-100;
var WinWidth=(ns||ns6)?window.innerWidth-100:window.document.body.clientWidth-100;
var Yscroll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
for (i=0; i < amount; i++){
if (ie4||ns6)
var layer=ns6?document.getElementById("iestars"+i).style : eval("iestars"+i).style;
else if (ns)
var layer=document.layers["nsstars"+i]
var randCol=Math.round(Math.random()*8);
var randSz=Math.round(Math.random()*2);
layer.top = Ypos + ProjectileVomitSize*Math.sin((KittyNowYacking+i*5)/3)*Math.sin(KittyNowYacking/100)
layer.left= Xpos + ProjectileVomitSize*Math.cos((KittyNowYacking+i*5)/3)*Math.sin(KittyNowYacking/100)
if (KittyNowYacking < 110){
if (ns){layer.bgColor=initialStarColor;layer.clip.width=1;layer.clip.height=1}
else{layer.background=initialStarColor;layer.width=1;layer.height=1;layer.fontSize=1}
}
else{
if (ns){layer.bgColor=Clrs[randCol];layer.clip.width=randSz;layer.clip.height=randSz}
else{layer.background=Clrs[randCol];layer.width=randSz;layer.height=randSz;layer.fontSize=randSz}
}
}
if (KittyNowYacking > 220)
{
KittyNowYacking=0;
Ypos = 50+Math.round(Math.random()*WinHeight)+Yscroll;
Xpos = 50+Math.round(Math.random()*WinWidth);
for (i=0; i < sClrs.length; i++)
{
var newIcol=Math.round(Math.random()*i);
}
initialStarColor=sClrs[newIcol];
ProjectileVomitSize=Math.round(80*Math.random()+100);
}
KittyNowYacking+=step;
setTimeout("ThirstyCat()",20);
}
ThirstyCat();
// -->
Cool! - Random Images:
/*2001 C. Germany. My dog Roofus is the BEST dog in the WHOLE world and I LOVE HIM!!!*/
function RoofusComeHereBoy(mydogsname)
{
var RoofusIsaGoldenRetreiver = Math.random();
var IGotHimFromtheHumaneSociety = mydogsname;
var mydog0 = "west.jpg";
var mydog1 = "band1.jpg";
var mydog2 = "barbiemountain.jpg";
var mydog3 = "dee2.gif";
var mydog4 = "chukbarb.jpg";
var mydog5 = "candyman.jpg";
var mydog6 = "blues.jpg";
var mydog7 = "dee3.gif";
var mydog8 = "craigchuck.jpg";
var mydog9 = "craigdeana.jpg";
var mydog10 = "chuknbabslog.jpg";
var mydog11 = "chuckskyline.jpg";
var mydog12 = "chris.jpg";
var mydog13 = "chuckamsterdam.jpg";
var mydog14 = "chuck2baltimore.jpg";
var mydog15 = "chuckamsterdam2.jpg";
var mydog16 = "chuckamsterdam3.jpg";
var mydog17 = "chuckcorrie.gif";
var mydog18 = "group2.jpg";
var mydog19 = "group3.jpg";
var mydog20 = "snowchuck.jpg";
while(RoofusIsaGoldenRetreiver <= (mydogsname-1)/IGotHimFromtheHumaneSociety) { mydogsname --; }
mydogsname = eval("mydog" + mydogsname);
loveanimalssomuch = mydogsname;
document.writeln('<IMG SRC=\"../'+loveanimalssomuch+' \" border=\"0\" alt=\"Randomly Selected Photos. Click here for WMA Archive.\">')
}
/*End Chuck G.'s Random Photo Selection Script - dedicated to my beloved Roofus*/
Timed Background:
/*You think Chuck G. is up all night changing things on web site? Nope. No time for that*/
var now = new Date();
var hours = now.getHours();
var psj=0;
//0600(6am)-1800(6pm) day
if (hours >= 6 && hours < 19){
document.write('<body bgcolor="#000000" TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"'
+
'text="#FFFFFF" bgproperties="fixed" background="../star4.gif" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF">')
}
//1900(7pm)-2000(8pm) Traveler night scene 1 (planets)
if (hours >= 19 && hours < 20){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star4.gif">')
}
//2000(8pm)-2100(9pm) Traveler night scene 2 (animated star field)
if (hours >= 20 && hours < 21){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star1.gif">')
}
//2100(9pm)-2200(10pm) Traveler night scene 3 (tiny suns)
if (hours >= 21 && hours < 22){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star5.jpg">')
}
//2200(10pm)-2300(11pm) Traveler night scene 4 (planets repeat)
if (hours >= 22 && hours < 23){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star4.gif">')
}
//2300(11pm)-2400(midnight) Traveler night scene 5 (black/white)
if (hours >= 23 && hours <= 24){
document.write('<body bgcolor="#000000" text="#FFFFFF" bgproperties="fixed" background="star3.gif"'
+
' onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF" leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">')
}
//0000(midnight)-0100(1am) Traveler night scene 6 (purple)
if (hours >= 0 && hours <= 1){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star2.gif">')
}
//0100(1am)-0600(6am) Traveler night scene 7 (default - planets again)
if (hours >= 1 && hours <= 6){
document.write('<body bgcolor="#000000" text="#FFFFFF" onLoad="Change();Place();Time()" LINK="#FF0000" VLINK="#0000FF"'
+
' leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" bgproperties="fixed" background="../star4.gif">')
}
/*End Chuck G.s Cool Change the Background and Page Based on the Time of Day Thing*/
Timed Messages:
/*C. Germanys Cool Change Message Based On the Time of Day Thing*/
/*For when you just don't have time to sit in front of your computer*/
/*changing things all day, but want people to see something different every time.*/
txt = ""
txtt = ""
txttt = ""
function Time() {
var now = new Date();
var time = now.getHours();
//0-4
if (time >= 0 && time < 4) { txt = 'Do you not sleep?';
txtt = 'Working the night shift, huh? Guess someone has to.';
txttt = 'You need Christ to live, but sleep helps too.'}
//4-8
else if (time >= 4 && time < 8) { txt = 'So, we have an early riser huh?';
txtt = 'God paints the sunrise with His brilliant, fiery love.';
txttt = 'Take time to notice His art this morning.'}
//8-12
else if (time >= 8 && time < 12) { txt = 'I hope you are having a good morning';
txtt = 'because this is the day the Lord has made!';
txttt = 'Trust Him for each trial you must face this day.'}
//12-16
else if (time >= 12 && time < 16) { txt = 'What an afternoon we are having!';
txtt = 'God makes both sunshine and rain so beautiful!';
txttt = 'Why are you inside on a computer?!?'}
//16-20
else if (time >= 16 && time < 20) { txt = 'This is one beautiful evening!';
txtt = 'Are the stars or moon visible tonight? Have you seen them lately?';
txttt = 'They are beautiful creations that sing of their Creator.'}
//20-24
else if (time >= 20 && time <= 24) { txt = 'It is starting to get late!';
txtt = 'Are you getting sleepy? God give His beloved children rest.';
txttt = 'He gives us a peace beyond understanding...'}
}
var worddd = 0
var word = 0
var wordd = 0
var msg
var timeI
var timeII
var timeIII
var timeIIII
function Change() {
if (word < txt.length+1) { word++;
timeI = setTimeout("Change()", 100) }
else if (word > txt.length) { clearTimeout(timeI);
Changee() }
}
function Changee() {
if (wordd < txtt.length+1) { wordd++;
timeIII = setTimeout("Changee()", 100) }
else if (wordd > txtt.length) { clearTimeout(timeIII);
Changeee() }
}
function Changeee() {
if (worddd < txttt.length+1) { worddd++;
timeIIII = setTimeout("Changeee()", 100) }
else if (worddd > txttt.length) { clearTimeout(timeIIII);
word = 0; wordd = 0; worddd = 0; Change() }
}
function Place() {
if (word < txt.length+1) msg = txt.substring(0, word)
else if (word > txt.length && wordd < txtt.length+1) msg = txtt.substring(0, wordd)
else if (wordd > txtt.length && worddd < txttt.length+1) msg = txttt.substring(0, worddd)
else if (worddd > txttt.length) msg = txt.substring(0, word)
window.status = msg
timeII = setTimeout("Place()", 100)
}
//-->
Fire and Forget
Holiday Script. Never worry about holiday maintenance again!:
/*2001 C.G. Calls Traveler holiday scripts if applicable. Creates new Date object.
This will add/alter website according to pre specified holidays.
Combines several scripts.*/
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var month = now.getMonth();
var year = now.getYear();
var Today = now.getDay(); //find day of week
var DateData = now.getDate();
var holiday = null;
var weekday = null;
/*Parse Date() Object for months. Beware fencepost error here. 0-11 instead of 1-12.*/
if (month==11) { month = "December"; holiday = "Christmas";} /*Christmas*/
else if (month==0) { month = "January"; holiday = "NewYear"; } /*New Year - Singular, s only for possessive!*/
else if (month==9) { month = "October"; holiday = "Halloween";} /*Halloween*/
else if (month==2) {month = "March"; holiday = "Easter";} /*Easter*/
else if (month==3) {month = "April"; holiday = "Easter";} /*Easter*/
else if (month==6) {month = "July"; holiday = "July4th";} /*July 4th*/
else { month = "SomeOtherMonth"; holiday = "Nothing";} /*No holidays*/
/*Parse Date() Object for day of week.*/
if (Today==0) {weekday="Sunday"};
else if (Today==1) {weekday="Monday"};
else if (Today==2) {weekday="Tuesday"};
else if (Today==3) {weekday="Wednesday"};
else if (Today==4) {weekday="Thursday"};
else if (Today==5) {weekday="Friday"};
else if (Today==6) {weekday="Saturday"};
/*-------------------------------------------------BEGIN SNOW EFFECT 1------------------------------------------------*/
var no = 20; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "../snow.gif";
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
function WriteSnowLayersForSnowType1() { //Begin Writing Layers to Screen
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
}
}
}
} //End WriteSnowLayers Function
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
} //End Netscape Version
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
} //End Internet Explorer Version
function MakeSomeSnowType1() { //Call appropriate function for browser
WriteSnowLayersForSnowType1();
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
} //end browser dependant snow display
/*---------------------------------------------------END SNOW EFFECT 1---------------------------------------------------*/
/*---------------------------------------------------BEGIN SNOW EFFECT 2-------------------------------------------------*/
function WriteLayersForSnow2() {
document.write('<div id=L1 style=\"position:absolute; width:30px; height:39px; z-index:101; left: 27px; top:-45px\">');
document.write('<a href=http://www.bobsspaceracers.com><img src=../fl4.gif width=42 height=37 border=0></a></div>');
document.write('<div id=L2 style="position:absolute; left:389px; top:-44px; width:48px; height:60px; z-index:102">');
document.write('<a href=http://www.bobsspaceracers.com><img src=../fl3.gif width=50 height=46 border=0></a></div>');
document.write('<div id=L3 style="position:absolute; left:186px; top:-41px; width:39px; height:52px; z-index:103">');
document.write('<a href=http://www.bobsspaceracers.com><img src=../fl2.gif width=40 height=40 border=0></a></div>');
document.write('<div id=L4 style="position:absolute; left:532px; top:-42px; width:31px; height:41px; z-index:104">');
document.write('<a href=http://www.bobsspaceracers.com><img src=../fl1.gif width=35 height=37 border=0></a></div>');
}
d=document; //This object MUST be defined GLOBALLY outside the functions
function SnowType2(tmLnName, myID) {
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
d.T == null;
if (d.T == null) iTl();
tmLn = d.T[tmLnName];
if (myID == null) { myID = ++tmLn.ID; firstTime=true;}
if (myID == tmLn.ID) {
setTimeout('SnowType2("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) { keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
}}}
function fO(n, d) {
var p,i,x;
if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
}
if(!(x=d[n])&&d.all) x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=fO(n,d.layers[i].document);
return x;
}
function sHL() {
var i,p,v,obj,args=sHL.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=fO(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
function iTl() {
var ns = navigator.appName == "Netscape";
d.T = new Array(4);
d.T[0] = new Array(2);
d.T["flk1"] = d.T[0];
d.T[0].fps = 5;
d.T[0][0] = new String("sprite");
d.T[0][0].slot = 1;
if (ns)
d.T[0][0].obj = d["L3"];
else
d.T[0][0].obj = d.all ? d.all["L3"] : null;
d.T[0][0].keyFrames = new Array(19, 20, 26, 33, 38, 43, 46, 54, 57, 69, 83, 96);
d.T[0][0].values = new Array(2);
d.T[0][0].values[0] = new
Array(186,186,190,196,202,210,217,224,229,235,241,246,251,256,259,262,263,262,261,260,258,256,253,250,
247,242,237,234,233,233,232,232,232,231,231,230,225,219,218,219,221,222,224,227,229,232,235,238,241,244,247,249,252,254,257,260,
263,266,268,271,273,276,277,279,280,281,281,281,280,280,279,278,277,276,274,273,272,271);
d.T[0][0].values[0].prop = "left";
d.T[0][0].values[1] = new
Array(-41,-34,-30,-26,-21,-15,-9,-2,3,9,14,20,26,33,40,51,62,74,84,95,105,115,124,132,139,146,151,160,167,175,
184,193,203,212,220,228,238,244,259,267,275,284,294,304,315,327,338,350,361,373,384,392,400,408,416,424,432,439,447,455,463,471,
480,488,497,507,517,527,537,548,558,569,579,590,600,611,621,632);
d.T[0][0].values[1].prop = "top";
if (!ns) {
d.T[0][0].values[0].prop2 = "style";
d.T[0][0].values[1].prop2 = "style";
}
d.T[0][1] = new String("behavior");
d.T[0][1].frame = 96;
d.T[0][1].value = "sHL('L1','','hide')";
d.T[0].lastFrame = 96;
d.T[1] = new Array(2);
d.T["flk2"] = d.T[1];
d.T[1].fps = 5;
d.T[1][0] = new String("sprite");
d.T[1][0].slot = 1;
if (ns)
d.T[1][0].obj = d["L2"];
else
d.T[1][0].obj = d.all ? d.all["L2"] : null;
d.T[1][0].keyFrames = new Array(1, 13, 18, 35, 45, 51, 53, 54, 83, 95);
d.T[1][0].values = new Array(2);
d.T[1][0].values[0] = new
Array(389,391,394,396,399,401,404,406,408,410,411,412,413,412,408,403,399,396,395,395,394,394,394,393,393,393,393,
392,392,392,391,391,390,389,388,386,383,379,376,372,369,366,363,360,358,356,356,357,358,359,359,357,355,349,350,352,354,355,357,359,361,
363,366,368,370,373,376,378,381,384,387,390,392,395,398,400,402,405,407,409,412,414,416,419,422,425,427,430,432,434,437,440,443,445,448);
d.T[1][0].values[0].prop = "left";
d.T[1][0].values[1] = new
Array(-44,-38,-33,-27,-22,-16,-10,-5,1,6,11,16,21,29,35,40,47,57,62,68,73,79,86,92,99,106,114,121,129,136,142,149,
156,162,168,176,184,191,197,203,209,214,219,224,229,236,243,249,254,258,263,273,283,315,321,327,334,340,347,354,362,370,378,386,394,
403,413,422,432,442,452,461,470,479,487,495,503,511,518,526,533,539,546,556,564,570,576,581,586,590,595,599,603,608,612);
d.T[1][0].values[1].prop = "top";
if (!ns) {
d.T[1][0].values[0].prop2 = "style";
d.T[1][0].values[1].prop2 = "style";
}
d.T[1][1] = new String("behavior");
d.T[1][1].frame = 95;
d.T[1][1].value = "sHL('L2','','hide')";
d.T[1].lastFrame = 95;
d.T[2] = new Array(2);
d.T["flk3"] = d.T[2];
d.T[2].fps = 5;
d.T[2][0] = new String("sprite");
d.T[2][0].slot = 1;
if (ns)
d.T[2][0].obj = d["L4"];
else
d.T[2][0].obj = d.all ? d.all["L4"] : null;
d.T[2][0].keyFrames = new Array(45, 52, 59, 64, 68, 72, 77, 81, 84, 94, 99);
d.T[2][0].values = new Array(2);
d.T[2][0].values[0] = new
Array(532,535,539,543,546,549,551,552,551,548,545,541,538,535,534,536,540,544,548,551,551,549,546,
545,546,548,549,549,546,542,537,532,529,528,528,529,529,527,524,525,527,529,532,536,539,543,547,550,552,554,555,554,552,549,547);
d.T[2][0].values[0].prop = "left";
d.T[2][0].values[1] = new
Array(-42,-28,-14,1,15,29,43,56,69,81,92,103,114,124,134,147,158,168,178,188,200,212,224,236,250,
265,279,294,305,315,325,335,345,359,372,385,397,409,419,436,445,455,466,478,490,504,516,529,540,552,570,586,601,616,631);
d.T[2][0].values[1].prop = "top";
if (!ns) {
d.T[2][0].values[0].prop2 = "style";
d.T[2][0].values[1].prop2 = "style";
}
d.T[2][1] = new String("behavior");
d.T[2][1].frame = 99;
d.T[2][1].value = "sHL('L1','','hide','L2','','hide','L3','','hide','L4','','hide')";
d.T[2].lastFrame = 99;
d.T[3] = new Array(2);
d.T["flk4"] = d.T[3];
d.T[3].fps = 5;
d.T[3][0] = new String("sprite");
d.T[3][0].slot = 1;
if (ns)
d.T[3][0].obj = d["L1"];
else
d.T[3][0].obj = d.all ? d.all["L1"] : null;
d.T[3][0].keyFrames = new Array(49, 64, 67, 72, 78, 107, 117, 123, 142);
d.T[3][0].values = new Array(2);
d.T[3][0].values[0] = new
Array(27,32,37,42,47,52,57,61,66,71,75,79,83,86,89,92,98,97,94,91,87,83,79,77,76,76,76,77,77,78,78,78,78,79,
79,79,79,80,80,80,80,81,81,81,82,82,82,82,82,83,83,83,83,83,83,83,83,82,82,81,78,76,72,69,66,63,61,59,59,61,64,69,75,80,84,85,86,87,
88,89,90,91,92,93,93,94,95,96,97,98,98,99,100,101);
d.T[3][0].values[0].prop = "left";
d.T[3][0].values[1] = new
Array(-45,-38,-31,-24,-17,-10,-3,4,11,18,24,30,36,42,48,53,70,83,96,106,116,126,138,153,170,188,207,227,246,
263,266,269,271,274,277,279,282,284,287,289,291,294,296,298,300,302,304,307,309,311,313,315,317,320,322,324,326,328,330,336,
341,346,350,355,360,365,371,378,385,400,416,433,452,472,493,500,508,515,523,530,538,546,554,562,571,579,587,596,604,613,621,
629,638,646);
d.T[3][0].values[1].prop = "top";
if (!ns) {
d.T[3][0].values[0].prop2 = "style";
d.T[3][0].values[1].prop2 = "style";
}
d.T[3][1] = new String("behavior");
d.T[3][1].frame = 142;
d.T[3][1].value = "sHL('L4','','hide')";
d.T[3].lastFrame = 142;
for (i=0; i<d.T.length; i++) {
d.T[i].ID = null;
d.T[i].curFrame = 0;
d.T[i].delay = 1000/d.T[i].fps;
}
}
function MakeSomeSnowType2() {
WriteLayersForSnow2();
SnowType2('flk1');
SnowType2('flk2');
SnowType2('flk3');
SnowType2('flk4');
}
/*---------------------------------------------------END SNOW EFFECT 2---------------------------------------------------*/
/*----------------------------------Begin Randomly Select Between 2 Separate Snow Effects--------------------------------*/
function SnowEffectRandomSelect(NumberOfSnowEffects)
{
var RandomSnowValue= Math.random();
var ConstNumberOfSnowEffects = NumberOfSnowEffects;
var SnowEffectType1 = "SnowEffectType1";
var SnowEffectType2 = "SnowEffectType2";
while(RandomSnowValue <= (NumberOfSnowEffects-1)/ConstNumberOfSnowEffects)
{
NumberOfSnowEffects--;
}
NumberOfSnowEffects = eval("SnowEffectType" + NumberOfSnowEffects);
if (NumberOfSnowEffects=="SnowEffectType1") {
MakeSomeSnowType1();
}
else if (NumberOfSnowEffects=="SnowEffectType2") {
MakeSomeSnowType2();
}
}
/*--------------------------------------End Random Selection of Snow Effects-------------------------------------------*/
/*--------------------------------------------Begin Fireworks Effect---------------------------------------------------*/
var ns=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
/*original value was 14*/
amount=28;
if (ns){
for (i=0; i < amount; i++)
document.write("<LAYER NAME='nsstars"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
}
else if (ie4||ns6){
document.write("<div id='ieCov' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
for (i=0; i < amount; i++)
document.write("<div id='iestars"+i+"' style='position:absolute;top:0px;left:0px;width:1;height:1;background:#ffffff;font-size:1;z-index:10'></div>");
document.write("</div></div>");
}
Clrs=new Array('ff0000','00ff00','ffffff','ff00ff','ffa500','ffff00','00ff00','ffffff','ff00ff')
sClrs=new Array('ffa500','00ff00','FFAAFF','fff000','fffffF')
Xpos=300;
Ypos=150;
initialStarColor='00ff00';
/*original value 5*/
step=15;
currStep=0;
/*original value 120*/
explosionSize=50;
function Fireworks(){
var WinHeight=(ns||ns6)?window.innerHeight-100:window.document.body.clientHeight-100;
var WinWidth=(ns||ns6)?window.innerWidth-100:window.document.body.clientWidth-100;
var Yscroll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
for (i=0; i < amount; i++){
if (ie4||ns6)
var layer=ns6?document.getElementById("iestars"+i).style : eval("iestars"+i).style;
else if (ns)
var layer=document.layers["nsstars"+i]
var randCol=Math.round(Math.random()*8);
var randSz=Math.round(Math.random()*2);
layer.top = Ypos + explosionSize*Math.sin((currStep+i*5)/3)*Math.sin(currStep/100)
layer.left= Xpos + explosionSize*Math.cos((currStep+i*5)/3)*Math.sin(currStep/100)
if (currStep < 110){
if (ns){layer.bgColor=initialStarColor;layer.clip.width=1;layer.clip.height=1}
else{layer.background=initialStarColor;layer.width=1;layer.height=1;layer.fontSize=1}
}
else{
if (ns){layer.bgColor=Clrs[randCol];layer.clip.width=randSz;layer.clip.height=randSz}
else{layer.background=Clrs[randCol];layer.width=randSz;layer.height=randSz;layer.fontSize=randSz}
}
}
if (currStep > 220)
{
currStep=0;
Ypos = 50+Math.round(Math.random()*WinHeight)+Yscroll;
Xpos = 50+Math.round(Math.random()*WinWidth);
for (i=0; i < sClrs.length; i++)
{
var newIcol=Math.round(Math.random()*i);
}
initialStarColor=sClrs[newIcol];
explosionSize=Math.round(80*Math.random()+100);
}
currStep+=step;
setTimeout("Fireworks()",10);
}
/*-----------------------------------------------End Fireworks Effect---------------------------------------------------*/
/*------------------------------------------------BEGIN CHRISTMAS-------------------------------------------------------*/
if (holiday=="Christmas") {
SnowEffectRandomSelect(2);
document.write('<center><img src=\"../happyholidays1.gif\"</center>');
document.write('<center><font size=1>Today is '+weekday+', '+month+' '+DateData+' of the year '+year+'.');
var daystillchristmas = 25-DateData;
var daysafterchristmas = DateData-25;
var daystillnewyear = (31-DateData)+1;
var daygrammarafter = "days";
var daygrammartill = "days";
var daygrammarnew = "days";
if (daystillchristmas<=1) { daygrammartill = "day"; }
if (daysafterchristmas<=1) { daygrammarafter = "day"; }
if (daystillnewyear<=1) { daygrammarnew = "day"; }
if (DateData<=24) {
document.write(' Only '+daystillchristmas+' '+daygrammartill+' until Christmas!'); }
else if (DateData==25) { document.write(' It IS Christmas!'); }
else if (DateData>=26) {
document.write(' It has been '+daysafterchristmas+' '+daygrammarafter+' since Christmas, '+daystillnewyear+' '+daygrammarnew+' until the New Year!'); }}
/*-------------------------------------------------END CHRISTMAS-------------------------------------------------------*/
/*-------------------------------------------------BEGIN NEW YEAR------------------------------------------------------*/
else if (holiday=="NewYear" && DateData<=15) {
SnowEffectRandomSelect(2);
document.write('<center>Happy New Year!</center>');
document.write('<center><font size=1>Today is '+weekday+', '+month+' '+DateData+' of the New Year '+year+'.');
}
/*--------------------------------------------------END NEW YEAR-------------------------------------------------------*/
/*--------------------------------------------------BEGIN EASTER-------------------------------------------------------*/
else if (holiday=="Easter" && month=="March" && DateData>=15 || month=="April") {
// GLOBAL VARIABLES
var jDay = 0;
var jMonth = 0;
var oDay = 0;
var oMonth = 0;
var wDay = 0;
var wMonth = 0;
var easteryear= 0;
//Check browser is version 2 or more
if (parseFloat(navigator.appVersion) < 2)
alert ("Primitive browser detected. You may need to upgrade it to reliably calculate Easter.");
// Define Easter Calculation Functions
function ShowEasters(yr)
{
easteryear= parseInt(yr, 10);
if (isNaN(easteryear))
easteryear= 0;
// reset vars
jDay = 0;
jMonth = 0;
oDay = 0;
oMonth = 0;
wDay = 0;
wMonth = 0;
//get relevant Easter dates(I doubt we'll be around long enough to execute this clause)
if ((easteryear<= 325) || (easteryear> 4099))
document.write("<font size=1 face=arial>You have exceeded the parameters expected for these calculations."
+
"Calculations are only valid from 326 to 4099</font>");
else {
EasterJulian(); // used for all calculations
if ((easteryear> 325) && (easteryear<= 1582)) {
document.write('<div align=\"center\"><center><table border=\"0\" width=\"55%\" cellspacing=\"0\" cellpadding=\"0\"><tr>"
+
"<td width=\"10%\" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\"></td>"
+
"<td width=\"80%\" valign=\"middle\" align=\"center\"><font face=\"arial\" size=\"1\">');
document.write("<font size=1 face=arial>Easter Sunday " + easteryear+ ": "
+ GetMonth(jMonth) + " " + GetOrdinal(jDay)
+ " in the Julian calendar </font>");
document.write('</td><td width=\"10\%" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\">"
+
"</td></tr></table></center></div>');
}
else { // easteryear is 1583 to 4099
EasterOrthodox (easteryear, jDay, jMonth);
EasterWestern ();
if (easteryear<= 1922) {
// clarify that this is a Gregorian date last known use of the Julian calendar was in 1922
document.write('<div align=\"center\"><center><table border=\"0\" width=\"55%\" cellspacing=\"0\" cellpadding=\"0\"><tr>"
+
"<td width=\"10%\" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\"></td>"
+
"<td width=\"80%\" valign=\"middle\" align=\"center\"><font face=\"arial\" size=\"1\">');
document.write("<font size=2 face=arial>Easter Sunday " + easteryear+ " falls on "
+ GetMonth(wMonth) + " " + GetOrdinal(wDay)
+ ".\n\n"
+ "Orthodox Easter Sunday " + easteryear+ " falls on "
+ GetMonth(oMonth) + " " + GetOrdinal(oDay)
+ "\n(in the Gregorian calendar), which is the same day as\n"
+ GetMonth(jMonth) + " " + GetOrdinal(jDay)
+ " in the Julian calendar\n(for regions using that calender at the time).</font>");
document.write('</td><td width=\"10\%" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\">"
+
"</td></tr></table></center></div>');
}
else {
document.write('<div align=\"center\"><center><table border=\"0\" width=\"55%\" cellspacing=\"0\" cellpadding=\"0\"><tr>"
+
"<td width=\"10%\" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\"></td>"
+
"<td width=\"80%\" valign=\"middle\" align=\"center\"><font face=\"arial\" size=\"1\">');
document.write("<center><font size=1 face=arial>He is Risen!<br>Easter Sunday " + easteryear+ " falls on "
+ GetMonth(wMonth) + " " + GetOrdinal(wDay) + ". "
+ "Orthodox Easter " + easteryear+ " falls on "
+ GetMonth(oMonth) + " " + GetOrdinal(oDay) + ". "
+ "<br>Easter is "
+ GetMonth(jMonth) + " " + GetOrdinal(jDay)
+ " for those using the Julian calendar.</font></center>");
document.write('</td><td width=\"10\%" valign=\"middle\" align=\"center\"><img border=\"0\" src=\"../cross3.gif\" width=\"67\" height=\"74\">"
+
"</td></tr></table></center></div>');
}
}
}
}
function IntDiv (num, dvsr)
// performs integer division of num/dvsr - eg IntDiv(9,4)=2
{
var negate = false;
var result = 0;
if (dvsr == 0)
return null;
else {
if (num * dvsr < 0 )
negate = true;
if (num < 0)
num = -num;
if (dvsr < 0)
dvsr = -dvsr;
result = ((num - (num % dvsr)) / dvsr);
if (negate)
return -result;
else
return result;
}
}
function GetMonth(m)
{
//switch is better, but not supported in JavaScript ver 1.0
if (m==3)
return ("March");
if (m==4)
return ("April");
if (m==5)
return ("May");
}
function GetOrdinal(d)
{
var rmdr = 0;
rmdr = d % 10;
if (((d >= 4) && (d <= 20)) || (rmdr == 0) || (rmdr > 3))
return (d + "th");
else {
//switch is better, but not supported in JavaScript ver 1.0
if (rmdr==1)
return (d + "st");
if (rmdr==2)
return (d + "nd");
if (rmdr==3)
return (d + "rd");
}
}
function EasterJulian()
{
var g = 0;
var i = 0;
var j = 0;
var p = 0;
g = easteryear% 19;
i = (19 * g + 15) % 30;
j = (easteryear+ IntDiv(easteryear, 4) + i) % 7;
p = i - j + 28;
jDay = p;
jMonth = 4;
if (p > 31)
jDay = p - 31;
else
jMonth = 3;
}
function EasterWestern()
{
var g = 0;
var c = 0;
var h = 0;
var i = 0;
var j = 0;
var p = 0;
g = easteryear% 19;
c = IntDiv(easteryear, 100);
h = (c - IntDiv(c, 4) - IntDiv(8 * c + 13, 25) + 19 * g + 15) % 30;
i = h - IntDiv(h, 28) * (1 - IntDiv(h, 28)
* IntDiv(29, h + 1) * IntDiv(21 - g, 11));
j = (easteryear+ IntDiv(easteryear, 4) + i + 2 - c + IntDiv(c, 4)) % 7;
p = i - j + 28;
wDay = p;
wMonth = 4;
if (p > 31)
wDay = p - 31;
else
wMonth = 3;
}
function EasterOrthodox (yr, jDay, jMonth)
/* Even though the Julian calendar is no longer in use
Orthodox Easters are still based on this calendar
NOTE! JULIAN Easter Date must be calculated first!
This function converts Julian March and April
Easter Sunday dates to Gregorian calendar dates */
{
var extra = 0;
var tmp = 0;
oDay = 0;
oMonth = 0;
if ((yr > 1582) && (yr <= 4099)) {
extra = 10;
if (yr > 1600) {
tmp = IntDiv(yr, 100) - 16;
extra = extra + tmp - IntDiv(tmp, 4);
}
oDay = jDay + extra;
oMonth = jMonth;
if ((oMonth == 3) && (oDay > 31)) {
oMonth = 4;
oDay = oDay - 31;
}
if ((oMonth == 4) && (oDay > 30)) {
oMonth = 5;
oDay = oDay - 30;
}
}
}
/*Call Easter Calculation Functions*/
ShowEasters(year);
} //close EASTER function
/*----------------------------------------------------END EASTER-------------------------------------------------------*/
/*--------------------------------------------------BEGIN HALLOWEEN----------------------------------------------------*/
else if (holiday=="Halloween" && DateData>=20) {
var daystillhalloween = 31-DateData;
document.write('<center>October Festivals. Harvest.</center>');
if (DateData==31) { document.write('<center>It\'s Halloween!</center>'); }
else if (DateData==30) { document.write('<center>Only one day until Halloween!<center>'); }
else if (DateData<=29) { document.write('<center>Only '+daystillhalloween+' days until Halloween.'); }
}
/*----------------------------------------------------END HALLOWEEN----------------------------------------------------*/
/*----------------------------------------------------BEGIN July 4th---------------------------------------------------*/
else if (holiday=="July4th" && DateData<=25) {
var daystilljuly4th = 4-DateData;
Fireworks();
if (DateData==4) { document.write('<center>It\'s July 4th. Happy Independance Day!</center>'); }
else if (DateData==3) { document.write('<center>One more day until July 4th.<center>'); }
else if (DateData<=2) { document.write('<center>Only '+daystilljuly4th+' days until July 4th.'); }
}
/*-----------------------------------------------------END July 4th----------------------------------------------------*/
/*--------------------------------------------------BEGIN Memorial Day-------------------------------------------------*/
/*---------------------------------------------------END Memorial Day--------------------------------------------------*/
STATUS BAR SCROLLS
1. Standard Scroll (Requires onLoad statement in BODY tag)
<BODY bgcolor="#000000" TEXT="#FFFFFF" onLoad="scroll(); return true">
<script language="javascript">
var scrlStr="...Greetings from Traveler – enjoy your visit and come back soon! ";
var width=140;
var strLen=scrlStr.length;
var pos=1-width;
function scroll() {
var scroll = "";
pos++;
if(pos == strLen)
pos =1 - width;
if(pos<0){
for(var i=1;i<=Math.abs(pos);i++)
scroll=scroll+" ";
scroll=scroll+scrlStr.substring(0,width-i+1);
}
else
scroll=scroll+scrlStr.substring(pos,pos+width);
window.status=scroll;
setTimeout("scroll()",60);
}
</script>
</BODY>
2. Typed Scroll (Must place between HEAD tags and include onLoad statement in BODY.)
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var Message="Hey you, yeah you! YOU know who you are. We hope you enjoyed your visit and come back soon!";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
}
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
}
}
// End -->
</SCRIPT>
</HEAD>
<BODY onLoad="scrollIn()" TEXT="#FFFFFF" BGCOLOR="#000000">
</BODY>
3. Blinker Message Scroll (Must place between HEAD tags and include onLoad statement in BODY.)
<HEAD>
<script LANGUAGE="JavaScript">
<!-- Begin
var message="Hi! C. Germany here and I pray that God blesses you!";
var speed=8000;
var visible=0;
function Flash() {
if (visible == 0) {
window.status=message;
visible=1;
} else {
window.status="";
visible=0;
}
setTimeout('Flash()', speed);
}
// End -->
</script>
</HEAD>
<BODY bgcolor="#000000" text="#FFFFFF" onLoad="Flash()">
</BODY>
4. Sliding Text Scroll (No onLoad statement required.)
<BODY>
<script LANGUAGE="JavaScript">
<!--//
// set speed of banner (pause in milliseconds between addition of new character)
var speed = 3
// decrease value to increase speed (must be positive)
// set pause between completion of message and beginning of following message
var pause = 1500
// increase value to increase pause
// set initial values
var timerID = null
var bannerRunning = false
// create array
var ar = new Array()
// assign the strings to the array's elements
ar[0] = "Who is Jesus?"
ar[1] = "Some say He was a fraud."
ar[2] = "Others say He was a teacher, a prophet."
ar[3] = "The Bible says He is the Son of God."
// assign index of current message
var message = 0
// empty string initialization
var state = ""
// no value is currently being displayed
clearState()
// stop the banner if it is currently running
function stopBanner() {
// if banner is currently running
if (bannerRunning)
// stop the banner
clearTimeout(timerID)
// timer is now stopped
timerRunning = false
}
// start the banner
function startBanner() {
// make sure the banner is stopped
stopBanner()
// start the banner from the current position
showBanner()
}
// assign state a string of "0" characters of the length of the current message
function clearState() {
// initialize to empty string
state = ""
// create string of same length containing 0 digits
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}
// display the current message
function showBanner() {
// if the current message is done
if (getString()) {
// increment message
message++
// if new message is out of range wrap around to first message
if (ar.length <= message)
message = 0
// new message is first displayed as empty string
clearState()
// display next character after pause milliseconds
timerID = setTimeout("showBanner()", pause)
}
else {
// initialize to empty string
var str = ""
// built string to be displayed (only character selected thus far are displayed)
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
}
// partial string is placed in status bar
window.status = str
// add another character after speed milliseconds
timerID = setTimeout("showBanner()", speed)
}
}
function getString() {
// set variable to true (it will stay true unless proven otherwise)
var full = true
// set variable to false if a free space is found in string (a not-displayed char)
for (var j = 0; j < state.length; ++j) {
// if character at index j of current message has not been placed in displayed string
if (state.charAt(j) == 0)
full = false
}
// return true immediately if no space found (avoid infinitive loop later)
if (full) return true
// search for random until free space found (braoken up via break statement)
while (1) {
// a random number (between 0 and state.length - 1 == message.length - 1)
var num = getRandom(ar[message].length)
// if free space found break infinitive loop
if (state.charAt(num) == "0")
break
}
// replace the 0 character with 1 character at place found
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
// return false because the string was not full (free space was found)
return false
}
function getRandom(max) {
// create instance of current date
var now = new Date()
// create a random number (good generator)
var num = now.getTime() * now.getSeconds() * Math.random()
// cut random number to value between 0 and max - 1, inclusive
return num % max
}
startBanner()
// -->
</script>
<BODY>
TEXT BOX SCROLLS
1. Standard Text Box Scroll
<BODY BGCOLOR="#000000" text="#FFFFFF" onload="banner()">
<script language="JavaScript">
var id,pause=0,position=0,revol=9;
function banner()
{
var i,k;
var msg=" Sure, you've had your fancy STUDIO PRODUCED music... You know, with all that REVERB and FLANGING and"
+
" special effects. But you just don't know what a HOME MADE mixer and 10-12 9-volt batteries can sound like. Folks, we're"
+
" talking Total Harmonic Distortion, Humm Encounters of the Third Kind. Hundreds of poor, unfortunate 9-volt batteries lost their"
+
" lives for this project (sob)... This has been a completely unprofessional, ameteur, out of the garage and IN YO FACE production...
" +
"I love you man and I don't even want your BUD LIGHT!... Bye!";
var speed=15;
document.thisform.thisbanner.value=msg.substring(position,position+50);
if(position++==msg.length)
{
if (revol-- < 2) return;
position=0;
}
id=setTimeout("banner()",1000/speed);
}
</script>
<//Requires Form Text Box Below for Display>
<FORM name="thisform">
<input type="text" name="thisbanner" size="40">
</FORM>
</BODY>
2. Flashing Message Text Box Scroll (No onLoad required, must place between HEAD tags.)
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--- Begin
var CurrentMsg = 'hello';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<49) {
pad = (50-n)/2;
for(var i=0; i<pad; i++) {
pad_str+=" ";
}
}
CurrentMsg =msg;
document.messages.field.value = CurrentMsg;
clearTimeout(timer);
timer = setTimeout("idleMsg()",4000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 10;
var notices = new MakeArray(notice_num);
notices[1] = " Jesus LOVES this world.";
notices[2] = " So Jesus died for this world.";
notices[3] = " He gave His life up for us.";
notices[4] = " He is always reaching out.";
notices[5] = " Always hoping to touch us...";
notices[6] = " to get our attention...";
notices[7] = " to fix our broken hearts...";
notices[8] = " to fill our lonliness...";
notices[9] = " to truly KNOW us...";
notices[10] = "Why do we resist such a friend?";
var timer = setTimeout('idleMsg()',1000);
function nochange() {
document.messages.field.value = CurrentMsg;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
// End -->
</SCRIPT>
</HEAD>
<//Must include form text box below>
<FORM name="messages" onSubmit="return false">
<input type="text" name="field" size=30 value="" onFocus="self.status=''; return true" onChange="nochange()">
</FORM>
TIME AND DATE OBJECT
1. Time/Date in Status Bar
<script language="JavaScript">
function doClock() {
window.setTimeout( "doClock()", 1000 );
today = new Date();
self.status = today.toString();
}
doClock()
</script>
2. Time-Date-Message in Form Text Box
<BODY bgproperties="fixed" bgcolor="#000000" onLoad="start_clock()">
<script language="JavaScript">
function start_clock()
{
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var today = now.getDay();
var month = now.getMonth();
var year = now.getYear();
var date = now.getDate();
if(hours < 12) var part_of_day = "Good Morning!"
else if(hours < 18) var part_of_day = "Good Afternoon!";
else var part_of_day = "Goodnight!";
if (today == 0) today = "Sunday, ";
else if (today == 1) today = "Monday, ";
else if (today == 2) today = "Tuesday, ";
else if (today == 3) today = "Wednesday, ";
else if (today == 4) today = "Thursday, ";
else if (today == 5) today = "Friday, ";
else if (today == 6) today = "Saturday, ";
if (month == 0) month = "January ";
else if (month == 1) month = "February ";
else if (month == 2) month = "March ";
else if (month == 3) month = "April ";
else if (month == 4) month = "May ";
else if (month == 5) month = "June ";
else if (month == 6) month = "July ";
else if (month == 7) month = "August ";
else if (month == 8) month = "September ";
else if (month == 9) month = "October ";
else if (month == 10) month = "November ";
else if (month == 11) month = "December ";
if(seconds < 10) seconds = "0" + seconds;
if(minutes < 10) minutes = "0" + minutes;
if(hours < 12) seconds = seconds + " A.M.";
else if(hours >= 12) seconds = seconds + " P.M."
if(hours == 0) hours = hours + 12;
else if(hours >12) hours = hours - 12;
var time = hours + ":" + minutes + ":" + seconds;
document.time_form.clock.value = time;
document.time_form.day_part.value = part_of_day
document.time_form.date.value = today + month + date + ", " + "19" + year
setTimeout("start_clock()", 1000);
}
</script>
<center>
<Form Text Box required below for display>
<FORM name="time_form">
<font COLOR="#FFFFFF" FACE="Baskerville" SIZE="3"><div align="center"><center><p>I
bid you <input name="day_part" size="13" value="Lyrics/Music">. Where you
live it is <input name="date" size="26" value="by..."> <br>
and your local time is approximately <input name="clock" size="11" value="C. Germany"> .</p>
</center></div>
</FORM>
</BODY>
3. Plain Text Output of Time/Date Object (Displays Message and date in simple text format.)
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
var d = new Date()
var h = d.getHours()
if (h < 12)
document.write("Good Morning!")
else
if (h < 17)
document.write("Good Afternoon!")
else
document.write("Good Evening!")
document.write("<BR><BR>Welcome to our web site. ")
document.write("<BR><BR>You've visited this page on <FONT COLOR='Red'>" + d + "</FONT>.")
//-->
</SCRIPT>
</BODY>
4. Clock in Screen Corner (Uses style sheets and absolute positioning.)
<BODY>
<span id="liveclock" style="position:absolute;left:0;top:0;">
</span>
<script language="JavaScript">
<!--
function show5(){
if (!document.layers&&!document.all)
return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here to your desire
myclock="<font size='5' face='Arial' ><b><font size='1'>Current Time:</font></br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
setTimeout("show5()",1000)
}
//-->
</script>
</BODY>
5. Dynamic Time/Date Calender
<BODY>
<script>
setCal()
function getTime() {
// initialize time-related variables with current time settings
var now = new Date()
var hour = now.getHours()
var minute = now.getMinutes()
now = null
var ampm = ""
// validate hour values and set value of ampm
if (hour >= 12) {
hour -= 12
ampm = "PM"
} else
ampm = "AM"
hour = (hour == 0) ? 12 : hour
// add zero digit to a one digit minute
if (minute < 10)
minute = "0" + minute // do not parse this number!
// return time string
return hour + ":" + minute + " " + ampm
}
function leapYear(year) {
if (year % 4 == 0) // basic rule
return true // is leap year
/* else */ // else not needed when statement is "return"
return false // is not leap year
}
function getDays(month, year) {
// create array to hold number of days in each month
var ar = new Array(12)
ar[0] = 31 // January
ar[1] = (leapYear(year)) ? 29 : 28 // February
ar[2] = 31 // March
ar[3] = 30 // April
ar[4] = 31 // May
ar[5] = 30 // June
ar[6] = 31 // July
ar[7] = 31 // August
ar[8] = 30 // September
ar[9] = 31 // October
ar[10] = 30 // November
ar[11] = 31 // December
// return number of days in the specified month (parameter)
return ar[month]
}
function getMonthName(month) {
// create array to hold name of each month
var ar = new Array(12)
ar[0] = "January"
ar[1] = "February"
ar[2] = "March"
ar[3] = "April"
ar[4] = "May"
ar[5] = "June"
ar[6] = "July"
ar[7] = "August"
ar[8] = "September"
ar[9] = "October"
ar[10] = "November"
ar[11] = "December"
// return name of specified month (parameter)
return ar[month]
}
function setCal() {
// standard time attributes
var now = new Date()
var year = now.getYear()
var month = now.getMonth()
var monthName = getMonthName(month)
var date = now.getDate()
now = null
// create instance of first day of month, and extract the day on which it occurs
var firstDayInstance = new Date(year, month, 1)
var firstDay = firstDayInstance.getDay()
firstDayInstance = null
// number of days in current month
var days = getDays(month, year)
// call function to draw calendar
drawCal(firstDay + 1, days, date, monthName, 1900 + year)
}
function drawCal(firstDay, lastDate, date, monthName, year) {
// constant table settings
var headerHeight = 50 // height of the table's header cell
var border = 2 // 3D height of table's border
var cellspacing = 4 // width of table's border
var headerColor = "midnightblue" // color of table's header
var headerSize = "+3" // size of tables header font
var colWidth = 60 // width of columns in table
var dayCellHeight = 25 // height of cells containing days of the week
var dayColor = "darkblue" // color of font representing week days
var cellHeight = 40 // height of cells representing dates in the calendar
var todayColor = "red" // color specifying today's date in the calendar
var timeColor = "purple" // color of font representing current time
// create basic table structure
var text = "" // initialize accumulative variable to empty string
text += '<CENTER>'
text += '<TABLE BORDER=' + border + ' CELLSPACING=' + cellspacing + '>' // table settings
text += '<TH COLSPAN=7 HEIGHT=' + headerHeight + '>' // create table header cell
text += '<FONT COLOR="' + headerColor + '" SIZE=' + headerSize + '>' // set font for table header
text += monthName + ' ' + year
text += '</FONT>' // close table header's font settings
text += '</TH>' // close header cell
// variables to hold constant settings
var openCol = '<TD WIDTH=' + colWidth + ' HEIGHT=' + dayCellHeight + '>'
openCol += '<FONT COLOR="' + dayColor + '">'
var closeCol = '</FONT></TD>'
// create array of abbreviated day names
var weekDay = new Array(7)
weekDay[0] = "Sun"
weekDay[1] = "Mon"
weekDay[2] = "Tues"
weekDay[3] = "Wed"
weekDay[4] = "Thu"
weekDay[5] = "Fri"
weekDay[6] = "Sat"
// create first row of table to set column width and specify week day
text += '<TR ALIGN="center" VALIGN="center">'
for (var dayNum = 0; dayNum < 7; ++dayNum) {
text += openCol + weekDay[dayNum] + closeCol
}
text += '</TR>'
// declaration and initialization of two variables to help with tables
var digit = 1
var curCell = 1
for (var row = 1; row <= Math.ceil((lastDate + firstDay - 1) / 7); ++row) {
text += '<TR ALIGN="right" VALIGN="top">'
for (var col = 1; col <= 7; ++col) {
if (digit > lastDate)
break
if (curCell < firstDay) {
text += '<TD></TD>';
curCell++
} else {
if (digit == date) { // current cell represent today's date
text += '<TD HEIGHT=' + cellHeight + '>'
text += '<FONT COLOR="' + todayColor + '">'
text += digit
text += '</FONT><BR>'
text += '<FONT COLOR="' + timeColor + '" SIZE=2>'
text += '<CENTER>' + getTime() + '</CENTER>'
text += '</FONT>'
text += '</TD>'
} else
text += '<TD HEIGHT=' + cellHeight + '>' + digit + '</TD>'
digit++
}
}
text += '</TR>'
}
// close all basic table tags
text += '</TABLE>'
text += '</CENTER>'
// print accumulative HTML string
document.write(text)
}
</script>
</BODY>
On Mouse-Overs
1. Give Hyperlink Description in Status Bar (Place in HEAD tags.)
<HEAD>
<script LANGUAGE="JavaScript1.2">
<!--
function ClearStatusBar() {
window.status="";
}
function Display(Tooltip) {
var Duration = 5000;
window.status = Tooltip;
setTimeout("ClearStatusBar()",Duration);
}
//-->
</script>
</HEAD>
<BODY>
<//Must write hyperlinks with onMouseOver statement like below:)>
<a HREF="http://www.netobjects.com"
onMouseOver="Display
('Visit the NetObjects web site'); return true;">NetObjects Inc.</a><br>
<br>
<a HREF="http://www.ibm.com"
onMouseOver="Display
('Visit the IBM web site'); return true;">IBM</a><br>
</BODY>
2. Image change onMouseOver
<BODY>
<script language = "JavaScript">
function on()
{
document.image_on.src = "chucky4.jpg"
}
function off()
{
document.image_on.src = "chucky2.jpg"
}
</script>
<A HREF="wavefile.html" onMouseOver = "on()" onMouseOut = "off()">
<IMG SRC="chucky2.jpg" ALT="Hold your mouse over this photo for a few seconds and see what happens!
Click here for WAVE music clips." Align="left" Border="0" name = "image_on"></A>
</BODY>
3. onMouseOver Display Hyperlink/image Map in Form Text Box
<BODY>
<script>
<!--
function showtip(tip){document.tool.tip.value=tip}
//-->
</script>
<//Below FORM Text Box needed for display.>
<FORM name="tool"><div align="center"><center>
<input type="text" name="tip" size="69"></center>
</div>
</FORM>
<//List hypertext references like so:>
<A HREF="grass.wav"
onMouseover="showtip('..........Mmmm...... I really do kinda think I want some grass about now.......')" onMouseout="showtip('')"></a>
<//Use with image map like so:>
<startspan circle=" (43,156) 43 grass.html"
circle=" (229,62) 58 dirt.wav" circle=" (286,241) 2 grass.wav"
circle=" (58,254) 54 grass.wav" circle=" (136,113) 40 back.wav"
circle=" (208,215) 11 nose.wav" circle=" (256,175) 20 back.wav"
circle=" (168,161) 18 back.wav" circle=" (149,33) 27 food.wav"
circle=" (37,33) 28 water.wav" circle=" (103,57) 18 tail.wav"
circle=" (211,158) 21 back.wav" circle=" (202,238) 13 ruff.wav" src="simba.jpg"
width="288" height="309" alt="Simba - Traveler's Virtual Puppy!" border="0" -->
<MAP NAME="TRAVELERMap0">
<AREA SHAPE="CIRCLE" COORDS="43, 156, 43" HREF="grass.wav"
onMouseover="showtip('..........Mmmm...... I really do kinda think I want some grass about now.......')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="229, 62, 58" HREF="dirt.wav"
onMouseOver="showtip('..........I LOVE to dig in the dirt! Wanna dig up some flowers?')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="286, 241, 2" HREF="grass.wav"
onMouseOver="showtip('..........Eat MORE grass? O.k. The stringy kind tastes like chicken!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="58, 254, 54" HREF="grass.wav"
onMouseOver="showtip('..........Eat MORE grass? O.k. The stringy kind tastes like chicken!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="136, 113, 40" HREF="back.wav"
onMouseOver="showtip('..........Yes! Please scratch my back! That feels so GOOD!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="208, 215, 11" HREF="nose.wav"
onMouseOver="showtip('..........Please get your hand off my nose, I can not breathe!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="256, 175, 20" HREF="back.wav"
onMouseOver="showtip('..........Oh yes, that ear, scratch me behind that ear.')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="168, 161, 18" HREF="back.wav"
onMouseOver="showtip('..........Oh, that ear too, I love it when they scratch behind my ears!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="149, 33, 27" HREF="food.wav"
onMouseOver="showtip('..........Oh FEED me, yeah! Feed me! - I LOVE FOOD! Take a hint?')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="37, 33, 28" HREF="water.wav"
onMouseOver="showtip('..........Yes, please give me some water. I am so THIRSTY!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="103, 57, 18" HREF="tail.wav"
onMouseOver="showtip('..........Ouch! That hurts! Please do not pull on my tail!')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="211, 158, 21" HREF="back.wav"
onMouseOver="showtip('..........Yes! Pet me on my head, I like that. Mmmmmore, yessssss...')" onMouseout="showtip('')"></a>
<AREA SHAPE="CIRCLE" COORDS="202, 238, 13" HREF="ruff.wav"
onMouseOver="showtip('..........Let me lick your hand and we will be friends!')" onMouseout="showtip('')"></a></MAP>
<img src="simba.jpg" width="288" height="309" alt="Simba - Traveler's Virtual Puppy!" border="0" usemap="#TRAVELERMap0">
</BODY>
RANDOM EVENTS
1. Randomly Picked Sound Files
<BODY>
<script language = "JavaScript">
function get_sound_file(n)
{
var x = Math.random();
var a = n;
var sound1 = "joynlord.mid";
var sound2 = "hesaythy.mid";
var sound3 = "newsong.mid";
var sound4 = "1truking.mid";
var sound5 = "2ndchanc.mid";
while(x <= (n-1)/a)
{
n --;
}
n = eval("sound" + n);
document.write("<center>");
document.write("<embed src = '" + n + "' autostart = 'true' loop = 'false' volume = '50%' height = '55' width = '140'>");
document.write("</embed>");
document.write("<BR>");
document.write("Randomly selected TRAVELER MIDI now playing is <FONT COLOR=FF000><FONT SIZE=4><blink> " +
n + "</blink></FONT></FONT>.");
document.write("</center>");
}
</script>
<script language = "JavaScript">
get_sound_file("5");
</script>
</BODY>
MENUS
1. Menu Drop Box
<BODY>
<script language = "JavaScript">
function go()
{
if(document.forms[0].place.selectedIndex == 1) goto_location = "poetry.html";
if(document.forms[0].place.selectedIndex == 2) goto_location = "http://www.geniegraphics.com/cgi-bin/chatpro/chatpro.cgi";
if(document.forms[0].place.selectedIndex == 3) goto_location = "discussion.html";
if(document.forms[0].place.selectedIndex == 4) goto_location = "stories.html";
if(document.forms[0].place.selectedIndex == 5) goto_location = "songs1.html";
if(document.forms[0].place.selectedIndex != 0) parent.location = goto_location;
}
</script>
<center>
<FORM>
<FONT COLOR="FFFFFF"><FONT SIZE="3"><FONT FACE="Arial">
To quickly navigate TRAVELER's web site select sections in the box below:
<SELECT NAME ="place" onChange = "go()">
<OPTION SELECTED>
<OPTION>Poetry Archive
<OPTION>Chat *LIVE* inside TRAVELER's Chat Complex!
<OPTION>TRAVELER Open Discussion Forum
<OPTION>Stories
<OPTION>Lyrics
</SELECT>
</FORM>
</BODY>
2. FRAME Driven Menu With Base Target (No button click required)
***PARENT FRAME***
<html>
<HEAD>
<title>Bob's Space Racers</title>
</HEAD>
<//Note: Call Primary and Secondary Frames - Initialize Menu from 3rd Frame>
<frameset frameborder="0" border="0" framespacing="0" rows="6%,94%">
<frame name="Trav1" src="Trav1.html" border="0" scrolling="no" frameborder="0"
framespacing="0" marginwidth="0" marginheight="0">
<frame name="Trav2" src="Trav2.html" border="0" scrolling="yes" frameborder="0"
framespacing="0" marginwidth="0" marginheight="0">
<noframes>
<body bgcolor="#000000" background="star.gif" text="#FFFFFF">
</body>
</noframes>
</frameset>
<//Note: For Sub Structure Expansion>
<frameset>
<noframes>Sorry - You Don't Do Frames.
</noframes>
</frameset>
</html>
***TOP FRAME (Trav1) - Loads "Trav1.html"***
<html>
<HEAD><TITLE>Bob's MENU</TITLE>
<SCRIPT LANGUAGE="JavaScript">
/* Menu Code written 10/25/98 by C. Germany*/
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
var ver = "n3";
if (bName == "Netscape" && bVer >= 3) ver = "n3";
else if (bName == "Netscape" && bVer == 2) ver = "n2";
else if (bName == "Microsoft Internet Explorer" && bVer >= 2) ver = "e3";
function MakeArrayZ()
{
this.length = MakeArrayZ.arguments.length
for (var z = 0; z < this.length; z++)
this[z+1] = MakeArrayZ.arguments[z]
}
function CreateEmail(){
MidiWindow=window.open("Email.htm","displayWindow","toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,width=640,height=480")
}
function CreateMessage(){
MidiWindow=window.open("Messages.htm","displayWindow","toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,width=400,height=400")
}
/* Javascript code for black menu bar: pulldown lists */
var siteopt1 = new MakeArrayZ("Production","CNC Jobs","Symix 4.0 Form","CNC Maintenance","Production 3","Production 4");
var url1 = new MakeArrayZ("","cnc.html","production1.html","maintenance.html","produce3.html","produce4.html");
var siteopt2 = new MakeArrayZ("BSR Games", "All BSR Products", "Arcade Games", "Park Games", "Trailer
Games", "Barrel of Fun", "Bowler Roller",
"Can Alley");
var url2 = new MakeArrayZ("", "games.htm", "arcadegames.htm", "parkgames.htm", "trailergames.htm", "barrel.htm", "bowlerroller.htm", "canalley.htm");
var siteopt3= new MakeArrayZ("TECH","Tech 1","Tech 2","Tech 3","Tech 4");
var url3= new MakeArrayZ("","tech1.html","tech2.html","tech3.html","tech4.html");
var siteopt4 = new MakeArrayZ("Sales","Game Requests","Arcade Games","Park Games","Trailer Games","Trailers","Redemption","Brochures");
var url4 = new MakeArrayZ("","sales.html","arcadegames.htm","parkgames.htm","trailergames.htm","trailers.htm","modular.htm","brochures.html");
var siteopt5 = new MakeArrayZ("News","News 1","News 2","News 3","News 4");
var url5 = new MakeArrayZ("","news1.html","news2.html","news3.html","news4.html");
var siteopt6 = new MakeArrayZ("Parts","Parts 1","Parts 2","Parts 3","Parts 4");
var url6 = new MakeArrayZ("","parts1.html","parts2.html","parts3.html","parts4.html");
var siteopt7 = new MakeArrayZ("MIS","APPS","CAT-5","MIS 1","MIS 2","MIS 3","MIS 4","FUNNY");
var url7 = new MakeArrayZ("","mismeasure.htm","mis5.html","mis1.html","mis2.html","mis3.html","mis4.html","mis6.html");
function jumpPage1(form){z = form.SelectMenu1.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url1[z+1];}
function jumpPage2(form){z = form.SelectMenu2.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url2[z+1];}
function jumpPage3(form){z = form.SelectMenu3.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url3[z+1];}
function jumpPage4(form){z = form.SelectMenu4.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url4[z+1];}
function jumpPage5(form){z = form.SelectMenu5.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url5[z+1];}
function jumpPage6(form){z = form.SelectMenu6.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url6[z+1];}
function jumpPage7(form){z = form.SelectMenu7.selectedIndex;if (z == 0) return;window.parent.Trav2.location.href = url7[z+1];}
</SCRIPT>
</HEAD>
<BODY background="star.gif" bgcolor="#000000" text="#FFFFFF">
<TABLE BGCOLOR="#000000" rules="none" cellspacing=0 cellpadding=1 border=0 align=center>
<TR BGCOLOR=#000000>
<FORM target="Trav2">
<TD BGCOLOR=#000000><input type="button" value="HOME" style="background-color:red" onClick="parent.self.location='index.html'">
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu2" onChange="jumpPage2(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt2.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt2[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu4" onChange="jumpPage4(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt4.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt4[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu3" onChange="jumpPage3(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt3.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt3[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu1" onChange="jumpPage1(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt1.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt1[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu5" onChange="jumpPage5(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt5.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt5[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu6" onChange="jumpPage6(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt6.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt6[i]);</SCRIPT></SELECT></TD>
<TD BGCOLOR=#000000><SELECT NAME="SelectMenu7" onChange="jumpPage7(this.form)"><SCRIPT
LANGUAGE="JavaScript">
tot = siteopt7.length;for (var i = 1; i <= tot; i++)document.write("<OPTION>" +siteopt7[i]);</SCRIPT></SELECT></TD>
</FORM>
</TR>
</TABLE>
</BODY>
</html>
***BOTTOM FRAME (Trav2) - Loads "Trav2.html"***
<html>
<head>
<title>TRAV2</title>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<embed src="news.wav" autostart="true" hidden="true" height="0" width="0"></embed>
<p align="center"><font color="#FF0000"><big><big><big><big><font
face="ZapfChancery-MediumItalic">TRAV Company News Page One...... Testing....</font> </big></big></big></big></font></p>
<p align="center"><img src="Travspark.gif" width="127" height="119"
alt="Travspark.gif (148450 bytes)"></p>
<p align="center"><a href="Trav2.html">BACK</a></p>
</BODY>
</html>
3. Frame Driven Menu (Button Click Required and with navigation buttons)
***PARENT FRAME***
<html>
<head><title>MENU</title>
</head>
<FRAMESET ROWS="15%, 85%" frameborder="0" border="0" framespacing="0">
<frame name="poetry4a" target="poetry4b" src="poetry4a.html" scrolling="no">
<frame name="poetry4b" src="poetry4b.html" scrolling="yes">
</FRAMESET>
<NOFRAMES>
Sorry - your browser does not support frames.<br>
You can still click <a href="poetry4b.html">HERE</a>
to browse Poetry Archive IV<br>
without frames or a Table of Contents.
</NOFRAMES>
<body background="stars2.gif" bgcolor="#000000" text="#FFFFFF">
</body>
</html>
***TOP FRAME***
<html>
<HEAD><TITLE>Poetry 4a</TITLE>
</HEAD>
<body background="stars2.gif" bgcolor="#000000" text="#FFFFFF">
<center>
<FORM name="CHUCK1">
SELECT A POEM:
<select name="CHUCK2" size="1">
<option selected value="poetry4b.html#Coleen">1. Coleen</option>
<option value="poetry4b.html#My">2. My Day in the Sun</option>
<option value="poetry4b.html#Her">3. Her World is Silent</option>
<option value="poetry4b.html#Never">4. You'd Never Guess</option>
<option value="poetry4b.html#Rehearsal">5. The Rehearsal</option>
<option value="poetry4b.html#Princess">6. Princess</option>
<option value="poetry4b.html#Pride">7. Pride</option>
<option value="poetry4b.html#Passion">8. The Passion</option>
<option value="poetry4b.html#Big">9. The Big Picture</option>
<option value="poetry4b.html#Rainy">10. Rainy Day</option>
</select>
<input type="button" value="View Selection"
onClick="parent.poetry4b.location=document.CHUCK1.CHUCK2.options
[document.CHUCK1.CHUCK2.selectedIndex].value" style="background-color:red">
<input TYPE="button" VALUE="Back"
onClick="parent.self.location='poetry.html'" style="background-color:red">
<input TYPE="button" VALUE="Home"
onClick="parent.self.location='index.html'" style="background-color:red">
</form>
</center>
</body>
</html>
***BOTTOM FRAME***
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<title>Poetry Archive 4b</title>
</head>
<BODY bgproperties="fixed" BACKGROUND="stars2.gif" bgcolor="#000000" text="#FFFFFF">
<center>POETRY</center>
<br>
<center>
<form>
<p><input TYPE="button" VALUE="Poetry Index"
onClick="self.parent.location='poetry.html'" style="background-color:red"> </p>
</form>
</center>
<br>
<br>
</body>
</html>
TEXT EFFECTS
1. Text Fader Colorizer Script with Style Sheet (Requires onLoad statement.)
<body bgcolor="#000000" text="#FFFFFF" onLoad="start()">
<STYLE>
<!--
A { text-decoration: none; }
A:visited { text-decoration: none; }
A:hover { color: cyan; font-weight:bold; }
-->
</STYLE>
<!-- Text Fader Script -->
<Script Language="Javascript">
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
var z=0;
var rgb=0;
var message= new Array();
var value=0;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
//Do not edit anything else in the Script except the lines below
var bgcolor="#FF0000"; //Fade color
var color="#0000FF"; //Starting color
var speed=55
//Do not edit anything else in the Script except the lines above
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
timer1=window.setInterval('up()',speed)
}
function up(){
if (red<hred){
if ((red+15)<hred){
red+=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (red>hred){
if ((red-15)>hred){
red-=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (green<hgreen){
if ((green+15)<hgreen){
green+=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (green>hgreen){
if ((green-15)>hgreen){
green-=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (blue<hblue){
if ((blue+15)<hblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
if (blue>hblue){
if ((blue-15)>hblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
document.linkColor=rgb;
document.vlinkColor=rgb;
if (z>19){
window.clearInterval(timer1);
timer2=window.setInterval('down()',speed)
}
else
z++
}
function down(){
if (red<ered){
if ((red+15)<ered){
red+=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (red>ered){
if ((red-15)>ered){
red-=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (green<egreen){
if ((green+15)<egreen){
green+=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (green>egreen){
if ((green-15)>egreen){
green-=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (blue<eblue){
if ((blue+15)<eblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
if (blue>eblue){
if ((blue-15)>eblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
document.linkColor=rgb;
document.vlinkColor=rgb;
if (z>38){
z=0;
window.clearInterval(timer2);
timer1=window.setInterval('up()',speed);
}
else
z++
}
// done hiding -->
</Script>
<!-- End Text Fading Javascript -->
2. Text Scrolls Up Screen (Requires onLoad statement.)
<HEAD>
<style type="text/css">
A:LINK {
text-decoration : none;
}
A:VISITED {
text-decoration : none;
}
P.main {
font-family : arial;
font-size : 16pt;
font-weight : bold;
}
</style>
<LINK rel="stylesheet" type="text/css" href="chuck1.css">
</HEAD>
<BODY bgcolor="#000000" onLoad="start()">
<script Language="Javascript">
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (bname=="Netscape")
brows=true
else
brows=false
var z=0;
var msg=0;
var rgb=0;
var message= new Array();
var value=0;
var timer1;
var timer2;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
var bgcolor="#000000"; //Color of Background
//Note: C. Gemrany - 10/23/98 - Line Below Controls Text Color - Line Above=Background Color
var color="#00FF30"; //Color of the Letters
message[0]='Welcome to TRAVELER On-line!'
message[1]='Here you will find clips posted'
message[2]='in Real Video Format.'
message[3]='You will need the free Real Player'
message[4]='offered above to watch them.'
message[5]='Use them to scare away roaches'
message[6]='or those pests looking over your shoulder.'
message[7]='Enjoy!'
message[8]='Thanks for visiting TRAVELER On-line.'
message[9]='Come Back Soon!'
for (x=0; x<5; x++){
for (y=0; y<5; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
if (brows)
res=document.layers['textanim'].top
else
res=textanim.style.top
//Note: c. Germany - 10/23/98 - Line Below Controls The Speed of the Scroll
timer1=window.setInterval('up()',40)
}
function stopf(){
window.clearInterval(timer1);
window.clearInterval(timer2);
for (x=0; x<2000; x++){}
}
function up(){
if (red<hred){
if ((red+15)<hred){
red+=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (red>hred){
if ((red-15)>hred){
red-=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (green<hgreen){
if ((green+15)<hgreen){
green+=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (green>hgreen){
if ((green-15)>hgreen){
green-=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (blue<hblue){
if ((blue+15)<hblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
if (blue>hblue){
if ((blue-15)>hblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='<Pre><P Class="main" Align="center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
//Note: C. Germany 10/23/98 - Text Position - This Variable Controls How Far the Text Moves Up the Page
//See Second Part Below - Keyword - Text Position 2
if (z<160){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
window.clearInterval(timer1);
timer2=window.setInterval('down()',1)
}
}
function down(){
if (red<ered){
if ((red+15)<ered){
red+=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (red>ered){
if ((red-15)>ered){
red-=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (green<egreen){
if ((green+15)<egreen){
green+=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (green>egreen){
if ((green-15)>egreen){
green-=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (blue<eblue){
if ((blue+15)<eblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
if (blue>eblue){
if ((blue-15)>eblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
if (z<38){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
if (brows){
document.layers['textanim'].document.writeln('')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='';
window.clearInterval(timer2);
if(msg<message.length-1){
msg++;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
window.setTimeout('start()',800);
}
else
{
msg=0;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
window.setTimeout('start()',1000);
}
}
}
}
</script>
<//Note: C. Germany 10/23/98 - Text Position - Part 2 - This Controls x/y axis and position where text starts on screen>
<center><div id="textanim" style="position: absolute; left: 50; top: 350"></div>
<Layer name="textanim" top="750"></Layer></center>
</BODY>
Drop Down List:
function go()
{
if(document.forms[0].place.selectedIndex == 1) goto_location = "poetry.html";
if(document.forms[0].place.selectedIndex == 2) goto_location = "http://www.geniegraphics.com/cgi-bin/chatpro/chatpro.cgi";
if(document.forms[0].place.selectedIndex == 3) goto_location = "discussion.html";
if(document.forms[0].place.selectedIndex == 4) goto_location = "stories.html";
if(document.forms[0].place.selectedIndex == 5) goto_location = "songs1.html";
if(document.forms[0].place.selectedIndex == 6) goto_location = "real.html";
if(document.forms[0].place.selectedIndex == 7) goto_location = "midi.html";
if(document.forms[0].place.selectedIndex == 8) goto_location = "http://www.geocities.com/Area51/Lair/3601/wavefile.html";
if(document.forms[0].place.selectedIndex == 9) goto_location = "answer.html";
if(document.forms[0].place.selectedIndex == 10) goto_location = "warrior.html";
if(document.forms[0].place.selectedIndex == 11) goto_location = "jesus.html";
if(document.forms[0].place.selectedIndex == 12) goto_location = "biograf.html";
if(document.forms[0].place.selectedIndex == 13) goto_location = "wife.html";
if(document.forms[0].place.selectedIndex == 14) goto_location = "charly.html";
if(document.forms[0].place.selectedIndex == 15) goto_location = "craig.html";
if(document.forms[0].place.selectedIndex == 16) goto_location = "message.html";
if(document.forms[0].place.selectedIndex == 17) goto_location = "music.html";
if(document.forms[0].place.selectedIndex == 18) goto_location = "cat.html";
if(document.forms[0].place.selectedIndex == 19) goto_location = "travjuke.html";
if(document.forms[0].place.selectedIndex == 20) goto_location = "http://www.geocities.com/Eureka/Plaza/2453/chukmidi.zip";
if(document.forms[0].place.selectedIndex == 21) goto_location = "xmastrav.mid";
if(document.forms[0].place.selectedIndex == 22) goto_location = "http://www.geocities.com/Eureka/Plaza/2453/games.html";
if(document.forms[0].place.selectedIndex == 23) goto_location = "http://www.geocities.com/Eureka/Plaza/2453/cool.html";
if(document.forms[0].place.selectedIndex == 24) goto_location = "http://www.geocities.com/Eureka/Plaza/2453/bible.html";
if(document.forms[0].place.selectedIndex == 25) goto_location = "index2.html";
if(document.forms[0].place.selectedIndex == 26) goto_location = "index3.html";
if(document.forms[0].place.selectedIndex == 27) goto_location = "virt.html";
if(document.forms[0].place.selectedIndex == 28) goto_location = "http://www.geocities.com/Eureka/Plaza/2453/obras.html";
if(document.forms[0].place.selectedIndex == 29) goto_location = "firework.html";
if(document.forms[0].place.selectedIndex == 30) goto_location = "sunset.html";
if(document.forms[0].place.selectedIndex == 31) goto_location = "fotocube.html";
if(document.forms[0].place.selectedIndex == 32) goto_location = "photos.html";
if(document.forms[0].place.selectedIndex == 33) goto_location = "http://www.geniegraphics.com/travler2/vqpage.html";
if(document.forms[0].place.selectedIndex == 34) goto_location = "java.html";
if(document.forms[0].place.selectedIndex == 35) goto_location = "real.html";
if(document.forms[0].place.selectedIndex == 36) goto_location = "video.html";
if(document.forms[0].place.selectedIndex != 0) parent.location = goto_location;
}
|