/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.dijit.InfoWindowLite"],["require","esri.InfoWindowBase"],["require","esri.utils"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.dijit.InfoWindowLite"]){_4._hasResource["esri.dijit.InfoWindowLite"]=true;_4.provide("esri.dijit.InfoWindowLite");_4.require("esri.InfoWindowBase");_4.require("esri.utils");_4.declare("esri.dijit.InfoWindow",[esri.InfoWindowBase],{constructor:function(_7,_8){_4.mixin(this,_7);var _9=(this.domNode=_4.byId(_8));_9.id=this.id||_5.getUniqueId(this.declaredClass);_4.addClass(_9,"simpleInfoWindow");this._title=_4.create("div",{"class":"title"},_9);this._content=_4.create("div",{"class":"content"},_9);this._close=_4.create("div",{"class":"close"},_9);},domNode:null,anchor:"upperright",fixedAnchor:null,coords:null,isShowing:true,width:250,height:150,title:"Info Window",_bufferWidth:10,_bufferHeight:10,startup:function(){this._anchors=[esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT,esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT,esri.dijit.InfoWindow.ANCHOR_LOWERLEFT,esri.dijit.InfoWindow.ANCHOR_UPPERLEFT];this.resize(this.width,this.height);this.hide();this._closeConnect=_4.connect(this._close,"onclick",this,this.hide);},destroy:function(){if(this.isShowing){this.hide();}this.destroyDijits(this._title);this.destroyDijits(this._content);_4.disconnect(this._closeConnect);_4.destroy(this.domNode);this.domNode=this._title=this._content=this._anchors=this._closeConnect=null;},setTitle:function(_a){if(!_a){_4.addClass(this._title,"empty");}else{_4.removeClass(this._title,"empty");}this.destroyDijits(this._title);this.__setValue("_title",_a);return this;},setContent:function(_b){if(!_b){_4.addClass(this._title,"empty");}else{_4.removeClass(this._title,"empty");}this.destroyDijits(this._content);this.__setValue("_content",_b);return this;},setFixedAnchor:function(_c){if(_c&&_4.indexOf(this._anchors,_c)===-1){return;}this.fixedAnchor=_c;if(this.isShowing){this.show(this.mapCoords||this.coords,_c);}this.onAnchorChange(_c);},show:function(_d,_e){if(!_d){return;}if(_d.spatialReference){this.mapCoords=_d;_d=this.coords=this.map.toScreen(_d,true);}else{this.mapCoords=null;this.coords=_d;}if(!_e||_4.indexOf(this._anchors,_e)===-1){_e=this.map.getInfoWindowAnchor(_d);}_e=(this.anchor=this.fixedAnchor||_e);esri.show(this.domNode);this._adjustContentArea();this._adjustPosition(_d,_e);this.isShowing=true;if(!arguments[2]){this.onShow();}},hide:function(){esri.hide(this.domNode);this.isShowing=false;if(!arguments[1]){this.onHide();}},move:function(_f,_10){if(_10){_f=this.coords.offset(_f.x,_f.y);}else{this.coords=_f;if(this.mapCoords){this.mapCoords=this.map.toMap(_f);}}this._adjustPosition(_f,this.anchor);},resize:function(_11,_12){this.width=_11;this.height=_12;_4.style(this.domNode,{width:_11+"px",height:_12+"px"});_4.style(this._close,{left:(_11-2)+"px",top:"-12px"});this._adjustContentArea();if(this.coords){this._adjustPosition(this.coords,this.anchor);}this.onResize(_11,_12);},onShow:function(){this.__registerMapListeners();this.startupDijits(this._title);this.startupDijits(this._content);},onHide:function(){this.__unregisterMapListeners();},onResize:function(){},onAnchorChange:function(){},_adjustContentArea:function(){var box=_4.contentBox(this.domNode);var _13=_4.coords(this._title);var _14=_4.coords(this._content);var _15=_4.contentBox(this._content);var _16=_14.h-_15.h;_4.style(this._content,{height:(box.h-_13.h-_16)+"px"});},_adjustPosition:function(_17,_18){var _19=Math.round(_17.x),_1a=Math.round(_17.y);var _1b=this._bufferWidth,_1c=this._bufferHeight;var _1d=_4.coords(this.domNode);switch(_18){case esri.dijit.InfoWindow.ANCHOR_UPPERLEFT:_19-=(_1d.w+_1b);_1a-=(_1d.h+_1c);break;case esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT:_19+=_1b;_1a-=(_1d.h+_1c);break;case esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT:_19+=_1b;_1a+=_1c;break;case esri.dijit.InfoWindow.ANCHOR_LOWERLEFT:_19-=(_1d.w+_1b);_1a+=_1c;break;}_4.style(this.domNode,{left:_19+"px",top:_1a+"px"});}});_4.mixin(esri.dijit.InfoWindow,{ANCHOR_UPPERRIGHT:"upperright",ANCHOR_LOWERRIGHT:"lowerright",ANCHOR_LOWERLEFT:"lowerleft",ANCHOR_UPPERLEFT:"upperleft"});}}};});