function orderRows(){
	var table = this.SortInfo.table;
	var column = this.SortInfo.column;
	var rowArray = [];
	var iRows = $(table).rows;
	
	this.SortInfo.sortasc = this.SortInfo.sortasc == undefined ? true : this.SortInfo.sortasc;
	if(window['currentsortedtable'] == table && window['currentsortedrow'] == column) {
		this.SortInfo.sortasc = !this.SortInfo.sortasc;
	}

	window['currentsortedtable'] = table;
	window['currentsortedrow'] = column;
	
	if(!window['currentorder']) {
		window['currentorder'] = {};
	}
	if(window['currentorder'][table.id]) {
		window['currentorder'][table.id].style.backgroundImage = "none";
		window['currentorder'][table.id].SortInfo.sortasc = undefined; 
		window['currentorder'][table.id] = undefined;
	}
	window['currentorder'][table.id] = this;
	
	for(i = 1; i < iRows.length; i++){
		rowArray.push([iRows.item(i).cells.item(column).innerHTML.stripHTML().stripNewLines().toLowerCase(), iRows.item(i)]);
		iRows.item(i).parentNode.removeChild(iRows.item(i));
		i--;
	}
	rowArray.sort();
	this.style.backgroundRepeat = "no-repeat";
	this.style.backgroundPosition = "top right";
	this.style.backgroundImage = "url(../jsp/images/sort/arrow-up.gif)"; 
	if(!this.SortInfo.sortasc) {
		rowArray.reverse();
		this.style.backgroundImage = "url(../jsp/images/sort/arrow-down.gif)"; 
	}

	var iTbody = $(table).firstChild;

	for(i = 0; i < rowArray.length; i++){
		if(i % 2 == 1) {
			rowArray[i][1].className = "coloredrow";
		} else {
			rowArray[i][1].className = "";
		}
		iTbody.appendChild(rowArray[i][1]);
	}
}
