Unless you have a more exotic scenario, where you need to access functionality only covered by Google's API itself, I agree with Nuno: you should stick with our actions.
In case you really need to do it...not sure I follow your problem, you say you needed to use "getElementById" to obtain a div to create a map manually. Have you tried using the "osGoogleMap.create" action, like the Map block does?
Check out the JavaScript property (or the JS file, when acessing a page with a Map block) to get a general idea of how it works. Let us know if you need help. :)
In case you really need to do it...not sure I follow your problem, you say you needed to use "getElementById" to obtain a div to create a map manually. Have you tried using the "osGoogleMap.create" action, like the Map block does?
Check out the JavaScript property (or the JS file, when acessing a page with a Map block) to get a general idea of how it works. Let us know if you need help. :)