
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Michael Burt :: http://galaxydefense.ga.funpic.org/ */

var depth = 7 // in pixels

// addLoadEvent created by: Simon Willison
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {

// Created by: Michael Burt
// http://galaxydefense.ga.funpic.org/
var a = document.all ? document.all : document.getElementsByTagName('*');
for (var i = 0;i < a.length;i++) {
        if (a[i].className == "shadow") {
                for (x = 0;x < depth;x++) {
                        var newSd = document.createElement("DIV")
                        newSd.className = "shadow2"
                        newSd.style.background = a[i].id
                        newSd.style.width = a[i].offsetWidth + "px"
                        newSd.style.height = a[i].offsetHeight + "px"
                        newSd.style.left = a[i].offsetLeft + x + "px"
                        newSd.style.top = a[i].offsetTop + x + "px"
                        document.body.appendChild(newSd)
                        }
                }
        }
}
);

