function EventUtils(){throw"RuntimeException: EventUtils is a static utility class and may not be instantiated";}EventUtils.addEventListener=function(a,b,c,e){var d=!0;a.addEventListener?a.addEventListener(b,c,e):a.attachEvent?d=a.attachEvent("on"+b,c,e):a["on"+b]=c;return d};EventUtils.findTarget=function(a,b){var c;c=window.event?window.event.srcElement:a?a.target:window;!b&&3==c.nodeType&&(c=c.parentNode);return c}; EventUtils.getMousePosition=function(a){var b=0,c=0;a||(a=window.event);if(a.pageX||a.pageY)b=a.pageX,c=a.pageY;else if(a.clientX||a.clientY)b=a.clientX+document.body.scrollLeft,c=a.clientY+document.body.scrollTop;return{x:b,y:c}};function TextSelectionEvent(a,b){this.selectedText=a;this.x=b.x;this.y=b.y};function PanoJS(a,b){this.viewerMovedListeners=[];this.viewerZoomedListeners=[];this.viewer="string"==typeof a?document.getElementById(a):a;"undefined"==typeof b&&(b={});this.tileUrlProvider="undefined"!=typeof b.tileUrlProvider&&PanoJS.isInstance(b.tileUrlProvider,PanoJS.TileUrlProvider)?b.tileUrlProvider:new PanoJS.TileUrlProvider(b.tileBaseUri?b.tileBaseUri:PanoJS.TILE_BASE_URI,b.tilePrefix?b.tilePrefix:PanoJS.TILE_PREFIX,b.tileExtension?b.tileExtension:PanoJS.TILE_EXTENSION);this.tileSize=b.tileSize? b.tileSize:PanoJS.TILE_SIZE;this.zoomLevel="undefined"==typeof b.initialZoom?-1:parseInt(b.initialZoom);this.maxZoomLevel="undefined"==typeof b.maxZoom?0:Math.abs(parseInt(b.maxZoom));this.zoomLevel>this.maxZoomLevel&&(this.zoomLevel=this.maxZoomLevel);this.initialPan=b.initialPan?b.initialPan:PanoJS.INITIAL_PAN;this.initialized=!1;this.well=this.surface=null;this.y=this.x=this.left=this.top=this.height=this.width=0;this.border=-1;this.mark={x:0,y:0};this.pressed=!1;this.tiles=[];this.cache={};var c= b.blankTile?b.blankTile:PanoJS.BLANK_TILE_IMAGE,e=b.loadingTile?b.loadingTile:PanoJS.LOADING_TILE_IMAGE;this.cache.blank=new Image;this.cache.blank.src=c;c!=e?(this.cache.loading=new Image,this.cache.loading.src=e):this.cache.loading=this.cache.blank;this.slideAcceleration=this.slideMonitor=this.moveCount=0;PanoJS.VIEWERS[PanoJS.VIEWERS.length]=this}PanoJS.PROJECT_NAME="PanoJS";PanoJS.PROJECT_VERSION="1.0.0";PanoJS.REVISION_FLAG="";PanoJS.SURFACE_STYLE_CLASS="surface";PanoJS.WELL_STYLE_CLASS="well"; PanoJS.CONTROLS_STYLE_CLASS="controls";PanoJS.TILE_STYLE_CLASS="tile";PanoJS.MSG_BEYOND_MIN_ZOOM="Cannot zoom out past the current level.";PanoJS.MSG_BEYOND_MAX_ZOOM="Cannot zoom in beyond the current level.";PanoJS.TILE_BASE_URI="tiles";PanoJS.TILE_PREFIX="tile-";PanoJS.TILE_EXTENSION="jpg";PanoJS.TILE_SIZE=256;PanoJS.BLANK_TILE_IMAGE="blank.gif";PanoJS.LOADING_TILE_IMAGE="blank.gif";PanoJS.INITIAL_PAN={x:0.5,y:0.5};PanoJS.USE_LOADER_IMAGE=!0;PanoJS.USE_SLIDE=!0;PanoJS.USE_KEYBOARD=!0; PanoJS.MOVE_THROTTLE=3;PanoJS.SLIDE_DELAY=40;PanoJS.SLIDE_ACCELERATION_FACTOR=5;PanoJS.DOM_ONLOAD=0<=navigator.userAgent.indexOf("KHTML")?!1:!0;PanoJS.GRAB_MOUSE_CURSOR=0<=navigator.userAgent.search(/KHTML|Opera/i)?"pointer":document.attachEvent?"url(grab.cur)":"-moz-grab";PanoJS.GRABBING_MOUSE_CURSOR=0<=navigator.userAgent.search(/KHTML|Opera/i)?"move":document.attachEvent?"url(grabbing.cur)":"-moz-grabbing";PanoJS.VIEWERS=[]; PanoJS.isInstance=function(a,b){for(;null!=a;){if(a==b.prototype)return!0;a=a.__proto__}return!1}; PanoJS.prototype={fitToWindow:function(a){if("number"!=typeof a||0>a)a=0;this.border=a;var b=0,c=0;window.innerWidth?(b=window.innerWidth,c=window.innerHeight):(b="CSS1Compat"==document.compatMode?document.documentElement.clientWidth:document.body.clientWidth,c="CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight);b=Math.max(b-2*a,0);c=Math.max(c-2*a,0);b%2&&b--;c%2&&c--;this.width=b;this.height=c;this.viewer.style.width=this.width+"px";this.viewer.style.height= this.height+"px";this.viewer.style.top=a+"px";this.viewer.style.left=a+"px"},init:function(){document.attachEvent&&(document.body.ondragstart=function(){return!1});0==this.width&&0==this.height&&(this.width=this.viewer.offsetWidth,this.height=this.viewer.offsetHeight);var a=this.tileSize;if(0<=this.zoomLevel&&this.zoomLevel<=this.maxZoomLevel)a=this.tileSize*Math.pow(2,this.zoomLevel);else{this.zoomLevel=-1;a=this.tileSize/2;do this.zoomLevel+=1,a*=2;while(a this.maxZoomLevel){var b=this.zoomLevel-this.maxZoomLevel;this.zoomLevel=this.maxZoomLevel;a/=Math.pow(2,b)}}this.x=Math.floor((a-this.width)*-this.initialPan.x);this.y=Math.floor((a-this.height)*-this.initialPan.y);for(a=this.viewer;a;a=a.offsetParent)this.top+=a.offsetTop,this.left+=a.offsetLeft;for(a=this.viewer.firstChild;a;a=a.nextSibling)if(a.className==PanoJS.SURFACE_STYLE_CLASS)this.surface=a,a.backingBean=this;else if(a.className==PanoJS.WELL_STYLE_CLASS)this.well=a,a.backingBean=this;else if(a.className== PanoJS.CONTROLS_STYLE_CLASS)for(b=a.firstChild;b;b=b.nextSibling)b.className&&(b.onclick=PanoJS[b.className+"Handler"]);this.viewer.backingBean=this;this.surface.style.cursor=PanoJS.GRAB_MOUSE_CURSOR;this.prepareTiles();this.initialized=!0},prepareTiles:function(){for(var a=Math.ceil(this.height/this.tileSize)+1,b=Math.ceil(this.width/this.tileSize)+1,c=0;cthis.width){do d.xIndex-=this.tiles.length,d.posx=d.xIndex*this.tileSize+this.x+a.x;while(d.posx>this.width);0>d.posx+this.tileSize&&(g=!1)}else{for(;d.posx<-this.tileSize;)d.xIndex+=this.tiles.length,d.posx=d.xIndex*this.tileSize+this.x+a.x;d.posx>this.width&&(g=!1)}if(d.posy>this.height){do d.yIndex-=this.tiles[c].length,d.posy=d.yIndex*this.tileSize+this.y+a.y;while(d.posy>this.height);0>d.posy+this.tileSize&&(g=!1)}else{for(;d.posy<-this.tileSize;)d.yIndex+= this.tiles[c].length,d.posy=d.yIndex*this.tileSize+this.y+a.y;d.posy>this.height&&(g=!1)}this.initialized||(this.assignTileImage(d,!0),d.element.style.top=d.posy+"px",d.element.style.left=d.posx+"px");g&&this.assignTileImage(d);d.element.style.top=d.posy+"px";d.element.style.left=d.posx+"px"}b&&(this.x+=a.x,this.y+=a.y)},assignTileImage:function(a,b){var c,e,d=b?!0:!1;if(!d){e=0>a.xIndex;var g=0>a.yIndex,j=a.xIndex>=Math.pow(2,this.zoomLevel),l=a.yIndex>=Math.pow(2,this.zoomLevel);if(g||e||l||j)d= !0}d?(c="blank:"+a.qx+":"+a.qy,e=this.cache.blank.src):c=e=this.tileUrlProvider.assembleUrl(a.xIndex,a.yIndex,this.zoomLevel);null!=a.element&&(null!=a.element.parentNode&&a.element.relativeSrc!=e)&&this.well.removeChild(a.element);var f=this.cache[c];null==f&&(f=this.cache[c]=this.createPrototype(e));if(d||!PanoJS.USE_LOADER_IMAGE||f.complete||f.image&&f.image.complete)f.onload=function(){},f.image&&(f.image.onload=function(){}),null==f.parentNode&&(a.element=this.well.appendChild(f));else{var d= "loading:"+a.qx+":"+a.qy,h=this.cache[d];null==h&&(h=this.cache[d]=this.createPrototype(this.cache.loading.src));h.targetSrc=c;var k=this.well;a.element=k.appendChild(h);f.onload=function(){h.parentNode&&h.targetSrc==c&&(f.style.top=h.style.top,f.style.left=h.style.left,k.replaceChild(f,h),a.element=f);f.onload=function(){};return!1};PanoJS.DOM_ONLOAD||(f.image=new Image,f.image.onload=f.onload,f.image.src=f.src)}},createPrototype:function(a){var b=document.createElement("img");b.src=a;b.relativeSrc= a;b.className=PanoJS.TILE_STYLE_CLASS;b.style.width=this.tileSize+"px";b.style.height=this.tileSize+"px";return b},addViewerMovedListener:function(a){this.viewerMovedListeners.push(a)},addViewerZoomedListener:function(a){this.viewerZoomedListeners.push(a)},notifyViewerZoomed:function(){for(var a=100/(this.maxZoomLevel+1)*(this.zoomLevel+1),b=0;bthis.zoomLevel+a)PanoJS.MSG_BEYOND_MIN_ZOOM&&alert(PanoJS.MSG_BEYOND_MIN_ZOOM);else if(this.zoomLevel+a>this.maxZoomLevel)PanoJS.MSG_BEYOND_MAX_ZOOM&&alert(PanoJS.MSG_BEYOND_MAX_ZOOM);else{this.blank();var b=Math.floor(this.width/2),c=Math.floor(this.height/2),e=c-this.y,d=Math.floor((b-this.x)* Math.pow(2,a)),e=Math.floor(e*Math.pow(2,a));this.x=b-d;this.y=c-e;this.zoomLevel+=a;this.positionTiles();this.notifyViewerZoomed()}},clear:function(){this.blank();this.initialized=!1;this.tiles=[]},blank:function(){for(imgId in this.cache){var a=this.cache[imgId];a.onload=function(){};a.image&&(a.image.onload=function(){});null!=a.parentNode&&this.well.removeChild(a)}},moveViewer:function(a){this.positionTiles({x:a.x-this.mark.x,y:a.y-this.mark.y});this.notifyViewerMoved(a)},recenter:function(a, b){b&&(a.x+=this.x,a.y+=this.y);var c={x:Math.floor(this.width/2-a.x),y:Math.floor(this.height/2-a.y)};if(!(0==c.x&&0==c.y)){if(PanoJS.USE_SLIDE){var e,d;0==c.x?(e=0,d=this.slideAcceleration):(d=Math.abs(c.y/c.x),e=Math.round(Math.pow(Math.pow(this.slideAcceleration,2)/(1+Math.pow(d,2)),0.5)),d=Math.round(d*e));c={x:Math.min(e,Math.abs(c.x))*(0>c.x?-1:1),y:Math.min(d,Math.abs(c.y))*(0>c.y?-1:1)}}this.positionTiles(c,!0);this.notifyViewerMoved();if(PanoJS.USE_SLIDE){var g={x:a.x+c.x,y:a.y+c.y},j=this; this.slideAcceleration+=PanoJS.SLIDE_ACCELERATION_FACTOR;this.slideMonitor=setTimeout(function(){j.recenter(g)},PanoJS.SLIDE_DELAY)}}},resize:function(){if(this.initialized){var a=this.viewer.offsetWidth,b=this.viewer.offsetHeight;this.viewer.style.display="none";this.clear();var c=Math.floor(this.width/2),e=Math.floor(this.height/2);0<=this.border?this.fitToWindow(this.border):(this.width=a,this.height=b);this.prepareTiles();a=Math.floor(this.width/2);b=Math.floor(this.height/2);0<=this.border&& (this.x+=a-c,this.y+=b-e);this.positionTiles();this.viewer.style.display="";this.initialized=!0;this.notifyViewerMoved()}},resolveCoordinates:function(a){return{x:(a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))-this.left,y:(a.pageY||a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))-this.top}},press:function(a){this.activate(!0);this.mark=a},release:function(a){this.activate(!1);var b=a.y-this.mark.y;this.x+=a.x-this.mark.x;this.y+=b;this.mark= {x:0,y:0}},activate:function(a){this.pressed=a;this.surface.style.cursor=a?PanoJS.GRABBING_MOUSE_CURSOR:PanoJS.GRAB_MOUSE_CURSOR;this.surface.onmousemove=a?PanoJS.mouseMovedHandler:function(){}},pointExceedsBoundaries:function(a){return a.xthis.tileSize*Math.pow(2,this.zoomLevel)+this.x||a.y>this.tileSize*Math.pow(2,this.zoomLevel)+this.y},resetSlideMotion:function(){0!=this.slideMonitor&&(clearTimeout(this.slideMonitor),this.slideMonitor=0);this.slideAcceleration=0}}; PanoJS.TileUrlProvider=function(a,b,c){this.baseUri=a;this.prefix=b;this.extension=c};PanoJS.TileUrlProvider.prototype={assembleUrl:function(a,b,c){return this.baseUri+"/"+this.prefix+c+"-"+a+"-"+b+"."+this.extension+(PanoJS.REVISION_FLAG?"?r="+PanoJS.REVISION_FLAG:"")}};PanoJS.mousePressedHandler=function(a){a=a?a:window.event;if(2>a.button){var b=this.backingBean,c=b.resolveCoordinates(a);b.pointExceedsBoundaries(c)?a.cancelBubble=!0:b.press(c)}return!1}; PanoJS.mouseReleasedHandler=function(a){a=a?a:window.event;var b=this.backingBean;b.pressed&&b.release(b.resolveCoordinates(a))};PanoJS.mouseMovedHandler=function(a){a=a?a:window.event;var b=this.backingBean;b.moveCount++;0==b.moveCount%PanoJS.MOVE_THROTTLE&&b.moveViewer(b.resolveCoordinates(a))};PanoJS.zoomInHandler=function(){this.parentNode.parentNode.backingBean.zoom(1);return!1};PanoJS.zoomOutHandler=function(){this.parentNode.parentNode.backingBean.zoom(-1);return!1}; PanoJS.doubleClickHandler=function(a){a=a?a:window.event;var b=this.backingBean;coords=b.resolveCoordinates(a);b.pointExceedsBoundaries(coords)||(b.resetSlideMotion(),b.recenter(coords))}; PanoJS.keyboardMoveHandler=function(a){a=a?a:window.event;for(var b=0;bzoomLevel&&256*metersPerPixel[zoomLevel]>a.coords.accuracy;zoomLevel++);zoomLevel!=findOnMap.viewerBean.zoomLevel&&(b=!0);findOnMap.viewerBean.zoomLevel=zoomLevel}!0==b&&findOnMap.viewerBean.notifyViewerZoomed();"undefined"!=typeof findOnMap.marker&&new findOnMap.marker("GPS",lat,lon,findOnMap,!0,a.coords.accuracy); fullSize=findOnMap.viewerBean.tileSize*Math.pow(2,findOnMap.viewerBean.zoomLevel);x=Math.floor(findOnMap.lon2pan(lon)*fullSize);y=Math.floor(findOnMap.lat2pan(lat)*fullSize);findOnMap.viewerBean.recenter({x:x,y:y},!0);return!1};var findOnMap=null,watchId=!1,metersPerPixel=[156412,78206,39103,19551,9776,4888,2444,1222,611,305,153,76,38,19,10,5,2,1,0.6];touchMapLite.prototype.MARKERS=[];touchMapLite.prototype.placeMarkerHandler=function(){var a;a=this.currentLonLat(this.viewerBean);new this.marker("GPS",a.y,a.x,this,!0)}; touchMapLite.prototype.getMarkersFormUrlParams=function(){var a,b,c,e,d;if(window.location.href.split("?")[1]){a=window.location.href.split("?")[1].split("&");for(b=0;b"+this.marker.lat+",
"+this.marker.lon;a.setAttribute("class","bubble");a.onmouseup=function(){this.parentNode.marker.hideBubbles();return!1};return!1}},updateMarker:function(a){var b;this.element&&(b=a.y+this.y,a=a.x+this.x,0<=b&&b