function FindImgsToCaption() {
	//var imgs = document.getElementById('cms_MainContent').getElementsByTagName("img")
	var imgs = document.images
	
	for (x = 0; x < imgs.length; x++) {
		if (imgs[x].title != "" && imgs[x].src.indexOf("/uploads/") > 0) {		
			var table = document.createElement("table")
			varfloat = imgs[x].align || imgs[x].style.stylefloat

			if (varfloat == "left") {
				table.className = "caption_box_left"
			} else if (varfloat == "right") {
				table.className = "caption_box_right"
			}
			
			var row, cell, cell2
			row = table.insertRow(-1)
			cell = row.insertCell(-1)
			
			row = table.insertRow(-1)
			cell2 = row.insertCell(-1)
			cell2.className = "img_caption_text"
			cell2.appendChild(document.createTextNode(imgs[x].title))
			
			imgs[x].parentNode.insertBefore(table, imgs[x])
			
			cell.appendChild(imgs[x])
		}
	}
}