added more javascript to control 3 load buttons and related functionality