Selection Sort Using Javascript For Navigation