Index: FCKeditor/trunk/_whatsnew.html
===================================================================
--- FCKeditor/trunk/_whatsnew.html	(revision 2372)
+++ FCKeditor/trunk/_whatsnew.html	(revision 2373)
@@ -51,4 +51,6 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2467">#2467</a>] Fixed JavaScript
 			error with the fit window command in source mode.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2472">#2472</a>] Splitting a TH
+			will create a two TH, not a TH and a TD.</li>
 	</ul>
 	<p>
Index: FCKeditor/trunk/editor/_source/internals/fcktablehandler.js
===================================================================
--- FCKeditor/trunk/editor/_source/internals/fcktablehandler.js	(revision 2372)
+++ FCKeditor/trunk/editor/_source/internals/fcktablehandler.js	(revision 2373)
@@ -299,5 +299,5 @@
 	this._MarkCells( cells, '_CellSelected' ) ;
 
-	var tableMap = this._CreateTableMap( cells[0].parentNode.parentNode ) ;
+	var tableMap = this._CreateTableMap( cells[0] ) ;
 	var rowIdx = cells[0].parentNode.rowIndex ;
 	var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, cells[0] ) ;
@@ -358,5 +358,5 @@
 	// Because the checking is already done by FCKTableCommand.
 	var refCell = cells[0] ;
-	var tableMap = this._CreateTableMap( refCell.parentNode.parentNode ) ;
+	var tableMap = this._CreateTableMap( refCell ) ;
 	var rowIdx = refCell.parentNode.rowIndex ;
 	var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
@@ -451,5 +451,5 @@
 
 	var refCell = cells[0] ;
-	var tableMap = this._CreateTableMap( refCell.parentNode.parentNode ) ;
+	var tableMap = this._CreateTableMap( refCell ) ;
 	var rowIdx = refCell.parentNode.rowIndex ;
 	var colIdx = FCKTableHandler._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
@@ -458,8 +458,8 @@
 	if ( cellSpan > 1 )
 	{
-		// Splittng a multi-column cell - original cell gets ceil(colSpan/2) columns,
+		// Splitting a multi-column cell - original cell gets ceil(colSpan/2) columns,
 		// new cell gets floor(colSpan/2).
 		var newCellSpan = Math.ceil( cellSpan / 2 ) ;
-		var newCell = FCKTools.GetElementDocument( refCell ).createElement( 'td' ) ;
+		var newCell = FCK.EditorDocument.createElement( refCell.nodeName ) ;
 		if ( FCKBrowserInfo.IsGeckoLike )
 			FCKTools.AppendBogusBr( newCell ) ;
@@ -489,5 +489,5 @@
 			{
 				newRow.push( refCell ) ;
-				newRow.push( FCKTools.GetElementDocument( refCell ).createElement( 'td' ) ) ;
+				newRow.push( FCK.EditorDocument.createElement( refCell.nodeName ) ) ;
 				if ( FCKBrowserInfo.IsGeckoLike )
 					FCKTools.AppendBogusBr( newRow[newRow.length - 1] ) ;
@@ -515,8 +515,8 @@
 
 	var currentCell = cells[0] ;
-	var tableMap = this._CreateTableMap( currentCell.parentNode.parentNode ) ;
-	var cellIndex = FCKTableHandler._GetCellIndexSpan( tableMap, currentCell.parentNode.rowIndex, currentCell ) ;
+	var tableMap = this._CreateTableMap( currentCell ) ;
+	var currentRowIndex = currentCell.parentNode.rowIndex ;
+	var cellIndex = FCKTableHandler._GetCellIndexSpan( tableMap, currentRowIndex, currentCell ) ;
 	var currentRowSpan = currentCell.rowSpan ;
-	var currentRowIndex = currentCell.parentNode.rowIndex ;
 	if ( isNaN( currentRowSpan ) )
 		currentRowSpan = 1 ;
@@ -529,10 +529,11 @@
 		// 2. Find the appropriate place to insert a new cell at the next row.
 		var newCellRowIndex = currentRowIndex + Math.ceil( currentRowSpan / 2 ) ;
+		var oRow = tableMap[newCellRowIndex] ;
 		var insertMarker = null ;
-		for ( var i = cellIndex+1 ; i < tableMap[newCellRowIndex].length ; i++ )
-		{
-			if ( tableMap[newCellRowIndex][i].parentNode.rowIndex == newCellRowIndex )
-			{
-				insertMarker = tableMap[newCellRowIndex][i] ;
+		for ( var i = cellIndex+1 ; i < oRow.length ; i++ )
+		{
+			if ( oRow[i].parentNode.rowIndex == newCellRowIndex )
+			{
+				insertMarker = oRow[i] ;
 				break ;
 			}
@@ -540,5 +541,5 @@
 
 		// 3. Insert the new cell to the indicated place, with the appropriate rowSpan, next row.
-		var newCell = FCK.EditorDocument.createElement( 'td' ) ;
+		var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ;
 		newCell.rowSpan = Math.floor( currentRowSpan / 2 ) ;
 		if ( FCKBrowserInfo.IsGeckoLike )
@@ -576,5 +577,5 @@
 
 		// 3. Insert a new cell to new row.
-		var newCell = FCK.EditorDocument.createElement( 'td' ) ;
+		var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ;
 		if ( FCKBrowserInfo.IsGeckoLike )
 			FCKTools.AppendBogusBr( newCell	) ;
@@ -632,8 +633,11 @@
 // cells that are "spanned". For example, a row with 3 cells where the second cell has colSpan=2 and rowSpan=3
 // will produce a bi-dimensional matrix with the following values (representing the cells):
-//		Cell1, Cell2, Cell2, Cell 3
-//		Cell4, Cell2, Cell2, Cell 5
-FCKTableHandler._CreateTableMap = function( table )
-{
+//		Cell1, Cell2, Cell2, Cell2, Cell 3
+//		Cell4, Cell2, Cell2, Cell2, Cell 5
+FCKTableHandler._CreateTableMap = function( refCell )
+{
+	// It's really a tbody, thead or tfoot. This is only temporary.
+	var table = (refCell.nodeName == 'TABLE' ? refCell : refCell.parentNode.parentNode ) ;
+
 	var aRows = table.rows ;
 
@@ -820,5 +824,5 @@
 
 	var refCell = cells[0] ;
-	var tableMap = this._CreateTableMap( refCell.parentNode.parentNode ) ;
+	var tableMap = this._CreateTableMap( refCell ) ;
 	var rowIdx = refCell.parentNode.rowIndex ;
 	var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
@@ -848,5 +852,5 @@
 
 	var refCell = cells[0] ;
-	var tableMap = this._CreateTableMap( refCell.parentNode.parentNode ) ;
+	var tableMap = this._CreateTableMap( refCell ) ;
 	var rowIdx = refCell.parentNode.rowIndex ;
 	var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
