var wmCustomMapTypePosition=G_ANCHOR_TOP_RIGHT;var wmCustomMapTypeOffset=7;var wmCustomMapTypes=new Array();wmCustomMapTypes.push({type:G_NORMAL_MAP,title:'Map',images:['/images/icons/maps/map_1.png','/images/icons/maps/map_2.png','/images/icons/maps/map_3.png']});wmCustomMapTypes.push({type:G_SATELLITE_MAP,title:'Satellite',images:['/images/icons/maps/satellite_1.png','/images/icons/maps/satellite_2.png','/images/icons/maps/satellite_3.png']});wmCustomMapTypes.push({type:G_HYBRID_MAP,title:'Hybrid',images:['/images/icons/maps/hybrid_1.png','/images/icons/maps/hybrid_2.png','/images/icons/maps/hybrid_3.png']});var wmCustomSmallZoomPosition=G_ANCHOR_TOP_LEFT;var wmCustomSmallZoomOffset=7;var wmCustomSmallZoom=new Array();wmCustomSmallZoom.push({fname:'zoomIn',title:'Zoom In',images:['/images/icons/maps/zoom_1.png','/images/icons/maps/zoom_2.png','/images/icons/maps/zoom_3.png']});wmCustomSmallZoom.push({fname:'zoomOut',title:'Zoom Out',images:['/images/icons/maps/minus_1.png','/images/icons/maps/minus_2.png','/images/icons/maps/minus_3.png']})
function mapTypeControl(){} mapTypeControl.prototype=new GControl();mapTypeControl.prototype.initialize=function(objMap){var objContainer=Builder.node('div',{id:'wmMapTypeControl'});for(var i=0;i<wmCustomMapTypes.length;i++){for(var j=0;j<wmCustomMapTypes[i].images.length;j++){wmPreload(wmCustomMapTypes[i].images[j]);} if(objMap.getCurrentMapType()==wmCustomMapTypes[i].type){var intState=1;}else{var intState=0;} var objBtn=Builder.node('img',{alt:wmCustomMapTypes[i].title,name:i,src:wmCustomMapTypes[i].images[intState],title:wmCustomMapTypes[i].title});this.setButtonStyle_(objBtn);objContainer.appendChild(objBtn);GEvent.addDomListener(objBtn,'mouseover',function(e){var objImg=Event.element(e);objImg.src=wmCustomMapTypes[objImg.name].images[1];});GEvent.addDomListener(objBtn,'mousedown',function(e){var objImg=Event.element(e);objImg.src=wmCustomMapTypes[objImg.name].images[2];});GEvent.addDomListener(objBtn,'mouseup',function(e){var objImg=Event.element(e);objImg.src=wmCustomMapTypes[objImg.name].images[1];});GEvent.addDomListener(objBtn,'click',function(e){var objImg=Event.element(e);objMap.setMapType(wmCustomMapTypes[objImg.name].type);var arrImg=document.id('wmMapTypeControl').childElements();for(var i=0;i<arrImg.length;i++){if(arrImg[i].name!=objImg.name){arrImg[i].src=wmCustomMapTypes[i].images[0];}}});GEvent.addDomListener(objBtn,'mouseout',function(e){var objImg=Event.element(e);if(objMap.getCurrentMapType()!=wmCustomMapTypes[objImg.name].type){objImg.src=wmCustomMapTypes[objImg.name].images[0];}});} objMap.getContainer().appendChild(objContainer);return objContainer;}
mapTypeControl.prototype.getDefaultPosition=function(){return new GControlPosition(wmCustomMapTypePosition,new GSize(wmCustomMapTypeOffset,wmCustomMapTypeOffset));}
mapTypeControl.prototype.setButtonStyle_=function(objBtn){objBtn.style.cursor='pointer';}
function smallZoomControl(){} smallZoomControl.prototype=new GControl();smallZoomControl.prototype.initialize=function(objMap){var objContainer=Builder.node('div',{id:'wmSmallZoomControl'});for(var i=0;i<wmCustomSmallZoom.length;i++){for(var j=0;j<wmCustomSmallZoom[i].images.length;j++){wmPreload(wmCustomSmallZoom[i].images[j]);}
var objDiv=Builder.node('div');this.setButtonStyle_(objDiv);objContainer.appendChild(objDiv);var objBtn=Builder.node('img',{alt:wmCustomSmallZoom[i].title,name:i,src:wmCustomSmallZoom[i].images[0],title:wmCustomSmallZoom[i]});objDiv.appendChild(objBtn);GEvent.addDomListener(objBtn,'mouseover',function(e){var objImg=Event.element(e);objImg.src=wmCustomSmallZoom[objImg.name].images[1];});GEvent.addDomListener(objBtn,'mousedown',function(e){var objImg=Event.element(e);objImg.src=wmCustomSmallZoom[objImg.name].images[2];});GEvent.addDomListener(objBtn,'mouseup',function(e){var objImg=Event.element(e);objImg.src=wmCustomSmallZoom[objImg.name].images[1];});GEvent.addDomListener(objBtn,"click",function(e){var objImg=Event.element(e);if(wmCustomSmallZoom[objImg.name].fname=='zoomIn'){objMap.zoomIn();}else if(wmCustomSmallZoom[objImg.name].fname='zoomOut'){objMap.zoomOut();}});GEvent.addDomListener(objBtn,'mouseout',function(e){var objImg=Event.element(e);objImg.src=wmCustomSmallZoom[objImg.name].images[0];});} objMap.getContainer().appendChild(objContainer);return objContainer;}
smallZoomControl.prototype.getDefaultPosition=function(){return new GControlPosition(wmCustomSmallZoomPosition,new GSize(wmCustomSmallZoomOffset,wmCustomSmallZoomOffset));}
smallZoomControl.prototype.setButtonStyle_=function(objBtn){objBtn.style.cursor='pointer';}
