BitePricesIndex = { homepageGraphBWI: function(child, width, height, index) { // Clear the element first. $(child).update(''); PM.global.newGraph(child, '/prices/homepage-graph?index=' + index, {createGraphDIV: true, width: width + 'px', height: height + 'px'}); }, homepageGraphWTI: function(child, width, height) { $(child).update(''); PM.global.newGraph(child, '/prices/homepage-wti', {createGraphDIV: true, width: width + 'px', height: height + 'px'}); } }; BiteSavedPorts = { changeSelectedRegion: function() { // Figure out which region is currently selected in the region drop down. var selected_region = $('region_code').value; // Get the ids of all the port drop downs. var port_dd_ids = $$("select[id^='port_select_']"); // Hide all the port drop downs except for the one which corresponds to the currently // selected value in the region drop down. for (i = 0; i < port_dd_ids.length; i++) { //alert('!'+port_dd_ids[i].id+'! as compared to !'+selected_region+'!'); if(port_dd_ids[i].id == 'port_select_'+selected_region) $(port_dd_ids[i].id).show(); else $(port_dd_ids[i].id).hide(); } } }