function MakeDropShadow() {

    var node = document;
    var tag = '*';
    var wantedClass = 'dropshadow';

    // Build a regular expression that will search specically for 'wantedClass'
    var pattern = new RegExp("(^|\\s)"+wantedClass+"(\\s|$)");

    // Scan through all tag elements in the document
    var scan_elem = node.getElementsByTagName(tag);
    for (i = 0; i < scan_elem.length; i++) {

      // If element has a class of 'wantedClass'
      if (pattern.test(scan_elem[i].className) ) {

        // Get the value from the element
        var text_value = scan_elem[i].innerHTML;

        // Create Shadow Children for this element
        CreateShadowChildren(scan_elem[i],text_value);
      }
    } // End for loop
  }

 function CreateShadowChildren(shadow_element,shadow_value) {

  var top_pos = .5;
  var right_pos = .5;

  // Assign starting color (in Hex notation) for the Red, Green, and Blue
  // Components (when they all have the same value you will alwys get a gray color).
  // For lighter shadows start with a "lighter" color of 66, 77, 88 99, aa, bb, etc..
  var starting_color = '00';
  var cRed = parseInt(starting_color,'0');
  var cGreen = parseInt(starting_color,'0');
  var cBlue = parseInt(starting_color,'0');

  // Set the max number of shadow elements to create.
  // This should never be set larger than the Z-Index value of dropshadow class
  var max_shadows = 10; 

  // Calculate color increament based on range of gray colors (from starting_color to
  // the lighest gray color of #fefefe) and max number of shadows you want
  var color_inc =  parseInt(( parseInt('00','16') - parseInt(starting_color,'16') ) / max_shadows,'10');

  for (j = 1; j <= max_shadows; j++) {

    // Build full color Hex string from it's individual RGB values
    var full_color_value = cRed.toString(16) + cGreen.toString(16) + cBlue.toString(16);

    // Create a Shadow DIV
    var shadow_div = document.createElement('div');

    //  Add the shadow_value to Shadow DIV
    shadow_div.innerHTML = shadow_value;

    // Style Shadow DIV
    shadow_div.style.width=shadow_element.offsetWidth + "px";
    shadow_div.style.color = '#' + full_color_value;
    shadow_div.style.borderColor = '#' + full_color_value;
    shadow_div.style.display = "block";
    shadow_div.style.position = "absolute";
    shadow_div.style.top = top_pos + "px";
    shadow_div.style.right = right_pos + "px";
    shadow_div.style.zIndex = (-1) * j;

    // Apppend Shadow DIV to shadow element
    shadow_element.appendChild(shadow_div);

    // Increment positons and shadows individual RGB color values
    top_pos += .5;
    right_pos += .5;
    cRed += color_inc;
    cGreen += color_inc;
    cBlue += color_inc;
  }

 }

// Run the MakeDropShadow function when the page finishes loading
window.onload = MakeDropShadow;


var menu=function(){
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();




