Make your own free website on


just copy and paste this code into you're site

background effects


  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the onLoad event handler into the BODY tag
  3.  Put the last coding into the HEAD of your HTML document - Optional  -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

// Set speed (milliseconds)
var speed = 1000
// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = '1.gif'
Pic[1] = '2.gif'
Pic[2] = '3.gif'
Pic[3] = '4.gif'
// do not edit anything below this line
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
function runBGSlideShow(){
   if (document.body){
   document.body.background = Pic[j];
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runBGSlideShow()', speed)
//  End -->
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->
<body onload="runBGSlideShow()">
<!-- STEP THREE: Copy this code into the HEAD of your HTML document  -->

Method One - Positionable Images
Put the following style sheet in the <head> of
your page.  Normally it will go *before* the script above.
background-repeat: no-repeat;
background-position: 200 100;
Set the position x y in pixels in the background-position
element to position the images in the page.  Do not use
commas between the values!

Method Two - Full Page-Space Background
Easy - just omit the style script above from the page.
The background images will then repeat across the page, as

<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="">you're number one code resource</a></font>
<!-- Script Size:  2.50 KB -->


codehut - all rights reserved