function Ts_datetosortkey (date) {//Y2K notes:two digit years less than-are treated as 20XX, greater than-are TR Eated as 19XX if (date.length = =) {switch (DATE.SUBSTR (3,3). toLowerCase ()) {case "a": var month = "a"; break
; Case "Feb": var month = "02";
Break Case "Mar": var month = "03";
Break Case "Apr": var month = "04";
Break Case "may": var month = "05";
Break Case "June": var month = "06";
Break Case "June": var month = "07";
Break Case "Aug": var month = "08";
Break Case "Sep": var month = "09";
Break Case "Oct": var month = "10";
Break Case "Nov": var month = "11";
Break Case "Dec": var month = "12";
Break
Default:var month = "00";
Return Date.substr (7,4) +month+date.substr (0,2); else if (Date.length =) {if (ts_europeandate = = False) {return date.substr (6,4) +date.substr (0,2) +date.substr (
3,2);
else {return date.substr (6,4) +date.substr (3,2) +date.substr (0,2); } else if (Date.length = = 8) {yr = Date.substr (6,2);
if (parseint (YR) <) {yr = ' m ' +yr;
else {yr = ' +yr ';
} if (ts_europeandate = = True) {return yr+date.substr (3,2) +date.substr (0,2);
else {return yr+date.substr (0,2) +date.substr (3,2);
} return "00000000"; }