Google Maps with HTML Template

Alright, so I can get this to run directly from the client. However, I have a form that is querying a database for dive site information and I want to be able to load a new map for each query. But since the map is inside of another dynamic container, it is having issues loading the map itself. Any ideas on how to get around this?

Thanks in advance,

Jules

Note: Fullscreen capture 622011 is from the form; Fullscreen capture 612011 is directly from the client.