/**
 * Copyright 2006, Internet Broadcasting Systems. All Rights Reserved.
 * Version:   $Name: REL_2_39_0 $
 * ID:        $Id: TableColumnHighlighter.js,v 1.1 2006/12/06 22:51:32 breisinger Exp $
*/
using("ibsys");
ibsys.TableColumnHighlighter = function(table,defaultColumn,className) {
	this.table = table;
	this.currentColumn = defaultColumn;
	this._className = className;
}
ibsys.TableColumnHighlighter.prototype.highlightColumn = function(colNum) {
	if(colNum != this.currentColumn) {
		var self = this;
		$A(this.table.rows).each(function(value) {
			//remove class name from last highlighted column cell
			Element.removeClassName(value.cells[self.currentColumn],self._className);
			//add to newly sorted column cell
			Element.addClassName(value.cells[colNum],self._className);
		});
		//take note of new current column
		this.currentColumn = colNum;
	}
}

