topical media & game development

graphic-javascript-effect-background-patriotic-effect.htm / htm

```

<!-- TWO STEPS TO INSTALL PATRIOTIC FADER:

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Original:  Dominic Canare (big_domino_16@yahoo.com ) -->

<!-- Begin

var i=0, bg=0, bgI=1, cNum=1;

var cArray = new Array(4);

var hex = new Array(30);

cArray[0]="FF0000";

cArray[1]="FFFFFF";

cArray[2]="0000FF";

cArray[3]="FF0000";

cArray[4]="FFFFFF";

hex[0]="00";

hex[1]="09";

hex[2]="11";

hex[3]="1A";

hex[4]="22";

hex[5]="2B";

hex[6]="33";

hex[7]="3C";

hex[8]="44";

hex[9]="4D";

hex[10]="55";

hex[11]="5E";

hex[12]="66";

hex[13]="6F";

hex[14]="77";

hex[15]="80";

hex[16]="88";

hex[17]="91";

hex[18]="99";

hex[19]="A2";

hex[20]="AA";

hex[21]="B3";

hex[22]="BB";

hex[23]="C4";

hex[24]="CC";

hex[25]="D5";

hex[26]="DD";

hex[27]="E6";

hex[28]="EE";

hex[29]="F7";

hex[30]="FF";

}

bg+=bgI;

if (bg>29) {bgI*=-1;}

else if (bg<1) {bgI*=-1;cNum=2;}

document.body.bgColor="#"+hex[bg]+"0000";

}

bg+=bgI;

if (bg>29) {bgI*=-1;}

else if (bg<1) {bgI*=-1;cNum=3;}

document.body.bgColor="#"+hex[bg]+hex[bg]+hex[bg];

}

bg+=bgI;

if (bg>29) {bgI*=-1;}

else if (bg<1) {bgI*=-1;cNum=1;}

document.body.bgColor="#0000"+hex[bg];

}

//  End -->

</script>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<p><center>

<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

</center><p>

<!-- Script Size:  2.03 KB -->
```

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.