function cleanupimages() {
	var allSpans = document.getElementsByTagName("span");

	for (i=0; i<allSpans.length; i++) {
		var theClass = allSpans[i].className;
	    if(theClass == "img_border_left" || theClass == "img_border_right" || theClass == "img_border_center") {
			var images = allSpans[i].getElementsByTagName("img");
			var tempDiv = document.createElement("div");
			tempDiv.appendChild(images[images.length - 1]);
			allSpans[i].innerHTML = tempDiv.innerHTML;
	    }    
	}
}