function getCaptions() {
	var myReportImages = document.getElementsByTagName("img");
	for (var i = 0; i < myReportImages.length; i++) {
		var myReportImage = myReportImages[i];
		if (myReportImage.name.substring(0,10) == 'imgcontent' || myReportImage.name.substring(0,6) == 'imgrhc') {
			setCaption(myReportImage);
		}
	}
	return true;
}
function setCaption( oImgElem ) {
	var picdiv = oImgElem.parentNode;
	while (picdiv && picdiv.nodeName != 'DIV' && picdiv.className.indexOf('pic') == -1) {
		picdiv = picdiv.parentNode;
	}
	if (picdiv && picdiv.nodeName == 'DIV' && picdiv.className.indexOf('pic') == 0) {
		var s = oImgElem.style;
		if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Mac") != -1) {
			// MSIE 5 for Mac must die!
			picdiv.style.width = (oImgElem.width+s.paddingLeft+s.paddingRight)+"px";
		} else {
			picdiv.style.width = (oImgElem.width+s.borderLeft+s.borderRight+s.paddingLeft+s.paddingRight)+"px";
		}
	}
	var caption = oImgElem.nextSibling;
	if (!caption) { // img inside anchor
		caption = oImgElem.parentNode.nextSibling;
	}
	if (caption && caption.nodeName == 'BR') { // line break between img and caption
		caption = caption.nextSibling;
	}
	if (caption && caption.nodeName == 'P' && caption.className == "img-caption") {
		caption.style.display = "block";
	}
	return true; 
}

