var selection; function go() { selection = new sort_array('selection', 10); selection.populate(-100, 100); selection.sort = selection_sort; document.getElementById('selection_populate').onclick = function(){selection.populate(-100, 100);} document.getElementById('selection_reset').onclick = function(){selection.reset();} document.getElementById('selection_sort').onclick = function(){selection.sort();} }