<!--//
// To style floated images that flow with text, use a containing Div and a caption
// rendered with an h6 tag below it. To make the div the correct
// width, even when captions are more than 1 line long, we have to
// manually set the div width as an inline style attribute. This script reads the
// width of the image and dynamically sets the width of the containing div. no inline style width required.

if (document.getElementById) {

	var AllDivs = document.getElementsByTagName("DIV");
	// alert(AllDivs.length);
	var numAllDivs = AllDivs.length;
		for (i=0; i < numAllDivs; i++) {

		if ((AllDivs[i].className == "imageBoxLeft") || (AllDivs[i].className == "imageBoxRight")) {

			if (AllDivs[i].hasChildNodes) {

				var AllChildNodes = AllDivs[i].childNodes;

				for (q=0; q < AllChildNodes.length; q++) {
					if (AllChildNodes[q].tagName == "IMG") {
						var childImageWidth = AllChildNodes[q].width;
						AllDivs[i].style.width = childImageWidth + "px";
					}
				}
			}
		}
	}
}


//-->