A pretty low-grade, but functional associative array sorter in JavaScript:

// execution
var assocArray = new Array();
assocArray[ 'b' ] = 'item3';
assocArray[ 'c' ] = 'item1';
assocArray[ 'a' ] = 'item2';

array_dump_html( 'Pre-sort', assocArray );

assocArray = array_sort( assocArray );

array_dump_html( 'Post-sort', assocArray );

// ---
// Sort functions...
function array_sort( arrayIn ) {

	var arrayCouplets = new Array();
	for( key in arrayIn ) {

		arrayCouplets.push({

			key: key,
			value: arrayIn[ key ]
		});
	}

	arrayCouplets.sort( sort_couplets );

	var arrayOut = new Array();
	for( i in arrayCouplets) {

		arrayOut[ arrayCouplets[ i ][ 'key' ] ] = arrayCouplets[ i ][ 'value' ];
	}

	return arrayOut;
}

function sort_couplets( coupletA, coupletB ) {

	return coupletA[ 'value' ] > coupletB[ 'value' ];
}

// ---
// Fluff functions...
function array_dump_html( title, arrayIn ) {

	var output = '';
	for( key in arrayIn ) {

		output += 'key(' + key + ') value(' + arrayIn[ key ] + ')<br />';
	}

	document.write( '<div><h1>' + title + ':</h1>' + output + '</div>' );
}

Outputs:

Pre-sort:
key(b) value(item3)
key(c) value(item1)
key(a) value(item2)

Post-sort:
key(c) value(item1)
key(a) value(item2)
key(b) value(item3)

Copy and paste into an online editor to try it.

Can you improve it? Please comment!