var ss1=[18,74,6,9,32,1],
ss2=["width","none","color","border","after","div"];
alert( getSorted(ss1, ss2) );
function getSorted(array1, array2){
return sort( array1.slice(), array2.slice(), [] );
function sort(array1, array2, result){
if( array1.length == 0 ) return result;
var index = array1.indexOf( Math.max.apply( Math, array1 ) );
array1.splice( index, 1 );
result.push( array2.splice( index, 1 ) );
return sort(array1, array2, result);
};
};