function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
}
function dropshadow(){
	var img = getElementsByClassName(document,"IMG", "dropshadow");
	for(var i=0; i<img.length; i++){
		var h = parseInt(img[i].getAttribute("height"))+8;
		var w = parseInt(img[i].getAttribute("width"))+8;
		var d = document.createElement("DIV");
		d.setAttribute('class',img[i].getAttribute('class'));
		img[i].setAttribute('class',"");
		d.setAttribute('style',"width:"+w+"px;height:"+h+"px;");
		var d0 = document.createElement("DIV");
		d0.setAttribute('style',"background-image:url(img/ds2.png);background-repeat:repeat-x;background-position:bottom;width:"+w+"px;height:"+h+"px;");
		var d1 = document.createElement("DIV");
		d1.setAttribute('style',"background-image:url(img/ds1.png);background-position: -16px 0;background-repeat:repeat-y;background-position:right");
		var d2 = document.createElement("DIV");
		d2.setAttribute('style',"background-image:url(img/ds1.png);background-position: -8px 0;width:8px;height:8px;float:right;");
		var d3 = document.createElement("DIV");
		d3.setAttribute('style',"background-image:url(img/ds1.png);background-position: 0 -8px;width:8px;height:8px;clear:both;float:left;");
		var d4 = document.createElement("DIV");
		d4.setAttribute('style',"background-image:url(img/ds1.png);background-position: -8px -8px;width:8px;height:8px;float:right;");
		img[i].parentNode.insertBefore(d,img[i]);
		d.appendChild(d0);
		d0.appendChild(d1);
		d1.appendChild(img[i]);
		d1.appendChild(d2);
		d0.appendChild(d3);
		d0.appendChild(d4);
	}
}
onLoad(dropshadow);