	function DropShadow()
	{
		var args = DropShadow.arguments;
		
		this.colorStart = "FFFFFF";
		this.colorEnd = "000000";
		this.length = 5;
		this.acceleration = 1;
		this.padding = 1;
		
		this.paddingLeft = null;
		this.paddingRight = null;
		this.paddingTop = null;
		this.paddingBottom = null;
		
		this.colorPalette = new Array();
		this.generatePalette = DropShadow_generatePalette;
		this.load = DropShadow_Load;
	}
	function DropShadow_Load()
	{
		try
		{
			this.generatePalette();
			var TheBox = document.getElementById(this.id);
			var Childs = TheBox.getElementsByTagName("div")[0];
			TheBox.removeChild(Childs);
			
			var LaBoxDavant = TheBox;
			
			for (var i = 0; i < this.length; i++)
			{
				var Box = document.createElement("div");
				Box.style.backgroundColor = "#" + this.colorPalette[i];
				
				if (this.paddingLeft != null && this.paddingRight != null && this.paddingTop != null && this.paddingBottom != null)
				{
					Box.style.paddingLeft = this.paddingLeft + "px";
					Box.style.paddingRight = this.paddingRight + "px";
					Box.style.paddingTop = this.paddingTop + "px";
					Box.style.paddingBottom = this.paddingBottom + "px";
				}
				else
					Box.style.padding = this.padding + "px";
				
				LaBoxDavant.appendChild(Box);
				LaBoxDavant = Box;
			}
			LaBoxDavant.appendChild(Childs);
		}
		catch (e)
		{
			alert("DropShadow_Load : " + e + "\nthis.id=" + this.id);
		}
	}
	
	function DropShadow_generatePalette()
	{
		// Decimal To Hexa
		function d2h(d) 
		{
			var hD="0123456789ABCDEF";
			var h = hD.substr(d&15,1);
			while(d>15) {d>>=4;h=hD.substr(d&15,1)+h;}
			return h;
		}

		this.colorPalette = new Array();
		
		// r,g,b = Red, Green, Blue
		// nR, nB, nG = niveau Red, niveau Green, niveau Blue
		var r1, g1, b1, r2, g2, b2, nR, nG, nB;
		try
		{
			r1 = eval("0x" + this.colorStart.substring(0,2));
			g1 = eval("0x" + this.colorStart.substring(2,4));
			b1 = eval("0x" + this.colorStart.substring(4,6));
			
			r2 = eval("0x" + this.colorEnd.substring(0,2));
			g2 = eval("0x" + this.colorEnd.substring(2,4));
			b2 = eval("0x" + this.colorEnd.substring(4,6));

			nR = (r1-r2) / this.length;
			nG = (g1-g2) / this.length;
			nB = (b1-b2) / this.length;
			
			for (var i = 1; i <= this.length; i++)
			{
				var local_R = d2h(r1 - i * nR);
				var local_G = d2h(g1 - i * nG);
				var local_B = d2h(b1 - i * nB);
				
				if (local_R.length < 2) {local_R += local_R};
				if (local_G.length < 2) {local_G += local_G};
				if (local_B.length < 2) {local_B += local_B};
				
				this.colorPalette.push(local_R + local_G + local_B);
			}
			
		}
		catch (e)
		{
			alert("DropShadow_generatePalette : " + e);
		}
	}

