var bubble; function go() { bubble = new sort_array('bubble', 10); bubble.populate(-100, 100); bubble.sort = bubble_sort; document.getElementById('bubble_populate').onclick = function(){bubble.populate(-100, 100);} document.getElementById('bubble_reset').onclick = function(){bubble.reset();} document.getElementById('bubble_sort').onclick = function(){bubble.sort();} }