attached_exception="ManipulatorAttachedException";not_attached_exception="ManipulatorNotAttachedException";var handler;var debug_latlng=false;var debug_latlng_handlers=[];var MapManipulator=new Class({options:{onAttach:Class.empty,onDetach:Class.empty,throwExceptions:true},initialize:function(A){this.setOptions(A);this.gmap=null},isAttached:function(){return(this.gmap!==null)},attachTo:function(A){if(this.isAttached()){if(this.options.throwExceptions){throw attached_exception}else{return }}this.gmap=A;this.fireEvent("onAttach");if(debug_latlng){handler=GEvent.addListener(this.gmap,"mousemove",function(B){console.log("[MM.debug_latlng] @",B.lat(),B.lng())});debug_latlng_handlers.push(handler)}},detach:function(){if(!this.isAttached()){if(this.options.throwExceptions){throw not_attached_exception}else{return }}this.fireEvent("onDetach");this.gmap=null;if(debug_latlng){debug_latlng_handlers.each(function(A){GEvent.removeListener(A)})}}});MapManipulator.implement(new Options(),new Events())