I'm messing around with google maps API and I'm trying to call GlocalSearch from within my own object. Is this possible?

Code JavaScript:
fp = {
       .... variables, methods etc....
       	getPointFromPostcode : function()
		var localSearch = new GlocalSearch();

Above is the basic principle, it works fine outside an object but within an object I get the error:

GlocalSearch is not defined

I'm pretty sure its because I'm trying to access the API out of my own object. Is their a way I can access the API class from within an object?

Any ideas......anyone?