/************************************************************************************************************
	@fileoverview
	This file provides functions related to the functionality of rounding corners.
	This functionality depends on the style-sheets as defined in the round_tables.css file.

************************************************************************************************************/

function roundTable(tableId, width) {
	var table = document.getElementById(tableId);
	if (table != null) {
		/*table.outerHTML = "<div id='nifty' style='width: " + width + "'>"
				+ "<b class='rtop'><b class='r1'></b><b class='r2'></b><b class='r3'></b><b class='r4'></b></b>"
				+ table.outerHTML
				+ "<b class='rbottom'><b class='r4'></b><b class='r3'></b><b class='r2'></b><b class='r1'></b></b>"
				+ "</div>";
		*/

		var tableColor = table.style.background;
		if (tableColor == null) {
			tableColor = "white";
		}
		table.outerHTML = "<div id='nifty' style='width: " + width + "'>"
				+ "<b class='rtop'>"
				+ "<b class='r1' style='background:"+tableColor+"'></b>"
				+ "<b class='r2' style='background:"+tableColor+"'></b>"
				+ "<b class='r3' style='background:"+tableColor+"'></b>"
				+ "<b class='r4' style='background:"+tableColor+"'></b>"
				+ "</b>"
				+ table.outerHTML
				+ "<b class='rbottom'>"
				+ "<b class='r4' style='background:"+tableColor+"'></b>"
				+ "<b class='r3' style='background:"+tableColor+"'></b>"
				+ "<b class='r2' style='background:"+tableColor+"'></b>"
				+ "<b class='r1' style='background:"+tableColor+"'></b>"
				+ "</b>"
				+ "</div>";
	}
}
