script">

var dialog	= window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;

var FCKDomTools = oEditor.FCKDomTools ;

// Gets the table if there is one selected.
var table ;
var e = dialog.Selection.GetSelectedElement() ;
var hasColumnHeaders ;

if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) )
	e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ;

if ( e && e.tagName == "TABLE" )
	table = e ;

// Fired when the window loading process is finished. It 