if(typeof iADMIN=="undefined"){var iADMIN=false}var bmTooltip=function(){var b=TT_MouseY=TT_oldMouseX=TT_oldMouseY=TT_VISIBLE=0;var a="overDiv";return{init:function(e,k,g){var h=document.getElementById(a);if(!h){var c=document.getElementsByTagName("BODY")[0];var h=document.createElement("DIV");h.id=a;h.style.position="absolute";h.style.display="none";h.style.overflow="hidden";h.style.zIndex=1000;c.appendChild(h)}h.style.width=g||"";var f='<div class="'+a+'_caption">'+e+"</div>";f+='<div class="'+a+'_text">'+k+"</div>";h.innerHTML=f;TT_VISIBLE=true;TT_oldMouseX=-1;TT_oldMouseY=-1},onmousemove:function(l){if(typeof l.pageX=="undefined"&&typeof l.clientX!="undefined"){var m=document.documentElement,o=document.body;if(m==undefined||o==undefined){return}l.pageX=l.clientX+(m.scrollLeft||o.scrollLeft);l.pageY=l.clientY+(m.scrollTop||o.scrollTop)}b=l.pageX;TT_MouseY=l.pageY;if(TT_VISIBLE&&(TT_oldMouseX!=b||TT_oldMouseY!=TT_MouseY)){var n=document.getElementById(a);if(n){var k=this.windowSize();var g,f;var h,c;n.style.display="";h=n.offsetWidth||0;c=n.offsetHeight||0;if((h==0||c==0)&&typeof n.oldOffsetWidth!="undefined"){h=n.oldOffsetWidth;c=n.oldOffsetHeight}g=f=10;if(b+h+g*3>k.w){g=-(h+g)}if(TT_MouseY+c+f*3>k.h){f=-(c+f)}n.style.left=(b+g)+"px";n.style.top=(TT_MouseY+f)+"px";if(n.offsetWidth!=0&&n.offsetHeight!=0){n.oldOffsetWidth=n.offsetWidth;n.oldOffsetHeight=n.offsetHeight}TT_oldMouseX=b;TT_oldMouseY=TT_MouseY}}},windowSize:function(){if(window.innerWidth){return{w:window.innerWidth,h:window.innerHeight}}else{if(document.documentElement&&document.documentElement.clientWidth){return{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}}else{if(document.body){return{w:document.body.clientWidth,h:document.body.clientHeight}}else{return{w:0,h:0}}}}},clear:function(){var c=document.getElementById(a);if(c){c.style.display="none"}TT_VISIBLE=false}}}();if(document.addEventListener){document.addEventListener("mousemove",function(a){bmTooltip.onmousemove(a)},false)}else{document.attachEvent("onmousemove",function(a){bmTooltip.onmousemove(a)})}var ZOOM_STEP=1;function getElementPosition(b){var a=0,c=0;while(b!=null){a+=b.offsetLeft-b.scrollLeft;c+=b.offsetTop-b.scrollTop;b=b.offsetParent}return{x:a,y:c}}function bmMap(f,c,e){var g=this;var h=document.createElement("div");h.style.position="absolute";h.style.top="0px";h.style.left="0px";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";var b=document.createElement("div");b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.width="100%";b.style.height="100%";b.style.overflow="visible";var k=document.createElement("div");k.style.position="absolute";k.style.top="0px";k.style.left="0px";k.style.overflow="visible";b.appendChild(k);h.appendChild(b);document.getElementById(f).appendChild(h);this.mainMap=b;this.overlay=k;this.viewportDiv=h;this.tiles=new bmTiles(this.mainMap);this.dragEnabled=true;bmDrag.init(this.mainMap);this.mainMap.onDragStart=function(){g.isMoved=false};this.mainMap.onDrag=function(n,m,l){return g.onDrag(n,m,l)};this.mainMap.onDragEnd=function(n,m,l){return g.onDragEnd(n)};bmZoom.init(this.mainMap);this.mainMap.onScroll=function(l,m){g.zoom(l,m)};this.updateViewportSize();this.load(c);$(window).resize(function(l){g.updateViewportSize();g.resizeAndCenter()});$(this.mainMap).dblclick(function(l){g.onDblClick(l)});this.overlays=[];var a={".map-marker":function(l){if(uniqID[l.target.id]){uniqID[l.target.id].tooltipNotify(true)}}};var d={".map-marker":function(l){if(uniqID[l.target.id]){uniqID[l.target.id].tooltipNotify(false)}}};$(this.mainMap).mouseover($.delegate_old(a)).mouseout($.delegate_old(d))}bmMap.prototype.addOverlay=function(a){this.overlays.push(a)};bmMap.prototype.notifyOverlays=function(){for(var a in this.overlays){this.overlays[a].notify(this)}};bmMap.prototype.appendLayer=function(a){try{if(typeof a=="string"){this.mainMap.innerHTML+=a}else{this.mainMap.appendChild(a)}}catch(b){console.debug("exception: bmMap.appendLayer(",a,"): ",b)}};bmMap.prototype.setDragEnabled=function(a){this.dragEnabled=a};bmMap.prototype.onDrag=function(d,b,a){if(!this.dragEnabled){this.isMoved=false;return false}this.isMoved=true;var f=((this.viewport.w/2)-b);var c=((this.viewport.h/2)-a);this.xCenter=((this.viewport.w/2)-b);this.yCenter=((this.viewport.h/2)-a);return true};bmMap.prototype.onDragEnd=function(a){if(!this.dragEnabled){this.isMoved=false;return false}if(this.isMoved){this.resizeAndCenter();this.isMoved=false}return true};bmMap.prototype.onDblClick=function(a){if(!this.dragEnabled){this.isMoved=false;return false}var b=this.convertMouseToMap(a.pageX,a.pageY);this.xCenter=b.x;this.yCenter=b.y;this.resizeAndCenter();a.preventDefault();a.stopPropagation()};bmMap.prototype.zoom=function(a,b){if(this.isMoved){return}if(b<0){this.zoomOut()}else{if(b>0){this.zoomIn()}}};bmMap.prototype.zoomIn=function(){if(this.zoomFactor<this.activeMap.maxZoom){this.setZoom(this.zoomFactor+ZOOM_STEP)}};bmMap.prototype.zoomOut=function(){if(this.zoomFactor>this.activeMap.minZoom){this.setZoom(this.zoomFactor-ZOOM_STEP)}};bmMap.prototype.setZoom=function(a){if(a<this.activeMap.minZoom){this.zoomFactor=this.activeMap.minZoom}else{if(a>this.activeMap.maxZoom){this.zoomFactor=this.activeMap.maxZoom}else{this.zoomFactor=a}}this.resizeAndCenter()};bmMap.prototype.resizeAndCenter=function(){this.cImageWidth=Math.pow(2,this.zoomFactor)*this.tiles.const_TileSize;this.cImageHeight=Math.pow(2,this.zoomFactor)*this.tiles.const_TileSize;if(this.cMapWidth&&this.cMapHeight){this.xCenter*=this.cImageWidth/this.cMapWidth;this.yCenter*=this.cImageHeight/this.cMapHeight}this.cMapWidth=this.cImageWidth;this.cMapHeight=this.cImageHeight;this.updateMapScale();this.mainMap.style.width=this.cImageWidth+"px";this.mainMap.style.height=this.cImageHeight+"px";var a=this.mapInfo(this.zoomFactor);if(this.xCenter+a.x>this.cImageWidth){this.xCenter=this.cImageWidth-a.x}if((this.xCenter-a.x)<0){this.xCenter=a.x}if(this.yCenter+a.y>this.cImageHeight){this.yCenter=this.cImageHeight-a.y}if((this.yCenter-a.y)<0){this.yCenter=a.y}this.centerXY(this.xCenter,this.yCenter)};bmMap.prototype.centerXY=function(a,b){this.xCenter=a;this.yCenter=b;this.mainMap.x=Math.floor(this.viewport.w/2-this.xCenter);this.mainMap.y=Math.floor(this.viewport.h/2-this.yCenter);this.mainMap.style.left=this.mainMap.x+"px";this.mainMap.style.top=this.mainMap.y+"px";this.tiles.update(this);this.notifyOverlays()};bmMap.prototype.recenterMap=function(){this.centerXY(Math.floor(this.cMapWidth/2),Math.floor(this.cMapHeight/2));this.tiles.update(this)};bmMap.prototype.mapInfo=function(f){if(!f){var f=this.zoomFactor}var e=Math.pow(2,this.zoomFactor)*this.tiles.const_TileSize;var d=this.activeMap.max.w/this.activeMap.max.h;var g=e;var c=e;if(this.activeMap.max.w>this.activeMap.max.h){c=Math.floor(e/d)}else{if(this.activeMap.max.w<this.activeMap.max.h){g=Math.floor(e*d)}}var b=Math.floor((e-g)/2);var a=Math.floor((e-c)/2);return{name:this.activeMap.name,x:b,y:a,w:g,h:c}};bmMap.prototype.setMap=function(d,c){this.load(d)};bmMap.prototype.load=function(a){this.mapName=a;this.activeMap=this.findMapInfo(a);this.zoomFactor=this.activeMap.minZoom;this.cMapWidth=null;this.cMapHeight=null;var b=this.MapXYtoImageXY(this.activeMap.max.w/2,this.activeMap.max.h/2);this.xCenter=b.x;this.yCenter=b.y;this.resizeAndCenter()};bmMap.prototype.updateMapScale=function(){this.mapScale={w:this.cMapWidth/this.activeMap.max.w,h:this.cMapHeight/this.activeMap.max.h}};bmMap.prototype.updateViewportSize=function(){this.viewport={w:$(this.viewportDiv).width(),h:$(this.viewportDiv).height()}};bmMap.prototype.findMapInfo=function(c){if(bmMap_data&&bmMap_data.mapInfo){for(var b=0;b<bmMap_data.mapInfo.length;b++){var a=bmMap_data.mapInfo[b];if(a.name==c){return a}}}return{name:"error",min:{w:0,h:0},max:{w:0,h:0}}};bmMap.prototype.convertMouseToMap=function(d,c){var b=getElementPosition(this.mainMap.parentNode);var a=d-b.x-parseInt(this.mainMap.style.left+0);var e=c-b.y-parseInt(this.mainMap.style.top+0);return{x:a,y:e}};bmMap.prototype.MouseToMapXY=function(a,f,e){if(!e){var e=this.zoomFactor}var d=this.mapInfo(e);var c=Math.floor((a-d.x)/d.w*this.activeMap.max.w);var b=Math.floor((f-d.y)/d.h*this.activeMap.max.h);return{x:c,y:b}};bmMap.prototype.MapXYtoImageXY=function(a,e){var d=this.mapInfo();var c=Math.floor(a/this.activeMap.max.w*d.w)+d.x;var b=Math.floor(e/this.activeMap.max.h*d.h)+d.y;return{x:c,y:b}};bmMap.prototype.isXYVisible=function(a,c){var b=(this.mainMap.x+a)>-this.tiles.const_TileSize&&(this.mainMap.x+a)<(this.viewport.w+this.tiles.const_TileSize)&&(this.mainMap.y+c)>-this.tiles.const_TileSize&&(this.mainMap.y+c)<(this.viewport.h+this.tiles.const_TileSize);return b};var bmDrag={obj:null,init:function(c,a){var b=c;if(typeof c!="object"){b=document.getElementById(c)}if(b){b.onDragStart=new Function();b.onDragEnd=new Function();b.onDrag=new Function();b.handle=a||false;$(b).mousedown(bmDrag.mouseDown)}else{console.debug("bmDrag.init: object id ["+o_id+"] not found")}},mouseDown:function(a){var b=bmDrag.obj=this;if(b.handle&&!$(a.target).is(b.handle)){return true}$(document).mousemove(bmDrag.mouseMove);$(document).mouseup(bmDrag.mouseUp);b.startMouseX=a.pageX;b.startMouseY=a.pageY;b.startTargetX=parseInt(b.style.left+0);b.startTargetY=parseInt(b.style.top+0);b.style.cursor="move";b.onDragStart(a);a.preventDefault();a.stopPropagation();return false},mouseMove:function(c){var d=bmDrag.obj;if(d==null){return}var b=(d.startTargetX+c.pageX-d.startMouseX);var a=(d.startTargetY+c.pageY-d.startMouseY);if(d.onDrag(c,b,a)){d.style.left=b+"px";d.style.top=a+"px"}c.preventDefault();c.stopPropagation();return false},mouseUp:function(a){var b=bmDrag.obj;if(b==null){return}b.style.cursor="default";b.onDragEnd(a);$(document).unbind("mousemove",bmDrag.mouseMove);$(document).unbind("mouseup",bmDrag.mouseUp);bmDrag.obj=null;a.preventDefault();a.stopPropagation();return false}};var bmZoom={init:function(a){$(a).bind($.browser.mozilla?"DOMMouseScroll":"mousewheel",bmZoom.mouseWheel);a.onScroll=new Function();a.isEnabled=true},mouseWheel:function(a){if(!this.isEnabled){a.preventDefault();a.stopPropagation();return false}var b=0;if(a.wheelDelta){b=a.wheelDelta/120}else{if(a.detail){b=-a.detail/3}}if(b){this.onScroll(a,b)}a.preventDefault();a.stopPropagation();return false}};function bmTiles(a){this.const_TileSize=256;this.tilesDiv=a}bmTiles.prototype.update=function(a){this.map=a;this.redraw()};bmTiles.prototype.redraw=function(){if(!this.map){return}var d=parseInt(this.map.mainMap.style.left+0);var h=parseInt(this.map.mainMap.style.top+0);this.tileSize=this.const_TileSize;var e=Math.ceil(this.map.cImageWidth/this.tileSize);var c=Math.ceil(this.map.cImageHeight/this.tileSize);var a,g,k,b;a=Math.floor(-d/this.tileSize);g=Math.ceil(-d/this.tileSize+this.map.viewport.w/this.tileSize);k=Math.floor(-h/this.tileSize);b=Math.ceil(-h/this.tileSize+this.map.viewport.h/this.tileSize);this.oldxMin=a;this.oldxMax=g;this.oldyMin=k;this.oldyMax=b;str="";a=Math.max(a,0);k=Math.max(k,0);g=Math.min(g,e);b=Math.min(b,c);this.oldTiles=this.currentTiles;this.currentTiles=[];for(i=a;i<=g;i++){for(j=k;j<=b;j++){if(i>=a&&i<g&&j>=k&&j<b){var f=new Image();f.alt=this.map.mapName+" "+i+"x"+j;f.title="";f.src=this.getTileUrl(this.map.mapName,Math.floor(this.map.zoomFactor),i,j);f.style.position="absolute";f.style.left=(i*this.tileSize)+"px";f.style.top=(j*this.tileSize)+"px";f.style.width=this.tileSize+"px";f.style.height=this.tileSize+"px";f.style.zIndex="-1";this.currentTiles.push(f);this.tilesDiv.appendChild(f)}}}if(this.oldTiles){while(this.oldTiles.length>0){var f=this.oldTiles.pop();this.tilesDiv.removeChild(f);f=null}}};bmTiles.prototype.getTileUrl=function(c,d,a,e){var b=HTTP_HOST+"images/new_maps/tiles/"+c+"/zoom_"+d+"/"+c+"_"+d+"_"+a+"x"+e+".jpg";if(typeof _hostName=="undefined"){return b}return b};function bmMapTooltip(b,c,a,d){if(!b){return}this.div=document.createElement("div");this.div.style.position="absolute";this.div.style.display="none";this.div.style.zIndex=10000;$(this.div).addClass("mapTooltip");this.width=false;this.title=c;this.content=a;this.target=b;this.callback=d||false}bmMapTooltip.prototype.setWidth=function(a){this.width=a};bmMapTooltip.prototype.setTitle=function(a){this.title=a};bmMapTooltip.prototype.setContent=function(a){this.content=a};bmMapTooltip.prototype.show=function(){if(this.title.length>0){bmTooltip.init(this.title,this.content,this.width)}};bmMapTooltip.prototype.hide=function(){if(this.title.length>0){bmTooltip.clear()}};var uniqID_counter=0;var uniqID={};function uniqueID(a){var b;do{b="UUID"+(++uniqID_counter)}while(typeof uniqID[b]!="undefined");uniqID[b]=a;return b}function clone(b){function a(){}a.prototype=b;var c=new a();c.constructor=a;return c}function bmOverlay(c,a,b){this.map=c||false;this.url=a||false;this.keywords=b||false;this.elapsed="";this.db_hits=0;this.items=[];this.hidden=true}bmOverlay.prototype.appendItems=function(e,c){if(!c){var c=false}var f;var k=[];for(var b in e){var d="";switch(e[b].type){case"label":f=new Label(e[b]);var g=uniqueID();k.push(f.createObject(g));f.removeFromMap=true;this.addItem(f);continue;break;case"teleport":d="map-teleport";break;case"spawn":case"portal":d="map-spawn";break;case"outpost":d="map-outpost";break;case"npc":case"vendor":case"trainer":d="map-npc";break;case"tribe":d="map-tribe";break;case"flag":d="map-flag";break;default:d=""}for(var a in e[b].map_data){var h=clone(e[b]);delete h.map_data;h.map=e[b].map_data[a].map;h.x=e[b].map_data[a].x;h.y=e[b].map_data[a].y;h.min=e[b].map_data[a].min;h.max=e[b].map_data[a].max;h.map_data_id=e[b].map_data[a].map_data_id;f=new Marker(h,"map-marker "+d);var g=uniqueID(f);k.push(f.createObject(g));f.removeFromMap=true;this.addItem(f)}}if(k.length>0){this.map.overlay.innerHTML+=k.join("")}};bmOverlay.prototype.addItem=function(a){this.items.push(a)};bmOverlay.prototype.notify=function(){this.redraw()};bmOverlay.prototype.redraw=function(){if(this.hidden){return}for(var a=0;a<this.items.length;a++){var c=this.items[a];if(c.getMapName()==this.map.mapName&&c.getMinZoom()<=this.map.zoomFactor&&c.getMaxZoom()>=this.map.zoomFactor){var b=this.map.MapXYtoImageXY(c.getX(),c.getY());if(this.map.isXYVisible(b.x,b.y)){c.move(b.x,b.y);c.show()}else{c.hide()}}else{c.hide()}}};bmOverlay.prototype.show=function(a){if(!this.hidden){return}if(this.items.length==0){this.loadItems(a);return}this.hidden=false;this.redraw();if(typeof a!="undefined"){a(true)}};bmOverlay.prototype.hide=function(b){if(this.hidden){return}this.hidden=true;for(var a in this.items){var c=this.items[a];if(c.data.map==this.map.mapName&&c.removeFromMap){c.hide()}}if(typeof b!="undefined"){b(true)}};bmOverlay.prototype.loadItems=function(b){if(!this.url||!this.keywords){return}var a=this;$.post(this.url,{ajax:1,q:this.keywords?this.keywords:""},function(c){if(c.error){alert(c.error);a.elapsed=c.elapsed;a.db_hits=0;if(typeof b!="undefined"){b(false)}}else{a.elapsed=c.elapsed;a.db_hits=c.db_hits;a.appendItems(c.result);if(c.result.length>0){a.show(b)}else{if(typeof b!="undefined"){b(true)}}}},"json")};bmOverlay.prototype.clearItems=function(){var b=this.items.pop();while(b){if(b.removeFromMap){var a=document.getElementById(b._div_id);if(a){this.map.overlay.removeChild(a)}}b=this.items.pop()}};bmOverlay.prototype.setZoomRange=function(c,a){for(var b in this.items){this.items[b].data.min=c;this.items[b].data.max=a}if(!this.hidden){this.redraw()}};bmOverlay.prototype.triggerTooltip=function(a,b){if(a<0||a>this.items.length-1){return}if(b){this.items[a].tooltipNotify(true)}else{this.items[a].tooltipNotify(false)}};bmOverlay.prototype.centerMarker=function(a,c){if(a<0||a>this.items.length-1){return}if(!this.map.mapName!=this.items[a].data.map){this.map.load(this.items[a].data.map)}if(typeof c!="undefined"&&this.map.zoomFactor<c){this.map.setZoom(c)}var d=this.map.MapXYtoImageXY(this.items[a].data.x,this.items[a].data.y);this.map.centerXY(d.x,d.y);var b=this;setTimeout(function(){$(b.items[a].div).trigger("mouseover")},100)};function bmMapControls(a,c){this.enabled=true;this.visible=false;this.img=document.getElementById(a);this.imgSrc=this.img.src.replace(/\.gif$/,"");if(typeof c=="undefined"){var c={};c.show=function(d){d()};c.hide=function(d){d()}}else{this.ovr=c}var b=this;$(this.img).click(function(d){b.showHide()})}bmMapControls.prototype.showHide=function(){if(!this.enabled){return}this.img.src=HTTP_HOST+"images/ajax/small-white-loader.gif";if(this.visible){this.hide()}else{this.show()}};bmMapControls.prototype.show=function(){var a=this;this.enabled=false;this.ovr.show(function(){a.enabled=true;a.setVisible(true)})};bmMapControls.prototype.hide=function(){var a=this;this.enabled=false;this.ovr.hide(function(){a.enabled=true;a.setVisible(false)})};bmMapControls.prototype.setVisible=function(a){this.visible=a;this.img.src=this.imgSrc+(this.visible?"_on.gif":".gif")};bmMapControls.prototype.setEnabled=function(a){this.enabled=a;if(a){this.setVisible(this.visible)}else{this.img.src=this.imgSrc+"_dis.gif"}};function Marker(a,b){if(typeof(a)=="undefined"){return}this.data=a;this.className=b||false;this._div="";this._div_id="";this._div_x=0;this._div_y=0;this.hidden=true;this.zIndex=false;this.tTitle="";this.tBody=""}Marker.prototype.getImage=function(){return""};Marker.prototype.createObject=function(a){if(this._div_id==""){this._div_id=a;var e=[];e.push('<div id="'+a+'" style="position: absolute; background-repeat: no-repeat; background-position: 0 0;');if(this.data.icon&&this.data.icon.name){var c=this.data.icon.name.split("/");if(c.length==1){e.push("background-image: url("+HTTP_HOST+"images/new_icons/"+c[0]+");")}else{var b=c.pop();if(c[c.length-1]=="resources"){c.push("24x24")}e.push("background-image: url("+HTTP_HOST+c.join("/")+"/"+b+");")}e.push("margin-left: -"+this.data.icon.w/2+"px;");e.push("margin-top: -"+this.data.icon.w/2+"px;");e.push("width: "+this.data.icon.w+"px;");e.push("height:"+this.data.icon.w+"px;")}e.push("top: "+this._div_y+"px;");e.push("left: "+this._div_x+"px;");if(this.hidden){e.push("display: none;")}e.push('"');if(this.className){e.push(' class="'+this.className+'"')}else{e.push(' class="map-marker"')}e.push(">");e.push(this.getContent());e.push("</div>");this._div=e.join("");this.tTitle=this.data.name;this.tBody=this.getTooltipContent()}return this._div};Marker.prototype.getX=function(){return this.data.x};Marker.prototype.getY=function(){return this.data.y};Marker.prototype.getMapName=function(){return this.data.map};Marker.prototype.getMinZoom=function(){return this.data.min};Marker.prototype.getMaxZoom=function(){return this.data.max};Marker.prototype.getSRDesc=function(){var a=[];if(this.data.title){a.push(this.data.title);if(this.data.max_q){a.push(", Q"+this.data.max_q)}}if(this.data.race){a.push((a.length!=0?", ":"")+this.data.race)}if(this.data.alignment){a.push((a.length!=0?", ":"")+this.data.alignment)}if(this.data.faction){a.push((a.length!=0?", ":"")+this.data.faction);if(this.data.neutral==1){a.push(", neutral")}}if(this.data.location){a.push((a.length!=0?", ":"")+this.data.location)}if(a.length==0){a.push("&nbsp;")}return"<b>"+this.data.name+"</b><br/><small>"+a.join("")+"</small>"};Marker.prototype.getTooltipContent=function(){var c=[];if(this.data.picture){c.push('<img src="'+HTTP_HOST+this.data.picture+'" class="tt_picture" />')}c.push("<dl>");c.push(this.data.name?"<dt>Name</dt><dd>"+this.data.name+"</dd>":"");c.push(this.data.tribe?"<dt>Tribe</dt><dd>"+this.data.tribe+"</dd>":"");c.push(this.data.title?"<dt>Title</dt><dd>"+this.data.title+"</dd>":"");c.push(this.data.max_q?"<dt>Max Q</dt><dd>"+this.data.max_q+"</dd>":"");c.push(this.data.race?"<dt>Race</dt><dd>"+this.data.race+"</dd>":"");c.push(this.data.alignment?"<dt>Alignment</dt><dd>"+this.data.alignment+"</dd>":"");c.push(this.data.faction?"<dt>Faction</dt><dd>"+this.data.faction+(this.data.neutral?", neutral allowed":"")+"</dd>":"");if(this.data.faction_increase){c.push("<dt>Faction gain:</dt><dd>"+this.data.faction_increase.join(", ")+"</dd>")}if(this.data.faction_decrease){c.push("<dt>Faction loss:</dt><dd>"+this.data.faction_decrease.join(", ")+"</dd>")}if(this.data.description){c.push(this.data.description?"<dt>Description</dt><dd>"+this.data.description+"</dd>":"")}else{}c.push(this.data.conditions?"<dt>Conditions</dt><dd>"+this.data.conditions+"</dd>":"");if(this.data.resources&&this.data.resources.length>0){c.push('<dt>Resources</dt><dd><ul class="flat">');for(var b in this.data.resources){var a=this.data.resources[b];c.push("<li>");if(a.icon.name!=""){if(a.icon.name.indexOf("/stars/")!=-1){a.icon.w=26;a.icon.h=13}c.push('<div style="width:'+(a.icon.w-2)+"px; height: "+a.icon.h+'px; overflow: hidden;float: left;">');c.push('<img src="'+HTTP_HOST+a.icon.name+'" style="height:'+a.icon.h+'px;" alt="" title="" />');c.push("</div>")}c.push(a.name);if(iADMIN){c.push(" ("+a.location_id+")")}c.push("</li>")}c.push("</ul></dd>")}c.push("</dl>");if(iADMIN){c.push("<b>ID: "+this.data.id+", "+this.data.map_data_id+"</b>")}return c.join("")};Marker.prototype.tooltipNotify=function(a){if(a){if(this.tTitle!=""){bmTooltip.init(this.tTitle,this.tBody)}var b=document.getElementById(this._div_id);if(b){this.zIndex=b.style.zIndex;b.style.zIndex="5000";b.style.backgroundPosition="100% 0"}}else{if(this.tTitle!=""){bmTooltip.clear()}var b=document.getElementById(this._div_id);if(b){b.style.zIndex=this.zIndex;b.style.backgroundPosition="0 0";this.zIndex=null}}};Marker.prototype.mouseOver=function(){this.me.tooltipNotify(true)};Marker.prototype.mouseOut=function(){this.me.tooltipNotify(false)};Marker.prototype.show=function(){if(!this.hidden){return}this.hidden=false;if(this._div_id!=""){var a=document.getElementById(this._div_id);if(a){a.style.display="";if(typeof a.marker=="undefined"){a.marker=this}}}};Marker.prototype.hide=function(){if(this.hidden){return}this.hidden=true;if(this._div_id!=""){var a=document.getElementById(this._div_id);if(a){a.style.display="none"}}};Marker.prototype.move=function(a,c){this._div_x=a;this._div_y=c;if(this._div_id!=""){var b=document.getElementById(this._div_id);if(b){b.style.left=a+"px";b.style.top=c+"px"}}};Marker.prototype.getContent=function(){return""};function Label(a){this.parent.constructor.call(this,a,a.className)}Label.prototype=new Marker();Label.prototype.constructor=Label;Label.prototype.parent=Marker.prototype;Label.prototype.getContent=function(){var h="black";var c="white";var g="";var a=this.data.name.length/2;this.tTitle="";this.tBody="";var e=2;var f="white";switch(this.data.rec_type){case 6:break;case 7:this.zIndex="56";e="56";f="#"+this.data.mob_color;break;case 8:break;case 9:this.zIndex="56";e="56";break;case 10:default:break}var d='<span style="position: absolute; left: -'+Math.floor(a/2)+"em; top: -.55em; width: "+a+"em; text-align: center; z-index: 1; color: "+h+';"><nobr>'+this.data.name+"</nobr></span>";var b='<span style="position: absolute; left: -'+Math.floor(a/2)+"em; top: -.55em; margin-left: -1px; margin-top: -1px; width: "+a+"em; text-align: center; z-index:"+e+"; color: "+f+';"><nobr>'+this.data.name+"</nobr></span>";return d+b};