namespaced the mapping and chart functions. Reorganized the remaining JS into a functions that occur on document ready. All test pages work for now. 1 niggling error on charttest, but not fatal.