text: OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:!1,displayClass:"",title:"",autoActivate:!1,active:null,handler:null,eventListeners:null,events:null,initialize:function(e){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,""),OpenLayers.Util.extend(this,e),this.events=new OpenLayers.Events(this),this.eventListeners instanceof Object&&this.events.on(this.eventListeners),null==this.id&&(this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_"))},destroy:function(){if(this.events&&(this.eventListeners&&this.events.un(this.eventListeners),this.events.destroy(),this.events=null),this.eventListeners=null,this.handler&&(this.handler.destroy(),this.handler=null),this.handlers){for(var e in this.handlers)this.handlers.hasOwnProperty(e)&&"function"==typeof this.handlers[e].destroy&&this.handlers[e].destroy();this.handlers=null}this.map&&(this.map.removeControl(this),this.map=null),this.div=null},setMap:function(e){this.map=e,this.handler&&this.handler.setMap(e)},draw:function(e){return null==this.div&&(this.div=OpenLayers.Util.createDiv(this.id),this.div.className=this.displayClass,this.allowSelection||(this.div.className+=" olControlNoSelect",this.div.setAttribute("unselectable","on",0),this.div.onselectstart=OpenLayers.Function.False),""!=this.title&&(this.div.title=this.title)),null!=e&&(this.position=e.clone()),this.moveTo(this.position),this.div},moveTo:function(e){null!=e&&null!=this.div&&(this.div.style.left=e.x+"px",this.div.style.top=e.y+"px")},activate:function(){return this.active?!1:(this.handler&&this.handler.activate(),this.active=!0,this.map&&OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active"),this.events.triggerEvent("activate"),!0)},deactivate:function(){return this.active?(this.handler&&this.handler.deactivate(),this.active=!1,this.map&&OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active"),this.events.triggerEvent("deactivate"),!0):!1},CLASS_NAME:"OpenLayers.Control"}),OpenLayers.Control.TYPE_BUTTON=1,OpenLayers.Control.TYPE_TOGGLE=2,OpenLayers.Control.TYPE_TOOL=3;