There are some problems with your code. you don't need to do anything complicated like overwrite sortOn.
What you need to do is use sort with a sortFuntion. I can't write specific code for you at the moment but here is an example of some code I wrote last week sorting on multiple fields.
It will group together objects with the same y value and then whithin those groups it will sort on x1.
function mySort(a, b)
ay = a.y;
ax = a.x1;
by = b.y;
bx = b.x1;
if(ay < by)
else if(ay > by)
if(ax < bx)
else if(ax > bx)
The code that matters is what's inside the mySort function.
1) if you want 'a' to show up before 'b' then return -1
2) if you want 'a' to show up after 'b' then return 1
3) and if 'a' and 'b' are the same return 0
I'd recomend reading up on Array.sort in the as dictionary. It gives a pretty good explanation.