// sort the date in DD-MMM-YYYY format

var months = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");

function oracleDateConverter( s ) {
	var month_no = 0;
	var date_array = s.split('-');

	for (var x=0; x<months.length; x++) {
		if (months[x] == date_array[1]) {
			month_no = x + 1;
		}
	}

	if (month_no < 10) { month_no  = '0' + month_no; }
	if (date_array[0] < 10) { date_array[0] = '0' + date_array[0]; }

	var iso_date =  date_array[2] + month_no + date_array[0];

	iso_date = iso_date.replace(/\n/g,'');
	iso_date = iso_date.replace(/\s/g,'');

	return iso_date
}

SortableTable.prototype.addSortType( "OracleDate", oracleDateConverter);

