function initDropShadow() {
	if (!document.createElement) return;

	// Sigh, IE doesn't do getElementsByTagName("*")
	if (document.all) {
		var els = document.all;
	} else {
		var els = document.getElementsByTagName("*");
	}
	for (i=0;i<els.length;i++) {
		if ((' '+els[i].className+' ').indexOf(' dropshadow ') != -1) {
			DS_process(els[i])
		}
	}
}

function DS_process(e) {
	// Make a duplicate of this element, with all its subelements
	var nel = e.cloneNode(1);
	var lsClassName = e.className;
	//new element becomes the main text and is placed over the original
	nel.className = lsClassName.replace('dropshadow','shadowedtext');
	//original element becomes the shadow
	e.className	= lsClassName.replace('dropshadow','shadowcolor');
	// Add it to the document
	e.parentNode.insertBefore(nel,e);
}

function addEvent(obj, evType, fn) {
  /* adds an eventListener for browsers which support it
	 Written by Scott Andrew: nice one, Scott */
  if (obj.addEventListener){
	obj.addEventListener(evType, fn, false);
	return true;
  } else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
	return r;
  } else {
	return false;
  }
}

addEvent(window,"load",initDropShadow);

