function TableRowPageViewPart() 
{
    /**
     * get the next row (default implementation
     * @return {TableRowPageViewPart} the next row if any, else returns null
     */
    this.nextRow = function() {
	if( this.next ) {
	    return this.next;
	}
	return null;
    }

    this.nextSibling = function() { return this.nextRow(); }

    /**
     * get the prev row (default implementation
     * @return {TableRowPageViewPart} the prev row if any, else returns null
     */
    this.prevRow = function() {
	if( this.prev ) {
	    return this.prev;
	}
	return null;
    }

    this.prevSibling = function() { return this.prevRow(); }

    /**
     * get the table of which this view (row) is part of
     * @return the DOM TABLE which this view is part of
     * @type DOMElement_TABLE
     */
    this.getTable = function() { return this.fTable; }

    /**
     * move the HTML contents of the row from one HTML table to another
     * @param {DOMElement_TABLE}	the new table to which the contents 
     *					need to be moved
     * @param {idx}			the index in that table
     */
    this.moveHTMLContents = function(toTable, idx) {
	var ntr = toTable.insertRow(idx);
	var tr = this.getContents();
	var ncells= tr.cells.length;
	for(i = 0; i < ncells; i++ ) {
	    var td = tr.cells[0];
	    tr.removeChild(td);
	    ntr.appendChild(td);
	}

	// delete us from the current table
	this.deleteHTMLContents();

	if(this.fOuter) this.removeFromIdMap(this.fOuter); 
	this.fTable = toTable;
	this.fOuter = ntr;
	ntr.id          = Utils.getNewId("tr"); Utils.addToIdMap(ntr, this);
	this.domid     = td.id;
	this.fTableRowDOMId = ntr.id;
    }

    /*
     * delete the HTML content of the row
     */
    this.deleteHTMLContents = function() {
	this.fTable.deleteRow(this.getRowIndex());
    }

    /**
     * get the index of this row view in its table
     */
    this.getRowIndex = function() {
	if( this.fTable == null ) return -1;

	// figure out row index
	var nrows = this.fTable.rows.length;
	var rowIndex;
	for(rowIndex = 0; rowIndex < nrows; rowIndex++ ) {
	    if( this.fTable.rows[rowIndex].id && this.fTable.rows[rowIndex].id == this.fTableRowDOMId ) break;
	}
	return rowIndex;
    }

    /**
     * get the column index (including span) of a cell
     * @param {int} 	cellindex	cellindex
     */
    this.getColumnIndex = function(cellIndex)  {
	var part = this.fFirstPart;
	var i = 0;
	var col = 0;
	while( i < cellIndex ) {
	    col += part.colspan();
	    part = part.next;
	    if( part == null ) break;
	    i++;
	}
	return col;
    }

    /**
     * get the column span of the heading (i.e. number of columns in the row)
     */
    this.colspan = function() 
    { 
	if( this.fOuter == null ) return 0;
	var colspan = 0;
	var ncells = this.fOuter.cells.length;
	cells = this.fOuter.cells;
	for(var i = 0; i < ncells; i++ )
	    colspan += cells[i].colSpan;
	return colspan;
    }

    /**
     * get the bottom coordinate of the row
     */
    this.getBottom = function() {
	var tr = this.getContents();
	var ht = tr.firstChild.offsetHeight;
	ht += this.fTable.offsetTop;
	return tr.firstChild.offsetTop + ht;
    }


    /**
     * get the height of the row
     */
    this.getHeight = function() {
	return this.getContents().firstChild.offsetHeight;
    }

    /**
     * (protected) the DOM table this view is part of
     * @type DOMElement_TABLE
     * @private
     */
    this.fTable = null;

}
/**
 * @class
 * base class represents a page view part, which is rendered as table row in a 
 * table that is part of a {@link PageView}
 */
@class
base class represents a page view part, which is rendered as table row in a
table that is part of a  PageView
@class base class represents a page view part which is rendered as table row in a table that is part of a PageView
function TableRowPageViewPart() 
{
    this.nextRow = function() {
	if( this.next ) {
	    return this.next;
	}
	return null;
    }
    this.nextSibling = function() { return this.nextRow(); }
    this.prevRow = function() {
	if( this.prev ) {
	    return this.prev;
	}
	return null;
    }
    this.prevSibling = function() { return this.prevRow(); }
    this.getTable = function() { return this.fTable; }
    this.moveHTMLContents = function(toTable, idx) {
	var ntr = toTable.insertRow(idx);
	var tr = this.getContents();
	var ncells= tr.cells.length;
	for(i = 0; i < ncells; i++ ) {
	    var td = tr.cells[0];
	    tr.removeChild(td);
	    ntr.appendChild(td);
	}
	this.deleteHTMLContents();
	if(this.fOuter) this.removeFromIdMap(this.fOuter); 
	this.fTable = toTable;
	this.fOuter = ntr;
	ntr.id          = Utils.getNewId("tr"); Utils.addToIdMap(ntr, this);
	this.domid     = td.id;
	this.fTableRowDOMId = ntr.id;
    }
    this.deleteHTMLContents = function() {
	this.fTable.deleteRow(this.getRowIndex());
    }
    this.getRowIndex = function() {
	if( this.fTable == null ) return -1;
	var nrows = this.fTable.rows.length;
	var rowIndex;
	for(rowIndex = 0; rowIndex < nrows; rowIndex++ ) {
	    if( this.fTable.rows[rowIndex].id && this.fTable.rows[rowIndex].id == this.fTableRowDOMId ) break;
	}
	return rowIndex;
    }
    this.getColumnIndex = function(cellIndex)  {
	var part = this.fFirstPart;
	var i = 0;
	var col = 0;
	while( i < cellIndex ) {
	    col += part.colspan();
	    part = part.next;
	    if( part == null ) break;
	    i++;
	}
	return col;
    }
    this.colspan = function() 
    { 
	if( this.fOuter == null ) return 0;
	var colspan = 0;
	var ncells = this.fOuter.cells.length;
	cells = this.fOuter.cells;
	for(var i = 0; i < ncells; i++ )
	    colspan += cells[i].colSpan;
	return colspan;
    }
    this.getBottom = function() {
	var tr = this.getContents();
	var ht = tr.firstChild.offsetHeight;
	ht += this.fTable.offsetTop;
	return tr.firstChild.offsetTop + ht;
    }
    this.getHeight = function() {
	return this.getContents().firstChild.offsetHeight;
    }
    this.fTable = null;
}
function TableRowPageViewPart ( ) { this . nextRow = function ( ) { if ( this . next ) { return this . next ; } return null ; } this . nextSibling = function ( ) { return this . nextRow ( ) ; } this . prevRow = function ( ) { if ( this . prev ) { return this . prev ; } return null ; } this . prevSibling = function ( ) { return this . prevRow ( ) ; } this . getTable = function ( ) { return this . fTable ; } this . moveHTMLContents = function ( toTable , idx ) { var ntr = toTable . insertRow ( idx ) ; var tr = this . getContents ( ) ; var ncells = tr . cells . length ; for ( i = 0 ; i < ncells ; i ++ ) { var td = tr . cells [ 0 ] ; tr . removeChild ( td ) ; ntr . appendChild ( td ) ; } this . deleteHTMLContents ( ) ; if ( this . fOuter ) this . removeFromIdMap ( this . fOuter ) ; this . fTable = toTable ; this . fOuter = ntr ; ntr . id = Utils . getNewId ( "tr" ) ; Utils . addToIdMap ( ntr , this ) ; this . domid = td . id ; this . fTableRowDOMId = ntr . id ; } this . deleteHTMLContents = function ( ) { this . fTable . deleteRow ( this . getRowIndex ( ) ) ; } this . getRowIndex = function ( ) { if ( this . fTable == null ) return - 1 ; var nrows = this . fTable . rows . length ; var rowIndex ; for ( rowIndex = 0 ; rowIndex < nrows ; rowIndex ++ ) { if ( this . fTable . rows [ rowIndex ] . id && this . fTable . rows [ rowIndex ] . id == this . fTableRowDOMId ) break ; } return rowIndex ; } this . getColumnIndex = function ( cellIndex ) { var part = this . fFirstPart ; var i = 0 ; var col = 0 ; while ( i < cellIndex ) { col += part . colspan ( ) ; part = part . next ; if ( part == null ) break ; i ++ ; } return col ; } this . colspan = function ( ) { if ( this . fOuter == null ) return 0 ; var colspan = 0 ; var ncells = this . fOuter . cells . length ; cells = this . fOuter . cells ; for ( var i = 0 ; i < ncells ; i ++ ) colspan += cells [ i ] . colSpan ; return colspan ; } this . getBottom = function ( ) { var tr = this . getContents ( ) ; var ht = tr . firstChild . offsetHeight ; ht += this . fTable . offsetTop ; return tr . firstChild . offsetTop + ht ; } this . getHeight = function ( ) { return this . getContents ( ) . firstChild . offsetHeight ; } this . fTable = null ; }
@class
 base class represents a page view part, which is rendered as table row in a
 table that is part of a {@link PageView}
@class base class represents a page view part which is rendered as table row in a table that is part of a { @link PageView }
/**
     * get the next row (default implementation
     * @return {TableRowPageViewPart} the next row if any, else returns null
     */ /**
     * get the prev row (default implementation
     * @return {TableRowPageViewPart} the prev row if any, else returns null
     */ /**
     * get the table of which this view (row) is part of
     * @return the DOM TABLE which this view is part of
     * @type DOMElement_TABLE
     */ /**
     * move the HTML contents of the row from one HTML table to another
     * @param {DOMElement_TABLE}	the new table to which the contents 
     *					need to be moved
     * @param {idx}			the index in that table
     */ // delete us from the current table
 /*
     * delete the HTML content of the row
     */ /**
     * get the index of this row view in its table
     */ // figure out row index
 /**
     * get the column index (including span) of a cell
     * @param {int} 	cellindex	cellindex
     */ /**
     * get the column span of the heading (i.e. number of columns in the row)
     */ /**
     * get the bottom coordinate of the row
     */ /**
     * get the height of the row
     */ /**
     * (protected) the DOM table this view is part of
     * @type DOMElement_TABLE
     * @private
     */