/*	Networkcar confidential and proprietary.
*	Copyright 2009 Networkcar, Inc. All rights reserved.
*	Author: Chaz Watson
*/
function Landmark(F,D,G,H,B,E,I,C,A){this.stage=null;this.dirty=true;this.num=F;this.id="LM"+F;CONST_PINTYPE_DEFAULT="0";CONST_PINTYPE_STICKY="1";if(D==""){D=CONST_PINTYPE_DEFAULT}this.pinType=D;this.lid=G;this.lat=H;this.lon=B;this.img=E;this.imgBlank="/Images/1.gif";this._LABLBASE="/networkcar/timg/";this.label=I;this.msg=C;this.includeMe=true;this.onStage=false;Landmark.prototype.createPin=function(){var L=new Position(this.lat,this.lon);var K=new Icon(this.img,11,11,21,21);var J=new Pin(L,this.msg,"mouseover",K);J.setId(this.id);J.setNCObject(this);EventRegistry.addListener(J,"rightclick",this.eventRightClick);EventRegistry.addListener(J,"dblclick",this.eventDoubleClick);return J};Landmark.prototype.createPinLabel=function(){var M=new Position(this.lat,this.lon);var L=new TextOverlay("<div style='position: absolute; width: 200px; height: 0px; align: center;'><table align=center style='background-color: FFFFFF; filter: alpha(opacity=80); opacity: .80; border-width: 1px; border-style: solid; border-color: gray; border-collapse: collapse;' id='vehicleLabel'><tr><td style='padding: 0 4 0 5;'><b>"+this.label+"</b></td</tr></table></div>",0,0);var K=new Icon(this.imgBlank,101,-11,200,25,L);var J=new Pin(M,"","",K);J.setId("L"+this.id);return J};Landmark.prototype.eventRightClick=function(K){var O=K.getNCObject();if(O.pinType!=CONST_PINTYPE_STICKY){var J=_temp_MousePosX-Utilities.getAbsoluteLeft(_divMap);var N=_temp_MousePosY-Utilities.getAbsoluteTop(_divMap);var M=new Array();var L=0;if(_showFullRightClickMenu&&_hasLndmrkGeofencePriv){M[L++]=new MenuItem("Landmark Profile","/networkcar/ted/flltlndmrk?landmarkId="+O.lid);M[L++]=new MenuItem("Edit Landmark","/networkcar/ted/fllteditlndmrk?landmarkId="+O.lid)}_stage.createPopupMenu(K,J,N,M)}};Landmark.prototype.eventDoubleClick=function(J){_stage.map.centerOnPosition(J.getPosition(),_stage.map.getZoomController().zoomInOneLevel())};Landmark.prototype.getStage=function(){return this.stage};Landmark.prototype.setStage=function(J){this.stage=J;updatePin()};Landmark.prototype.getLat=function(){return this.lat};Landmark.prototype.setLat=function(J){this.lat=J;this.dirty=true;updatePin()};Landmark.prototype.getLon=function(){return this.lon};Landmark.prototype.setLon=function(J){this.lon=J;this.dirty=true;updatePin()};Landmark.prototype.getImg=function(){return this.img};Landmark.prototype.setImg=function(J){this.img=J;this.dirty=true;updatePin()};Landmark.prototype.getLabel=function(){return this.label};Landmark.prototype.setLabel=function(J){this.label=J;this.dirty=true;updatePin()};Landmark.prototype.getMsg=function(){return this.msg};Landmark.prototype.setMsg=function(J){this.msg=J;this.dirty=true;updatePin()};Landmark.prototype.update=function(){};Landmark.prototype.getPin=function(){return this.pin};Landmark.prototype.hide=function(){this.includeMe=false};Landmark.prototype.show=function(){this.includeMe=true};Landmark.prototype.included=function(){return this.includeMe}};