//BROWSER INDEPENDENT REPRESENTATION OF A TABLE COLUMN
//ASSUMES THAT THERE ARE NO CELLS THAT SPAN COLUMNS

function aColumn(sourceTable, index){
	this.table=sourceTable;
	this.colIndex=index;

	this.getWidth = function(){
		//CHECK THAT THE COLUMN WIDTH IS CONSISTENT
		for(var rowIndex=0;rowIndex<this.table.getNumRow();rowIndex++){
			var width=this.table.getCell(rowIndex, colIndex).getWidth();
			if (width!=null) return width;
		}//for
		return -1;
	}//getWidth

	this.setWidth = function(width){
		//SET ALL CELLS IN COLUMN TO SAME WIDTH
		for(var rowIndex=0;rowIndex<table.getNumRow();rowIndex++){
			var cell=this.table.getCell(rowIndex, colIndex);
			cell.setWidth(width);
		}//for
	}//setWidth

	return this;
}//aColumn

