Started work on phase-based search map scripts. Phase one needs to be extracted from search.js.