Colspan, rowspan problem.

The DOM table (tHead, tBodies) object has rows object. The rows object has a cells object. But there is no a 'column' (or something similar) object. That is mean: any of the cells is a children only a particular row. The visually separation by 'columns' is just a visual representation. There is no a vertical relationship between cell of the same column from point of the Document Object Model. Absent of the multi inheritance of the 'cell' is a source of the problems for a dynamically management.
I said that my 'sortedTable' doesn't support a multi rows header. Let see a real problem.

Person NameAge
First NameLast Name
AdamForest72

The first row of the header has 2 children ('Person Name' and 'Age').
The second row of the header has 2 children too ('First Name' and 'Last Name').
But any row of the tbody has 3 (three) children.

But we can manage the situation if the table has just one row in the thead with 'colspan(s)' attribute for some cell.
colspan="2"Second Column
Some Infothird column

Let's to analyze this situation:
1. we have 3 columns table.
2. in the thead we created just 2 columns because we want to emphasize that the first and the second columns are logically joined under the same meaning.

In such situation, to make our table sorted we have to redesign our thead, and to create as much columns as our tbody has (in our situation: 3).
	<thead>
		<tr>
			<td class="sorttable_nosort"></td>
			<td>Info</td>
			<td>Second Column</td>
		</tr>
	</thead>
InfoSecond Column
Some Infothird column

But now we lost the visual relation in the header between the two first columns.
The CSS tricks can help us.

If you use the 'border-collapsed:collapsed' for the table you have to put a color for:
first header column: border-right-color:;#colo_of_the_thead_background',
second header column: border-left-color:'#color_of_the_thead_background'.

If the table has 'border-collapse: separate' (default value) you can use a technique like that:
(see the html source of this page) colspan.htm

With <table border="1" the CSS tricks are even more sophisticate, and I couldn't find the easy and stable version that works in the same way for different resolution.