function populate_gender(lst){ lst.options[lst.options.length] = new Option("Men", "M"); lst.options[lst.options.length] = new Option("Women", "W"); } function populate_relay_gender(lst){ lst.options[lst.options.length] = new Option("Men", "M"); lst.options[lst.options.length] = new Option("Women", "W"); lst.options[lst.options.length] = new Option("Mixed", "B"); } function populate_from_age(lst){ for(var i = 25 ; i <= 105 ; i += 5) lst.options[lst.options.length] = new Option(i + "-" + (i + 4), i); } function populate_relay_from_age(lst){ for(var i = 100 ; i < 120 ; i += 20) lst.options[lst.options.length] = new Option(i + "-" + (i + 19), i); for(var i = 120 ; i <= 360 ; i += 40) lst.options[lst.options.length] = new Option(i + "-" + (i + 39), i); } function populate_stroke(lst){ lst.options[lst.options.length] = new Option("Freestyle", "FR"); lst.options[lst.options.length] = new Option("Backstroke", "BC"); lst.options[lst.options.length] = new Option("Breaststroke", "BR"); lst.options[lst.options.length] = new Option("Butterfly", "BU"); lst.options[lst.options.length] = new Option("Individual Medley", "IM"); } function populate_relay_stroke(lst){ lst.options[lst.options.length] = new Option("Freestyle", "FR"); lst.options[lst.options.length] = new Option("Medley", "IM"); } function populate_distance(lst){ lst.options[lst.options.length] = new Option("50m", "50"); lst.options[lst.options.length] = new Option("100m", "100"); lst.options[lst.options.length] = new Option("200m", "200"); lst.options[lst.options.length] = new Option("400m", "400"); lst.options[lst.options.length] = new Option("800m", "800"); lst.options[lst.options.length] = new Option("1500m", "1500"); } function populate_relay_distance(lst){ lst.options[lst.options.length] = new Option("200m", "4x50"); lst.options[lst.options.length] = new Option("400m", "4x100"); lst.options[lst.options.length] = new Option("800m", "4x200"); } function reachAnchor(){ var gender = document.getElementById("gender"); var anchor = gender.options[gender.selectedIndex].value; var from_age = document.getElementById("from_age"); anchor += "_" + from_age.options[from_age.selectedIndex].value; var stroke = document.getElementById("stroke"); anchor += "_" + stroke.options[stroke.selectedIndex].value; var distance = document.getElementById("distance"); anchor += "_" + distance.options[distance.selectedIndex].value; location.hash = anchor; } function reachXAnchor(){ var gender = document.getElementById("gender"); var anchor = gender.options[gender.selectedIndex].value; var from_age = document.getElementById("from_age"); anchor += "_" + from_age.options[from_age.selectedIndex].value; location.hash = anchor; }