if(!dojo._hasResource["dijit.Menu"]){
dojo._hasResource["dijit.Menu"]=true;
dojo.provide("dijit.Menu");
dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){
this._bindings=[];
},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){
if(this.contextMenuForWindow){
this.bindDomNode(dojo.body());
}else{
dojo.forEach(this.targetNodeIds,this.bindDomNode,this);
}
this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);
},startup:function(){
dojo.forEach(this.getChildren(),function(_1){
_1.startup();
});
this.startupKeyNavChildren();
},onExecute:function(){
},onCancel:function(_2){
},_moveToPopup:function(_3){
if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
this.focusedChild._onClick(_3);
}
},_onKeyPress:function(_4){
if(_4.ctrlKey||_4.altKey){
return;
}
switch(_4.keyCode){
case dojo.keys.RIGHT_ARROW:
this._moveToPopup(_4);
dojo.stopEvent(_4);
break;
case dojo.keys.LEFT_ARROW:
if(this.parentMenu){
this.onCancel(false);
}else{
dojo.stopEvent(_4);
}
break;
}
},onItemHover:function(_5){
this.focusChild(_5);
if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){
this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);
}
},_onChildBlur:function(_6){
dijit.popup.close(_6.popup);
_6._blur();
this._stopPopupTimer();
},onItemUnhover:function(_7){
},_stopPopupTimer:function(){
if(this.hover_timer){
clearTimeout(this.hover_timer);
this.hover_timer=null;
}
},_getTopMenu:function(){
for(var _8=this;_8.parentMenu;_8=_8.parentMenu){
}
return _8;
},onItemClick:function(_9){
if(_9.disabled){
return false;
}
if(_9.popup){
if(!this.is_open){
this._openPopup();
}
}else{
this.onExecute();
_9.onClick();
}
},_iframeContentWindow:function(_a){
var _b=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_a))||dijit.Menu._iframeContentDocument(_a)["__parent__"]||(_a.name&&document.frames[_a.name])||null;
return _b;
},_iframeContentDocument:function(_c){
var _d=_c.contentDocument||(_c.contentWindow&&_c.contentWindow.document)||(_c.name&&document.frames[_c.name]&&document.frames[_c.name].document)||null;
return _d;
},bindDomNode:function(_e){
_e=dojo.byId(_e);
var _f=dijit.getDocumentWindow(_e.ownerDocument);
if(_e.tagName.toLowerCase()=="iframe"){
_f=this._iframeContentWindow(_e);
_e=dojo.withGlobal(_f,dojo.body);
}
var cn=(_e==dojo.body()?dojo.doc:_e);
_e[this.id]=this._bindings.push([dojo.connect(cn,"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);
},unBindDomNode:function(_11){
var _12=dojo.byId(_11);
var bid=_12[this.id]-1,b=this._bindings[bid];
dojo.forEach(b,dojo.disconnect);
delete this._bindings[bid];
},_contextKey:function(e){
this._contextMenuWithMouse=false;
if(e.keyCode==dojo.keys.F10){
dojo.stopEvent(e);
if(e.shiftKey&&e.type=="keydown"){
var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};
_e.preventDefault=_e.stopPropagation=function(){
};
window.setTimeout(dojo.hitch(this,function(){
this._openMyself(_e);
}),1);
}
}
},_contextMouse:function(e){
this._contextMenuWithMouse=true;
},_openMyself:function(e){
dojo.stopEvent(e);
var x,y;
if(dojo.isSafari||this._contextMenuWithMouse){
x=e.pageX;
y=e.pageY;
}else{
var _1b=dojo.coords(e.target,true);
x=_1b.x+10;
y=_1b.y+10;
}
var _1c=this;
var _1d=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_1d);
dijit.popup.close(_1c);
};
dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});
this.focus();
this._onBlur=function(){
dijit.popup.close(this);
};
},onOpen:function(e){
this.isShowingNow=true;
},onClose:function(){
this._stopPopupTimer();
this.parentMenu=null;
this.isShowingNow=false;
this.currentPopup=null;
if(this.focusedChild){
this._onChildBlur(this.focusedChild);
this.focusedChild=null;
}
},_openPopup:function(){
this._stopPopupTimer();
var _1f=this.focusedChild;
var _20=_1f.popup;
if(_20.isShowingNow){
return;
}
_20.parentMenu=this;
var _21=this;
dijit.popup.open({parent:this,popup:_20,around:_1f.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_20);
_1f.focus();
_21.currentPopup=null;
}});
this.currentPopup=_20;
if(_20.focus){
_20.focus();
}
}});
dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\"><div class=\"dijitMenuItemIcon ${iconClass}\" dojoAttachPoint=\"iconNode\" ></div></td>"+"<td tabIndex=\"-1\" class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode\" waiRole=\"menuitem\"></td>"+"<td class=\"dijitReset\" dojoAttachPoint=\"arrowCell\">"+"<div class=\"dijitMenuExpand\" dojoAttachPoint=\"expand\" style=\"display:none\">"+"<span class=\"dijitInline dijitArrowNode dijitMenuExpandInner\">+</span>"+"</div>"+"</td>"+"</tr>",label:"",iconClass:"",disabled:false,postCreate:function(){
dojo.setSelectable(this.domNode,false);
this.setDisabled(this.disabled);
if(this.label){
this.containerNode.innerHTML=this.label;
}
},_onHover:function(){
this.getParent().onItemHover(this);
},_onUnhover:function(){
this.getParent().onItemUnhover(this);
},_onClick:function(evt){
this.getParent().onItemClick(this);
dojo.stopEvent(evt);
},onClick:function(){
},focus:function(){
dojo.addClass(this.domNode,"dijitMenuItemHover");
try{
dijit.focus(this.containerNode);
}
catch(e){
}
},_blur:function(){
dojo.removeClass(this.domNode,"dijitMenuItemHover");
},setDisabled:function(_23){
this.disabled=_23;
dojo[_23?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.containerNode,"disabled",_23?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _24=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_24[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(!this.popup){
var _25=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.popup=dijit.byNode(_25);
}
dojo.body().appendChild(this.popup.domNode);
this.popup.domNode.style.display="none";
dojo.addClass(this.expand,"dijitMenuExpandEnabled");
dojo.style(this.expand,"display","");
dijit.setWaiState(this.containerNode,"haspopup","true");
}});
dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){
dojo.setSelectable(this.domNode,false);
},isFocusable:function(){
return false;
}});
}
if(!dojo._hasResource["dijit.form._FormWidget"]){
dojo._hasResource["dijit.form._FormWidget"]=true;
dojo.provide("dijit.form._FormWidget");
dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",value:"",name:"",id:"",alt:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),setDisabled:function(_26){
this.domNode.disabled=this.disabled=_26;
if(this.focusNode){
this.focusNode.disabled=_26;
}
if(_26){
this._hovering=false;
this._active=false;
}
dijit.setWaiState(this.focusNode||this.domNode,"disabled",_26);
this._setStateClass();
},_onMouse:function(_27){
var _28=_27.target;
if(_28&&_28.getAttribute){
this.stateModifier=_28.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_27.type){
case "mouseenter":
case "mouseover":
this._hovering=true;
break;
case "mouseout":
case "mouseleave":
this._hovering=false;
break;
case "mousedown":
this._active=true;
var _29=this;
var _2a=this.connect(dojo.body(),"onmouseup",function(){
_29._active=false;
_29._setStateClass();
_29.disconnect(_2a);
});
break;
}
this._setStateClass();
}
},isFocusable:function(){
return !this.disabled&&(dojo.style(this.domNode,"display")!="none");
},focus:function(){
dijit.focus(this.focusNode);
},_setStateClass:function(){
if(!("staticClass" in this)){
this.staticClass=(this.stateNode||this.domNode).className;
}
var _2b=[this.baseClass];
function multiply(_2c){
_2b=_2b.concat(dojo.map(_2b,function(c){
return c+_2c;
}));
};
if(this.checked){
multiply("Checked");
}
if(this.state){
multiply(this.state);
}
if(this.selected){
multiply("Selected");
}
if(this.disabled){
multiply("Disabled");
}else{
if(this._active){
multiply(this.stateModifier+"Active");
}else{
if(this._focused){
multiply("Focused");
}
if((this.stateModifier||!this._focused)&&this._hovering){
multiply(this.stateModifier+"Hover");
}
}
}
(this.stateNode||this.domNode).className=this.staticClass+" "+_2b.join(" ");
},onChange:function(_2e){
},postCreate:function(){
this.setValue(this.value,null);
this.setDisabled(this.disabled);
this._setStateClass();
},setValue:function(_2f,_30){
this._lastValue=_2f;
dijit.setWaiState(this.focusNode||this.domNode,"valuenow",this.forWaiValuenow());
if(_30===undefined){
_30=true;
}
if(this._lastValueReported==undefined&&_30===null){
this._lastValueReported=_2f;
}
if((this.intermediateChanges||_30)&&((_2f&&_2f.toString)?_2f.toString():_2f)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
this._lastValueReported=_2f;
this.onChange(_2f);
}
},getValue:function(){
return this._lastValue;
},undo:function(){
this.setValue(this._lastValueReported,false);
},_onKeyPress:function(e){
if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){
var v=this.getValue();
var lv=this._lastValueReported;
if((typeof lv!="undefined")&&((v!==null&&v.toString)?v.toString():null)!==lv.toString()){
this.undo();
dojo.stopEvent(e);
return false;
}
}
return true;
},forWaiValuenow:function(){
return this.getValue();
}});
}
if(!dojo._hasResource["dijit.form.Button"]){
dojo._hasResource["dijit.form.Button"]=true;
dojo.provide("dijit.form.Button");
dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<div class=\"dijit dijitLeft dijitInline dijitButton\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><div class='dijitRight'\n\t\t><button class=\"dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><span class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t\t><span class=\"dijitToggleButtonIconChar\">&#10003</span \n\t\t\t></span\n\t\t\t><span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span\n\t\t></button\n\t></div\n></div>\n",_onClick:function(e){
if(this.disabled){
return false;
}
this._clicked();
return this.onClick(e);
},_onButtonClick:function(e){
dojo.stopEvent(e);
var _36=this._onClick(e)!==false;
if(this.type=="submit"&&_36){
for(var _37=this.domNode;_37;_37=_37.parentNode){
var _38=dijit.byNode(_37);
if(_38&&_38._onSubmit){
_38._onSubmit(e);
break;
}
if(_37.tagName.toLowerCase()=="form"){
if(!_37.onsubmit||_37.onsubmit()){
_37.submit();
}
break;
}
}
}
},postCreate:function(){
if(this.showLabel==false){
var _39="";
this.label=this.containerNode.innerHTML;
_39=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);
this.titleNode.title=_39;
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_3c){
this.containerNode.innerHTML=this.label=_3c;
if(dojo.isMozilla){
var _3d=dojo.getComputedStyle(this.domNode).display;
this.domNode.style.display="none";
var _3e=this;
setTimeout(function(){
_3e.domNode.style.display=_3d;
},1);
}
if(this.showLabel==false){
this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);
}
}});
dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<div class=\"dijit dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><div class='dijitRight'>\n\t<button class=\"dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div\n\t\t><span class=\"dijitButtonText\" \tdojoAttachPoint=\"containerNode,popupStateNode\"\n\t\tid=\"${id}_label\">${label}</span\n\t\t><span class='dijitA11yDownArrow'>&#9660;</span>\n\t</button>\n</div></div>\n",_fillContent:function(){
if(this.srcNodeRef){
var _3f=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_3f[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(!this.dropDown){
var _40=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_40);
delete this.dropDownContainer;
}
dojo.body().appendChild(this.dropDown.domNode);
this.dropDown.domNode.style.display="none";
},_onArrowClick:function(e){
if(this.disabled){
return;
}
this._toggleDropDown();
},_onDropDownClick:function(e){
var _43=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_43||e.detail!=0||this._seenKeydown){
this._onArrowClick(e);
}
this._seenKeydown=false;
},_onDropDownKeydown:function(e){
this._seenKeydown=true;
},_onDropDownBlur:function(e){
this._seenKeydown=false;
},_onKey:function(e){
if(this.disabled){
return;
}
if(e.keyCode==dojo.keys.DOWN_ARROW){
if(!this.dropDown||this.dropDown.domNode.style.display=="none"){
dojo.stopEvent(e);
return this._toggleDropDown();
}
}
},_onBlur:function(){
this._closeDropDown();
},_toggleDropDown:function(){
if(this.disabled){
return;
}
dijit.focus(this.popupStateNode);
var _47=this.dropDown;
if(!_47){
return false;
}
if(!_47.isShowingNow){
if(_47.href&&!_47.isLoaded){
var _48=this;
var _49=dojo.connect(_47,"onLoad",function(){
dojo.disconnect(_49);
_48._openDropDown();
});
_47._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _4a=this.dropDown;
var _4b=_4a.domNode.style.width;
var _4c=this;
dijit.popup.open({parent:this,popup:_4a,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){
_4c._closeDropDown(true);
},onCancel:function(){
_4c._closeDropDown(true);
},onClose:function(){
_4a.domNode.style.width=_4b;
_4c.popupStateNode.removeAttribute("popupActive");
this._opened=false;
}});
if(this.domNode.offsetWidth>_4a.domNode.offsetWidth){
var _4d=null;
if(!this.isLeftToRight()){
_4d=_4a.domNode.parentNode;
var _4e=_4d.offsetLeft+_4d.offsetWidth;
}
dojo.marginBox(_4a.domNode,{w:this.domNode.offsetWidth});
if(_4d){
_4d.style.left=_4e-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_4a.focus){
_4a.focus();
}
},_closeDropDown:function(_4f){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_4f){
this.focus();
}
this._opened=false;
}
}});
dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0'\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<tr>\n\t\t<td\tclass=\"dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"  dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\">\n\t\t\t<div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div>\n\t\t\t<span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span>\n\t\t</td>\n\t\t<td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t><div waiRole=\"presentation\">&#9660;</div>\n\t</td></tr>\n</table>\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:""}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){
this.inherited(arguments);
this._focalNodes=[this.titleNode,this.popupStateNode];
dojo.forEach(this._focalNodes,dojo.hitch(this,function(_50){
if(dojo.isIE){
this.connect(_50,"onactivate",this._onNodeFocus);
}else{
this.connect(_50,"onfocus",this._onNodeFocus);
}
}));
},focusFocalNode:function(_51){
this._focusedNode=_51;
dijit.focus(_51);
},hasNextFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[1];
},focusNext:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];
dijit.focus(this._focusedNode);
},hasPrevFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[0];
},focusPrev:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];
dijit.focus(this._focusedNode);
},getFocalNodes:function(){
return this._focalNodes;
},_onNodeFocus:function(evt){
this._focusedNode=evt.currentTarget;
},_onBlur:function(evt){
this.inherited(arguments);
this._focusedNode=null;
}});
dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,_clicked:function(evt){
this.setChecked(!this.checked);
},setChecked:function(_55){
this.checked=_55;
dijit.setWaiState(this.focusNode||this.domNode,"pressed",this.checked);
this._setStateClass();
this.onChange(_55);
}});
}
if(!dojo._hasResource["mq.widget.LocationListItem"]){
dojo._hasResource["mq.widget.LocationListItem"]=true;
dojo.provide("mq.widget.LocationListItem");
dojo.declare("mq.widget.LocationListItem",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"locationListItem\" id=\"location${strIndex}\" haslayout=\"true\">\n\t<div class=\"locDiv\" id=\"locDiv${strIndex}\">\n\t\t<div class=\"dirIcons\">\n\t\t\t${iconImage}\n\t\t</div>\n\t\t<div class=\"dirTextRt\">\n\t\t\t<span dojoAttachPoint=\"addressText\" class=\"h5\"></span>\n\t\t\t<ul class=\"gLinks\">\n\t\t\t\t<li dojoAttachPoint=\"websiteContainer\" class=\"firstli disn\"><a dojoAttachEvent=\"onclick: websiteHandler\">Website</a></li><li dojoAttachPoint=\"searchNearbyLi\"><a dojoAttachEvent=\"onclick: searchNearbyHandler\">Search Nearby</a></li><li><a dojoAttachEvent=\"onclick: zoomToStreetHandler\">Zoom to Street</a></li><li class=\"${stcClass}\"><a dojoAttachEvent=\"onclick: sendToCellHandler\">Send to Cell</a></li><li ${stoClass}><a dojoAttachEvent=\"onclick: sendToOnstarHandler\">Send to OnStar</a></li>\n\t\t\t</ul>\n\t\t\t<div id=\"mqar-locad${strIndex}\" class=\"mqar  mqar-prerender\">\n\t\t\t</div>\n\t\t\t<br/>\t\n\t\t</div>\n\t\t<div id=\"localDiv${strIndex}\" dojoAttachPoint=\"localLink\" class=\"localCity\">\n\t\t</div>\n\t\t<div class=\"locAlterDiv\">\n\t\t\t<div>\n\t\t\t\t<button class=\"btnSm\" alt=\"edit\" title=\"Edit this Location\" dojoAttachEvent=\"onclick: editHandler\">\n\t\t\t\t\t<div>Edit</div>\n\t\t\t\t</button>\n\t\t\t\t<button class=\"btnSm\" alt=\"remove\" title=\"Remove this Location\" dojoAttachPoint=\"removeImage\" dojoAttachEvent=\"onclick: removeHandler\">\n\t\t\t\t\t<div>Remove <img height=\"8\" width=\"8\" src=\"${imagePath}/btn-x.png\"/></div>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"padt4\">\n\t\t\t\t<button class=\"btnSm\" alt=\"move up\" title=\"Move Location Up\" dojoAttachPoint=\"upImage\" dojoAttachEvent=\"\">\n\t\t\t\t\t<div>Move Up <img height=\"5\" width=\"8\" src=\"${imagePath}/btn-arw_up_on.png\"/></div>\n\t\t\t\t</button>\n\t\t\t\t<button class=\"btnSm\" alt=\"move down\" title=\"Move Location Down\" dojoAttachPoint=\"downImage\" dojoAttachEvent=\"\">\n\t\t\t\t\t<div>Move Down <img height=\"5\" width=\"8\" src=\"${imagePath}/btn-arw_dwn_on.png\"/></div>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clearb\"></div>\n\t</div>\n\t<div id=\"locEditDiv${strIndex}\"></div>\n\t<div id=\"routeNarrative${strIndex}\"></div>\n</div>\n",strIndex:"0",position:0,listSize:0,location:null,imagePath:mqPrefix+"/cdn/images",iconPattern:"stop_{VAR}.png",stcClass:"",stoClass:"",markupFactory:function(_56,_57){
debug("MarkupFactory: "+_56.position);
_56.location=model.locations[_56.position].location;
_56.renderedOnServer=true;
debug(_56);
return new mq.widget.LocationListItem(_56,_57);
},buildRendering:function(){
debug("In build rendering:"+this.renderedOnServer);
if(!this.renderedOnServer){
this.inherited(arguments);
}
},postMixInProperties:function(){
debug("Position: "+this.position);
this.strIndex=""+(this.position);
icon=this.iconPattern.replace("{VAR}",this.position);
this.iconImage=mq.setImagePng24(this.imagePath+"/icons/"+icon,29,29);
debug("iconImage: "+this.iconImage);
this.showHideSTOLinks();
},postCreate:function(){
debug("PostCreate: "+this.position);
if(this.renderedOnServer){
this.upImage=$d("moveUp"+this.position);
this.downImage=$d("moveDown"+this.position);
this.handleListEvent();
return;
}
var sb=[];
if(this.location.name){
sb.push(this.location.name+"&nbsp;");
}
if(this.location.title){
sb.push(this.location.title+"&nbsp;");
}
if(this.location.addressLine1){
sb.push(this.location.addressLine1+",&nbsp;");
}
if(this.location.county){
if(!this.location.city&&!this.location.postalCode){
sb.push(this.location.county+"&nbsp;");
}
}
var sb2=[];
if(this.location.city){
sb2.push(this.location.city);
}
if(this.location.state){
if(this.location.city||this.location.county){
sb2.push(", ");
}
sb2.push(this.location.state+"&nbsp;");
}
if(this.location.postalCode){
if(this.location.city||this.location.state){
sb.push("  ");
}
sb2.push(this.location.postalCode+"&nbsp;");
}else{
if(this.location.city||this.location.state){
}
}
if(sb2.join("").length==0){
sb2.push(this.location.country+"&nbsp;");
}
sb.push(sb2.join(""));
if(sb.length>1&&sb[0]!="  "&&sb[0]!=""&&sb[1]!=""){
for(var i=1;i<sb.length;i++){
if(sb[i]!=""){
sb[i]="<span class=\"n\">"+sb[i]+"</span>";
}
}
}
if(this.location.phoneNumber){
sb.push("&nbsp;<span class=\"nowrap\">-&nbsp;"+mq.util.formatPhoneNumber(this.location.phoneNumber)+"&nbsp;</span>");
}
if(this.location.website){
this.websiteContainer.style.display="inline";
}else{
this.websiteContainer.style.display="none";
this.searchNearbyLi.className="firstli";
}
var sbS=sb.join("");
if(sbS.substring(sbS.length-5,sbS.length)=="<br/>"){
sbS=sbS.substring(0,sbS.length-5);
}
this.addressText.innerHTML=sbS;
this.showHideLocalLink();
this.handleListEvent();
},handleListEvent:function(){
if(this.listSize<2){
this.disableMoveButton(this.upImage);
this.disableMoveButton(this.downImage);
return;
}
if(this.position==0){
dojo.connect(this.downImage,"onclick",this,"moveDownHandler");
this.disableMoveButton(this.upImage);
}
if(this.position>0&&this.position<this.listSize-1){
dojo.connect(this.upImage,"onclick",this,"moveUpHandler");
dojo.connect(this.downImage,"onclick",this,"moveDownHandler");
}
if(this.position==(this.listSize-1)){
dojo.connect(this.upImage,"onclick",this,"moveUpHandler");
this.disableMoveButton(this.downImage);
}
},disableMoveButton:function(_5c){
_5c.style.filter="alpha(opacity=30)";
_5c.style.opacity=".30";
_5c.style.cursor="default";
},removeHandler:function(evt){
debug("Remove Location: "+this.position);
ua.a(":MQ08Delete");
this.onRemove(this.position);
},editHandler:function(evt){
this.onEdit(this.position);
},moveUpHandler:function(evt){
mq.showLoadingImage();
ua.a(":MQ08ReorderUp");
this.onMoveUp(this.position);
},moveDownHandler:function(evt){
mq.showLoadingImage();
ua.a(":MQ08ReorderDown");
this.onMoveDown(this.position);
},searchNearbyHandler:function(evt){
controller.clearBusinessLocator();
debug("searchNearbyHandler: "+this.location.city);
mq.showSearchNearby(evt.currentTarget,this.location);
},websiteHandler:function(evt){
ua.a(":MQ08Website");
var _63=this.location.website;
if(_63.indexOf("http:")==-1){
_63="http://"+_63;
}
mq.fullWindow(_63,"locationWebsite");
},zoomToStreetHandler:function(evt){
this.onZoomToStreet(this.location);
},sendToCellHandler:function(evt){
ua.a(":MQ08LOCS2C");
mq.showSTC(this.location);
},setLocation:function(loc){
this.location=loc;
},showHideSTOLinks:function(){
if(enableSTO){
this.stcClass="";
this.stoClass="class='lastli'";
}else{
this.stcClass="lastli";
this.stoClass="style='display:none;'";
}
},showHideLocalLink:function(){
if(enableLocal&&this.location.country=="US"){
this.localLink.style.display="block";
this.localLink.innerHTML="<a onclick=\"mq.goLocal("+this.position+",'MQ08DirNarrLocal');\"><img src=\""+mqPrefix+"/cdn/images/icon-local.png\" alt=\"MapQuest Local\" title=\"MapQuest Local\" height=\"19\" width=\"20\" /></a><div><a onclick=\"javascript:mq.goLocal("+this.position+",'MQ08DirNarrLocal');\">Local Information</a> <span>&raquo;</span><br/>See local events,<br/>movies, news &amp; more.</div>";
}else{
this.localLink.style.display="none";
this.localLink.innerHTML="";
}
},sendToOnstarHandler:function(evt){
var loc=this.location;
mq.dynamicRequire("mq.STO.onstar",function(){
mq.STO.onstar.initSTO(loc,"LOCATION");
});
}});
}
if(!dojo._hasResource["mq.widget.SendEmail"]){
dojo._hasResource["mq.widget.SendEmail"]=true;
dojo.provide("mq.widget.SendEmail");
dojo.declare("mq.widget.SendEmail",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"emailPopupWidth\" dojoattachpoint=\"wrapper\">\n  <div id=\"${id}DispContent\" style=\"display:block;\">\n\t<div class=\"popHead\">\n       <div class=\"fltl\"><h2>Email</h2></div>\n      <div class=\"fltr\"><button class=\"btnClose\" dojoAttachEvent='onclick:handleCancel'><span>close</span></button></div>\n    </div>  \n    <br/>\n\n\t<div style=\"display: none; background-image: none; background-color: transparent;\"\n    \t class=\"alert-warning\" id=\"mqpopup-errmsg\">\n\t  <img width=\"22\" height=\"22\" alt=\"warning\" src=\"http://img.mqcdn.com/mqsite2/icon-alert-expoint.gif\"/>\n\t\tInvalid Email Address\n\t</div>\n    \n    <div class=\"fltl\"><span class=\"b\">*To:</span><br/><br/><br/><span class=\"b\">*From:</span></div>\n    <div class=\"fltr\"><input type=\"text\" id=\"sendEmailTo\" style=\"width:175px;\" />\n        <br/><span class=\"caption\">Separate multiple emails with a space</span>\n        <br/><br/><input type=\"text\" id=\"sendEmailFrom\" style=\"width:175px;\" />\n\t       <br/><span class=\"caption\">Your email address (required)</span>\n   \t</div>\n\n    <div class=\"clearb\">\n\t        <span class=\"b\">Subject:</span><br/>\n\t        <input style=\"width:228px;\" type=\"text\" id=\"sendEmailSubject\" /><br/><br/>\n\t        <span class=\"b\">Comments:</span><br/>\n\t        <textarea style=\"width:228px;\" id=\"sendEmailComments\">${pageURL}</textarea><br/><br/>\n\t\t    <div style=\"text-align:center;\"><input type=\"button\" class=\"btn\" value=\"Send\"  dojoAttachEvent='onclick: handleAccept'/></div>\n    </div>\n      <br/>\n      <hr/>\n      <span class=\"b\">* = required fields</span><br/>\n  \t<div id=\"sendEmailPromo\" class=\"textc\" style=\"height:65px;\"></div>\n  </div> \n  <div id=\"${id}Confirmation\" style=\"display:none;\">\n   <div class=\"emailPopupWidth\">\n\t<div class=\"popHead\">\n\t\t<div class=\"fltl\"><h2>Email</h2></div>\n\t\t<div class=\"fltr\"><img src=\"${imagePath}/btn-close.png\" id=\"${id}XIcon\" alt=\"Close\" height=\"16\" width=\"16\" dojoAttachEvent='onclick: handleCancel'/></div>\n\t</div>\n\t<br/>\n\t<div class=\"b\">Congratulations!<br/><br/>\n      \tYour map and comments have been sent.<br/><br/>\n       Thank you for taking a moment to email a MapQuest map. We will make every effort to ensure that your map is received at the email addresses you provided.\n       <br/><br/>\n\t   <div class=\"textc\"><input type=\"button\" class=\"btn\" id=\"${id}CloseButton\" value=\"Close\" dojoAttachEvent='onclick: handleCancel'/></div>    \n\t</div>\n   </div>\n  </div>\n</div>\n",imagePath:mqPrefix+"/cdn/images",pageURL:"",handleAccept:function(){
this.acceptCallback();
},handleCancel:function(){
ua.a(":MQ08EmailClose");
},postCreate:function(){
var _69=dojo.hitch(this,"handlePromoPopupCallback");
UIService.generatePromo("mainui-email-popup",_69);
this.inherited("postCreate",arguments);
},handlePromoPopupCallback:function(_6a){
if($d("sendEmailPromo")){
$d("sendEmailPromo").innerHTML=_6a;
}else{
debug("coulndt load promo");
}
}});
}
if(!dojo._hasResource["mq.widget.SendToGPS"]){
dojo._hasResource["mq.widget.SendToGPS"]=true;
dojo.provide("mq.widget.SendToGPS");
dojo.declare("mq.widget.SendToGPS",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"stgPopupWidth\" dojoattachpoint=\"wrapper\">\n\t<div id=\"${id}DispContent\" class=\"\" style=\"display:block;\">\n\t\t<div class=\"popHead\">\n\t\t\t<div class=\"fltl\">\n\t\t\t\t<h2>Send to GPS</h2>\n\t\t\t</div>\n\t\t    <div class=\"fltr\">\n\t\t    \t<a class=\"n\" id=\"gpsHelp\" href=\"http://help.mapquest.com/jive/kbcategory.jspa?categoryID=11\" target=\"_blank\" onclick=\"Javascript:ua.a(':MQ08S2GHelp');\">Help</a>\n\t\t    </div>\n\t\t</div>\n\t\t<div class=\"clearb\">\n\t\t   <div id=\"gpsNoPlugin\" style=\"display:${noPluginFoundDisplay}\" class=\"stgPopupWidth\">\n\t\t   \t\t<div>\n\t\t   \t\t\t<div class=\"fltl\">\n\t\t   \t\t\t\t<img class=\"gpsWarningImage\" src='${imagePath}/icon-warn-sm8.png' height=\"18\" width=\"18\" alt=\"warning\"/>\n\t\t   \t\t\t</div>\n\t\t\t  \t\t<div class=\"gpsError\">\n\t\t   \t\t\t\t<span id=\"errorMessage\">Garmin Communicator Plugin is NOT detected.</span>\n\t\t   \t\t\t\t<br/>\n\t\t   \t\t\t\tPlease install the Garmin Communicator plugin and try again\n\t\t   \t\t\t\t<br/><br/>\n\t\t   \t\t\t</div>\n\t\t   \t\t\t<div class=\"textc\">\t\n\t\t   \t\t\t\t<a href=\"http://www8.garmin.com/products/communicator/\" target=\"_blank\" onclick=\"Javascript:ua.a(':MQ08S2GPluginDownload');\">Download Garmin Communicator Plugin</a>\n\t\t   \t\t\t</div>\n\t\t   \t\t\t<br/>\n\t\t   \t\t\t<br/>\n\t\t   \t\t</div>\n\t\t\t   \t<div class=\"clearb textc\">\n\t\t\t   \t\t<input id=\"gpsNoPluginClose\" type=\"button\" class=\"btn\" value=\"Close\"/>\n\t\t\t   \t</div>\n\t\t   </div>\n\t\t   <div id=\"gpsNoDevices\" style=\"display:${noDevicesFoundDisplay}\" class=\"stgPopupWidth\">\n\t\t   \t\t<div>\n\t\t   \t\t\t<div class=\"fltl\">\n\t\t   \t\t\t\t<img class=\"gpsWarningImage\" src='${imagePath}/icon-warn-sm8.png' height=\"18\" width=\"18\" alt=\"warning\"/>\n\t\t   \t\t\t</div>\n\t\t\t  \t\t<div class=\"gpsError\">\n\t\t\t  \t\t\t<span>Garmin device is NOT detected.</span>\n\t\t\t  \t\t\t<br/>\n\t\t\t  \t\t\tPlease connect your device, turn it on and try again.\n\t\t\t  \t\t\t<br/><br/>\n\t\t\t  \t\t</div>\n\t\t\t  \t</div>\n\t\t\t  \t<div class=\"textc\">\n\t\t\t  \t\t<form>\n\t\t\t  \t\t\t<button id=\"gpsNotDetectedRetry\" type=\"button\" class=\"btn\" value=\"Try Again\">Try Again</button>&nbsp;&nbsp;<button type=\"button\" class=\"btn\" value=\"Close\" id=\"gpsNotDetectedClose\">Close</button>\n\t\t\t  \t\t</form>\n\t\t\t  \t</div>\n\t\t   </div>\n\t\t   <div id=\"gpsDetailsDisplay\" style=\"display:${detailsDisplay};\" class=\"stgPopupWidth\">\n\t\t\t\t<div id=\"userInputErrorMessage\">\n\t\t\t\t</div>\n\t\t   \t   \t<form action=\"\" id=\"STGDevice\" name=\"STGDevice\">\n\t\t   \t   \t<div id=\"userInput\" style=\"display:${inputDisplay}\">\n\t\t   \t\t\t<div>\n\t\t   \t\t\t\t<span id=\"gpsLocDetails\">\n\t\t   \t\t\t\t\t${locDetails}\n\t\t   \t\t\t\t</span>\n\t\t   \t\t\t\t<span class=\"gpsSubSelect\">\n\t\t   \t\t\t\t\t<input id=\"routeCheck\" type=\"radio\" name=\"ro\" value=\"route\" checked=\"checked\"/>&nbsp;Route \n\t\t   \t\t\t\t\t<input id=\"waypointCheck\" type=\"radio\" name=\"ro\" value=\"waypoints\" />&nbsp;Waypoints\n\t\t   \t\t\t\t</span>\n\t\t   \t\t\t\t<span>\n\t\t   \t\t\t\t\t<img id=\"gpsInfoImage\" src='${imagePath}/icon-help.png'/>\n\t\t   \t\t\t\t</span>\n\t   \t\t\t\t</div> \n\t\t   \t\t\t<div id=\"gpsFileName\">\n\t\t   \t\t\t\t<span class=\"b\">\n\t\t   \t\t\t\t\tEnter File name:&nbsp;&nbsp;<input type=\"text\" id=\"fileName\" value=\"${tempFileName}\" onclick=\"this.focus();this.select();\"/>&nbsp;.GPX\n\t\t   \t\t\t\t</span>\n\t\t   \t\t\t</div>\n\t\t   \t\t</div>\n\t\t   \t\t<div id=\"devices\">\n\t\t\t   \t\t<label id=\"gpsSelectDeviceDetail\">\n\t\t\t   \t\t\tSelect device(s):\n\t\t\t   \t\t</label>\n\t\t\t   \t\t<span id=\"deviceData\">\n\t\t\t   \t\t\t${devices}\n\t\t\t   \t\t</span>\n\t\t   \t\t</div>\n\t\t   \t\t<br/>\n\t\t   \t\t<div id=\"gpsDetails\" class=\"gpsDetails\">\n\t\t   \t\t\t${details}\n\t\t   \t\t</div>\n\t\t\t   \t<br/>\n\t\t\t   \t<div class=\"textc\">\n\t\t\t   \t\t<form action=\"\" method=\"post\" onsubmit=\"return false\">\n\t\t\t   \t\t<input type=\"button\" class=\"btn\" id=\"STGSendButton\" value=\"&nbsp;Send&nbsp;\"/>\n\t\t\t   \t\t<input type=\"button\" class=\"btn\" id=\"STGCancelButton\" value=\"Cancel\" />\n\t\t\t   \t\t</form>\n\t\t\t   \t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div class=\"n\">\n\t\t\t\t<div id=\"gpsNote\">\n\t\t\t   \t\t<br/><br/>\n\t\t\t   \t\t<span class=\"b\">Note:</span> For use with Garmin devices only.\n\t\t\t   \t</div>\n\t\t\t   \tPowered by <a href=\"http://www.garmin.com/products/communicator/\" target=\"_blank\" onclick=\"Javascript:ua.a(':MQ08S2GGarmin');\">Garmin Communicator</a>&nbsp;&nbsp;&nbsp;&nbsp;<img id=\"garminLogo\" src=\"${imagePath}/gps/Garmin-logo.png\"/>\n\t\t\t   \t<br/>\n\t\t\t</div>\n\t\t\t<div id=\"${id}Promo\" style=\"display:${PromoDisplay};\">\n\t\t\t\t${PromoResult}\n\t\t\t</div>\t\n\t\t</div>\n\t \t<br/>\n\t</div>\n  \n\t<div id=\"${id}ConfirmationSuccess\" style=\"display:none;\">\n\t\t<div class=\"stgPopupWidth\">\n\t\t\t<div class=\"popHead\">\n\t\t\t\t<div class=\"fltl\">\n\t\t\t\t\t<h2>Send to GPS</h2>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fltr\">\n\t\t\t\t\t<a class=\"n\" id=\"gpsHelp\" href=\"http://help.mapquest.com/jive/kbcategory.jspa?categoryID=11\" onclick=\"Javascript:ua.a(':MQ08S2GHelp');\">Help</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br/>\n\t   \t\t<div class=\"stgPopupWidth\">\n\t\t\t\t<span class=\"gpsSuccess\">Success!</span><br/><br/>\n\t        \t<div id=\"gpsSuccessMessage\"></div>\n\t\t\t</div>\n\t\t    <br/><br/>\n\t\t    <div class=\"textc\">\n\t\t    \t<input type=\"button\" value=\"Close\" id=\"closeButton\" class=\"btn\"/>\n\t\t    </div>\n\t\t   \t<br/>\n\t\t   \t<div class=\"n\">\n\t\t\t\t<div id=\"gpsNote\">\n\t\t\t \t\t<span class=\"b\">Note:</span> For use with Garmin devices only.\n\t\t\t   \t</div>\n\t\t\t   \tPowered by <a href=\"http://www.garmin.com/products/communicator/\" target=\"_blank\" onclick=\"Javascript:ua.a(':MQ08S2GGarmin');\">Garmin Communicator</a>&nbsp;&nbsp;&nbsp;&nbsp;<img id=\"garminLogo\" src=\"${imagePath}/gps/Garmin-logo.png\"/>\n\t\t\t   \t<br/>\n\t\t\t  </div>\n\t\t</div> \n\t</div>\n  \n\t<div id=\"${id}ConfirmationFailure\" style=\"display:none;\">\n\t\t<div class=\"stgPopupWidth\">\n\t\t\t<div class=\"popHead\">\n\t\t\t\t<div class=\"fltl\">\n\t\t\t\t\t<h2>Send to GPS</h2>\n\t\t\t\t</div>\n\t\t    \t<div class=\"fltr\">\n\t\t    \t\t<a class=\"n\" id=\"gpsHelp\" href=\"http://help.mapquest.com/jive/kbcategory.jspa?categoryID=11\" onclick=\"Javascript:ua.a(':MQ08S2GHelp');\">Help</a>\n\t\t    \t</div>\n\t\t\t</div>\n\t\t   \t<br/>\n\t   \t\t<div class=\"stgPopupWidth\">\n\t         \t<div class=\"b\">\n\t         \t\tFailure:\n\t         \t</div>\n\t         \t<br/><br/>\n\t         \tWe were unable to update one or more of your devices.\n\t         \t<div id=\"stgError\">\n\t         \t</div>   \n\t\t\t</div>\n\t\t\t<br/><br/>\n\t\t\t<div class=\"textc\"><input type=\"button\" value=\"Close\" id=\"closeButton\" class=\"btn\"/>\n\t\t\t</div>\n\t\t\t<br/><br/>\t\n\t\t</div>\n\t</div>\n</div>\n",imagePath:mqPrefix+"/cdn/images",location:null,details:"",gps:"",devices:"",errorMessage:"",detailsDisplay:"none",noPluginFoundDisplay:"none",noDevicesFoundDisplay:"none",inputDisplay:"none",locDetails:"",selectedDevices:[],deviceWriteResults:[],type:"",PromoResult:"",PromoDisplay:"none",reloading:false,tempFileName:"",postCreate:function(){
this.inherited("postCreate",arguments);
},setDefaults:function(){
this.details="";
this.devices="";
this.errorMessage="";
this.detailsDisplay="none";
this.noPluginFoundDisplay="none";
this.noDevicesFoundDisplay="none";
this.inputDisplay="none";
this.locDetails="";
this.selectedDevices=[];
this.deviceWriteResults=[];
},formatLocation:function(loc){
var sb=new dojox.string.Builder();
var l={};
for(prop in loc){
if(prop!="sourceId"&&prop!="website"){
l[prop]=loc[prop];
}
}
loc.formattedLocation=mq.util.formatLocationSummary(l);
sb.append("<div class='gpsSelectorItem' style='visibility:none;'>").append(loc.formattedLocation).append("</div>");
return sb.toString();
},postMixInProperties:function(){
this.setDefaults();
this.digestData();
this.tempFileName="MapQuest-"+Math.round(1000*Math.random());
},digestData:function(){
if(this.gps.result&&this.gps.result.loadError){
ua.a(":MQ08S2GPluginError");
this.noPluginFoundDisplay="";
this.errorMessage=this.gps.result.msg;
if(this.PromoResult){
this.PromoDisplay="block";
}
}else{
if(this.gps.gpsController.getDevicesCount()==0){
ua.a(":MQ08S2GDeviceError");
this.noDevicesFoundDisplay="";
if(this.PromoResult){
this.PromoDisplay="block";
}
}else{
var _6e=controller._model.locations;
this.detailsDisplay="";
if(_6e&&_6e.length>1){
this.inputDisplay="";
}
var d=this.gps.gpsController.getDevices();
var _70="<div class='gpsSelector'>";
if(d.length==1){
_70+="<div class='gpsSelectorItem'><input type='checkbox' class='gpsDevice' name='device_0' id='device_0' checked='checked'/>"+d[0].getDisplayName()+"</div>";
}else{
for(i=0;i<d.length;i++){
_70+="<div class='gpsSelectorItem'><input type='checkbox' class='gpsDevice' name='device_"+i+"' id='device_"+i+"'/>"+d[i].getDisplayName()+"</div>";
}
}
_70+="</div>";
this.devices=_70;
if(this.location&&this.location.postalCode){
var _72=new dojox.string.Builder();
_72.append("<div class='b'>Location to send:</div>");
_72.append("<div class='gpsSelector"+this.type+"' gpsSelector>");
_72.append(this.formatLocation(this.location));
_72.append("</div>");
this.details=_72;
this.addrSummaryHeight=mq.getPopupContentWidthHeight(this.details).height;
}else{
if(_6e!=undefined&&_6e.length>0){
var sb=new dojox.string.Builder();
if(_6e.length==1){
this.type="Map";
sb.append("<div class='b'>Location to send:</div>");
}else{
this.type="Route";
this.locDetails="<span class='b'>Sending "+_6e.length+" locations as:</span>";
sb.append("<div class='b'>Locations to send:</div>");
}
sb.append("<div class='gpsSelector"+this.type+" gpsSelector'>");
for(var i=0;i<_6e.length;i++){
if(i+1<_6e.length){
sb.append("<div class='divide'>"+this.formatLocation(_6e[i].location)+"</div>");
}else{
sb.append(this.formatLocation(_6e[i].location));
}
}
sb.append("</div>");
this.details=sb.toString();
}
}
}
}
},requestReload:function(){
if(this.reloading){
return;
}
this.reloading=true;
this.enabledisableButton($d("gpsNotDetectedRetry"),false);
this.enabledisableButton($d("gpsNotDetectedClose"),false);
this.enabledisableButton($d("mqSTGPopupPopupClose"),false);
this.gps.reload();
},showError:function(_74){
this.createWarning("<div class=\"gpsError\"><span id=\"errorMessage\">There was an error communicating with your device. Please make sure your device is plugged in and turned on.</span></div><div class=\"clearb\"></div>");
},reload:function(){
this.setDefaults();
this.digestData();
if($d("gpsLocDetails")){
$d("gpsLocDetails").innerHTML=this.locDetails;
}
if($d("deviceData")){
$d("deviceData").innerHTML=this.devices;
}
if($d("gpsDetails")){
$d("gpsDetails").innerHTML=this.details;
}
if($d("gpsNoPlugin")){
$d("gpsNoPlugin").style.display=this.noPluginFoundDisplay;
}
if($d("userInput")){
$d("userInput").style.display=this.inputDisplay;
}
if($d("gpsDetailsDisplay")){
$d("gpsDetailsDisplay").style.display=this.detailsDisplay;
}
if($d("gpsNoDevices")){
$d("gpsNoDevices").style.display=this.noDevicesFoundDisplay;
}
this.enabledisableButton($d("gpsNotDetectedRetry"),true);
this.enabledisableButton($d("gpsNotDetectedClose"),true);
this.enabledisableButton($d("mqSTGPopupPopupClose"),true);
this.reloading=false;
},enabledisableButton:function(_75,_76){
if(_75){
if(_76){
_75.disabled=false;
_75.style.opacity=1;
_75.style.cursor="pointer";
}else{
_75.disabled=true;
_75.style.opacity=0.3;
_75.style.cursor="default";
}
}
},createWarning:function(_77){
var _78="<div class='gpsWarning'><div class='fltl'><img src='"+this.imagePath+"/icon-warn-sm.png' height='18' width='18'></div>"+_77+"";
$w("mqSTGPopup")._increaseHeight(50);
$d("userInputErrorMessage").innerHTML=_78;
},handleNameToggle:function(){
$d("fileName").disabled=$d("waypointCheck").checked?true:false;
},handleSend:function(){
if($d("gpsHelpBubble")){
$w("gpsHelpBubble").close();
}
ua.a(":MQ08S2GSend");
this.selectedDevices=[];
this.deviceWriteResults=[];
var d=this.gps.gpsController.getDevices();
for(i=0;i<d.length;i++){
if($d("device_"+i).checked){
this.selectedDevices.push(d[i]);
}
}
if(this.selectedDevices.length==0){
ua.a(":MQ08S2GSelectError");
this.createWarning("Please select at least 1 device");
$d("gpsSelectDeviceDetail").style.color="#CC0000";
return;
}
var fn=$d("fileName").value;
if(fn!=""){
fn=fn.replace(/[^A-Za-z0-9 ]+/g," ");
}else{
fn=this.tempFileName;
}
this.gps.fileName=fn;
this.prepareAndWrite(this.selectedDevices[0]);
},prepareAndWrite:function(_7b){
var _7c=this.gps.supportsRoutes(_7b);
if(!_7c){
this.gps.waypointsOnly=true;
}else{
if(document.STGDevice.ro[0].checked){
this.gps.waypointsOnly=false;
}else{
this.gps.waypointsOnly=true;
}
}
if(this.location||!_7c){
if(this.location){
this.writeData([this.location],_7b);
}else{
var _7d=[];
for(var i=0;i<controller._model.locations.length;i++){
_7d[i]=controller._model.locations[i].location;
}
this.writeData(_7d,_7b);
}
}else{
var _7d=[];
for(var i=0;i<controller._model.locations.length;i++){
_7d[i]=controller._model.locations[i].location;
}
this.writeData(_7d,_7b,controller._model.routeOptions);
}
},writeData:function(_7f,_80,_81){
this.gps.writePOIs(_7f,_80,_81);
},handleAccept:function(){
},handleCancel:function(){
if(this.reloading){
return;
}
ua.a(":MQ08S2GClose");
this.destroy();
},handleRetry:function(){
this.gps.reload();
},hide:function(){
},showMoreInfoPopup:function(evt){
if($d("gpsHelpBubble")){
return;
}
if($d("gpsHelpBubble")){
$w("gpsHelpBubble").close();
}
ua.a(":MQ08S2GHelpRteWP");
var _83,_84,_85,_86;
var _87=evt.currentTarget;
var id=_87.id;
var _89=dojo.coords(_87,true);
var _8a=new dojox.string.Builder();
_8a.append("<div class=\"alert-warning\" style=\"display: block;width: 250px;\">");
_8a.append("<span style=\"font-weight:bold\">Sending locations as a route vs waypoints</span>");
_8a.append("<div class=\"avoid\" style=\"text-align:left; margin-top:7px\">");
_8a.append("You can send multiple locations to your Garmin device.  Selecting route will send the locations as a group of waypoints.  Selecting waypoints will send each location individually.");
_8a.append("</div>");
_8a.append("</div>");
_8a=_8a.toString();
var _8b=mq.getPopupContentWidthHeight(_8a);
var _8c=(dojo.isSafari)?_89.x:_89.x;
var _8d=(dojo.isSafari)?_89.y:_89.y;
_84=0;
_85=_8c-145;
_86=_8d+30;
var _8e=new mq.widget.MQPopup({id:"gpsHelpBubble",xoffset:_85,yoffset:_86,bgOpacity:0,fadingBg:false,closeButtonRequired:true,closeOnBackGroundClick:false,popupArrowPlacement:_84,arrowOffsetX:140,popupImage:"sprt-pop-ylw",bgRequired:false,popupMinWidth:_8b.width+10,popupContent:_8a,popupMinHeight:95});
$d("gpsHelpBubble").focus();
}});
}
if(!dojo._hasResource["mq.widget.CopyURL"]){
dojo._hasResource["mq.widget.CopyURL"]=true;
dojo.provide("mq.widget.CopyURL");
dojo.declare("mq.widget.CopyURL",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"emailPopupWidth\" dojoattachpoint=\"wrapper\">\n  <div id=\"${id}DispContent\" style=\"display:block;\">\n\t<div class=\"popHead\">\n       <div class=\"fltl\"><h2>Link to this Page</h2></div>              \n      <div class=\"fltr\"><button class=\"btnClose\" dojoAttachEvent='onclick:handleCancel'><span>close</span></button></div>\n    </div>  \n   \n   \n     <div class=\"clearb\"></div> \n    <div class=\"fltl\"><span >Use this URL to Link Directly to the Map of : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>\n     <div id=\"addressLine\" class=\"addrLine\"></div> \n     <div class=\"clearb\">&nbsp;</div> \n    <div class=\"clearb\">&nbsp;</div> \n    <div class=\"fltl\"><input type=\"text\" class=\"lttpInput\" value=\"http://www.mapquest.com/...\" onfocus=\"mq.lttp.update(this)\" onblur=\"mq.lttp.blur(this)\" id=\"sendEmailTo\" style=\"width:175px;\" />  \t</div>\n    <div class=\"clearb\">&nbsp;</div> \n    <div class=\"clearb\">&nbsp;</div>    \t\n  </div>   \n</div>\n",imagePath:mqPrefix+"/cdn/images",pageURL:"",handleAccept:function(){
debug("Came Inside JS ------->");
this.handlePromoPopupCallback();
},handleCancel:function(){
ua.a(":MQ08EmailClose");
},postCreate:function(){
var _8f=dojo.hitch(this,"handlePromoPopupCallback");
UIService.generatePromo("mainui-email-popup",_8f);
this.inherited("postCreate",arguments);
},handlePromoPopupCallback:function(){
if(model.locations!=null&&model.locations.length>0&&model.locations[0]!=null&&model.locations[0].location!=null){
var _90=model.locations[0].location.city+", "+model.locations[0].location.state;
debug("Location Name ------->"+model.locations[0].location.name);
if(model.locations[0].location.name!=null&&model.locations[0].location.name!=""){
_90=model.locations[0].location.name+", "+_90;
}
$d("addressLine").innerHTML=_90;
mq.show($d("addressLine"));
}
}});
}
if(!dojo._hasResource["mq.uicontroller"]){
dojo._hasResource["mq.uicontroller"]=true;
dojo.provide("mq.uicontroller");
dojo.declare("mq.UIController",null,{constructor:function(_91){
try{
debug("Initialize: "+_91);
if(_91==null){
this._model={showRoute:false,mode:"MAPS"};
}else{
debug("2. "+_91.showRoute);
this._model=_91;
if(_91.locations){
var _92=[];
for(var i=0;i<_91.locations.length;i++){
_92.push(_91.locations[i].location);
}
mq.savedandrecent.addRecentLocations(_92);
}
if(!_91.routeResults){
this.calculateRoute();
}
}
var c=this;
window.historyTimer=setInterval(function(){
if(!c.delaySaveState){
var _95=window.location.hash.substring(1);
c.handleNavigation(_95);
}
},this.stateUpdateInterval);
var _96=(dojo.isSafari<=2)?16:4;
window.setTimeout(function(){
c.origModelStr=mq.util.modelToString(window.model);
},this.stateUpdateInterval*_96);
if(dojo.isSafari<=2){
this.delaySaveState=true;
}
}
catch(e){
logDebug("uicontroller.constructor",e);
}
},origServerResults:window.serverResults,origModelStr:false,winLoc:location.protocol+"//"+location.host+location.pathname+location.search,defaultLocation:null,delimiter:":",autoHashed:false,stateUpdateInterval:500,LONG_ROUTE_MI:250,CONVERT_MI_TO_KM:1.609,exportModel:function(){
return mq.util.modelToString(this._model);
},importModel:function(str){
debug("UIController.importModel");
this._model=window.model=mq.util.hashToModel(str.substring(2));
if(this._model.showRoute){
this.calculateRoute();
}else{
this.onModelUpdate(this._model);
}
},onResetSearchAttributes:function(){
},addLocation:function(loc,_99){
debug("UIController.addLocation: "+_99);
if(this.numLocs()==0&&_99==0){
if(loc.sourceId){
debug("Mapping an RBL Profile");
mq.mapProfile(loc.name,loc.addressLine1,loc.city,loc.state,loc.sourceId,loc.resultingView);
return;
}else{
debug("Mapping single location");
var m={};
var ml={location:loc};
m.locations=[];
m.locations[0]=ml;
mq.createUrlFromModel(m);
return;
}
}
this._model.mode="MAPS";
this.resetMap();
if(this._model.locations==null){
this._model.locations=[];
}
if(_99==null){
_99=this._model.locations.length;
}
if(this._model.locations.length==1){
this._model.showRoute=true;
}
var _9c={};
_9c.location=loc;
_9c.mapOrder=_99;
this._model.locations[_99]=_9c;
this.calculateRoute();
this.saveState();
this.updateCookie(loc);
},addLocations:function(_9d){
debug("UIController.addLocations: "+_9d.length);
this._model.mode="MAPS";
this.resetMap();
this._model.locations=null;
this._model.locations=[];
for(var i=0;i<_9d.length;i++){
var loc=_9d[i];
var _a0={};
_a0.location=loc;
_a0.mapOrder=i;
this._model.locations.push(_a0);
this.updateCookie(loc);
}
this.showRoute(_9d.length>1);
this.calculateRoute();
this.saveState();
},removeLocation:function(_a1){
this._model.locations.splice(_a1,1);
if(this._model.locations.length==0){
this._model.locations=null;
}
this.resetMap();
this.calculateRoute();
this.saveState();
},moveUp:function(_a2){
this.resetMap();
var l1=this._model.locations[_a2];
l1.mapOrder--;
var l2=this._model.locations[_a2-1];
l2.mapOrder++;
this._model.locations.splice(_a2-1,2,l1,l2);
this.calculateRoute();
this.saveState();
},moveDown:function(_a5){
this.resetMap();
var l1=this._model.locations[_a5];
l1.mapOrder++;
var l2=this._model.locations[parseInt(_a5)+1];
l2.mapOrder--;
this._model.locations.splice(_a5,2,l2,l1);
this.calculateRoute();
this.saveState();
},reorder:function(_a8){
this.resetMap();
for(i=0;i<_a8.length;i++){
var _a9={};
_a9.location=_a8[i];
_a9.mapOrder=i;
this._model.locations[i]=_a9;
}
this.calculateRoute();
this.saveState();
},showRoute:function(_aa){
this._model.showRoute=_aa;
},toggleRoute:function(){
debug("UIController.toggleRoute");
if(this._model.showRoute){
ua.a(":MQ08RouteOff");
this._model.showRoute=false;
this._model.routeResults=null;
}else{
ua.a(":MQ08RouteOn");
this._model.showRoute=true;
}
this.calculateRoute();
this.saveState();
},togglePrint:function(_ab){
this._model.printerFriendly=_ab;
if(!_ab){
this._model.showPrint=false;
}
this.saveState();
},calculateRoute:function(){
debug("UIController.calculateRoute: "+this._model.showRoute);
var _ac=dojo.clone(this._model);
if(this._model.showRoute==false){
this.handleRoute(_ac,null);
return;
}
if(this._model.locations==null||this._model.locations.length<2){
this._model.routeResults=null;
this.handleRoute(_ac,null);
return;
}
var _ad=dojo.hitch(this,"handleRoute",_ac);
var _ae=[];
for(var i=0;i<this._model.locations.length;i++){
_ae[i]=this._model.locations[i].location;
}
if(this._model.routeOptions==null){
this._model.routeOptions={};
this._model.routeOptions.routeType="FASTEST";
}
var _b0="";
if(this._model.routeResults!=null&&this._model.routeResults.sessionId!=null){
_b0=this._model.routeResults.sessionId;
}
try{
UIService.route(_ae,this._model.routeOptions,_b0,_ad);
}
catch(e){
console.error("Error contacting route server.");
}
},handleRoute:function(_b1,_b2){
debug("UIController.handleRoute");
if(_b2&&_b2.resultCode!=0){
debug("Route Failed: "+_b1);
this._model=_b1;
if(!this._model.routeResults){
this._model.routeResults={};
}
this._model.routeResults.resultMessages=_b2.resultMessages;
this._model.routeResults.resultCode=_b2.resultCode;
if(_b1.routeOptions){
var _b3=_b1.routeOptions.lastRequestedAvoidGEFS;
if(_b3){
if(!this._model.routeResults.unavoidableGEFIDs){
this._model.routeResults.unavoidableGEFIDs=[];
}
for(var i=0;i<_b3.length;i++){
this._model.routeResults.unavoidableGEFIDs.push(_b3[i]);
this._model.routeOptions.avoidGEFIDList=mq.util.removeFromArray(this._model.routeOptions.avoidGEFIDList,_b3[i]);
}
if(this._model.routeOptions.lastRequestedAvoidTrekAndMan){
var _b5=this._model.routeResults.treks[this._model.routeOptions.lastRequestedAvoidTrekAndMan[0]];
var man=_b5.maneuvers[this._model.routeOptions.lastRequestedAvoidTrekAndMan[1]];
man.message="MSG_UNABLE_TO_AVOID";
this._model.routeResults.wasAvoidError=true;
}
}
}
this.saveState();
}else{
this._model.routeResults=_b2;
if(this._model.routeOptions&&this._model.routeOptions.avoidHighways&&this.isLongRoute()){
this._model.routeOptions.avoidHighways=false;
}
}
this.onModelUpdate(this._model);
},showAvoidsRestoreLink:function(){
var _b7=false;
if(this._model.routeOptions&&this._model.routeOptions.avoidGEFIDList){
if(this._model.routeResults&&this._model.routeResults.unavoidableGEFIDs){
if(this._model.routeResults.unavoidableGEFIDs.toString()!=this._model.routeOptions.avoidGEFIDList.toString()&&this._model.routeOptions.avoidGEFIDList.length>0){
_b7=true;
}
}else{
if(this._model.routeOptions.avoidGEFIDList&&this._model.routeOptions.avoidGEFIDList.length>0){
_b7=true;
}
}
}
return _b7;
},reverseRoute:function(){
debug("UIController.reverseRoute");
ua.a(":MQ08ReverseRoute");
this.resetMap();
if(this._model.locations!=null){
this._model.locations.reverse();
this.calculateRoute();
this.saveState();
}
},avoidRouteSegment:function(_b8,_b9){
debug("UIController.avoidRouteSegment:"+_b8+"-"+_b9);
var man=this._model.routeResults.treks[_b8].maneuvers[_b9];
if(this._model.routeOptions==null){
this._model.routeOptions={};
}
if(this._model.routeOptions.avoidGEFIDList==null){
this._model.routeOptions.avoidGEFIDList=[];
}
this._model.routeOptions.lastRequestedAvoidGEFS=[];
this._model.routeOptions.lastRequestedAvoidTrekAndMan=[_b8,_b9];
for(var i=0;i<man.GEFIDs.length;i++){
this._model.routeOptions.avoidGEFIDList.push(man.GEFIDs[i]);
this._model.routeOptions.lastRequestedAvoidGEFS.push(man.GEFIDs[i]);
}
debug("UIController.avoidRouteSegment: "+this._model.routeOptions.avoidGEFIDList.length);
this.calculateRoute();
this.saveState();
},removeAvoidSegments:function(){
ua.a(":MQ08RestoreAvoid");
this._model.routeOptions.avoidGEFIDList=null;
this._model.showRoute=true;
this.calculateRoute();
this.saveState();
if($d("avoidRestore")){
$d("avoidRestore").style.display="none";
}
},clearAllLocations:function(){
debug("UIConroller.clearAllLocations()!");
this.clearAllLocationObjects();
this.calculateRoute();
this.saveState();
},clearAllLocationObjects:function(){
this._model.locations=null;
this._model.routeResults=null;
this._model.centerLatitude=this._model.centerLongitude=null;
},modeChange:function(_bc){
debug("UIController.modeChange: "+_bc);
this._model.mode=_bc;
this.saveState();
},viewTypeChange:function(_bd){
debug("UIController.viewTypeChange");
this._model.viewType=_bd;
this.saveState();
},panZoomChange:function(_be,_bf){
debug("UIController.panZoomChange: "+_be);
this._model.zoomLevel=_be;
this._model.centerLatitude=_bf.getLatitude();
this._model.centerLongitude=_bf.getLongitude();
},resetMap:function(){
debug("UIController.resetMap");
this._model.centerLatitude=null;
this._model.centerLongitude=null;
this._model.zoomLevel=null;
},updateSearch:function(loc,_c1,_c2){
debug("UIController.updateSearch");
this.resetMap();
this._model.mode="SEARCH";
this._model.searchLocation=loc;
this._model.searchResults=_c1;
this._model.searchOptions=_c2;
this.saveState();
this.onModelUpdate(this._model);
},onModelUpdate:function(_c3){
debug("UIController.onModelUpdate");
},onGutterUpdate:function(){
debug("UIController.onGutterUpdate");
},rerunRoute:function(){
this.resetMap();
if(this._model.locations!=null){
if(this._model.routeOptions&&this._model.routeOptions.reverseRoute){
this._model.locations.reverse();
this._model.routeOptions.reverseRoute=false;
}
}
this.calculateRoute();
this.saveState();
},onSearchResults:function(_c4,_c5){
},delaySaveState:false,saveState:function(){
if(!this.delaySaveState){
var c=this;
c.delaySaveState=setTimeout(function(){
c.delaySaveState=false;
c.saveHistory();
},this.stateUpdateInterval);
}
},createState:function(){
var _c7=this._model!=null?mq.util.modelToString(this._model):"a/maps/io:0/e";
return _c7;
},saveMapGutterState:function(_c8){
},setMapGutterState:function(_c9){
this._model.mapGutterState=_c9;
},saveSearchGutterState:function(_ca){
},setSearchGutterState:function(_cb){
this._model.searchGutterState=_cb;
},syncGutterState:function(_cc){
this.setMapGutterState(_cc);
this.setSearchGutterState(_cc);
this.saveState();
},updateCookie:function(loc){
mq.savedandrecent.addRecentLocation(loc);
},maxUrlLength:2045,saveHistory:function(){
var _ce=dojo.isIE||dojo.isSafari==2;
var _cf=this.createState();
debug("Model State: "+_cf);
if(_cf.indexOf("a//")==0){
return;
}
if((this.winLoc+_cf).length<this.maxUrlLength){
window.location.hash=_cf;
}else{
this.origModelStr=_cf;
_ce=true;
}
this.modelStrCache=_cf;
if(_ce){
$d("iframe_history").contentWindow.location.search="state="+_cf;
}
},handleNavigation:function(_d0){
if(!_d0){
if(serverResults){
if(!dojo.isSafari){
window.history.go(-1);
}
return;
}
_d0=this.origModelStr;
}
if(_d0!=this.modelStrCache&&this.modelStrCache){
if((dojo.isIE||dojo.isSafari==2)&&(this.winLoc+_d0).length<this.maxUrlLength){
window.location.hash=_d0;
}
this.importModel(this.modelStrCache=_d0);
}
},numLocs:function(){
var val=0;
try{
if(this._model&&this._model.locations){
val=this._model.locations.length;
}
}
catch(e){
}
return val;
},adUserStateFromModel:function(){
var m=this._model,i,loc,_d5=[],_d6=[],_d7=[];
var vp=dijit.getViewport();
var us={locations:_d5,searches:_d6,treks:_d7,routeDistance:m.routeResults?m.routeResults.distance:null,mainUiShowRouting:!!m.showRoute,mapViewType:m.viewType,mapZoomLevel:m.zoomLevel,viewport:{left:vp.l,top:vp.t,width:vp.w,height:vp.h},url:document.URL,referrer:document.referrer,useragent:window.navigator.userAgent};
if(m.locations){
for(i=0;i<m.locations.length;i++){
loc=m.locations[i];
if(loc){
loc=loc.location;
}
if(!loc){
continue;
}
var _da=loc.sicCodesCommaNames;
var cat="";
try{
if(_da){
cat=_da.split(/,/)[1].split(/#/)[0].replace("(All) ","");
}
}
catch(e){
console.warn("Error parsing category: "+_da);
}
_d5.push({role:"stop",stopNumber:i+1,city:loc.city,state:loc.state,country:loc.country,postalCode:loc.postalCode,lattitude:loc.latitude||NaN,longitude:loc.longitude||NaN,category:cat});
}
}
if(m.routeResults&&m.routeResults.treks){
for(i=0;i<m.routeResults.treks.length;i++){
_d7.push(m.routeResults.treks[i].distance);
}
}
_d5.push({role:"mapcenter",lattitude:m.centerLatitude||NaN,longitude:m.centerLongitude||NaN});
if(m.searchLocation){
loc=m.searchLocation;
var _dc="";
if(loc.city==null||loc.city==""){
if(m.searchResults&&m.searchResults.searchResults){
var _dd=m.searchResults.searchResults[0];
if(_dd){
_dc=_dd.city;
}
}
}
_d6.push({searchText:loc.query,searchCategory:m.searchCategory,searchRelativeTo:{role:"search",city:loc.city?loc.city:_dc,state:loc.state,country:loc.country,postalCode:loc.postalCode,lattitude:loc.latitude||NaN,longitude:loc.longitude||NaN}});
}
return us;
},clearBusinessLocator:function(){
this._model.blId=null;
this._model.blColor=null;
},clearSearchObjects:function(){
debug("UIConroller.clearSearchObjects()!");
this._model.searchLocation=null;
this._model.searchOptions=null;
this._model.searchResults=null;
},clearSearch:function(){
debug("UIConroller.clearSearch()!");
this.clearSearchObjects();
this.calculateRoute();
this.saveState();
},sendToCell:function(){
debug("sendToCell called");
},addGPSData:function(_de){
if(_de&&_de.length>0){
this._model.locations=[];
for(i=0;i<_de.length;i++){
var _df={};
_df.mapOrder=i;
_df.location=_de[i];
this._model.locations[i]=_df;
}
this.saveState();
this.onModelUpdate(this._model);
}
},isLongRoute:function(){
if(!this._model.routeResults||!this._model.showRoute){
return false;
}
var _e0=false;
try{
var _e1=this._model.routeOptions.distanceUnit;
var _e2=(_e1.toLowerCase()=="m")?this.LONG_ROUTE_MI:this.LONG_ROUTE_MI*this.CONVERT_MI_TO_KM;
var _e3=this._model.routeResults.distance.match(/[0-9.]*/);
if(parseFloat(_e3)>_e2){
_e0=true;
}
}
catch(e){
logDebug("uicontroller.isLongRoute",e);
}
return _e0;
}});
}
if(!dojo._hasResource["mq.uiview"]){
dojo._hasResource["mq.uiview"]=true;
dojo.provide("mq.uiview");
dojo.declare("mq.UIView",null,{constructor:function(_e4,_e5){
try{
debug("UIView.constructor");
this._controller=_e4;
dojo.connect(this._controller,"onSearchResults",this,"processSearch");
var my=this;
window.setTimeout(function(){
dojo.connect(window,"onresize",my,"resizeLayout");
},1000);
mq.hideLoadingImage();
dojo.connect(this._controller,"onModelUpdate",this,"updateView");
dwr.engine.setPostHook(mq.hideLoadingImage);
dwr.engine.setErrorHandler(this.errorHandler);
dwr.engine._lookup=function(){
return null;
};
}
catch(e){
logDebug("uiview.constructor",e);
}
},searchView:null,mapView:null,myView:null,ranFirst:false,homeEditInProgress:false,workEditInProgress:false,errorHandler:function(msg){
console.error("DWR Error Handler: "+msg);
UIService.log("ERROR",(model.fromClassic?"classic":"general"),window.location.href,mq.getBrowser()+": "+msg);
logDebug("mq.handleSearch",null);
mq.handleFormErrorPopups(null,"<span class=\"redavoid\">"+mq.getMessage("ERROR_GENERIC")+"</span>");
},updateView:function(_e8){
try{
debug("UIView.updateView: ");
if(!_e8.searchGutterState||_e8.searchGutterState==""){
_e8.searchGutterState="NORMAL";
}
if(_e8.mode){
dojo.removeClass($d("content"),"MAPS");
dojo.removeClass($d("content"),"SEARCH");
dojo.removeClass($d("content"),"MY");
dojo.addClass($d("content"),_e8.mode+"");
}
if(_e8.mode=="SEARCH"){
if(_e8.searchLocation&&_e8.searchResults==null){
var _e9=_e8.searchOptions;
var _ea=(parseInt(_e9.pageSkip))?parseInt(_e9.pageSkip):0;
if(_e8.blId&&parseInt(_e8.blId)){
_e8.searchLocation.query="sourcevendor:"+_e8.blId;
}
_e8.searchLocation.formName="reload";
mq.search(_e8.searchLocation,0,_e9);
return;
}
this.contentModeHandler("SEARCH");
this.processModeChange(_e8);
}else{
if(_e8.mode=="MY"){
this.contentModeHandler("MY");
this.processModeChange(_e8);
}else{
if(!_e8.mode){
_e8.mode="MAPS";
}
(this.mapView==null)?this.initMapView(false):this.mapView.updateView(_e8);
this.contentModeHandler("MAPS");
this.processModeChange(_e8);
if(controller.showAvoidsRestoreLink()){
if($d("avoidRestore")){
$d("avoidRestore").style.display="block";
}
}else{
if($d("avoidRestore")){
$d("avoidRestore").style.display="none";
}
}
if(window.IsTrafficEnabled=="true"){
debug("init traffic");
if(window["trafficPopupContent"]&&!$w("mqErrorPopup")){
window.initTrafficPopup("mapTrafficHelp");
}
}
}
}
}
catch(e){
logDebug("uiview.updateview",e);
}
},contentModeHandler:function(_eb,_ec){
try{
debug("UIView.contentModeHandler: "+_eb+","+_ec);
if(mq.isShowing($d(_eb))){
return;
}
var _ed=$d(_eb);
var _ee=_ed.parentNode;
var lis=_ee.childNodes;
var dv;
debug(_ed);
for(var x=0;x<lis.length;x++){
dv=lis[x];
(_ed!==dv)?dojo.removeClass($d("content"),dv.id):dojo.addClass($d("content"),dv.id);
if(_ed!==dv&&dojo.hasClass(dv,"contentPane")){
mq.hide(dv);
}
}
mq.show(_ed);
this._controller.modeChange(_eb);
}
catch(e){
logDebug("uiview.contentModeChange",e);
}
},processModeChange:function(_f2){
try{
var _f3=this.getCurrentMode();
debug("UIView.processModeChange: "+_f3);
dojo.removeClass($d("content"),"MAPS");
dojo.removeClass($d("content"),"SEARCH");
dojo.removeClass($d("content"),"MY");
dojo.addClass($d("content"),_f3+"");
if(_f3=="MAPS"){
var _f4=controller._model.locations;
if(_f4){
if(_f4.length>0){
mq.show($d("itin"));
if(_f4.length==1){
this.showHideAdditionalForm("display");
}
}else{
mq.hide($d("itin"));
}
}
if(this.mapView==null){
debug("Initializing mapView");
this.initMapView(false);
}else{
this.resizeLayout();
}
mq.show($d("contentBizLocArea"));
mq.show($d("menuBarPane"));
mq.show($d("linktothis"));
mq.hide($d("infoUSA"));
$w("stcButton").setDisabled(false);
if(this._controller.numLocs()<1){
mq.hide($d("fNearby"));
}else{
mq.show($d("fNearby"));
}
if(enableSTO){
$w("stoButton").setDisabled(false);
}
}else{
if(_f3=="MY"){
mq.hide($d("itin"));
this.showHideAdditionalForm("none");
if(this.myView==null){
$w(_f3).onLoad=function(e){
view.initMyView();
$d("mqLangSettings").focus();
};
$w(_f3).setHref("/controller/mainui/my");
}else{
this.myView.updateSettingsPage();
}
mq.hide($d("contentBizLocArea"));
mq.hide($d("menuBarPane"));
mq.hide($d("linktothis"));
this.resizeLayout();
}else{
if(_f3=="SEARCH"){
if($d("top-header-container")){
mq.util.scrollElemToView($d("top-header-container"));
}
mq.hide($d("itin"));
this.showHideAdditionalForm("none");
if(this.searchView==null){
debug("Initializing searchView");
this.initSearchView(_f2);
}else{
debug("searchView already initialized");
this.processSearch(_f2);
}
mq.show($d("contentBizLocArea"));
mq.show($d("menuBarPane"));
mq.show($d("linktothis"));
$w("stcButton").setDisabled(true);
if(enableSTO){
$w("stoButton").setDisabled(true);
}
}
}
}
}
catch(e){
logDebug("uiview.processModeChange",e);
}
},getCurrentMode:function(){
return controller._model.mode;
},processSearch:function(_f6){
debug("UIView:processSearch ");
if(_f6&&_f6.searchResults){
this.searchView.processSearchResults(_f6);
}
mq.traffic.enable(view.searchView._tileMap,_f6.trafficEnabled);
debug("UIView: processSearch: end");
},initMapView:function(_f7){
try{
debug("UIView.initMapView: "+_f7);
if(!controller._model.mode){
controller._model.mode="MAPS";
}
var me=this;
mq.dynamicRequire("mq.maptabview",function(){
me.mapView=new mq.MapTabView(controller,_f7,{"mapDiv":"mapWindow","locationList":"locationWindowNarr"});
me.resizeLayout();
});
}
catch(e){
logDebug("uiview.initMapView",e);
}
},initSearchView:function(_f9){
try{
debug("UIView.initSearchView");
mq.showLoadingImage();
mq.dynamicRequire("mq.searchtabview",function(){
debug("Search onLoad event fired");
view.searchView=new mq.SearchTabView(controller,false,{"mapDiv":"mapWindowS","searchList":"searchWindow"});
if(!controller._model.searchResults){
mq.hideLoadingImage();
}
view.processSearch(_f9);
mq.traffic.enable(view.searchView._tileMap,_f9.trafficEnabled);
if(_f9.showPrint){
showPrint();
}
view.resizeLayout();
debug("UIView.initSearchView end");
});
}
catch(e){
logDebug("uiview.initSearchView",e);
}
},initMyView:function(){
try{
var me=this;
mq.dynamicRequire("mq.mytabview",function(){
if(me.myView==null){
debug("uiview.initMyView:create myView object");
me.myView=new mq.MyTabView(me._controller);
me.myView.updateSettingsPage();
}
});
}
catch(e){
logDebug("uiview.initMyView",e);
}
},executeBizLocator:function(loc,_fc,_fd){
debug("UIView.executeBizLocator: "+loc.query);
var _fe={sortType:_fc,filterState:_fd};
var w=$w("searchResults");
if(w){
w.showRefineSearchLnk=false;
w.showEditSearch=false;
}
mq.search(loc,null,_fe);
},chooseBLLocation:function(ind){
try{
debug("UIView.chooseBLLocation: "+ind);
var tab=controller._model.mode;
var loc,sort,_104;
var _105=$d("searchSumResultsFor");
if(_105){
debug("UIView.  Got header element");
_105.innerHTML="";
}else{
debug("UIView.  Do not have header element");
}
if(tab=="MAPS"||tab=="MY"||ind>0){
if(controller._model.locations&&ind>0){
loc=controller._model.locations[ind-1].location;
if(loc.geocodeQuality=="STATE"){
_104=loc.state;
sort="relevance";
}
}else{
if(!view.mapView){
loc=mq.savedandrecent.getDefaultMapLocation();
if(loc&&loc.latitude&&loc.longitude){
loc.geocodeQuality="CITY";
}else{
loc={geocodeQuality:"COUNTRY",latitude:39.527596,longitude:-99.141968};
}
}else{
if(view.mapView._tileMap.getZoomLevel()<5){
sort="relevance";
loc={};
}else{
loc={latitude:view.mapView._tileMap.getCenter().lat,longitude:view.mapView._tileMap.getCenter().lng,geocodeQuality:"CITY"};
}
}
}
}else{
if(controller._model.searchLocation){
loc=controller._model.searchLocation;
}else{
if(view.searchView._tileMap.getZoomLevel()){
sort="relevance";
loc={};
}else{
loc={latitude:view.searchView._tileMap.getCenter().lat,longitude:view.searchView._tileMap.getCenter().lng,geocodeQuality:"CITY"};
}
}
}
var id=controller._model.blId;
var _107={};
for(prop in loc){
if(prop!="id"&&prop!="name"){
_107[prop]=loc[prop];
}
}
try{
if(controller._model.mode=="SEARCH"){
_107.formName=(controller.numLocs()>0||(dirForm&&dirForm.results&&dirForm.results.length>1))?"SearchDirectionsResultsBizLoc":"SearchMapResultsBizLoc";
}else{
_107.formName=(controller.numLocs()>1)?"DirectionsResultsBizLoc":"MapResultsBizLoc";
}
}
catch(e){
}
debug("Biz Locator form name: "+_107.formName);
_107.query=(parseInt(id))?"sourcevendor:"+id:id;
this.executeBizLocator(_107,sort,_104);
}
catch(e){
logDebug("uiview.chooseBLLocation",e);
}
},resizeLayout:function(){
if(dojo.isIE){
if(this.resizeTimeout){
return false;
}else{
this.resizeTimeout=window.setTimeout("view.resizeLayoutNow()",500);
}
}else{
this.resizeLayoutNow();
}
},resizeLayoutNow:function(){
try{
this.resizeTimeout=null;
debug("View.resizeLayout");
var _108=dijit.getViewport();
var _109=(_108.h>848)?Number((_108.h)-848+600):600;
var _10a=this.getCurrentMode();
var _10b=$d("contentMainWrap");
var _10c=$d("contentContainer");
var _10d=265;
var _10e=995;
if(mq.isSafari3()){
_108.w=_108.w-15;
}
if(dojo.isFF>0){
_10c.style.width=(_108.w)+"px";
}
var _10f=null;
if(_108.w<_10e){
document.body.style.width=(_10e)+"px";
_10f=_10e;
_10c.style.width=_10f+"px";
_10b.style.width=(_10f-12)+"px";
}else{
document.body.style.width="auto";
_10f=_108.w;
_10c.style.width=_10f+"px";
_10b.style.width=(_10f-10)+"px";
}
var _110=$d("rightrailad");
_110.style.width="187px";
if(dojo.isSafari){
_110.style.cssFloat="right";
}
if(_10a=="MAPS"){
var _111=$d("mapWindow");
var _112=$d("rblWindow");
var _113=$d("rblMapInfo");
var _114=$d("rblMapReview");
$d("content").style.height="auto";
_111.style.height=(_109-60)+"px";
var _115=(mqPageContext=="rblprofile")?8:0;
var _116=(_108.w>_10e)?(_108.w-_110.clientWidth-34-_115):(_10e-_110.clientWidth-34-_115);
if(_112){
_112.style.width=(_116-5)+"px";
}
if(_113){
_113.style.width=(_116-440)+"px";
}
if(_114){
_114.style.width=(_116-440)+"px";
}
if(this.mapView&&(typeof (this.mapView._tileMap)!="undefined"&&this.mapView._tileMap)){
this.mapView.resizeMap((_116),(_109-60));
}
$d("MAPS").style.width=(_116)+"px";
_111.style.width=(_116)+"px";
if(this.mapView&&(typeof (this.mapView._tileMap)!="undefined"&&this.mapView._tileMap)&&!controller._model.showRoute&&this.mapView._tileMap.rtehighlight){
this.mapView._tileMap.removeRouteHighlight();
}
}else{
if(_10a=="SEARCH"){
var _117=$d("SEARCH");
var _118=$d("mapWindowS");
var _119=$d("leftS");
var _11a=$d("searchWindow");
if(_117&&_118&&_119&&_11a){
$d("content").style.height=_109+"px";
var _11b=(_109-62);
_117.style.height=_118.style.height=_119.style.height=_11b+"px";
_11a.style.height=(_11b-145-1)+"px";
if($d("searchAdWrapper")){
$d("searchAdWrapper").style.display="block";
}
var _11c=(_108.w>_10e)?(_108.w-_110.clientWidth-31):(_10e-_110.clientWidth-31);
var _11d=(_11c-_10d-5);
if(this.searchView){
this.searchView.resizeMap(_11d,_11b);
}
_118.style.width=(_11d)+"px";
_117.style.width=(_11c-2)+"px";
}
}else{
if(_10a=="MY"){
if($d("recentSearchesContainer")){
if(_109>200){
$d("MY").style.height=(_109-15)+"px";
$d("recentSearchesContainer").style.height=(_109-($d("homeAndWork").offsetHeight)-65)+"px";
}
}
}
}
}
debug("end resizeLayout");
}
catch(e){
logDebug("uiview.resizeLayout",e);
}
},searchNearbyHandler:function(node,_11f,_120,pos){
var _122=controller._model;
controller.clearBusinessLocator();
var loc;
if(_120){
loc=results[_11f];
}else{
loc=this._controller._model.locations[_11f].location;
}
mq.showSearchNearby(node,loc,pos);
},popularSearch:function(_124,_125,pos,_127,_128){
debug("View.popularSearch");
if(_128){
if(mqPageContext=="results"){
ua.a(":MQ08BUBPopSearch"+_127);
}else{
ua.a(":MQ08BUBPopSearch"+_127+"PVA");
}
}else{
if(mqPageContext=="results"){
ua.a(":MQ08PopSearch"+_127);
}else{
ua.a(":MQ08PopSearch"+_127+"PVA");
}
}
(controller._model.mode=="MAPS")?this.mapView.popularSearch(_124,_125):this.searchView.popularSearch(_124,_125,pos);
},searchNearby:function(_129,pos){
debug("View.searchNearby");
var _12b=$d("srchNrby"+_129).value;
(controller._model.mode=="MAPS")?this.mapView.popularSearch(_12b,_129,pos):this.searchView.popularSearch(_12b,_129,pos);
},zoomToStreetHandler:function(_12c,_12d,_12e,_12f){
var loc;
if(_12d){
loc=this.getResultLoc(_12c);
this.fixPoiOnZoom(this.searchView,_12c);
this.searchView.zoomToStreet(loc,_12e,_12f);
}else{
if(this._controller._model.mode=="SEARCH"){
loc=this._controller._model.searchLocation;
this.fixPoiOnZoom(this.searchView,_12c);
this.searchView.zoomToStreet(loc,_12e,_12f);
}else{
if(mq.rbl){
mq.rbl.changeTab("Map");
}
loc=this._controller._model.locations[_12c].location;
this.fixPoiOnZoom(this.mapView,_12c);
this.mapView.zoomToStreet(loc,_12e,_12f);
}
}
},onZoomToStreet:function(loc){
this.mapView.zoomToStreet(loc);
},showSTC:function(_132,_133,_134,_135){
if(_134){
(_135)?ua.a(":MQ08BUBCSS2C"):ua.a(":MQ08BUBS2C");
}else{
ua.a(":MQ08LOCS2C");
}
var loc;
if(_133){
loc=this.getResultLoc(_132);
}else{
if(this._controller._model.mode=="SEARCH"){
loc=this._controller._model.searchLocation;
}else{
loc=this._controller._model.locations[_132].location;
}
}
mq.showSTC(loc);
},adCallBack:function(){
},directionsTo:function(_137,mode){
var loc;
if(controller.numLocs()==0){
loc=this.getResultLoc(_137);
}else{
var _13a=controller._model.locations;
if(_13a&&_13a.length>_137){
loc=_13a[_137].location;
}
}
if(loc){
mq.directionsTo(loc.name,loc.addressLine1,loc.city,loc.state,loc.postalCode,loc.country,loc.latitude,loc.longitude,mode,loc.id,loc.sourceId);
}
},directionsFrom:function(_13b,mode){
var loc;
if(controller.numLocs()==0){
loc=this.getResultLoc(_13b);
}else{
var _13e=controller._model.locations;
if(_13e&&_13e.length>_13b){
loc=_13e[_13b].location;
}
}
if(loc){
mq.directionsFrom(loc.name,loc.addressLine1,loc.city,loc.state,loc.postalCode,loc.country,loc.latitude,loc.longitude,mode,loc.id,loc.sourceId);
}
},showHideAdditionalForm:function(show){
debug("View.showHideAdditionalForm: "+show);
if(show&&show=="none"){
if($d("additionalAddForm")){
mq.hide($d("additionalAddForm"));
}
if($d("loc11Form")){
mq.hide($d("loc11Form"));
}
}else{
if($d("additionalAddForm")){
var _140=$d("additionalAddForm");
_140.removeAttribute("style");
dojo.addClass(_140,"clearb");
}
if($d("loc11Form")){
mq.show($d("loc11Form"));
}
}
},updateFindNBLocList:function(){
var _141=$d("findLoc");
_141.style.display="inline";
var _142=controller.numLocs();
_141.options.length=1;
for(var i=0;i<_142;i++){
_141.options[i]=new Option(mq.formatLocationSingleLine(controller._model.locations[i].location),i);
if(i==_142-1){
_141.options[i].selected="true";
}
}
},saveTinyURL:function(_144){
debug("uiview.js saveTinyURL Start...");
var _145;
if(controller._model.routeResults){
_145={};
for(prop in controller._model){
if(prop!="routeResults"&&prop){
_145[prop]=controller._model[prop];
}
}
}else{
_145=controller._model;
}
debug("uiview.js saveTinyURL Calling UIService.saveTinyURL");
UIService.saveTinyURL(_145,_144);
},getTinyUrl:function(key){
var l=window.location;
return l.protocol+"//"+l.hostname+(l.port?":"+l.port:"")+"/mq/"+encodeURIComponent(key);
},useParameterUrl:function(){
return (this.getCurrentMode()=="MAPS"&&controller.numLocs()==1&&(window.location.hash.length==0||window.location.hash.indexOf("/l:")==-1));
},getLttpParameterUrl:function(){
if(mq.util.modelToString(controller._model)!=controller.origModelStr){
var _148=window.location.href;
if(_148.indexOf("#")>0){
_148=_148.substr(0,_148.indexOf("#"));
}
return _148+"#a/maps"+mq.util.mapOptionsAsHash(controller._model)+"/e";
}else{
var _149="";
if(mqPageContext=="rblprofile"){
var _14a=dojo.query("li.current",$d("rblMaps"))[0].id;
if(_14a=="rblOverviewLi"){
_149="?view=overview";
}
if(_14a=="rblReviewsLi"){
_149="?view=reviews";
}
debug("rblView: "+_149);
debug("returning "+window.location.href.split("?")[0]+_149);
return window.location.href.split("?")[0]+_149;
}else{
return window.location.href;
}
}
},locationDetail:function(_14b,_14c){
var loc;
if(mqPageContext=="rblprofile"){
mq.rbl.changeTab("Map");
}
var _14e=document.createElement("iframe");
_14e.width=570;
_14e.height=400;
_14e.frameBorder=0;
_14e.scrolling="auto";
_14e.setAttribute("style","background-color:white;");
var _14f=(this.getCurrentMode()=="MAPS")?"mapView":"searchView";
var pois=view[_14f]._tileMap.getShapeCollection("");
debug("Pois found: "+pois.getSize());
view[_14f]._tileMap.closeInfoDisplayBox();
var poi,_152,_153;
if(_14f=="mapView"){
debug("Getting poi for MAPS");
var ind=0;
for(var i=0;i<controller.numLocs();i++){
var l=controller._model.locations[i].location;
if(l.sourceId==_14b){
loc=l;
ind=i;
break;
}
}
poi=pois.getAt(ind);
_152=view.mapView.alphabet[ind];
if(controller._model.showRoute){
debug("Setting session for route highlight");
_153=controller._model.routeResults.sessionId;
}
if(_14c=="locsummary"){
ua.a(":MQ08LOCCSMore");
}else{
if(_14c=="poiclick"){
ua.a(":MQ08BUBCSLocDetails");
}else{
ua.a(":MQ08BUBCSMoreInfo");
}
}
mq.util.scrollElemToView($d("mapWindow"),"center");
}else{
debug("Getting poi for SEARCH");
loc=this.getResultLoc(_14b);
var skip=controller._model.searchOptions.pageSkip||0;
_152=_14b+skip+1;
var isSB=(_14b>=$w("searchResults").searchResults.searchResults.length)?true:false;
if(_14c=="resultList"){
(isSB)?ua.a(":MQ08SBMoreInfo"):ua.a(":MQ08CSMoreInfo");
}else{
if(_14c=="poiclick"){
(isSB)?ua.a(":MQ08BUBSBLocDetails"):ua.a(":MQ08BUBCSLocDetails");
}else{
(isSB)?ua.a(":MQ08BUBSBMoreInfo"):ua.a(":MQ08BUBCSMoreInfo");
}
}
for(var i=0;i<pois.getSize();i++){
var p=pois.getAt(i);
if(p.getKey().substring(5)==_14b+controller._model.searchOptions.pageSkip+1){
poi=p;
break;
}
}
}
var _15a="/controller/CitySearch/bubble?id="+loc.sourceId+"&poi="+_152;
if(_153){
_15a=_15a+"&session="+_153;
}
_14e.src=_15a;
poi.closeInfoRollover();
poi.showInfoDisplayBox(_14e,loc.name);
},closeOpenInfoDisplayBox:function(pois){
if(pois){
for(var i=0;i<pois.getSize();i++){
if(pois.getAt(i).IDB){
pois.getAt(i).closeInfoDisplayBox();
break;
}
}
}
},handleEmailClick:function(){
ua.a(":MQ08Email");
this.showEmailPopup();
},showEmailPopup:function(){
debug("maptabview.js showEmailPopup Start....");
var _15d=$w("mqEmail");
var my=this;
my.saveTinyURL(function(_15f,_160){
debug("uiview.js showEmailPopup saveTinyURL function.  Start...");
var _161=new mq.widget.SendEmail({id:"mqEmail"});
dojo.connect(_161,"acceptCallback",null,function(){
debug("uiview.js showEmailPopup saveTinyURL Dojo connect");
my.submitEmail((view.useParameterUrl())?view.getLttpParameterUrl():view.getTinyUrl(_15f));
});
var _162=new mq.widget.MQPopup({id:"mqEmailPopup",position:"center",popupWidget:_161,onClose:dojo.hitch(_161,"destroy")});
dojo.connect(_161,"handleCancel",_162,"handleCancel");
});
},handleLinkUrl:function(){
ua.a(":MQ08Email");
this.showUrlPopup();
},showUrlPopup:function(){
debug("maptabview.js showEmailPopup Start....");
var _163=$w("mqCopyUrl");
var my=this;
my.saveTinyURL(function(_165,_166){
debug("uiview.js showEmailPopup saveTinyURL function.  Start...");
var _167=new mq.widget.CopyURL({id:"mqCopyUrl"});
var _168=new mq.widget.MQPopup({id:"mqURLPopup",position:"center",popupWidget:_167,onClose:dojo.hitch(_167,"destroy")});
dojo.connect(_167,"handleCancel",_168,"handleCancel");
});
},submitEmail:function(_169){
var _16a={};
_16a.to=($d("sendEmailTo").value.replace(/,/g," ")).split(" ");
debug(_16a.to);
_16a.from=$d("sendEmailFrom").value;
_16a.subject=$d("sendEmailSubject").value;
_16a.body=$d("sendEmailComments").value;
var _16b=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var _16c=true;
for(var i=0;i<_16a.to.length;i++){
if(_16a.to[i].length>0&&!_16b.test(_16a.to[i])){
_16c=false;
break;
}
}
if(!_16c||!(_16a.from!=null&&_16b.test(_16a.from))){
$d("mqpopup-errmsg").style.display="block";
}else{
var _16e=dojo.hitch(this,"handleEmailSubmit");
var _16f={};
if(serverResults){
_16f=serverResults;
}
var _170;
if(controller._model.routeResults){
_170={};
for(prop in controller._model){
if(prop!="routeResults"&&prop){
_170[prop]=controller._model[prop];
}else{
_170["routeResults"]=this.sendEmailGetMinRouteResults();
}
}
}else{
_170=this._controller._model;
}
UIService.sendEmail(_170,null,_16a,_169,_170.mode,_16e);
}
},sendEmailGetMinRouteResults:function(){
var _171=controller._model.routeResults;
var _172={};
for(prop in _171){
if(prop!="treks"){
_172[prop]=_171[prop];
}else{
_172["treks"]=this.sendEmailGetMinTreks(_171["treks"]);
}
}
return _172;
},sendEmailGetMinTreks:function(_173){
var _173=controller._model.routeResults.treks;
var _174=new Array();
if(_173&&_173.length>0){
var trek;
for(var i=0;i<_173.length;i++){
trek=_173[i];
var _177={};
for(prop in trek){
if(prop!="maneuvers"){
_177[prop]=trek[prop];
}else{
_177["maneuvers"]=this.sendEmailGetMinManeuvers(trek.maneuvers);
}
}
_174[i]=_177;
}
}
return _174;
},sendEmailGetMinManeuvers:function(_178){
var _179=new Array();
if(_178&&_178.length>0){
var _178;
for(var i=0;i<_178.length;i++){
maneuver=_178[i];
var _17b={};
for(prop in maneuver){
if(prop=="narrative"||prop=="distance"){
_17b[prop]=maneuver[prop];
}
}
_179[i]=_17b;
}
}
return _179;
},handleEmailSubmit:function(_17c){
ua.a(":MQ08EmailSend");
$w("mqEmailPopup").changeContent($d("mqEmailConfirmation").innerHTML);
dojo.connect($d("mqEmailCloseButton"),"onclick",$w("mqEmail").handleCancel);
dojo.connect($d("mqEmailXIcon"),"onclick",$w("mqEmail").handleCancel);
},getResultLoc:function(_17d){
var loc;
if(view.getCurrentMode()=="MAPS"){
loc=controller._model.locations[_17d].location;
}else{
if(_17d>=controller._model.searchResults.searchResults.length){
loc=controller._model.searchResults.paidResults[(_17d-controller._model.searchResults.searchResults.length)];
}else{
loc=results[_17d];
}
}
return loc;
},fixPoiOnZoom:function(_17f,_180){
try{
var _181=_17f._tileMap._getAllShapes(true).getAt(_180);
_181.dragTop=null;
_181.dragLeft=null;
}
catch(e){
debug("uiview.fixPoiOnZoom",e);
}
}});
}
if(!dojo._hasResource["mq.ua"]){
dojo._hasResource["mq.ua"]=true;
dojo.provide("mq.ua");
dojo.declare("mq.UA",null,{_userAction:null,_pageViewAttribute:(mq.getCookie("pageViewAttribute")&&mq.getCookie("pageViewAttribute")!="")?mq.getCookie("pageViewAttribute"):null,_userActionMapping:{":pv":{omn:{pv:true},cs:true,ad:true},":pvNoAd":{omn:{pv:true},cs:true,ad:false},":pvForced":{omn:{pv:true},cs:true,ad:true,forced:true},":pvNoAdForced":{omn:{pv:true},cs:true,ad:false,forced:true},":MQ08OffersDrop":{omn:{pv:true,an:"MQ08OffersDrop"},cs:true,ad:false},":MQ08OffersRight":{omn:{pv:true,an:"MQ08OffersRight"},cs:true,ad:false},":MQ08SettingsLink":{omn:{pv:true,an:"MQ08SettingsLink"},cs:true,ad:true,forced:true},":MQ08OffersClose":{omn:{pv:true,an:"MQ08OffersClose"},cs:true,ad:true,forced:true},":MQ08PFTextMap":{omn:{pv:true,an:"MQ08PFTextMap"},cs:true,ad:true,forced:true},":MQ08PFTextOnly":{omn:{pv:true,an:"MQ08PFTextOnly"},cs:true,ad:true,forced:true},":MQ08PFReturn":{omn:{pv:true,an:"MQ08PFReturn"},cs:true,ad:true,forced:true},":MQ08PFMyMap":{omn:{pv:true,an:"MQ08PFMyMap"},cs:true,ad:true,forced:true},":MQ08PFDefaultMap":{omn:{pv:true,an:"MQ08PFDefaultMap"},cs:true,ad:true,forced:true},":MQ08PFMyView":{omn:{pv:true,an:"MQ08PFMyView"},cs:true,ad:true,forced:true},":MQ08PFShowAll":{omn:{pv:true,an:"MQ08PFShowAll"},cs:true,ad:true,forced:true},":MQ08SettingsEdit":{omn:{pv:true,an:"MQ08SettingsEdit"},cs:true,ad:true,forced:true},":MQ08SettingsEditPVA":{omn:{pva:true,an:"MQ08SettingsEdit"},cs:false},":MQ08SettingsAdd":{omn:{pv:true,an:"MQ08SettingsAdd"},cs:true,ad:true,forced:true},":MQ08SettingsAddPVA":{omn:{pva:true,an:"MQ08SettingsAdd"},cs:false},":MQ08GeoDiff":{omn:{an:"MQ08GeoDiff"},cs:false,forced:true},":MQ08Amb":{omn:{an:"MQ08Amb"},cs:false,forced:true},":MQ08Hybrid":{omn:{pv:true,an:"MQ08Hybrid"},cs:true,ad:true,forced:true},":MQ08Aerial":{omn:{pv:true,an:"MQ08Aerial"},cs:true,ad:true,forced:true},":MQ08Street":{omn:{pv:true,an:"MQ08Street"},cs:true,ad:true,forced:true},":MQ08CompassC":{omn:{pv:true,an:"MQ08CompassC"},cs:true,ad:true,forced:true},":MQ08CompassE":{omn:{pv:true,an:"MQ08CompassE"},cs:true,ad:true,forced:true},":MQ08CompassN":{omn:{pv:true,an:"MQ08CompassN"},cs:true,ad:true,forced:true},":MQ08CompassS":{omn:{pv:true,an:"MQ08CompassS"},cs:true,ad:true,forced:true},":MQ08CompassW":{omn:{pv:true,an:"MQ08CompassW"},cs:true,ad:true,forced:true},":MQ08CompassOptions":{omn:{pv:true,an:"MQ08CompassOptions"},cs:true,ad:true,forced:true},":MQ08DragE":{omn:{pv:true,an:"MQ08DragE"},cs:true,ad:true,forced:true},":MQ08DragN":{omn:{pv:true,an:"MQ08DragN"},cs:true,ad:true,forced:true},":MQ08DragNE":{omn:{pv:true,an:"MQ08DragNE"},cs:true,ad:true,forced:true},":MQ08DragNW":{omn:{pv:true,an:"MQ08DragNW"},cs:true,ad:true,forced:true},":MQ08DragS":{omn:{pv:true,an:"MQ08DragS"},cs:true,ad:true,forced:true},":MQ08DragSE":{omn:{pv:true,an:"MQ08DragSE"},cs:true,ad:true,forced:true},":MQ08DragSW":{omn:{pv:true,an:"MQ08DragSW"},cs:true,ad:true,forced:true},":MQ08DragW":{omn:{pv:true,an:"MQ08DragW"},cs:true,ad:true,forced:true},":MQ08Recenter":{omn:{pv:true,an:"MQ08Recenter"},cs:true,ad:true,forced:true},":MQ08Zoom1":{omn:{pv:true,an:"MQ08Zoom1"},cs:true,ad:true,forced:true},":MQ08Zoom10":{omn:{pv:true,an:"MQ08Zoom10"},cs:true,ad:true,forced:true},":MQ08Zoom11":{omn:{pv:true,an:"MQ08Zoom11"},cs:true,ad:true,forced:true},":MQ08Zoom12":{omn:{pv:true,an:"MQ08Zoom12"},cs:true,ad:true,forced:true},":MQ08Zoom13":{omn:{pv:true,an:"MQ08Zoom13"},cs:true,ad:true,forced:true},":MQ08Zoom14":{omn:{pv:true,an:"MQ08Zoom14"},cs:true,ad:true,forced:true},":MQ08Zoom15":{omn:{pv:true,an:"MQ08Zoom15"},cs:true,ad:true,forced:true},":MQ08Zoom16":{omn:{pv:true,an:"MQ08Zoom16"},cs:true,ad:true,forced:true},":MQ08Zoom2":{omn:{pv:true,an:"MQ08Zoom2"},cs:true,ad:true,forced:true},":MQ08Zoom20":{omn:{pv:true,an:"MQ08Zoom20"},cs:true,ad:true,forced:true},":MQ08Zoom3":{omn:{pv:true,an:"MQ08Zoom3"},cs:true,ad:true,forced:true},":MQ08Zoom4":{omn:{pv:true,an:"MQ08Zoom4"},cs:true,ad:true,forced:true},":MQ08Zoom5":{omn:{pv:true,an:"MQ08Zoom5"},cs:true,ad:true,forced:true},":MQ08Zoom6":{omn:{pv:true,an:"MQ08Zoom6"},cs:true,ad:true,forced:true},":MQ08Zoom7":{omn:{pv:true,an:"MQ08Zoom7"},cs:true,ad:true,forced:true},":MQ08Zoom8":{omn:{pv:true,an:"MQ08Zoom8"},cs:true,ad:true,forced:true},":MQ08Zoom9":{omn:{pv:true,an:"MQ08Zoom9"},cs:true,ad:true,forced:true},":MQ08Reset":{omn:{pv:true,an:"MQ08Reset"},cs:true,ad:true,forced:true},":MQ08ZoomIN":{omn:{pv:true,an:"MQ08ZoomIN"},cs:true,ad:true,forced:true},":MQ08ZoomOUT":{omn:{pv:true,an:"MQ08ZoomOUT"},cs:true,ad:true,forced:true},":MQ08ZoomStreetLevel":{omn:{pv:true,an:"MQ08ZoomStreetLevel"},cs:true,ad:true,forced:true},":MQ08BUBZoomStreetLevel":{omn:{pv:true,an:"MQ08BUBZoomStreetLevel"},cs:true,ad:true,forced:true},":MQ08TrafficOn":{omn:{pv:true,an:"MQ08TrafficOn"},cs:true,ad:true,forced:false},":MQ08TrafficOff":{omn:{pv:true,an:"MQ08TrafficOff"},cs:true,ad:true,forced:true},":MQ08TrafficRefresh":{omn:{pv:true,an:"MQ08TrafficRefresh"},cs:true,ad:true,forced:true},":MQ08TRFZoomIn":{omn:{pv:true,an:"MQ08TRFZoomIn"},cs:true,ad:true,forced:true},":MQ08Revise":{omn:{pva:true,an:"MQ08Revise"},cs:false},":MQ08CSBOXMore":{omn:{pv:true,an:"MQ08CSBOXMore"},cs:true,ad:true,forced:true},":MQ08CSBOXMoreAO":{omn:{an:"MQ08CSBOXMore"},cs:false,ad:false},":MQ08OverviewTab":{omn:{pv:true,an:"MQ08OverviewTab"},cs:true,ad:true,forced:true},":MQ08MapTab":{omn:{pv:true,an:"MQ08MapTab"},cs:true,ad:true,forced:true},":MQ08ReviewsTab":{omn:{pv:true,an:"MQ08ReviewsTab"},cs:true,ad:true,forced:true},":MQ08CSMoreInfo":{omn:{pv:true,an:"MQ08CSMoreInfo"},cs:true,ad:true,forced:true},":MQ08SBMoreInfo":{omn:{pv:true,an:"MQ08SBMoreInfo"},cs:true,ad:true,forced:true},":MQ08BUBCSMoreInfo":{omn:{pv:true,an:"MQ08BUBCSMoreInfo"},cs:true,ad:true,forced:true},":MQ08BUBCSMoreInfoNOPV":{omn:{an:"MQ08BUBCSMoreInfo"},cs:false},":MQ08BUBCSLessInfo":{omn:{pv:true,an:"MQ08BUBCSLessInfo"},cs:true,ad:true,forced:true},":MQ08BUBCSLessInfoNOPV":{omn:{an:"MQ08BUBCSLessInfo"},cs:false},":MQ08BUBSBMoreInfo":{omn:{pv:true,an:"MQ08BUBSBMoreInfo"},cs:true,ad:true,forced:true},":MQ08BUBCSOverviewTab":{omn:{pv:true,an:"MQ08BUBCSOverviewTab"},cs:true,ad:true,forced:true},":MQ08BUBCSOverviewTabNOPV":{omn:{an:"MQ08BUBCSOverviewTab"},cs:false},":MQ08BUBCSMapTab":{omn:{pv:true,an:"MQ08BUBCSMapTab"},cs:true,ad:true,forced:true},":MQ08BUBCSMapTabNOPV":{omn:{an:"MQ08BUBCSMapTab"},cs:false},":MQ08BUBCSReviewsTab":{omn:{pv:true,an:"MQ08BUBCSReviewsTab"},cs:true,ad:true,forced:true},":MQ08BUBCSReviewsTabNOPV":{omn:{an:"MQ08BUBCSReviewsTab"},cs:false},":MQ08BUBCSZoomStreetLevel":{omn:{pv:true,an:"MQ08BUBCSZoomStreetLevel"},cs:true,ad:true,forced:true},":MQ08BUBSRCHCSMapPVA":{omn:{pva:true,an:"MQ08BUBSRCHCSMap"},cs:false},":MQ08BUBSRCHSBMapPVA":{omn:{pva:true,an:"MQ08BUBSRCHSBMap"},cs:false},":MQ08BUBSRCHCSDirTo":{omn:{pva:true,an:"MQ08BUBSRCHCSDirTo"},cs:false},":MQ08BUBSRCHCSDirFrom":{omn:{pva:true,an:"MQ08BUBSRCHCSDirFrom"},cs:false},":MQ08CSAddSearchNamePVA":{omn:{pva:true,an:"MQ08CSAddSearchName"},cs:false},":MQ08CSAddSearchName":{omn:{pv:true,an:"MQ08CSAddSearchName"},cs:true,ad:true},":MQ08CSAddSearchPVA":{omn:{pva:true,an:"MQ08CSAddSearch"},cs:false},":MQ08CSAddSearch":{omn:{pv:true,an:"MQ08CSAddSearch"},cs:true,ad:true},":MQ08SBMoreInfo":{omn:{pv:true,an:"MQ08SBMoreInfo"},cs:true,ad:true,forced:true},":MQ08LOCSRCHSBDirFrom":{omn:{pva:true,an:"MQ08LOCSRCHSBDirFrom"},cs:false},":MQ08LOCSRCHSBDirTo":{omn:{pva:true,an:"MQ08LOCSRCHSBDirTo"},cs:false},":MQ08BUBCSLocDetails":{omn:{pv:true,an:"MQ08BUBCSLocDetails"},cs:true,ad:true,forced:true},":MQ08BUBCSLocDetailsNOPV":{omn:{an:"MQ08BUBCSLocDetails"},cs:false},":MQ08BUBSBLocDetails":{omn:{pv:true,an:"MQ08BUBSBLocDetails"},cs:true,ad:true,forced:true},":MQ08BUBCSLessInfo":{omn:{pv:true,an:"MQ08BUBCSLessInfo"},cs:true,ad:true,forced:true},":MQ08BUBCSClose":{omn:{pv:true,an:"MQ08BUBCSClose"},cs:true,ad:true,forced:true},":MQ08BUBCSCloseAO":{omn:{an:"MQ08BUBCSClose"},cs:false},":MQ08BUBCSPrint":{omn:{pv:false,an:"MQ08BUBCSPrint"},cs:false,ad:true},":MQ08LOCCSMore":{omn:{pv:true,an:"MQ08LOCCSMore"},cs:true,ad:true,forced:true},":MQ08CSOVERWhatsNearby1":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby1"},cs:false},":MQ08CSOVERWhatsNearby2":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby2"},cs:false},":MQ08CSOVERWhatsNearby3":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby3"},cs:false},":MQ08CSOVERWhatsNearby4":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby4"},cs:false},":MQ08CSOVERWhatsNearby5":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby5"},cs:false},":MQ08CSOVERWhatsNearby6":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby6"},cs:false},":MQ08CSOVERWhatsNearby7":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby7"},cs:false},":MQ08CSOVERWhatsNearby8":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby8"},cs:false},":MQ08CSOVERWhatsNearby9":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby9"},cs:false},":MQ08CSOVERWhatsNearby10":{omn:{pva:true,an:"MQ08CSOVERWhatsNearby10"},cs:false},":MQ08ReorderUp":{omn:{pv:true,an:"MQ08ReorderUp"},cs:true,ad:true},":MQ08ReorderDown":{omn:{pv:true,an:"MQ08ReorderDown"},cs:true,ad:true},":MQ08DragStop":{omn:{pv:true,an:"MQ08DragStop"},cs:true,ad:true},":MQ08AvoidMan":{omn:{pv:true,an:"MQ08AvoidMan"},cs:true,ad:true},":MQ08AvoidHigh":{omn:{pv:true,an:"MQ08AvoidHigh"},cs:true,ad:true},":MQ08AvoidSeason":{omn:{pv:true,an:"MQ08AvoidSeason"},cs:true,ad:true},":MQ08AvoidToll":{omn:{pv:true,an:"MQ08AvoidToll"},cs:true,ad:true},":MQ08ShortTime":{omn:{pv:true,an:"MQ08ShortTime"},cs:true,ad:true},":MQ08ShortDistance":{omn:{pv:true,an:"MQ08ShortDistance"},cs:true,ad:true},":MQ08ReverseRoute":{omn:{pv:true,an:"MQ08ReverseRoute"},cs:true,ad:true},":MQ08RestoreAvoid":{omn:{pv:true,an:"MQ08RestoreAvoid"},cs:true,ad:true},":MQ08SearchNearbyBar":{omn:{pv:true,an:"MQ08SearchNearbyBar"},cs:true,ad:true},":MQ08PopSearch1":{omn:{pv:true,an:"MQ08PopSearch1"},cs:true,ad:true},":MQ08PopSearch2":{omn:{pv:true,an:"MQ08PopSearch2"},cs:true,ad:true},":MQ08PopSearch3":{omn:{pv:true,an:"MQ08PopSearch3"},cs:true,ad:true},":MQ08PopSearch4":{omn:{pv:true,an:"MQ08PopSearch4"},cs:true,ad:true},":MQ08PopSearch5":{omn:{pv:true,an:"MQ08PopSearch5"},cs:true,ad:true},":MQ08PopSearch6":{omn:{pv:true,an:"MQ08PopSearch6"},cs:true,ad:true},":MQ08PopSearch1PVA":{omn:{pva:true,an:"MQ08PopSearch1"},cs:false},":MQ08PopSearch2PVA":{omn:{pva:true,an:"MQ08PopSearch2"},cs:false},":MQ08PopSearch3PVA":{omn:{pva:true,an:"MQ08PopSearch3"},cs:false},":MQ08PopSearch4PVA":{omn:{pva:true,an:"MQ08PopSearch4"},cs:false},":MQ08PopSearch5PVA":{omn:{pva:true,an:"MQ08PopSearch5"},cs:false},":MQ08PopSearch6PVA":{omn:{pva:true,an:"MQ08PopSearch6"},cs:false},":MQ08BUBPopSearch1":{omn:{pv:true,an:"MQ08BUBPopSearch1"},cs:true,ad:true},":MQ08BUBPopSearch2":{omn:{pv:true,an:"MQ08BUBPopSearch2"},cs:true,ad:true},":MQ08BUBPopSearch3":{omn:{pv:true,an:"MQ08BUBPopSearch3"},cs:true,ad:true},":MQ08BUBPopSearch4":{omn:{pv:true,an:"MQ08BUBPopSearch4"},cs:true,ad:true},":MQ08BUBPopSearch5":{omn:{pv:true,an:"MQ08BUBPopSearch5"},cs:true,ad:true},":MQ08BUBPopSearch6":{omn:{pv:true,an:"MQ08BUBPopSearch6"},cs:true,ad:true},":MQ08BUBPopSearch1PVA":{omn:{pva:true,an:"MQ08BUBPopSearch1"},cs:false},":MQ08BUBPopSearch2PVA":{omn:{pva:true,an:"MQ08BUBPopSearch2"},cs:false},":MQ08BUBPopSearch3PVA":{omn:{pva:true,an:"MQ08BUBPopSearch3"},cs:false},":MQ08BUBPopSearch4PVA":{omn:{pva:true,an:"MQ08BUBPopSearch4"},cs:false},":MQ08BUBPopSearch5PVA":{omn:{pva:true,an:"MQ08BUBPopSearch5"},cs:false},":MQ08BUBPopSearch6PVA":{omn:{pva:true,an:"MQ08BUBPopSearch6"},cs:false},":MQ08SearchNearbyGo":{omn:{pv:true,an:"MQ08SearchNearbyGo"},cs:true,ad:true},":MQ08SearchNearbyGoPVA":{omn:{pva:true,an:"MQ08SearchNearbyGo"},cs:false},":MQ08RouteOn":{omn:{pv:true,an:"MQ08RouteOn"},cs:true,ad:true},":MQ08RouteOff":{omn:{pv:true,an:"MQ08RouteOff"},cs:true,ad:true},":MQ08AddNextGo":{omn:{pv:true,an:"MQ08AddNextGo"},cs:true,ad:true},":MQ08DirFromGo":{omn:{pva:true,an:"MQ08DirFromGo"},cs:false},":MQ08DirToGo":{omn:{pva:true,an:"MQ08DirToGo"},cs:false},":MQ08RouteOptionsGo":{omn:{pv:true,an:"MQ08RouteOptionsGo"},cs:true,ad:true},":MQ08PlacesForm":{omn:{pv:true,an:"MQ08PlacesForm"},cs:true},":MQ08Distance":{omn:{pv:true,an:"MQ08Distance"},cs:true,ad:true},":MQ08Alpha":{omn:{pv:true,an:"MQ08Alpha"},cs:true,ad:true},":MQ08Relevance":{omn:{pv:true,an:"MQ08Relevance"},cs:true,ad:true},":MQ08RefineRadius":{omn:{pv:true,an:"MQ08RefineRadius"},cs:true,ad:true},":MQ08RefineCity":{omn:{pv:true,an:"MQ08RefineCity"},cs:true,ad:true},":MQ08RefineCategory":{omn:{pv:true,an:"MQ08RefineCategory"},cs:true,ad:true},":MQ08Next":{omn:{pv:true,an:"MQ08Next"},cs:true,ad:true},":MQ08NextTop":{omn:{pv:true,an:"MQ08NextTop"},cs:true,ad:true},":MQ08Previous":{omn:{pv:true,an:"MQ08Previous"},cs:true,ad:true},":MQ08PreviousTop":{omn:{pv:true,an:"MQ08PreviousTop"},cs:true,ad:true},":MQ08AddSearch":{omn:{pv:true,an:"MQ08AddSearch"},cs:true,ad:true},":MQ08SBAddSearch":{omn:{pv:true,an:"MQ08SBAddSearch"},cs:true,ad:true},":MQ08BUBAddSearch":{omn:{pv:true,an:"MQ08BUBAddSearch"},cs:true,ad:true},":MQ08AddSearchPVA":{omn:{pva:true,an:"MQ08AddSearch"},cs:false},":MQ08BUBCSAddSearch":{omn:{pv:true,an:"MQ08BUBCSAddSearch"},cs:true,ad:true},":MQ08BUBCSAddSearchPVA":{omn:{pva:true,an:"MQ08BUBCSAddSearch"},cs:false},":MQ08BUBSBAddSearch":{omn:{pv:true,an:"MQ08BUBSBAddSearch"},cs:true,ad:true},":MQ08BUBSBAddSearchPVA":{omn:{pva:true,an:"MQ08BUBSBAddSearch"},cs:false},":MQ08SBAddSearchPVA":{omn:{pva:true,an:"MQ08SBAddSearch"},cs:false},":MQ08AddSearchName":{omn:{pv:true,an:"MQ08AddSearchName"},cs:true,ad:true},":MQ08AddSearchNamePVA":{omn:{pva:true,an:"MQ08AddSearchName"},cs:false},":MQ08SBAddSearchName":{omn:{pv:true,an:"MQ08SBAddSearchName"},cs:true,ad:true},":MQ08SBAddSearchNamePVA":{omn:{pva:true,an:"MQ08SBAddSearchName"},cs:false},":MQ08BUBAddSearchPVA":{omn:{pva:true,an:"MQ08BUBAddSearch"},cs:false},":MQ08CancelSearchPVA":{omn:{pva:true,an:"MQ08CancelSearch"},cs:false},":MQ08CancelSearch":{omn:{pv:true,an:"MQ08CancelSearch"},cs:true,ad:true,forced:true},":MQ08EditGo":{omn:{pv:true,an:"MQ08EditGo"},cs:true,ad:true},":MQ08LOCDirTo":{omn:{pva:true,an:"MQ08LOCDirTo"},cs:false},":MQ08LOCDirFrom":{omn:{pva:true,an:"MQ08LOCDirFrom"},cs:false},":MQ08BUBSRCHMapPVA":{omn:{pva:true,an:"MQ08BUBSRCHMap"},cs:false},":MQ08LOCSRCHDirTo":{omn:{pva:true,an:"MQ08LOCSRCHDirTo"},cs:false},":MQ08LOCSRCHDirFrom":{omn:{pva:true,an:"MQ08LOCSRCHDirFrom"},cs:false},":MQ08BUBSRCHDirTo":{omn:{pva:true,an:"MQ08BUBSRCHDirTo"},cs:false},":MQ08BUBSRCHDirFrom":{omn:{pva:true,an:"MQ08BUBSRCHDirFrom"},cs:false},":MQ08BUBSRCHMap":{omn:{pva:true,an:"MQ08BUBSRCHMap"},cs:false},":MQ08ResultsNear":{omn:{pv:true,an:"MQ08ResultsNear"},cs:true,ad:true},":MQ08LOCEmail":{omn:{an:"MQ08LOCEmail"},cs:false,ad:true},":MQ08EmailClose":{omn:{an:"MQ08EmailClose"},cs:false,ad:true},":MQ08S2CClose":{omn:{an:"MQ08S2CClose"},cs:false,ad:true},":MQ08AOLSearch":{omn:{an:"MQ08AOLSearch",pause:250},cs:false},":MQ08LOCMap":{omn:{pva:true,an:"MQ08LOCMap"},cs:false},":MQ08S2GClose":{omn:{an:"MQ08S2GClose"},ad:true},":dummy":{omn:{pv:false,an:"dummy"},cs:false}},_getAction:function(_182){
return this._userActionMapping[_182]||this._userActionMapping[":"];
},_getUserActionMappingType:function(_183){
var uam=this._getAction(_183);
if(uam){
if(uam["forced"]){
return "forced";
}else{
if(uam["omn"]){
if(uam["omn"].pv){
if(uam["omn"].an){
return "pageviewAction";
}else{
return "pageview";
}
}else{
if(uam["omn"].an){
if(uam["omn"].pva){
return "pageviewattribute";
}else{
return "action";
}
}
}
}
}
}else{
return "action";
}
},a:function(uam){
var _186=this._getUserActionMappingType(uam);
if(_186=="forced"){
this._userAction=uam;
debug("Forced PV for action: "+uam);
this.commit();
}else{
if(_186=="action"&&!this._userAction){
this._userAction=uam;
this.commit();
}else{
if(_186=="pageviewAction"&&!this._userAction){
this._userAction=uam;
}else{
if(_186=="pageview"&&!this._userAction){
this._userAction=uam;
}else{
if(_186=="pageviewattribute"&&!this._userAction){
var _187=mq.getCookie("pageViewAttribute");
if(!_187&&_187!=""){
mq.setCookie("pageViewAttribute",this._getAction(uam).omn.an,1,"/");
}
return;
}
}
}
}
}
},promo:function(_188){
this._invokeOmniture({an:_188,pause:250});
},commit:function(){
if(this._userAction){
this._fire(this._userAction);
this._userAction=null;
}
},_fire:function(_189){
var _18a=this._getAction(_189);
if(typeof (_18a)=="undefined"){
_189=(_189.indexOf(":")==0)?_189=_189.substring(1,_189.length):_189;
_18a={};
_18a.omn={};
_18a.omn.an=_189;
}
if(_18a["omn"]){
this._invokeOmniture(_18a["omn"]);
}
if(_18a["cs"]){
this._comScore(_18a["cs"],_18a["omn"]);
}
if(_18a["ad"]){
var jtn=_189.indexOf(":")>=0?_189.substring(_189.indexOf(":")+1):_189;
this._invokeAd(jtn,{});
}
if(logOmnQueryParams){
this.debug("=======================================================================");
}
},_invokeOmniture:function(_18c){
try{
s_265.prop20=null;
s_265.prop21=null;
s_265.prop2="";
s_265.pageName="";
var _18d=this._generatePageViewName();
var pv=_18c.pv;
if(typeof (pv)=="boolean"){
pv=_18d;
}
if(_18c.pv){
var _18f=this._generateProp2(pv);
s_265.prop2=s_265.pfxID+" : "+_18f;
s_265.pageName=s_265.pfxID+" : "+pv;
var _190="";
if(_18c.an){
s_265.prop20=_18c.an;
_190=", an(prop20): "+_18c.an;
}else{
if(this._pageViewAttribute&&this._pageViewAttribute!=""){
var pva=this._pageViewAttribute;
pva=(pva.indexOf(":")==0)?pva.substring(1,pva.length):pva;
s_265.prop20=pva;
_190=", an(prop20): "+pva;
this._pageViewAttribute=null;
mq.setCookie("pageViewAttribute","",-1,"/");
mq.deleteCookie("pageViewAttribute");
}else{
s_265.prop20="none";
}
}
s_account=s_accountCL+((mq.getServerPurpose()=="production")?",aolsvc":"");
if(typeof (testbedOmnitureValue)!="undefined"){
s_265.prop17=testbedOmnitureValue;
}
try{
this._getLogger(s_account).t();
}
catch(e){
logDebug("ua._invokeOmniture: t()",e);
}
this.debug("[omniture] pv: "+pv+", sd(prop2): '"+_18f+"'"+_190);
this.debugSelenium();
}else{
s_265.prop21=_18d;
if(typeof (testbedOmnitureValue)!="undefined"){
s_265.prop22=testbedOmnitureValue;
}
s_accountCL;
try{
this._getLogger(s_accountCL).tl(true,"o",_18c.an);
}
catch(e){
logDebug("ua._invokeOmniture: tl()",e);
}
if(_18c.pause){
var now=new Date();
var _193=now.getTime()+_18c.pause;
var _194=true;
while(_194){
now=new Date();
if(now.getTime()>_193){
_194=false;
}
}
}
s_265.sa(s_account);
this.debug("[omniture] an: "+_18c.an+", pv(prop21): '"+_18d+"'");
}
if(logOmnQueryParams){
this._logOmnitureQueryParams();
}
s_265.prop20=null;
s_265.prop21=null;
s_265.prop22=null;
s_265.prop2="";
s_265.pageName="";
if(s_265.prop16){
s_265.prop16=null;
}
}
catch(e){
logDebug("ua._invokeOmniture",e);
}
},isActionInCache:function(_195){
if(this._userAction==_195){
return true;
}
return false;
},_logOmnitureQueryParams:function(){
var _196=s_265.d.images;
var _197=null;
if(_196&&_196.length>0&&_196[_196.length-1].name&&_196[_196.length-1].name.indexOf(s_accountCL)>=0){
_197=_196[_196.length-1];
}else{
if(_196&&_196.length>0){
for(var i=_196.length-1;i>=0;i--){
var img=_196[i];
if(img&&img.name&&img.name.indexOf(s_accountCL)>=0){
_197=img;
break;
}
}
}
}
if(_197){
try{
var _19a=_197.src;
var _19b=_19a.substring(_19a.indexOf("?")+1,_19a.length);
var host=_19a.substring(0,_19a.indexOf("?"));
var _19d=_19b.split("&");
var _19e="";
for(var i=0;i<_19d.length;i++){
var tmp=_19d[i].split("=");
if(tmp.length==2){
_19e+=(tmp[0]+" = "+unescape(tmp[1])+"; ");
}
}
this.debug("[omniture] URL-QueryParams: host = "+host+"; "+_19e.substring(0,_19e.length-2));
}
catch(e){
this.debug("[omniture] URL-QueryParams: Error in parsing Omniture query information.");
}
}else{
this.debug("[omniture] URL-QueryParams: Not able to find omniture query.");
}
},_initialAdSuppressionComplete:false,_invokeAd:function(_1a0,_1a1){
if(this._initialAdSuppressionComplete){
var pv=this._generatePageViewName(),e,_1a4;
if(typeof _1a1=="object"){
_1a4=_1a1.an;
}
if(!_1a4){
_1a4=_1a0;
}
try{
var us=controller.adUserStateFromModel();
var _1a6=mq.ad.selectCurrentRegions();
mq.ad.refreshRegions(_1a6,{userAction:_1a0,pageView:pv,userState:us,promotionalBrandingId:controller._model.blId});
this.debug("[ad] true");
}
catch(e){
debug("[ad] Error in ad call: ",e);
this.debug("[ad] Error in ad call.");
}
}else{
this._initialAdSuppressionComplete=true;
}
},_getLogger:function(acct){
var s=s_gi(acct);
if(!s){
return;
}
(acct==s_accountCL)?s.linkTrackVars="prop21,prop22":s.linkTrackVars="None";
s.linkTrackEvents="None";
return s;
},_initialComScoreSuppressionComplete:false,_comScore:function(fire,omn){
if(fire){
if(this._initialComScoreSuppressionComplete){
var pv="?pv="+this._generatePageViewName();
var _1ac="";
if(omn){
if(omn.an){
_1ac="&an="+omn.an;
}
}
var r="&r="+Math.round((Math.random()*10000))+"&h=2";
var _1ae="/mqrequest.html"+pv+_1ac+r;
var req=({url:_1ae,handleAs:"text",timeout:10000,handle:function(_1b0,_1b1){
if(_1b0 instanceof Error){
ua.debug("[comScore] something went horribly, horribly wrong.");
}
}});
try{
dojo.xhrGet(req);
ua.debug("[comScore] pv: "+_1ae);
}
catch(e){
ua.debug("[comScore] something went horribly, horribly wrong. Error: "+e);
}
}else{
ua.debug("[comScore] pv: false");
this._initialComScoreSuppressionComplete=true;
}
}
if(!fire){
ua.debug("[comScore] pv: false");
}
},_generatePageViewName:function(){
if(controller&&controller._model){
var sb=new dojox.string.Builder();
var _1b3=controller._model;
var _1b4=$d("printDisplay").style.display;
if(addressPopup&&!addressPopup.closed){
return (addressPopup.name=="airports")?"address.airport":"address.category";
}
if(_1b3.mode=="MY"){
if($d("offersWrapper")){
sb.append("setting.offers");
}else{
sb.append("settings.default");
}
return sb.toString();
}else{
if(mqPageContext=="rblprofile"){
sb.append("cs.results");
if(_1b4=="block"){
sb.append(".print");
}else{
if($d("offersWrapper")){
sb.append(".offers");
}else{
sb.append(".scroll");
}
}
}else{
if(_1b3.mode=="MAPS"){
var _1b5=0;
if(_1b3.locations){
var _1b5=_1b3.locations.length;
}
var _1b6=null;
if(_1b5>1){
sb.append("dir.results");
}else{
if(_1b5==1){
sb.append("map.results");
}else{
if(_1b4=="block"){
return "home.form.print";
}else{
if(_1b3.trafficEnabled){
return "traffic.form.map";
}else{
return "home.form.map";
}
}
}
}
if(_1b4=="block"){
sb.append(".print");
}else{
if($d("offersWrapper")){
sb.append(".offers");
}else{
sb.append(".scroll");
}
}
}else{
if(_1b3.mode=="SEARCH"){
var _1b7=0;
if($w("searchResults")){
if($w("searchResults").available){
_1b7=$w("searchResults").available;
}
}
var _1b8="search.results";
if(_1b7==0){
return (_1b4=="block")?"home.form.print":"home.form.split";
}else{
if(mq.isShowing($d("bizLocatorSelect"))){
_1b8="bl.results";
}
}
sb.append(_1b8);
if(_1b4=="block"){
sb.append(".print");
}else{
if($d("offersWrapper")){
sb.append(".offers");
}else{
sb.append(".split");
}
}
}
}
}
return sb.toString();
}
}
return sb.toString();
},_generateProp2:function(_1b9){
s_265.prop2="";
var sb=new dojox.string.Builder();
if(_1b9.indexOf("print")>=0){
return "printer friendly";
}
var _1bb=_1b9.split(".");
if(_1bb[_1bb.length-1]=="offers"){
return "offers";
}
if(_1bb.length>1){
if(_1bb[0]=="dir"){
sb.append("directions ");
}else{
if(_1bb[0]=="map"){
sb.append("map ");
}else{
if(_1bb[0]=="cs"){
sb.append("citysearch ");
}else{
if(_1bb[0]=="search"){
sb.append("search ");
}else{
if(_1bb[0]=="bl"){
return "business locator";
}else{
if(_1bb[0]=="settings"){
return "settings";
}else{
if(_1bb[0]=="address"){
return "address";
}else{
if(_1bb[0]=="traffic"){
return "traffic";
}
}
}
}
}
}
}
}
if(_1bb[1]=="form"){
return "home form";
}else{
if(_1bb[1]=="results"){
sb.append("results");
}
}
return sb.toString();
}else{
this.debug("Error: there was a problem generating prop2 based on pagename: >>"+_1b9+"<<");
return "";
}
},debug:function(_1bc){
var dbgr=$d("userActionDebugger");
if(dbgr){
var _1be=dbgr.value;
dbgr.value=_1be+"\n"+_1bc;
debug(_1bc);
dbgr.value=dbgr.value;
dbgr.scrollTop=dbgr.scrollHeight;
}
},debugSelenium:function(){
var _1bf=$d("seleniumDebugger");
if(_1bf){
var _1c0=_1bf.value;
_1bf.value=_1c0+"\nok";
}
},showDebugger:function(){
dojo.removeClass($d("userActionDebugger").parentNode,"hiddenButPresent");
$d("clearLogger").style.visibility="visible";
$d("closeLogger").style.visibility="visible";
},clear:function(){
$d("userActionDebugger").value="";
}});
}
if(!dojo._hasResource["mq.weather"]){
dojo._hasResource["mq.weather"]=true;
dojo.provide("mq.weather");
mq.weather.show=function(node,ind){
var _1c3="<div id='weatherDiv' dojoType='dijit.layout.ContentPane' style='width: 250px;height: 200px;'></div>";
var _1c4=dojo.coords(node,true);
var _1c5=new mq.widget.MQPopup({id:"mqWeatherPopup",xoffset:_1c4.x+65,yoffset:_1c4.y-30,popupContent:_1c3,closeButtonRequired:true,closeOnBackGroundClick:true,widgetsInTemplate:true,closeAll:true,popupArrowPlacement:11,onClose:mq.weather.close});
var sb=new dojox.string.Builder();
var loc=controller._model.locations[ind].location;
sb.append("/controller/weather?latitude=").append(loc.latitude).append("&longitude=").append(loc.longitude);
$w("weatherDiv").setHref(sb.toString());
};
mq.weather.close=function(){
debug("Close weather");
$w("weatherDiv").destroy();
$w("mqWeatherPopup").close();
};
}
if(!dojo._hasResource["mq.searcheditform"]){
dojo._hasResource["mq.searcheditform"]=true;
dojo.provide("mq.searcheditform");
dojo.declare("mq.searcheditform",mq.form,{constructor:function(args,node){
try{
this.connect(this.prefix+"-form","onsubmit","locationHandler");
}
catch(e){
logDebug("searcheditform.constructor",e);
}
},createTemplate:function(){
var d=new dojox.string.Builder();
d.append("\t<div class=\"lcEditNext\">");
d.append("\t<form id=\""+this.prefix+"-form\" action=\"/search\" method=\"get\" >");
d.append("\t\t<fieldset><div>");
d.append("\t\t\t<div class=\"searchTitle\"><h5>Edit Search</h5></div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"lcAddNextExtDiv\" id=\"editLocBus\">");
d.append("\t\t\t<span class=\"b\">Find a Business</span> <span class=\"gray\">(optional)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkSearch\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t<div class=\"inputAlign topinputalt\">");
d.append("\t\t\t\t<div class=\"fltl\"><input title=\"Enter the business name or description\" maxlength=\"100\" type=\"text\" id=\""+this.prefix+"0-query\" tabindex=\"6\" value=\"Enter Search Term\"  class=\"nochev\"/></div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div>");
d.append("\t\t\t<span class=\"b\">Location</span><span class=\"gray\"> (Address, City, State and/or ZIP)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkLocation\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t<div class=\"inputAlign topinputaltlong fltl\">");
d.append("\t\t\t\t<div class=\"fltl\"><input title=\"Enter the location including Address, City and State\" maxlength=\"120\" tabindex=\"7\" id=\""+this.prefix+"0-addressInput\"  type=\"text\" value=\"\" /></div>");
d.append("\t\t\t\t<div class=\"chevron\">");
d.append("\t\t\t\t\t<a id=\""+this.prefix+"0-sr\">&nbsp;</a>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"fltr\">");
d.append("\t\t\t<input id=\""+this.prefix+"0-button\" tabindex=\"8\" class=\"btn\" type=\"submit\" onclick=\"view.searchView.showHideEditSearch();\" value=\"Go\"/> ");
d.append("\t\t\t<button id=\""+this.prefix+"0-cancel\" tabindex=\"9\" class=\"btn\" type=\"button\" onclick=\"view.searchView.showHideEditSearch();\" value=\"Cancel\">Cancel</button>");
d.append("\t\t</div></fieldset>");
d.append("\t\t<div class=\"clearb\"></div>");
d.append("\t</form>");
d.append("\t</div>");
var _1cb=document.createElement("div");
_1cb.setAttribute("id",this.jsId);
_1cb.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_1cb,this.parentElem.nextSibling);
}});
}
if(!dojo._hasResource["mq.mapresultsform"]){
dojo._hasResource["mq.mapresultsform"]=true;
dojo.provide("mq.mapresultsform");
dojo.declare("mq.mapresultsform",mq.form,{constructor:function(args,node){
debug("mq.mapresultform constructor: "+this.formType);
try{
this.hookedUpHandlers=[];
this.connect(this.prefix+"-form","onsubmit","locationHandler");
this.connect(this.prefix+"addLocationSelect","onchange","changeSelect");
}
catch(e){
logDebug("mapresultsform.constructor.connectors",e);
}
},createTemplate:function(){
var _1ce,_1cf,_1d0;
_1ce="minus";
_1cf="block";
_1d0="block";
var d=new dojox.string.Builder();
d.append("");
d.append("<div class=\"lcAddNext\" id=\"lcAddNext\">");
d.append("\t<form id=\""+this.prefix+"-form\" class=\"locationForm\" action=\"/search\" method=\"get\">");
d.append("\t\t<div id=\""+this.prefix+"addNextLocationToggle\" class=\"lcAddNextInd\">");
d.append("\t\t<span id=\""+this.prefix+"toggleAddLink\" class=\"toggleAddLink\" class=\"b\">Add Another Location</span>");
d.append("\t</div>");
d.append("\t\t<div id=\"addNextDir\">");
d.append("\t\t<div id=\""+this.prefix+"addNextLocationFields\" style=\"display:"+_1cf+";\">");
d.append("\t\t\t<div class=\"fltl\" id=\"addNextLoc\">");
d.append("\t\t\t\t<div class=\"fltl lcAddNextExtDiv\">");
d.append("\t\t\t\t\t<label>Find a Business</label> <span class=\"gray\">(optional)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkSearch\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t\t\t<div class=\"inputAlign topinputalt\">");
d.append("\t\t\t\t\t\t<div class=\"fltl\"><input title=\"Enter the business name or description\" maxlength=\"100\" type=\"text\" tabindex=\""+this.startTabIndex+"\" id=\""+this.prefix+"0-query\" value=\"Enter Search Term\" class=\"nochev\"/></div>");
d.append("\t\t\t\t\t</div>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t\t<div class=\"fltl\">");
d.append("\t\t\t\t\t<label>Location</label><span class=\"gray\"> (Address, City, State and/or ZIP)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkLocation\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t\t\t<div class=\"inputAlign topinputaltlong fltl\">");
d.append("\t\t\t\t\t\t<div class=\"fltl\"><input title=\"Enter the location including Address, City and State\" maxlength=\"120\" tabindex=\""+(this.startTabIndex+1)+"\" id=\""+this.prefix+"0-addressInput\" type=\"text\" value=\"\" /></div>");
d.append("\t\t\t\t\t\t<div class=\"chevron\">");
d.append("\t\t\t\t\t\t\t<a id=\""+this.prefix+"0-sr\">&nbsp;</a>");
d.append("\t\t\t\t\t\t</div>");
d.append("\t\t\t\t\t</div>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t\t<button id=\""+this.prefix+"-button\" tabindex=\""+(this.startTabIndex+2)+"\" class=\"btn\" type=\"submit\" value=\"Add Location\">Add Location</button> ");
d.append("\t\t\t\t<div class=\"clearb\"></div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"clearb\"></div>");
d.append("\t</form>");
d.append("</div>");
var _1d2=document.createElement("div");
_1d2.setAttribute("id",this.jsId);
_1d2.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_1d2,this.parentElem.nextSibling);
},locationHandler:function(evt){
try{
debug("mapresultsform.locationHandler");
evt.preventDefault();
this.geocodeCounter=0;
if($w("mqErrorPopup")){
return;
}
mq.showLoadingImage();
var locs=[];
var loc={};
loc.formName=this.setFormName();
var _1d6=this.formContains("Addr",0,loc);
var _1d7=this.formContains("Query",0,loc);
var _1d8=this.isDirectionsTo();
var _1d9=($d(this.prefix+"0-query").value==this.getDefaultQuery())?"":$d(this.prefix+"0-query").value;
this.idList=[this.prefix+"0-addressInput"];
if(this.tmpStartLocation&&($d(this.prefix+"0-addressInput").value==mq.formatLocationSingleLine(this.tmpStartLocation))&&(_1d9==this.tmpStartLocation.name)){
if(_1d7){
(this.tmpStartLocation.name==$d(this.prefix+"0-query").value)?this.tmpStartLocation.name=loc.query:this.tmpStartLocation.query=loc.query;
}else{
if(_1d6){
this.tmpStartLocation.addressInput=loc.addressInput;
this.tmpStartLocation.query=this.tmpStartLocation.name=null;
}
}
var _1da=controller._model;
var _1db={};
_1db.location=this.tmpStartLocation;
_1da.locations.push(_1db);
if(_1d8){
ua.a(":MQ08DirToGo");
_1da.locations.reverse();
}else{
ua.a(":MQ08DirFromGo");
}
mq.createUrlFromModel(_1da);
return;
}else{
locs.push(loc);
}
if(_1d6){
locs[0].query=null;
if(_1d8){
locs.push(controller._model.locations[0].location);
this.idList.push("dirStartAddrSummary");
ua.a(":MQ08DirToGo");
view.scrollToElement=0;
}
if(this.allowGeocode(4)){
this.geocode(locs,this.idList);
}
}else{
if(_1d7){
var _1da=controller._model;
var l=_1da.locations[this.locNum-1].location;
for(prop in l){
if(prop!="name"&&prop!="id"&&prop!="sourceId"){
loc[prop]=l[prop];
}
}
if(loc.geocodeQuality=="STATE"){
loc={state:loc.state};
}
loc.query=$d(this.prefix+"0-query").value;
var _1db={};
_1db.location=loc;
_1db.mapOrder=i;
_1da.locations.push(_1db);
if(_1d8){
_1da.locations.reverse();
}
mq.createUrlFromModel(_1da);
}else{
mq.showErrorPopupForNoAddr(this.prefix+"0-addressInput");
}
}
}
catch(e){
logDebug("mapresultsform.locationHandler",e);
}
},geocode:function(locs,_1de,_1df){
this.geocodeCounter++;
debug("GeocodeCounter: "+this.geocodeCounter);
var _1e0=this.isDirectionsTo();
for(var i=0;i<locs.length;i++){
if(!locs[i].formName){
locs[i].formName=this.setFormName();
}
}
debug("mapresultsform.geocode: "+locs.length+"  mode "+this.mode);
debug("allResultsGeocoded: "+_1df);
mq.showLoadingImage();
if(!_1df){
var _1e2=dojo.hitch(this,"handleGeocodeLocation",_1de);
UIService.geocodeLocationsService(locs,_1de,_1e2);
}else{
debug("Geocoded locations are true");
var _1e3=[];
var _1e4=controller._model;
for(var i=0;i<locs.length;i++){
var _1e5={};
_1e5.location=locs[i];
_1e5.mapOrder=i;
_1e4.locations.push(_1e5);
}
mq.createUrlFromModel(_1e4);
}
},handleGeocodeLocation:function(_1e6,_1e7){
debug("form.handleGeocodeLocation: "+_1e7.length+"--"+this.locNum);
this.results=_1e7;
this.idList=_1e6;
var _1e8=this.isDirectionsTo();
var res=_1e7[0].locationResult;
var _1ea=($d(this.prefix+"0-query").value==this.getDefaultQuery())?"":$d(this.prefix+"0-query").value;
if(_1ea){
res.query=_1ea;
}
if(this.checkDuplicateLocation(res,_1e7)){
mq.hideLoadingImage();
return;
}else{
debug("mapresultsform.handleGeocodeLocation, geocoded: "+res.geocoded);
debug("ResultCode: "+_1e7[0].resultCode);
if(_1e7[0].resultCode=="NO_LOCATION_RESULT"){
this.showNoLocationError(_1e6[0]);
return;
}else{
if(!res.geocoded){
this.ambiguousResults(_1e7,_1e6,0);
return;
}else{
}
}
if(!view.scrollToElement){
view.scrollToElement=0;
}
if(_1e8){
ua.a(":MQ08DirToGo");
}else{
ua.a(":MQ08DirFromGo");
}
var _1eb=controller._model;
var _1ec={};
_1ec.location=res;
_1ec.mapOrder=i;
_1eb.locations.push(_1ec);
if(_1e8){
_1eb.locations.reverse();
}
mq.createUrlFromModel(_1eb);
}
},isDirectionsTo:function(){
return ($d(this.prefix+"addLocationSelect")&&$d(this.prefix+"addLocationSelect").value.toLowerCase()=="to");
},changeSelect:function(evt){
if($d(this.prefix+"addLocationSelect")){
$d(this.prefix+"dirToFromIcon").src=($d(this.prefix+"addLocationSelect").value=="From")?mqPrefix+"/cdn/images/icon-end.png":mqPrefix+"/cdn/images/icon-start.png";
}
}});
}
if(!dojo._hasResource["mq.addnextlocationform"]){
dojo._hasResource["mq.addnextlocationform"]=true;
dojo.provide("mq.addnextlocationform");
dojo.declare("mq.addnextlocationform",mq.form,{constructor:function(args,node){
try{
debug("addnextlocationform.constructor");
this.connect(this.prefix+"-form","onsubmit","locationHandler");
if($d(this.prefix+"addLocationSelect")){
this.connect(this.prefix+"addLocationSelect","onchange","changeSelect");
}
}
catch(e){
logDebug("addnextlocationform.constructor",e);
}
},createTemplate:function(){
var _1f0,_1f1,_1f2;
_1f0="minus";
_1f1="block";
_1f2="block";
var d=new dojox.string.Builder();
d.append("");
d.append("<div class=\"lcAddNext\" id=\"lcAddNext\">");
d.append("\t<form id=\""+this.prefix+"-form\" class=\"locationForm\" action=\"/search\" method=\"get\">");
d.append("\t\t<div id=\""+this.prefix+"addNextLocationToggle\" class=\"lcAddNextInd\">");
d.append("\t\t<span id=\""+this.prefix+"toggleAddLink\" class=\"toggleAddLink\" class=\"b\">Add Another Location</span>");
d.append("\t</div>");
d.append("\t\t<div id=\"addNextDir\">");
d.append("\t\t<div id=\""+this.prefix+"addNextLocationFields\" style=\"display:"+_1f1+";\">");
d.append("\t\t\t<div class=\"fltl\" id=\"addNextLoc\">");
d.append("\t\t\t\t<div class=\"fltl lcAddNextExtDiv\">");
d.append("\t\t\t\t\t<label>Find a Business</label> <span class=\"gray\">(optional)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkSearch\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t\t\t<div class=\"inputAlign topinputalt\">");
d.append("\t\t\t\t\t\t<div class=\"fltl\"><input title=\"Enter the business name or description\" maxlength=\"100\" type=\"text\" tabindex=\""+this.startTabIndex+"\" id=\""+this.prefix+"0-query\" value=\"Enter Search Term\" class=\"nochev\"/></div>");
d.append("\t\t\t\t\t</div>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t\t<div class=\"fltl\">");
d.append("\t\t\t\t\t<label>Location</label><span class=\"gray\"> (Address, City, State and/or ZIP)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkLocation\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t\t\t<div class=\"inputAlign topinputaltlong fltl\">");
d.append("\t\t\t\t\t\t<div class=\"fltl\"><input title=\"Enter the location including Address, City and State\" maxlength=\"120\" tabindex=\""+(this.startTabIndex+1)+"\" id=\""+this.prefix+"0-addressInput\" type=\"text\" value=\"\" /></div>");
d.append("\t\t\t\t\t\t<div class=\"chevron\">");
d.append("\t\t\t\t\t\t\t<a id=\""+this.prefix+"0-sr\">&nbsp;</a>");
d.append("\t\t\t\t\t\t</div>");
d.append("\t\t\t\t\t</div>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t\t<button id=\""+this.prefix+"-button\" tabindex=\""+(this.startTabIndex+2)+"\" type=\"submit\" value=\"Add Location\"><span>Add Location</span></button> ");
d.append("\t\t\t\t<div class=\"clearb\"></div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"clearb\"></div>");
d.append("\t</form>");
d.append("</div>");
var _1f4=document.createElement("div");
_1f4.setAttribute("id",this.jsId);
_1f4.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_1f4,this.parentElem.nextSibling);
},changeSelect:function(evt){
$d(this.prefix+"dirToFromIcon").src=($d(this.prefix+"addLocationSelect").value=="From")?mqPrefix+"/cdn/images/icon-end.png":mqPrefix+"/cdn/images/icon-start.png";
}});
}
if(!dojo._hasResource["mq.editlocationform"]){
dojo._hasResource["mq.editlocationform"]=true;
dojo.provide("mq.editlocationform");
dojo.declare("mq.editlocationform",mq.form,{constructor:function(args,node){
try{
debug("editlocationform.constructor");
this.connect(this.prefix+"-form","onsubmit","locationHandler");
}
catch(e){
logDebug("editlocationform.constructor",e);
}
},createTemplate:function(){
var d=new dojox.string.Builder();
d.append("<div class=\"lcEditNext\">");
d.append("\t<form id=\""+this.prefix+"-form\" action=\"/search\" method=\"get\">");
d.append("\t\t<div class=\"fltl\">");
d.append("\t\t\t<div class=\"fltl\">");
d.append(mq.setImagePng24(mqPrefix+"/cdn/images/icons/stop_"+this.locNum,29,29));
d.append("\t\t\t</div>");
d.append("\t\t\t<div class=\"editTitle\"><h5>Edit Location</h5></div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"fltl lcAddNextExtDiv\">");
d.append("\t\t\t<span class=\"b\">Find a Business</span> <span class=\"gray\">(optional)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkSearch\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t<div class=\"inputAlign topinputalt\">");
d.append("\t\t\t\t<div class=\"fltl\"><input title=\"Enter the business name or description\" maxlength=\"100\" type=\"text\" tabindex=\""+(6+(this.locNum*4))+"\" id=\""+this.prefix+"0-query\" value=\"Enter Search Term\" class=\"nochev\"/></div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"fltl\">");
d.append("\t\t\t<span class=\"b\">Location</span><span class=\"gray\"> (Address, City, State and/or ZIP)</span>&nbsp;<a id=\""+this.prefix+"0-helpBubbleLinkLocation\" href=\"javascript:;\"><img src=\""+mqPrefix+"/cdn/images/icon-help.png\" class=\"alignt\" alt=\"Help\" height=\"15\" width=\"15\"/></a><br/>");
d.append("\t\t\t<div class=\"inputAlign topinputaltlong fltl\">");
d.append("\t\t\t\t<div class=\"fltl\"><input title=\"Enter the location including Address, City and State\" maxlength=\"120\" tabindex=\""+(7+(this.locNum*4))+"\" id=\""+this.prefix+"0-addressInput\" type=\"text\" value=\"\" /></div>");
d.append("\t\t\t\t<div class=\"chevron\">");
d.append("\t\t\t\t\t<a id=\""+this.prefix+"0-sr\">&nbsp;</a>");
d.append("\t\t\t\t</div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"fltl\">");
d.append("\t\t\t<button id=\""+this.prefix+"-button\" tabindex=\""+(8+(this.locNum*4))+"\" class=\"btn\" type=\"submit\" value=\"Go\">Go</button> ");
d.append("\t\t\t<button id=\""+this.prefix+"-cancel\" tabindex=\""+(9+(this.locNum*4))+"\" class=\"btn\" type=\"button\" onclick=\"mq.destroyForm("+this.jsId+", $d('locDiv"+this.locNum+"'));\" value=\"Cancel\">Cancel</button>");
d.append("\t\t</div>");
d.append("\t\t<div class=\"clearb\"></div>");
d.append("\t</form>");
d.append("</div>");
var _1f9=document.createElement("div");
_1f9.setAttribute("id",this.jsId);
_1f9.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_1f9,this.parentElem.nextSibling);
this.populateInputTextField(true,controller._model.locations[this.locNum].location);
}});
}
if(!dojo._hasResource["mq.tabview"]){
dojo._hasResource["mq.tabview"]=true;
dojo.provide("mq.tabview");
dojo.declare("mq.TabView",null,{constructor:function(_1fa,_1fb,_1fc){
this._controller=_1fa;
this._idList=_1fc;
},alphabet:["A","B","C","D","E","F","G","H","I","J"],zoomLevels:{"MAX":14,"MIN":2,"LATLNG":7,"ADDRESS":12,"INTERSECTION":12,"STREET":12,"ZIP":10,"CITY":7,"COUNTY":6,"STATE":4,"COUNTRY":2},tabState:{map:"MAP",normal:"NORMAL",text:"TEXT"},imagePath:"/cdn/images",iconPattern:"",iconWidth:29,iconHeight:29,iconOffsetX:-16,iconOffsetY:-16,initMap:function(loc,_1fe,_1ff,_200,_201){
if(_1fe==null){
_1fe="map";
}
if(!_1ff){
_1ff=this.zoomLevels[loc.geocodeQuality];
}
debug("4: "+this._idList["mapDiv"]);
try{
if(_200&&(model&&model.locations&&model.locations.length>0)){
var _202=model.locations;
var pois=this.getPois(_202);
debug("TabView:initMap:withServerFlag "+model.locations.length);
if(_202.length==1){
var loc=_202[0].location;
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),this.zoomLevels[loc.geocodeQuality],new MQLatLng(loc.latitude,loc.longitude),_1fe);
}else{
if(_202.length>1){
var _204=new MQA.MapInit();
var box;
if(model.showRoute){
var ul=model.routeResults.upperLeft;
var lr=model.routeResults.lowerRight;
box=new MQA.RectLL(new MQA.LatLng(ul.latitude,ul.longitude),new MQA.LatLng(lr.latitude,lr.longitude));
}else{
box=pois.getBoundingRect();
}
_204.setBestFitRect(box);
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),null,new MQLatLng(_202[0].location.latitude,_202[0].location.longitude),_1fe,_204);
if(model.showRoute){
this.addRouteHighlight(model,false);
}
}
}
this._tileMap.infowindow.setTitleBackgroundColor("#E2EAF1");
this._tileMap.addShapeCollection(pois);
this._tileMap.bestFitRect=null;
}else{
if(_201){
var _208;
if(serverResults[0].resultCode=="SEARCH_RESULTS"){
_208=serverResults[0];
}else{
if(serverResults[1]&&serverResults[1].resultCode=="SEARCH_RESULTS"){
_208=serverResults[1];
}
}
var _209=(model.blColor)?model.blColor:"purple";
var pois=this.getSearchPois(_208.searchResults,_208.searchOptions.position,_209);
var _204=new MQA.MapInit();
_204.setBestFitRect(pois.getBoundingRect());
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),null,null,_1fe,_204);
this._tileMap.bestFitRect=null;
}else{
debug("Initializing map for no locations: "+_1ff);
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),_1ff,new MQLatLng(loc.latitude,loc.longitude),_1fe);
}
}
}
catch(e){
logDebug("tabview.initMap-start",e);
}
try{
var tzc=mq.zoomcontrol.makeZoomControl(this._tileMap);
var _20b=new MQA.ViewControl3(this._tileMap);
this._tileMap.addControl(_20b,new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(0,0)));
var tc=mq.traffic.makeTrafficControl(this._tileMap);
this._tileMap.setLogoPlacement(MQA.MapLogo.MAPQUEST,new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_LEFT,new MQA.Size(0,5)));
this._tileMap.setLogoPlacement(MQA.MapLogo.MAPQUEST_COPYRIGHT,new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,new MQA.Size(190,0)));
this._tileMap.setLogoPlacement(MQA.MapLogo.SCALES,new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,new MQA.Size(0,30)));
this._tileMap.getDeclutter().setLeaderLineDotMode(1);
this._tileMap.getDeclutter().setDeclutterMode(2);
MQA.EventManager.addListener(this._tileMap,"click",dojo.hitch(this,"recenterMap"));
this._tileMap.getRolloverWindow().setFlipStateEnabled(true);
this._tileMap.getRolloverWindow().setTextLength(35);
this._tileMap.setBestFitMargin(25);
}
catch(e){
logDebug("tabview.initMap-end",e);
}
},setDefaultMap:function(loc){
this._tileMap.setCenter(new MQLatLng(loc.latitude,loc.longitude));
this._tileMap.setZoomLevel(this.zoomLevels[loc.geocodeQuality]);
},changeMapType:function(evt){
debug("TabView.mapTypeChange: "+evt.mapType);
var _20f=null;
if(evt.mapType=="sat"){
_20f=":MQ08Aerial";
}else{
if(evt.mapType=="hyb"){
_20f=":MQ08Hybrid";
}else{
if(evt.mapType=="map"){
_20f=":MQ08Street";
}
}
}
ua.a(_20f);
this.onMapTypeChange(evt.mapType);
},onMapTypeChange:function(_210){
},onPanZoomChange:function(zoom,_212){
},onRecenter:function(_213){
},changeZoom:function(evt){
debug("TabView.changeZoom: "+evt.zoom);
this.onPanZoomChange(evt.zoom,this._tileMap.getCenter());
},panMap:function(evt){
debug("TabView.panMap: "+evt.eventName);
var pt=new MQA.Point(evt.clientX,evt.clientY);
this.onPanZoomChange(this._tileMap.getZoomLevel(),this._tileMap.getCenter());
},recenterMap:function(evt){
if(!evt.srcObject){
debug("Recenter map");
this._tileMap.slideMapToPoint(evt.xy);
this.onPanZoomChange(this._tileMap.getZoomLevel(),evt.ll);
}
},addPoisToMap:function(_218){
debug("TabView.addPoisToMap: "+_218.length);
try{
this._tileMap.addShapeCollection(this.getPois(_218));
}
catch(e){
logDebug("tabview.addPoisToMap",e);
}
},getPois:function(_219){
var _21a=new MQA.ShapeCollection();
for(var i=0;i<_219.length;i++){
var loc=_219[i].location;
var icon=this.iconPattern.replace("{VAR}",i);
var _21e=new MQA.Icon(this.imagePath+"/icons/"+icon,this.iconWidth,this.iconHeight);
var _21f=new MQA.Icon("http://img.mqcdn.com/mqtoolkit/shadow.png",23,7);
var pt=new MQA.Poi(new MQLatLng(loc.latitude,loc.longitude));
if(controller.numLocs()>1){
pt.setIcon(_21e);
}
pt.setValue("iconOffset",new MQA.Point(this.iconOffsetX+3,this.iconOffsetY-10));
pt.setValue("shadow",_21f);
pt.setValue("shadowOffset",new MQA.Point(this.iconOffsetX+25,this.iconOffsetY+10));
pt.setValue("declutterShadowOffset",new MQA.Point(this.iconOffsetX+28,this.iconOffsetY+15));
if((controller.numLocs()>1)&&loc.sourceId){
pt.createInfoWindowTitleText(mq.util.getMiniPopupContent(loc),"view.locationDetail("+loc.sourceId+")");
}else{
pt.setInfoTitleHTML(mq.util.getMiniPopupContent(loc));
}
pt.setInfoContentHTML(mq.util.getInfoPopupContent(loc,i,false,true,false));
if((controller.numLocs()>1)&&loc.sourceId){
pt.createInfoWindowTitleText(loc.name,"view.locationDetail("+loc.sourceId+")");
pt.createInfoRolloverTitleText(loc.name,"view.locationDetail("+loc.sourceId+")");
}else{
pt.setValue("infoWindowTitleText",loc.name);
}
pt.setKey("stops-"+unescape("%"+(i+65).toString(16)));
MQA.EventManager.addListener(pt,"mouseover",dojo.hitch(this,"openIR",pt));
MQA.EventManager.addListener(pt,"mouseout",dojo.hitch(this,"closeIR",pt));
if((controller.numLocs()>1)&&loc.sourceId){
MQA.EventManager.addListener(pt,"click",dojo.hitch(this,"clickPoi",loc.sourceId,pt));
MQA.EventManager.addListener(pt,"infodisplayboxlinkclick",dojo.hitch(this,"clickLessInfo",loc.sourceId,pt));
MQA.EventManager.addListener(pt,"infodisplayboxclickclosed",dojo.hitch(this,"clickClose",loc.sourceId,pt));
}else{
MQA.EventManager.addListener(pt,"click",dojo.hitch(this,"clickNormalPoi",pt));
}
_21a.add(pt);
}
return _21a;
},openIR:function(pt){
var _222=mq.getPopupContentWidthHeight(pt.getValue("infoContentHTML"));
var _223=document.createElement("div");
_223.style.width=_222.width+"px";
_223.style.height=_222.height+"px";
_223.style.backgroundColor="#FFFFFF";
_223.innerHTML=pt.getValue("infoContentHTML");
pt.showInfoRollover(_223,pt.getValue("infoTitleHTML"));
},closeIR:function(pt){
pt.closeInfoRollover();
},clickPoi:function(ind,poi){
if(poi.ir){
poi.closeInfoRollover();
}
view.locationDetail(ind,"poiclick");
},clickNormalPoi:function(poi){
this._tileMap.closeInfoDisplayBox();
if(poi.ir){
poi.closeInfoRollover();
}
poi.shape.style.zIndex=110;
ua.a(":MQ08BUBLocDetails");
},addLocationForm:function(_228,_229,_22a){
debug("TabView.addLocationForm");
if(!_228){
_228=0;
}
_229="loc"+_228;
if(controller.numLocs()==1){
window[_229+"Form"]=new mq.mapresultsform({template:"addNextLocation",jsId:_229+"Form",prefix:_229,formType:"add",mode:"ajax",parentElem:(_22a)?$d(_22a):$d("locationWindowNarr"),searchBoxStartId:_229+"0-query",locationBoxStartId:_229+"0-addressInput",startTabIndex:(10+(((_228>10)?2:_228)*4)),locNum:(_228>10)?1:_228});
}else{
window[_229+"Form"]=new mq.addnextlocationform({template:"addNextLocation",jsId:_229+"Form",prefix:_229,formType:"add",mode:"ajax",parentElem:(_22a)?$d(_22a):$d("locationWindowNarr"),searchBoxStartId:_229+"0-query",locationBoxStartId:_229+"0-addressInput",startTabIndex:(10+(((_228>10)?2:_228)*4)),locNum:(_228>10)?1:_228});
}
},resizeMap:function(w,h){
var _22d=$d(this._idList["mapDiv"]);
var _22e=(h)?h:dojo.contentBox(_22d).h;
var _22f=(w)?w:dojo.contentBox(_22d).w;
if((_22e!=this._tileMap.getSize().height||_22f!=this._tileMap.getSize().width)&&(!isNaN(_22e)&&!isNaN(_22f))){
_22f=(_22f<0)?(-1*_22f):_22f;
_22e=(_22e<0)?(-1*_22e):_22e;
debug("TabView.resizeMap: "+_22f+","+_22e);
this._tileMap.setSize(new MQA.Size(_22f,_22e));
if(controller._model["trafficEnabled"]){
this._tileMap.controls[MQA.CONTROL_TRAFFIC].getValue("traffic").refresh();
}
}
},getDefaultMapLocation:function(){
if(this._controller._model.mode=="MAPS"&&this._controller._model.centerLatitude&&this._controller._model.centerLongitude){
loc={geocodeQuality:"COUNTRY",latitude:this._controller._model.centerLatitude,longitude:this._controller._model.centerLongitude};
}else{
loc=mq.savedandrecent.getDefaultMapLocation();
if(loc&&loc.latitude&&loc.longitude){
loc.geocodeQuality="CITY";
}else{
loc={geocodeQuality:"COUNTRY",latitude:39.527596,longitude:-99.141968};
}
}
return loc;
},validateAddLocation:function(loc){
var _231=true;
if(this._controller._model.locations!=null){
var _232=this._controller._model.locations[this._controller._model.locations.length-1].location;
if(this._controller._model.locations.length>9){
var _233=new dojox.string.Builder();
_233.append("<div class=\"alert-warning\" style=\"display: block;width: 220px;\">");
_233.append("<img src=\""+mqPrefix+"/cdn/images/icon-warn.gif\" height=\"25\" width=\"24\">");
_233.append(mq.getMessage("ERROR_MAX_STOPS")+"<br/><br/>");
_233.append("</div>");
_233=_233.toString();
mq.handleFormErrorPopups(null,_233);
ua.a(":MQ08MaxStops");
_231=false;
}else{
if(_232.latitude==loc.latitude&&_232.longitude==loc.longitude&&_232.name==loc.name){
mq.showErrorPopupForSameAddr(null,mq.getMessage("ERROR_DUPLICATE_PREVIOUS_STOP"));
_231=false;
}
}
}else{
if(serverResults&&serverResults.length==2){
var _234;
if(serverResults[0].locationResult&&(!serverResults[0].availableResultCount||serverResults[0].availableResultCount==0)){
_234=serverResults[0].locationResult;
}else{
_234=serverResults[1].locationResult;
}
if(_234.latitude==loc.latitude&&_234.longitude==loc.longitude&&_234.name==loc.name){
mq.showErrorPopupForSameAddr(null,mq.getMessage("ERROR_DUPLICATE_START_END"));
_231=false;
}
}
}
return _231;
},clickLessInfo:function(){
ua.a(":MQ08BUBCSLessInfo");
},clickClose:function(ind,pt){
if(controller&&(controller.numLocs()>0)&&view&&(view.getCurrentMode()!="SEARCH")){
ua.a(":MQ08BUBCSCloseAO");
}else{
ua.a(":MQ08BUBCSCloseAO");
}
},zoomToStreet:function(loc,_238,_239){
debug("TabView.zoomToStreet");
if(_238==true||_238=="true"){
if(_239==true||_239=="true"){
ua.a(":MQ08BUBCSZoomStreetLevel");
}else{
ua.a(":MQ08BUBZoomStreetLevel");
}
}else{
ua.a(":MQ08ZoomStreetLevel");
}
this._tileMap.setCenter(new MQLatLng(loc.latitude,loc.longitude));
this._tileMap.setZoomLevel(this.zoomLevels["MAX"]);
if(view.getCurrentMode()=="MAPS"){
mq.util.scrollToElem($d("mapWindow"),500);
}
ua.commit();
}});
}
if(!dojo._hasResource["mq.comscore"]){
dojo._hasResource["mq.comscore"]=true;
dojo.provide("mq.comscore");
dojo.declare("mq.ComScore",null,{constructor:function(_23a,_23b,_23c){
debug("comscore:createobject");
this.tileMap=_23b;
this.mapWindow=_23c;
},tileMap:null,mapWindow:null,x:0,y:0,type:"",startxy:null,dragStarted:false,monitor1:function(evt){
if(this.dragStarted){
this.dragStarted=false;
var _23e=this.tileMap.getCenterLatLng();
var _23f=this.tileMap.llToPix(_23e);
_23f.x=_23f.x-mq.getScrollBarPosition().ptOffsetX;
_23f.y=_23f.y-mq.getScrollBarPosition().ptOffsetY;
this.type="click";
debug("click");
var _240=this.tileMap.percentage(this.startxy.x,this.startxy.y,_23f.x,_23f.y,true);
this.dragTracker(this.startxy.x,this.startxy.y,_23f.x,_23f.y);
}
},monitor:function(evt){
if(evt.eventName=="MQA.TileMap.mouseDown"){
debug("comscore:monitor ");
this.dragStarted=true;
this.startxy=this.tileMap.startDragPoint;
debug("mousedown");
dojo.disconnect(this.tileMap.parent,"click",this,"monitor1");
dojo.connect(this.tileMap.parent,"click",this,"monitor1");
}
if(evt.eventName=="MQA.TileMap.dragEnd"){
this.dragStarted=false;
debug("drag");
this.type="drag";
this.dragTracker(this.startxy.x,this.startxy.y,this.tileMap.endDragPoint.x,this.tileMap.endDragPoint.y);
}
},dragTracker:function(_242,_243,_244,_245){
this.x=(this.x)+(_244-_242);
this.y=(this.y)+(_245-_243);
var _246=this.tileMap.percentage(0,0,this.x,this.y,false);
var diag=Math.round(Math.sqrt(_246.shiftX*_246.shiftX+_246.shiftY*_246.shiftY));
if(diag>=40){
var _248=this.tileMap.direction(0,0,this.x,this.y);
var _249;
if(this.type=="click"){
_249=("Action = "+this.type);
ua.a(":MQ08Recenter");
}else{
_249=("Action = "+this.type+": direction = "+_248);
ua.a(":MQ08Drag"+this.dragDirToPanDir(_248).toUpperCase());
}
this.x=0;
this.y=0;
this.type="";
}
},dragDirToPanDir:function(_24a){
var _24b;
switch(_24a){
case "n":
_24b="s";
break;
case "e":
_24b="w";
break;
case "w":
_24b="e";
break;
case "s":
_24b="n";
break;
case "ne":
_24b="sw";
break;
case "nw":
_24b="se";
break;
case "se":
_24b="nw";
break;
case "sw":
_24b="ne";
break;
default:
_24b="error";
}
return _24b;
}});
}
if(!dojo._hasResource["mq.lttp"]){
dojo._hasResource["mq.lttp"]=true;
dojo.provide("mq.lttp");
mq.lttp=new (function(){
this.defaultMessage="http://www.mapquest.com/...";
this.imagePath=mqPrefix+"/cdn/images";
this.lttpState=false;
this.initialState=true;
this.update=function(node){
if(this.lttpState!=controller._model||mqPageContext=="rblprofile"){
if(view.useParameterUrl()){
var _24d=view.getLttpParameterUrl();
this.lttpState=controller._model;
this.lttpLastValue=node.value=_24d;
}else{
var my=this;
view.saveTinyURL(function(_24f,_250){
my.lttpState=controller._model;
my.lttpLastValue=node.value=view.getTinyUrl(_24f);
my.resize(node);
my.select(node);
});
}
}else{
node.value=this.lttpLastValue;
}
this.resize(node);
this.select(node);
ua.a(":MQ08LTTP");
};
this.blur=function(node){
node.value=this.defaultMessage;
this.resize(node);
};
this.resize=function(node){
if(dojo.isSafari){
node.style.width="";
node.style.width=node.scrollWidth+"px";
return;
}
node.size=(node.value.length<45)?node.value.length:45;
if(node.value.match(/\.$/)){
node.size=24;
}
};
this.select=function(node){
node.select();
};
this.cancelEvent=function(){
if(window.event){
window.event.cancelBubble=true;
}
if(event&&event.stopPropagation){
event.stopPropagation();
}
return false;
};
this.listenForPanZoom=function(){
if(this.listening){
return;
}
this.listening=true;
var my=this;
dojo.connect(controller,"panZoomChange",function(){
my.lttpLastValue=my.lttpState=my.initialState=false;
if($d("linktothis")){
$d("linktothis").blur();
}
if($d("linktothis2")){
$d("linktothis2").blur();
}
});
};
});
}
if(!dojo._hasResource["mq.rbl"]){
dojo._hasResource["mq.rbl"]=true;
dojo.provide("mq.rbl");
mq.rbl=new (function(){
this.changeTab=function(_255){
if(dojo.byId("rblMaps")){
var _256=0;
if(_255=="Overview"){
_256=0;
}
if(_255=="Map"){
_256=1;
}
if(_255=="Reviews"){
_256=2;
}
this.tabChange(dojo.query(".rblTabs ul li")[_256]);
}
};
this.tabChange=function(elem,_258){
if(_258){
if(elem.className=="current"){
return;
}
}
dojo.query(".rblTabs li").removeClass("current");
elem.className="current";
var _259=["#rblOverviewTab","#rblMapTab","#rblReviewsTab"];
this.hideShowThese(_259,"hide");
if(elem.id=="rblOverviewLi"){
this.hideShowThese(["#rblOverviewTab"],"show");
if(mqPageContext=="rblprofile"&&$d("profileStreetMap")&&dojo.query("div",$d("profileStreetMap")).length==0){
this.showRBLDetailMap();
}
if(_258){
if(parent.mqPageContext=="rblprofile"){
ua.a(":MQ08OverviewTab");
}else{
ua.a(":MQ08BUBCSOverviewTab");
}
}
}else{
if(elem.id=="rblMapLi"){
this.hideShowThese(["#rblMapTab"],"show");
this.showMapOnMapTab();
if(_258){
if(parent.mqPageContext=="rblprofile"){
ua.a(":MQ08MapTab");
}else{
ua.a(":MQ08BUBCSMapTab");
}
}
}else{
if(elem.id=="rblReviewsLi"){
this.hideShowThese(["#rblReviewsTab"],"show");
if(_258){
if(parent.mqPageContext=="rblprofile"){
ua.a(":MQ08ReviewsTab");
}else{
ua.a(":MQ08BUBCSReviewsTab");
}
}
}
}
}
this.track(elem.id);
};
this.showMapOnMapTab=function(){
if(typeof (streetMapUrl)!="undefined"){
var vp=dijit.getViewport();
var _25b=vp.w-40;
var _25c=Math.floor(Number((vp.w-40)*0.5556));
var _25d=streetMapUrl;
_25d=_25d.replace("<width>",_25b);
_25d=_25d.replace("<height>",_25c);
if(dojo.query("#streetMapContainer img").length==0){
var _25e=document.createElement("img");
_25e.setAttribute("src",_25d);
_25e.setAttribute("id","streetMap");
_25e.setAttribute("class","rblStreetMap");
dojo.byId("streetMapContainer").appendChild(_25e);
}else{
if(dojo.byId("streetMap").src!=_25d){
dojo.byId("streetMap").src=_25d;
}
}
}else{
if(view&&view.mapView){
var mapw=dojo.coords($d("mapWindow"));
view.mapView.resizeMap(mapw.w,mapw.h);
}
}
};
this.showRBLDetailMap=function(){
debug("Showing RBL Detail map");
var _260=$d("profileStreetMap");
debug("1");
routeResults=view._controller._model.routeResults;
var _261=-3;
var _262=-27;
var coll=new MQA.ShapeCollection();
var _264=new MQA.Icon("http://img.mqcdn.com/mqtoolkit/shadow.png",23,7);
debug("2");
var _265=new MQA.MapInit();
var loc=controller._model.locations[0].location;
var _267=new MQA.TileMap(_260,15,new MQA.LatLng(loc.latitude,loc.longitude),"map",_265);
var _268=new MQA.ZoomControl(_267);
_268.zoomin.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-in2");
_268.zoomout.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-out2");
_267.addControl(_268,new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(5,15)));
_267.replaceShapes(coll);
debug("3");
for(var i=0;i<controller._model.locations.length;i++){
var icon=new MQA.Icon(this.imagePath+"/icons/stop_"+i+".png",27,27,true,false);
var l=controller._model.locations[i].location;
var pt=new MQA.Poi(new MQA.LatLng(l.latitude,l.longitude));
pt.setKey("stops-"+unescape("%"+(i+65).toString(16)));
pt.setValue("iconOffset",new MQA.Point(_261,_262));
if(controller.numLocs()>1){
pt.setIcon(icon);
}
pt.setValue("shadow",_264);
pt.setValue("shadowOffset",new MQA.Point(5,-4));
_267.addPoi(pt);
}
debug("4");
MQA.EventManager.addListener(_267,"dragend",dojo.hitch(this,"dragRblStreetMap"));
};
this.dragRblStreetMap=function(evt){
ua.a(":MQ08CSOVERMapDrag");
};
this.hideShowThese=function(_26e,what){
for(var i=0;i<_26e.length;i++){
var elem=dojo.query(_26e[i])[0];
if(elem!="undefined"){
elem.style.display=(what=="hide")?"none":"block";
}
}
};
this.rblInit=function(){
if(dojo.byId("extraInfo")&&parent.mq&&parent.mq.util&&parent.controller&&parent.controller._model){
var _272=(parent)?(parent.enableSTO):false;
if(parent.controller.numLocs()>1&&parent.view&&parent.view.mapView&&parent.view.getCurrentMode()=="MAPS"){
var _273=0;
var _274=parent.view.mapView.alphabet;
for(var i=0;i<_274.length;i++){
if(_274[i]==poi){
_273=i;
break;
}
}
dojo.byId("extraInfo").innerHTML=parent.mq.util.getLocationBasedLinks(_273,_273,true,false,false,false,_272,true);
}else{
if(parent.controller._model.searchResults&&parent.controller._model.searchResults.searchResults){
var w=parent.$w("searchResults");
var _277=(w&&w.isSearchResultMode("MAP_ONLY"))?false:true;
var skip=parent.controller._model.searchOptions.pageSkip||0;
var loc=parent.controller._model.searchResults.searchResults[poi-skip];
dojo.byId("extraInfo").innerHTML=parent.mq.util.getLocationBasedLinks(loc,poi-skip-1,true,true,_277,true,_272,true);
}
}
}
};
this.closeRBL=function(_27a){
var _27b=(parent.view.getCurrentMode()=="MAPS")?"mapView":"searchView";
var pois=parent.view[_27b]._tileMap.getShapeCollection("");
var _27d=(_27b=="mapView"&&parent.controller.numLocs()>1)?"-"+parent.view.mapView.alphabet[_27a]:_27a+parent.controller._model.searchOptions.pageSkip+1;
for(var i=0;i<pois.getSize();i++){
var p=pois.getAt(i);
if(p.getKey().substring(5)==_27d){
p.closeInfoDisplayBox();
break;
}
}
};
this.showAllReviews=function(_280){
dojo.byId("moreReviews").style.display="block";
dojo.query(".rblNextBar")[0].innerHTML="Showing 1-"+_280+" of "+_280;
dojo.byId("moreReviewsLink").style.display="none";
ua.a(":MQ08CSREVShowAll");
};
this.printRbl=function(){
ua.a(":MQ08BUBCSPrint");
print();
};
this.website=function(){
if(parent.mqPageContext=="rblprofile"){
if(dojo.byId("rblOverviewLi").className=="current"){
ua.a(":MQ08CSOVERWebsite");
}else{
ua.a(":MQ08CSREVWebsite");
}
}else{
ua.a(":MQ08BUBCSWebsite");
}
return true;
};
this.moreDetailsHandler=function(){
if(dojo.byId("rblOverviewLi").className!="current"){
mq.rbl.changeTab("Overview");
ua.a(":MQ08CSBOXMore");
}else{
ua.a(":MQ08CSBOXMoreAO");
}
mq.util.scrollToElem($d("rblWindow"),500);
};
this.menu=function(_281,_282){
window.open(_281,"Menu","height=600,width=680");
if(_282){
ua.a(":MQ08CSBOXMenu");
}else{
if(parent.mqPageContext=="rblprofile"){
ua.a(":MQ08CSMenu");
}else{
ua.a(":MQ08BUBCSMenu");
}
}
return false;
};
this.track=function(tab){
var _284=dojo.byId(tab.replace("Li","Tracking"));
if(!_284.src){
var _285=dojo.byId("rblOverviewTracking").src||dojo.byId("rblMapTracking").src;
var url=_285.substring(0,_285.indexOf("brandCode"));
if(tab=="rblOverviewLi"){
url+="brandCode=mq_rbl&pageType=external_profile";
}else{
if(tab=="rblMapLi"){
url+="brandCode=mq_map&pageType=external_map";
}else{
if(tab=="rblReviewsLi"){
url+="brandCode=mq_review&pageType=external_review";
}else{
}
}
}
_284.src=url;
}
};
});
}

Key="GsX";
if(typeof (MQA)=="undefined"){
MQA=new Object();
}
MQA={PIXERSPERLATDEGREE:315552459.661917,PIXERSPERLNGDEGREE:250344597.90989706,TILESIZE:256,SLIDESTEPS:9,SLIDEDELAY:11,SCALES:new Array(0,88011773,29337258,9779086,3520471,1504475,701289,324767,154950,74999,36000,18000,9000,4700,2500,1500,1000),MODS:new Array(0,4,12,36,100,234,502,1084,2272,4694,9778,19558,39116,74900,140818,234698,352047),VENDORLIST:new Array("","mz1copy.gif","mz4copy.gif","mz7copy.gif","mz0copy.gif"),MAPVENDORS:new Array(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4),RESOURCES:"http://"+RESSERVER+"/res/",STATICRESOURCES:"http://"+STATICSERVER+"/tileprint.php",CORNER_TOPLEFT:0,CORNER_TOPRIGHT:1,CORNER_BOTTOMLEFT:2,CORNER_BOTTOMRIGHT:3,LOGO_MQ_LOGO:0,LOGO_MQ_SCALES:1,LOGO_MQ_COPY:2,LOGO_NT_COPY:3,LOGO_I3_COPY:4,LOGO_MAP_COPY:3,LOGO_SAT_COPY:4,EVENT_NONE:-1,EVENT_CLICK:0,EVENT_DBLCLICK:1,OPER_RECENTER:0,OPER_RECENTERZOOM:1,MAXMAPHEIGHT:7168,MAXMAPWIDTH:7168,BUTTON_MQ_LEFT:0,BUTTON_MQ_MIDDLE:1,BUTTON_MQ_RIGHT:2,MASTER_BROKER:null,SAFARI_BROWSER:(navigator.userAgent.indexOf("Safari")>=0),PAN_NORTH:0,PAN_SOUTH:1,PAN_EAST:2,PAN_WEST:3,CONTROL_PANZOOM:0,CONTROL_PAN:1,CONTROL_ZOOM:2,CONTROL_TYPE:3,CONTROL_TRAFFIC:4};
MQA.SURFACE_OFFSET=2*MQA.TILESIZE;
MQA.NOTHING=MQA.RESOURCES+"nothing.gif";
MQA.MAP_TYPE={MAP:"map",SAT:"sat",HYB:"hyb",NONE:"none"};
MQA.TILE_LAYER_ID={MAP:"mqmaptilediv",SAT:"mqsattilediv",HYB:"mqhybtilediv"};
MQA.TILE_LAYER_TYPE={MAP:1,SAT:2,STRLBL:3,HOODPOLY:4,PARCEL:5};

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(typeof (MQA.Common)=="undefined"){
MQA.Common=new Object();
}
MQA.createXMLDoc=function(_1){
var _2;
if(document.implementation.createDocument){
var _3=new window.DOMParser();
if(MQA.BrowserInfo.isSafari){
_1=_1.replace(/&/g,"&amp;");
}
_2=_3.parseFromString(_1,"text/xml");
}else{
if(window.ActiveXObject){
_2=new window.ActiveXObject("Microsoft.XMLDOM");
_2.async="false";
_2.loadXML(_1);
}
}
return _2;
};
mqCreateXMLDoc=MQA.createXMLDoc;
MQA.createXMLDocFromNode=function(_4){
var _5;
_4=_4.documentElement;
if(document.implementation.createDocument){
var _5=document.implementation.createDocument("","",null);
try{
_5.appendChild(_5.importNode(_4,true));
}
catch(error){
alert(error);
alert(_4.nodeName);
}
}else{
if(window.ActiveXObject){
_5=new ActiveXObject("Microsoft.XMLDOM");
_5.async="false";
_5.loadXML(_4.xml);
}
}
return _5;
};
mqCreateXMLDocFromNode=MQA.createXMLDocFromNode;
MQA.Browser=function(){
this.name=null;
this.version=null;
this.os=null;
this.appname=null;
this.appVersion=null;
this.vMajor=null;
this.isNS=null;
this.isNS4=null;
this.isNS6=null;
this.isIE=null;
this.isIE4=null;
this.isIE5=null;
this.isDOM=null;
this.isSafari=null;
this.platform=null;
};
MQBrowser=MQA.Browser;
MQA.getBrowserInfo=function(){
var _6=new MQA.Browser();
_6.name=_6.version=_6.os="unknown";
var _7=window.navigator.userAgent.toLowerCase();
var _8=window.navigator.appName;
var _9=window.navigator.appVersion;
var _a=new Array("firefox","msie","netscape","opera","safari");
var _b=new Array("linux","mac","windows","x11");
var _c=_a.length;
var _d="";
for(var i=0,n=_c;i<n;i++){
_d=_7.indexOf(_a[i])+1;
if(_d>0){
_6.name=_a[i];
var _10=_d+_6.name.length;
var _11=((_6.name=="safari")||(_7.charAt(_10+4)>0&&_7.charAt(_10+4)<9))?5:3;
_6.version=_7.substring(_10,_10+_11);
}
}
var _12=_b.length;
for(var j=0,m=_12;j<m;j++){
_d=_7.indexOf(_b[j])+1;
if(_d>0){
_6.os=_b[j];
}
}
if(_8=="Netscape"){
_6.appname="ns";
}else{
if(_8=="Microsoft Internet Explorer"){
_6.appname="ie";
}
}
_6.appVersion=_9;
_6.vMajor=parseInt(_6.appVersion);
_6.isNS=(_6.appname=="ns"&&_6.vMajor>=4);
_6.isNS4=(_6.appname=="ns"&&_6.vMajor==4);
_6.isNS6=(_6.appname=="ns"&&_6.vMajor==5);
_6.isIE=(_6.appname=="ie"&&_6.vMajor>=4);
_6.isIE4=(_6.appVersion.indexOf("MSIE 4")>0);
_6.isIE5=(_6.appVersion.indexOf("MSIE 5")>0);
_6.isDOM=(document.createElement&&document.appendChild&&document.getElementsByTagName)?true:false;
_6.isSafari=(_6.name=="safari");
if(_7.indexOf("win")>-1){
_6.platform="win";
}else{
if(_7.indexOf("mac")>-1){
_6.platform="mac";
}else{
_6.platform="other";
}
}
return _6;
};
mqGetBrowserInfo=MQA.getBrowserInfo;
MQA.BrowserInfo=MQA.getBrowserInfo();
MQA.Object=function(){
var _15=null;
this.getM_XmlDoc=function(){
return _15;
};
this.setM_XmlDoc=function(_16){
_15=_16;
};
var _17=null;
this.getM_Xpath=function(){
return _17;
};
this.setM_Xpath=function(_18){
_17=_18;
};
};
MQA.Object.prototype.getClassName=function(){
return "MQObject";
};
MQA.Object.prototype.getObjectVersion=function(){
return 0;
};
MQA.Object.prototype.setProperty=function(_19,_1a){
var _1b;
if(_19!==null){
_1b="/"+this.getM_Xpath()+"/"+_19;
}else{
_1b="/"+this.getM_Xpath();
}
var _1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
if(_1c===null){
var _1d=this.getM_XmlDoc().createElement(_19);
var _1e=this.getM_XmlDoc().documentElement.appendChild(_1d);
_1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
}
return _1c;
};
MQA.Object.prototype.getProperty=function(_1f){
var _20;
if(_1f!==null){
_20="/"+this.getM_Xpath()+"/"+_1f;
}else{
_20="/"+this.getM_Xpath();
}
return mqGetXPathNodeText(this.getM_XmlDoc(),_20);
};
MQA.Object.prototype.copy=function(){
var cp=new this.constructor;
cp.loadXml(this.saveXml());
return cp;
};
MQA.Object.prototype.internalCopy=function(obj){
var _23="<"+obj.getM_Xpath();
if(this.getObjectVersion()>0){
_23=_23+" Version=\""+this.getObjectVersion()+"\"";
}
_23=_23+">";
var _24=this.getM_XmlDoc().documentElement;
var _25=_24.childNodes;
var _26=_25.length;
for(var _27=0;_27<_26;_27++){
_23=_23+mqXmlToStr(_25[_27]);
}
_23=_23+"</"+obj.getM_Xpath()+">";
var cp=new this.constructor;
cp.loadXml(_23);
return cp;
};
MQObject=MQA.Object;
MQA.Point=function(_29,_2a){
this.x=0;
this.y=0;
this.setM_Xpath("Point");
if(arguments.length==1){
this.setM_Xpath(_29);
}else{
if(arguments.length==2){
this.x=parseInt(_29);
this.y=parseInt(_2a);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("1MQPoint constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQPoint constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments");
}
}
}
};
MQA.Point.prototype=new MQA.Object();
MQA.Point.prototype.constructor=MQA.Point;
MQA.Point.prototype.getClassName=function(){
return "MQPoint";
};
MQA.Point.prototype.getObjectVersion=function(){
return 0;
};
MQA.Point.prototype.loadXml=function(_2b){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_2b));
this.x=this.getProperty("X");
this.y=this.getProperty("Y");
}
};
MQA.Point.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><X>"+this.x+"</X><Y>"+this.y+"</Y></"+this.getM_Xpath()+">";
};
MQA.Point.prototype.setX=function(x){
this.x=parseInt(x);
if(isNaN(this.x)){
throw new Error("MQPoint.setX called with invalid parameter");
}
};
MQA.Point.prototype.getX=function(){
return this.x;
};
MQA.Point.prototype.setY=function(y){
this.y=parseInt(y);
if(isNaN(this.y)){
throw new Error("MQPoint.setY called with invalid parameter");
}
};
MQA.Point.prototype.getY=function(){
return this.y;
};
MQA.Point.prototype.setXY=function(x,y){
this.x=parseInt(x);
this.y=parseInt(y);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("MQPoint.setXY called with invalid parameter");
}
};
MQA.Point.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.x!=MQCONSTANT.MQPOINT_INVALID)&&Math.abs(this.y!=MQCONSTANT.MQPOINT_INVALID));
}
return false;
};
MQA.Point.prototype.equals=function(pt){
if(pt){
return (this.x===pt.x&&this.y===pt.y);
}
return false;
};
MQA.Point.prototype.toString=function(){
return this.x+","+this.y;
};
MQPoint=MQA.Point;
MQA.LatLng=function(_31,_32){
MQA.Object.call(this);
this.lat=0;
this.lng=0;
this.setM_Xpath("LatLng");
if(arguments.length==1){
this.setM_Xpath(_31);
}else{
if(arguments.length==2){
this.lat=parseFloat(_31);
this.lng=parseFloat(_32);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQA.LatLng constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments.");
}
}
}
};
MQA.LatLng.prototype=new MQA.Object();
MQA.LatLng.prototype.constructor=MQA.LatLng;
MQA.LatLng.prototype.getClassName=function(){
return "MQLatLng";
};
MQA.LatLng.prototype.getObjectVersion=function(){
return 0;
};
MQA.LatLng.prototype.loadXml=function(_33){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_33));
this.lat=this.getProperty("Lat");
this.lng=this.getProperty("Lng");
}
};
MQA.LatLng.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><Lat>"+this.lat+"</Lat><Lng>"+this.lng+"</Lng></"+this.getM_Xpath()+">";
};
MQA.LatLng.prototype.setLatitude=function(_34){
this.lat=parseFloat(_34);
if(isNaN(this.lat)){
throw new Error("MQA.LatLng.setLatitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLatitude=function(){
return this.lat;
};
MQA.LatLng.prototype.setLongitude=function(_35){
this.lng=parseFloat(_35);
if(isNaN(this.lng)){
throw new Error("MQA.LatLng.setLongitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLongitude=function(){
return this.lng;
};
MQA.LatLng.prototype.setLatLng=function(_36,_37){
this.lat=parseFloat(_36);
this.lng=parseFloat(_37);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng.setLatLng called with invalid parameter");
}
};
MQA.LatLng.prototype.arcDistance=function(ll2,_39){
if("undefined"!==typeof (mqutils)){
if(ll2){
if(ll2.getClassName()!=="MQLatLng"){
alert("failure in arcDistance");
throw "failure in arcDistance";
}
}else{
alert("failure in arcDistance");
throw "failure in arcDistance";
}
if(_39){
mqIsClass("MQDistanceUnits",_39,false);
}else{
_39=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);
}
if(this.getLatitude()==ll2.getLatitude()&&this.getLongitude()==ll2.getLongitude()){
return 0;
}
var _3a=ll2.getLongitude()-this.getLongitude();
var a=MQCONSTANT.MQLATLNG_RADIANS*(90-this.getLatitude());
var c=MQCONSTANT.MQLATLNG_RADIANS*(90-ll2.getLatitude());
var _3d=(Math.cos(a)*Math.cos(c))+(Math.sin(a)*Math.sin(c)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*(_3a)));
var _3e=(_39.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES)?3963.205:6378.160187;
if(_3d<-1){
return MQCONSTANT.PI*_3e;
}else{
if(_3d>=1){
return 0;
}else{
return Math.acos(_3d)*_3e;
}
}
}
return -1;
};
MQA.LatLng.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.getLatitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE&&Math.abs(this.getLongitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE);
}
return false;
};
MQA.LatLng.prototype.equals=function(ll){
if(ll!==null){
return (this.getLongitude()===ll.getLongitude()&&this.getLatitude()===ll.getLatitude());
}
return false;
};
MQA.LatLng.prototype.toString=function(){
return this.lat+","+this.lng;
};
MQLatLng=MQA.LatLng;
MQA.XMLDOC=function(){
this.AUTOGEOCODECOVSWITCH=null;
this.AUTOROUTECOVSWITCH=null;
this.AUTOMAPCOVSWITCH=null;
this.DBLAYERQUERY=null;
this.LINEPRIMITIVE=null;
this.POLYGONPRIMITIVE=null;
this.RECTANGLEPRIMITIVE=null;
this.ELLIPSEPRIMITIVE=null;
this.TEXTPRIMITIVE=null;
this.SYMBOLPRIMITIVE=null;
this.LATLNG=null;
this.POINT=null;
this.POINTFEATURE=null;
this.LINEFEATURE=null;
this.POLYGONFEATURE=null;
this.LOCATION=null;
this.ADDRESS=null;
this.SINGLELINEADDRESS=null;
this.GEOADDRESS=null;
this.GEOCODEOPTIONS=null;
this.MANEUVER=null;
this.ROUTEOPTIONS=null;
this.ROUTERESULTS=null;
this.ROUTEMATRIXRESULTS=null;
this.RADIUSSEARCHCRITERIA=null;
this.RECTSEARCHCRITERIA=null;
this.POLYSEARCHCRITERIA=null;
this.CORRIDORSEARCHCRITERIA=null;
this.SIGN=null;
this.TREKROUTE=null;
this.INTCOLLECTION=null;
this.DTCOLLECTION=null;
this.LATLNGCOLLECTION=null;
this.LOCATIONCOLLECTION=null;
this.LOCATIONCOLLECTIONCOLLECTION=null;
this.MANEUVERCOLLECTION=null;
this.SIGNCOLLECTION=null;
this.STRINGCOLLECTION=null;
this.STRCOLCOLLECTION=null;
this.FEATURECOLLECTION=null;
this.PRIMITIVECOLLECTION=null;
this.POINTCOLLECTION=null;
this.TREKROUTECOLLECTION=null;
this.FEATURESPECIFIERCOLLECTION=null;
this.GEOCODEOPTIONSCOLLECTION=null;
this.COVERAGESTYLE=null;
this.RECORDSET=null;
this.MAPSTATE=null;
this.SESSION=null;
this.SESSIONID=null;
this.DTSTYLE=null;
this.DTSTYLEEX=null;
this.DTFEATURESTYLEEX=null;
this.FEATURESPECIFIER=null;
this.BESTFIT=null;
this.BESTFITLL=null;
this.CENTER=null;
this.CENTERLATLNG=null;
this.PAN=null;
this.ZOOMIN=null;
this.ZOOMOUT=null;
this.ZOOMTO=null;
this.ZOOMTORECT=null;
this.ZOOMTORECTLATLNG=null;
this.getAUTOGEOCODECOVSWITCH=function(){
if(this.AUTOGEOCODECOVSWITCH===null){
this.AUTOGEOCODECOVSWITCH=MQA.createXMLDoc("<AutoGeocodeCovSwitch/>");
}
return this.AUTOGEOCODECOVSWITCH;
};
this.getAUTOROUTECOVSWITCH=function(){
if(this.AUTOROUTECOVSWITCH===null){
this.AUTOROUTECOVSWITCH=MQA.createXMLDoc("<AutoRouteCovSwitch><Name/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></AutoRouteCovSwitch>");
}
return this.AUTOROUTECOVSWITCH;
};
this.getAUTOMAPCOVSWITCH=function(){
if(this.AUTOMAPCOVSWITCH===null){
this.AUTOMAPCOVSWITCH=MQA.createXMLDoc("<AutoMapCovSwitch><Name/><Style/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/><ZoomLevels Count=\"14\"><Item>6000</Item><Item>12000</Item><Item>24000</Item><Item>48000</Item><Item>96000</Item><Item>192000</Item><Item>400000</Item><Item>800000</Item><Item>1600000</Item><Item>3000000</Item><Item>6000000</Item><Item>12000000</Item><Item>24000000</Item><Item>48000000</Item></ZoomLevels></AutoMapCovSwitch>");
}
return this.AUTOMAPCOVSWITCH;
};
this.getDBLAYERQUERY=function(){
if(this.DBLAYERQUERY===null){
this.DBLAYERQUERY=MQA.createXMLDoc("<DBLayerQuery/>");
}
return this.DBLAYERQUERY;
};
this.getLINEPRIMITIVE=function(){
if(this.LINEPRIMITIVE===null){
this.LINEPRIMITIVE=MQA.createXMLDoc("<LinePrimitive Version=\"2\"/>");
}
return this.LINEPRIMITIVE;
};
this.getPOLYGONPRIMITIVE=function(){
if(this.POLYGONPRIMITIVE===null){
this.POLYGONPRIMITIVE=MQA.createXMLDoc("<PolygonPrimitive Version=\"2\"/>");
}
return this.POLYGONPRIMITIVE;
};
this.getRECTANGLEPRIMITIVE=function(){
if(this.RECTANGLEPRIMITIVE===null){
this.RECTANGLEPRIMITIVE=MQA.createXMLDoc("<RectanglePrimitive Version=\"2\"/>");
}
return this.RECTANGLEPRIMITIVE;
};
this.getELLIPSEPRIMITIVE=function(){
if(this.ELLIPSEPRIMITIVE===null){
this.ELLIPSEPRIMITIVE=MQA.createXMLDoc("<EllipsePrimitive Version=\"2\"/>");
}
return this.ELLIPSEPRIMITIVE;
};
this.getTEXTPRIMITIVE=function(){
if(this.TEXTPRIMITIVE===null){
this.TEXTPRIMITIVE=MQA.createXMLDoc("<TextPrimitive Version=\"2\"/>");
}
return this.TEXTPRIMITIVE;
};
this.getSYMBOLPRIMITIVE=function(){
if(this.SYMBOLPRIMITIVE===null){
this.SYMBOLPRIMITIVE=MQA.createXMLDoc("<SymbolPrimitive Version=\"2\"/>");
}
return this.SYMBOLPRIMITIVE;
};
this.getLATLNG=function(){
if(this.LATLNG===null){
this.LATLNG=MQA.createXMLDoc("<LatLng/>");
}
return this.LATLNG;
};
this.getPOINT=function(){
if(this.POINT===null){
this.POINT=MQA.createXMLDoc("<Point/>");
}
return this.POINT;
};
this.getPOINTFEATURE=function(){
if(this.POINTFEATURE===null){
this.POINTFEATURE=MQA.createXMLDoc("<PointFeature/>");
}
return this.POINTFEATURE;
};
this.getLINEFEATURE=function(){
if(this.LINEFEATURE===null){
this.LINEFEATURE=MQA.createXMLDoc("<LineFeature/>");
}
return this.LINEFEATURE;
};
this.getPOLYGONFEATURE=function(){
if(this.POLYGONFEATURE===null){
this.POLYGONFEATURE=MQA.createXMLDoc("<PolygonFeature/>");
}
return this.POLYGONFEATURE;
};
this.getLOCATION=function(){
if(this.LOCATION===null){
this.LOCATION=MQA.createXMLDoc("<Location/>");
}
return this.LOCATION;
};
this.getADDRESS=function(){
if(this.ADDRESS===null){
this.ADDRESS=MQA.createXMLDoc("<Address/>");
}
return this.ADDRESS;
};
this.getSINGLELINEADDRESS=function(){
if(this.SINGLELINEADDRESS===null){
this.SINGLELINEADDRESS=MQA.createXMLDoc("<SingleLineAddress/>");
}
return this.SINGLELINEADDRESS;
};
this.getGEOADDRESS=function(){
if(this.GEOADDRESS===null){
this.GEOADDRESS=MQA.createXMLDoc("<GeoAddress/>");
}
return this.GEOADDRESS;
};
this.getGEOCODEOPTIONS=function(){
if(this.GEOCODEOPTIONS===null){
this.GEOCODEOPTIONS=MQA.createXMLDoc("<GeocodeOptions/>");
}
return this.GEOCODEOPTIONS;
};
this.getMANEUVER=function(){
if(this.MANEUVER===null){
this.MANEUVER=MQA.createXMLDoc("<Maneuver Version=\"1\"><Narrative/><Streets Count=\"0\"/><TurnType>-1</TurnType><Distance>0.0</Distance><Time>-1</Time><Direction>0</Direction><ShapePoints Count=\"0\"/><GEFIDs Count=\"0\"/><Signs  Count=\"0\"/></Maneuver>");
}
return this.MANEUVER;
};
this.getROUTEOPTIONS=function(){
if(this.ROUTEOPTIONS===null){
this.ROUTEOPTIONS=MQA.createXMLDoc("<RouteOptions Version=\"3\"><RouteType>0</RouteType><NarrativeType>1</NarrativeType><NarrativeDistanceUnitType>0</NarrativeDistanceUnitType><MaxShape>0</MaxShape><MaxGEFID>0</MaxGEFID><Language>English</Language><CoverageName></CoverageName><CovSwitcher><Name></Name><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></CovSwitcher><AvoidAttributeList Count=\"0\"/><AvoidGefIdList Count=\"0\"/><AvoidAbsoluteGefIdList Count=\"0\"/><StateBoundaryDisplay>1</StateBoundaryDisplay><CountryBoundaryDisplay>1</CountryBoundaryDisplay></RouteOptions>");
}
return this.ROUTEOPTIONS;
};
this.getROUTERESULTS=function(){
if(this.ROUTERESULTS===null){
this.ROUTERESULTS=MQA.createXMLDoc("<RouteResults Version=\"1\"><Locations Count=\"0\"/><CoverageName/><ResultMessages Count=\"0\"/><TrekRoutes Count=\"0\"/></RouteResults>");
}
return this.ROUTERESULTS;
};
this.getROUTEMATRIXRESULTS=function(){
if(this.ROUTEMATRIXRESULTS===null){
this.ROUTEMATRIXRESULTS=MQA.createXMLDoc("<RouteMatrixResults/>");
}
return this.ROUTEMATRIXRESULTS;
};
this.getRADIUSSEARCHCRITERIA=function(){
if(this.RADIUSSEARCHCRITERIA===null){
this.RADIUSSEARCHCRITERIA=MQA.createXMLDoc("<RadiusSearchCriteria/>");
}
return this.RADIUSSEARCHCRITERIA;
};
this.getRECTSEARCHCRITERIA=function(){
if(this.RECTSEARCHCRITERIA===null){
this.RECTSEARCHCRITERIA=MQA.createXMLDoc("<RectSearchCriteria/>");
}
return this.RECTSEARCHCRITERIA;
};
this.getPOLYSEARCHCRITERIA=function(){
if(this.POLYSEARCHCRITERIA===null){
this.POLYSEARCHCRITERIA=MQA.createXMLDoc("<PolySearchCriteria/>");
}
return this.POLYSEARCHCRITERIA;
};
this.getCORRIDORSEARCHCRITERIA=function(){
if(this.CORRIDORSEARCHCRITERIA===null){
this.CORRIDORSEARCHCRITERIA=MQA.createXMLDoc("<CorridorSearchCriteria/>");
}
return this.CORRIDORSEARCHCRITERIA;
};
this.getSIGN=function(){
if(this.SIGN===null){
this.SIGN=MQA.createXMLDoc("<Sign><Type>0</Type><Text></Text><ExtraText></ExtraText><Direction>0</Direction></Sign>");
}
return this.SIGN;
};
this.getTREKROUTE=function(){
if(this.TREKROUTE===null){
this.TREKROUTE=MQA.createXMLDoc("<TrekRoute><Maneuvers Count=\"0\"/></TrekRoute>");
}
return this.TREKROUTE;
};
this.getINTCOLLECTION=function(){
if(this.INTCOLLECTION===null){
this.INTCOLLECTION=MQA.createXMLDoc("<IntCollection Count=\"0\"/>");
}
return this.INTCOLLECTION;
};
this.getDTCOLLECTION=function(){
if(this.DTCOLLECTION===null){
this.DTCOLLECTION=MQA.createXMLDoc("<DTCollection Version=\"1\" Count=\"0\"/>");
}
return this.DTCOLLECTION;
};
this.getLATLNGCOLLECTION=function(){
if(this.LATLNGCOLLECTION===null){
this.LATLNGCOLLECTION=MQA.createXMLDoc("<LatLngCollection Version=\"1\" Count=\"0\"/>");
}
return this.LATLNGCOLLECTION;
};
this.getLOCATIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTION===null){
this.LOCATIONCOLLECTION=MQA.createXMLDoc("<LocationCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTION;
};
this.getLOCATIONCOLLECTIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTIONCOLLECTION===null){
this.LOCATIONCOLLECTIONCOLLECTION=MQA.createXMLDoc("<LocationCollectionCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTIONCOLLECTION;
};
this.getMANEUVERCOLLECTION=function(){
if(this.MANEUVERCOLLECTION===null){
this.MANEUVERCOLLECTION=MQA.createXMLDoc("<ManeuverCollection Count=\"0\"/>");
}
return this.MANEUVERCOLLECTION;
};
this.getSIGNCOLLECTION=function(){
if(this.SIGNCOLLECTION===null){
this.SIGNCOLLECTION=MQA.createXMLDoc("<SignCollection Count=\"0\"/>");
}
return this.SIGNCOLLECTION;
};
this.getSTRINGCOLLECTION=function(){
if(this.STRINGCOLLECTION===null){
this.STRINGCOLLECTION=MQA.createXMLDoc("<StringCollection Count=\"0\"/>");
}
return this.STRINGCOLLECTION;
};
this.getSTRCOLCOLLECTION=function(){
if(this.STRCOLCOLLECTION===null){
this.STRCOLCOLLECTION=MQA.createXMLDoc("<StrColCollectin/>");
}
return this.STRCOLCOLLECTION;
};
this.getFEATURECOLLECTION=function(){
if(this.FEATURECOLLECTION===null){
this.FEATURECOLLECTION=MQA.createXMLDoc("<FeatureCollection Count=\"0\"/>");
}
return this.FEATURECOLLECTION;
};
this.getPRIMITIVECOLLECTION=function(){
if(this.PRIMITIVECOLLECTION===null){
this.PRIMITIVECOLLECTION=MQA.createXMLDoc("<PrimitiveCollection Count=\"0\"/>");
}
return this.PRIMITIVECOLLECTION;
};
this.getPOINTCOLLECTION=function(){
if(this.POINTCOLLECTION===null){
this.POINTCOLLECTION=MQA.createXMLDoc("<PointCollection Count=\"0\"/>");
}
return this.POINTCOLLECTION;
};
this.getTREKROUTECOLLECTION=function(){
if(this.TREKROUTECOLLECTION===null){
this.TREKROUTECOLLECTION=MQA.createXMLDoc("<TrekRouteCollection Count=\"0\"/>");
}
return this.TREKROUTECOLLECTION;
};
this.getFEATURESPECIFIERCOLLECTION=function(){
if(this.FEATURESPECIFIERCOLLECTION===null){
this.FEATURESPECIFIERCOLLECTION=MQA.createXMLDoc("<FeatureSpecifierCollection Count=\"0\"/>");
}
return this.FEATURESPECIFIERCOLLECTION;
};
this.getGEOCODEOPTIONSCOLLECTION=function(){
if(this.GEOCODEOPTIONSCOLLECTION===null){
this.GEOCODEOPTIONSCOLLECTION=MQA.createXMLDoc("<GeocodeOptionsCollection Count=\"0\"/>");
}
return this.GEOCODEOPTIONSCOLLECTION;
};
this.getCOVERAGESTYLE=function(){
if(this.COVERAGESTYLE===null){
this.COVERAGESTYLE=MQA.createXMLDoc("<CoverageStyle/>");
}
return this.COVERAGESTYLE;
};
this.getRECORDSET=function(){
if(this.RECORDSET===null){
this.RECORDSET=MQA.createXMLDoc("<RecordSet/>");
}
return this.RECORDSET;
};
this.getMAPSTATE=function(){
if(this.MAPSTATE===null){
this.MAPSTATE=MQA.createXMLDoc("<MapState/>");
}
return this.MAPSTATE;
};
this.getSESSION=function(){
if(this.SESSION===null){
this.SESSION=MQA.createXMLDoc("<Session Count=\"0\"/>");
}
return this.SESSION;
};
this.getSESSIONID=function(){
if(this.SESSIONID===null){
this.SESSIONID=MQA.createXMLDoc("<SessionID/>");
}
return this.SESSIONID;
};
this.getDTSTYLE=function(){
if(this.DTSTYLE===null){
this.DTSTYLE=MQA.createXMLDoc("<DTStyle/>");
}
return this.DTSTYLE;
};
this.getDTSTYLEEX=function(){
if(this.DTSTYLEEX===null){
this.DTSTYLEEX=MQA.createXMLDoc("<DTStyleEx/>");
}
return this.DTSTYLEEX;
};
this.getDTFEATURESTYLEEX=function(){
if(this.DTFEATURESTYLEEX===null){
this.DTFEATURESTYLEEX=MQA.createXMLDoc("<DTFeatureStyleEx/>");
}
return this.DTFEATURESTYLEEX;
};
this.getFEATURESPECIFIER=function(){
if(this.FEATURESPECIFIER===null){
this.FEATURESPECIFIER=MQA.createXMLDoc("<FeatureSpecifier/>");
}
return this.FEATURESPECIFIER;
};
this.getBESTFIT=function(){
if(this.BESTFIT===null){
this.BESTFIT=MQA.createXMLDoc("<BestFit Version=\"2\"/>");
}
return this.BESTFIT;
};
this.getBESTFITLL=function(){
if(this.BESTFITLL===null){
this.BESTFITLL=MQA.createXMLDoc("<BestFitLL Version=\"2\"/>");
}
return this.BESTFITLL;
};
this.getCENTER=function(){
if(this.CENTER===null){
this.CENTER=MQA.createXMLDoc("<Center/>");
}
return this.CENTER;
};
this.getCENTERLATLNG=function(){
if(this.CENTERLATLNG===null){
this.CENTERLATLNG=MQA.createXMLDoc("<CenterLatLng/>");
}
return this.CENTERLATLNG;
};
this.getPAN=function(){
if(this.PAN===null){
this.PAN=MQA.createXMLDoc("<Pan/>");
}
return this.PAN;
};
this.getZOOMIN=function(){
if(this.ZOOMIN===null){
this.ZOOMIN=MQA.createXMLDoc("<ZoomIn/>");
}
return this.ZOOMIN;
};
this.getZOOMOUT=function(){
if(this.ZOOMOUT===null){
this.ZOOMOUT=MQA.createXMLDoc("<ZoomOut/>");
}
return this.ZOOMOUT;
};
this.getZOOMTO=function(){
if(this.ZOOMTO===null){
this.ZOOMTO=MQA.createXMLDoc("<ZoomTo/>");
}
return this.ZOOMTO;
};
this.getZOOMTORECT=function(){
if(this.ZOOMTORECT===null){
this.ZOOMTORECT=MQA.createXMLDoc("<ZoomToRect/>");
}
return this.ZOOMTORECT;
};
this.getZOOMTORECTLATLNG=function(){
if(this.ZOOMTORECTLATLNG===null){
this.ZOOMTORECTLATLNG=MQA.createXMLDoc("<ZoomToRectLatLng/>");
}
return this.ZOOMTORECTLATLNG;
};
};
MQXMLDOC=MQA.XMLDOC;
MQA.MQXML=new MQA.XMLDOC();
MQXML=MQA.MQXML;
MQA.ObjectCollection=function(max){
MQA.Object.call(this);
var _41=new Array();
this.getM_Items=function(){
return _41;
};
var _42=(max!==null)?max:-1;
var _43="MQObject";
this.getValidClassName=function(){
return _43;
};
this.setValidClassName=function(_44){
_43=_44;
};
this.add=function(obj){
if(this.isValidObject(obj)){
if(_42!==-1&&_41.length===max){
return;
}
_41.push(obj);
return _41.length;
}
return;
};
this.getSize=function(){
return _41.length;
};
this.get=function(i){
return _41[i];
};
this.remove=function(_47){
return _41.splice(_47,1);
};
this.removeAll=function(){
_41=null;
_41=new Array();
};
this.contains=function(_48){
var _49=this.getSize();
for(var _4a=0;_4a<_49;_4a++){
if(_41[_4a]===_48){
return true;
}
}
return false;
};
this.append=function(_4b){
if(this.getClassName()===_4b.getClassName()){
_41=_41.concat(_4b.getM_Items());
}else{
alert("Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!");
throw "Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!";
}
};
this.set=function(i,_4d){
var _4e=get(i);
_41[i]=_4d;
return _4e;
};
this.isValidObject=function(obj){
if(obj!==null){
if(_43==="ALL"){
return true;
}else{
if(_43==="MQObject"){
return true;
}else{
if(_43==="String"){
return true;
}else{
if(_43==="int"){
if(isNaN(obj)){
return false;
}else{
if(obj===Math.floor(obj)){
return true;
}
}
}else{
if(obj.getClassName()===_43){
return true;
}
}
}
}
}
}
return false;
};
var _50="Item";
this.getM_itemXpath=function(){
return _50;
};
this.setM_itemXpath=function(_51){
_50=_51;
};
this.getById=function(_52){
try{
for(var _53=0;_53<this.getSize();_53++){
if(_41[_53].getId()==_52){
return _41[_53];
}
}
}
catch(Error){
}
return null;
};
this.removeItem=function(_54){
for(var i=0;i<_41.length;i++){
if(_41[i]==_54){
this.remove(i);
i=_41.length;
}
}
};
};
MQA.ObjectCollection.prototype=new MQA.Object();
MQA.ObjectCollection.prototype.constructor=MQA.ObjectCollection;
MQA.ObjectCollection.prototype.getClassName=function(){
return "MQObjectCollection";
};
MQA.ObjectCollection.prototype.getObjectVersion=function(){
return 0;
};
MQA.ObjectCollection.prototype.getAt=function(i){
return this.get(i);
};
MQObjectCollection=MQA.ObjectCollection;
MQA.LatLngCollection=function(){
MQA.ObjectCollection.call(this,32678);
this.setValidClassName("MQLatLng");
this.setM_Xpath("LatLngCollection");
this.setM_XmlDoc(MQA.createXMLDocFromNode(MQA.MQXML.getLATLNGCOLLECTION()));
};
MQA.LatLngCollection.prototype=new MQA.ObjectCollection(32678);
MQA.LatLngCollection.prototype.constructor=MQA.LatLngCollection;
MQA.LatLngCollection.prototype.getClassName=function(){
return "MQLatLngCollection";
};
MQA.LatLngCollection.prototype.getObjectVersion=function(){
return 1;
};
MQA.LatLngCollection.prototype.loadXml=function(_57){
this.removeAll();
var _58=MQA.createXMLDoc(_57);
this.setM_XmlDoc(_58);
if(_58!==null){
this._loadCollection(_58);
}
};
MQA.LatLngCollection.prototype.loadXmlFromNode=function(_59){
this.removeAll();
var _5a=mqCreateXMLDocImportNode(_59);
this.setM_XmlDoc(_5a);
if(_5a!==null){
this._loadCollection(_5a);
}
};
MQA.LatLngCollection.prototype._loadCollection=function(_5b){
var _5c=_5b.documentElement;
var _5d=_5c.childNodes;
var _5e=_5d.length;
_5e=(_5e<32678)?_5e:32678;
var _5f=0;
var _60=0;
var _61=0;
var _62=0;
var _63=null;
if(this.getValidClassName()==="MQLatLng"){
for(var _64=0;_64<_5e;_64++){
if(_64==0){
if(_5d[_64].firstChild!==null){
_61=_5d[_64].firstChild.nodeValue/1000000;
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_5d[_64].firstChild.nodeValue/1000000;
}
}else{
if(_5d[_64].firstChild!==null){
_61=_5f+(_5d[_64].firstChild.nodeValue/1000000);
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_60+(_5d[_64].firstChild.nodeValue/1000000);
}
}
_5f=_61;
_60=_62;
_63=new MQA.LatLng(_61,_62);
this.add(_63);
}
}
};
MQA.LatLngCollection.prototype.saveXml=function(){
var _65="<"+this.getM_Xpath()+" Version=\""+this.getObjectVersion()+"\" Count=\""+this.getSize()+"\">";
var _66=parseInt(this.getSize());
if(_66>=1){
var _67=nLng=nPrevLat=nPrevLng=nDeltaLat=nDeltaLng=0;
var _68=null;
for(var i=0;i<_66;i++){
_68=this.getAt(i);
_67=parseInt(_68.getLatitude()*1000000);
nLng=parseInt(_68.getLongitude()*1000000);
nDeltaLat=_67-nPrevLat;
nDeltaLng=nLng-nPrevLng;
_65+="<Lat>"+nDeltaLat+"</Lat>";
_65+="<Lng>"+nDeltaLng+"</Lng>";
nPrevLat=_67;
nPrevLng=nLng;
}
}
_65=_65+"</"+this.getM_Xpath()+">";
return _65;
};
MQA.LatLngCollection.prototype.generalize=function(_6a){
var _6b=function(){
this.pLL=null;
this.dSegmentLength=0;
this.dPriorLength=0;
};
var _6c=function(){
this.pLL=null;
this.ulOriginalPoint=0;
};
mqllAnchor=null;
var _6d;
var i;
var _6f=0;
var _70=this.getSize();
var _71=new Array(_70);
var _72=new Array(_70);
var _73=0;
if(_70<2){
return;
}
for(i=0;i<_70;i++){
_71[i]=new _6b();
_72[i]=new _6c();
_71[i].pLL=this.getAt(i);
}
for(i=0;i<_70-1;i++){
_71[i].dSegmentLength=_71[i].pLL.arcDistance(_71[(i+1)].pLL);
if(i==0){
_71[i].dPriorLength=0;
}else{
_71[i].dPriorLength=_6f;
}
_6f+=_71[i].dSegmentLength;
}
mqllAnchor=_71[0].pLL;
_6d=0;
_72[0].pLL=mqllAnchor;
_72[0].ulOriginalPoint=0;
_73=1;
for(i=2;i<_70;i++){
if(!this.isEverybodyWithinDeviation(_71,_6d,i,_6a)){
mqllAnchor=_71[(i-1)].pLL;
_6d=(i-1);
_72[_73].pLL=mqllAnchor;
_72[_73].ulOriginalPoint=(i-1);
_73++;
}
}
_72[_73].pLL=_71[_70-1].pLL;
_72[_73].ulOriginalPoint=_70-1;
_73++;
var _74=_70;
var _75;
for(_75=(_73-1);_75>=0;_75--){
if((_74-1)!=_72[_75].ulOriginalPoint){
for(var x=(_74-1);x>_72[_75].ulOriginalPoint;x--){
try{
this.remove(x);
}
catch(e){
}
}
_74=_72[_75].ulOriginalPoint;
}else{
_74--;
}
}
_71=null;
_72=null;
};
MQA.LatLngCollection.prototype.isEverybodyWithinDeviation=function(_77,_78,_79,_7a){
var _7b=0;
var _7c=0;
var _7d=null;
var _7e=null;
var _7f=0;
var _80=0;
var _81=0;
var i;
var _83=null;
var _84=0;
var _85=0;
var _86=0;
var _87=0;
var _88=0;
var _89=0;
var _8a=0;
var _8b=0;
_7b=MQA.DistanceApproximation.getMilesPerLngDeg(_77[_78].pLL.getLatitude());
_7c=_7a*_7a;
_7d=_77[_78].pLL;
_7e=_77[_79].pLL;
_7f=(_7e.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_80=(_7e.getLongitude()-_7d.getLongitude())*_7b;
_81=_7f*_7f+_80*_80;
for(i=_78+1;i<_79;i++){
_83=_77[i].pLL;
_84=(_83.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_85=(_83.getLongitude()-_7d.getLongitude())*_7b;
_86=_84*_84+_85*_85;
_88=_7f*_84+_80*_85;
_89=_7f*_7f+_80*_80;
if(_89==0){
_87=0;
}else{
_87=_88/_89;
}
_8a=_87*_87*_81;
_8b=_86-_8a;
if(_8b>_7c){
return false;
}
}
return true;
};
MQLatLngCollection=MQA.LatLngCollection;
MQA.DistanceApproximation=new function(){
this.m_testLat;
this.m_testLng;
this.m_mpd;
this.m_milesPerLngDeg=new Array(69.170976,69.160441,69.128838,69.076177,69.002475,68.907753,68.792041,68.655373,68.497792,68.319345,68.120088,67.900079,67.659387,67.398085,67.116253,66.813976,66.491346,66.148462,65.785428,65.402355,64.999359,64.576564,64.134098,63.672096,63.190698,62.690052,62.17031,61.63163,61.074176,60.498118,59.903632,59.290899,58.660106,58.011443,57.345111,56.66131,55.96025,55.242144,54.507211,53.755675,52.987764,52.203713,51.403761,50.588151,49.757131,48.910956,48.049882,47.174172,46.284093,45.379915,44.461915,43.530372,42.58557,41.627796,40.657342,39.674504,38.679582,37.672877,36.654698,35.625354,34.585159,33.534429,32.473485,31.40265,30.322249,29.232613,28.134073,27.026963,25.911621,24.788387,23.657602,22.519612,21.374762,20.223401,19.065881,17.902554,16.733774,15.559897,14.38128,13.198283,12.011266,10.820591,9.626619,8.429716,7.230245,6.028572,4.825062,3.620083,2.414002,1.207185,1);
this.MILES_PER_LATITUDE=69.170976;
this.KILOMETERS_PER_MILE=1.609347;
this.getMilesPerLngDeg=function(lat){
return (Math.abs(lat)<=90)?this.m_milesPerLngDeg[parseInt(Math.abs(lat)+0.5)]:69.170976;
};
};
DistanceApproximation=MQA.DistanceApproximation;

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
MQA.Util={getLLToXY:function(LL){
var xy=new MQA.PointXY(0,0);
var _3=MQA.getColTile(LL.lng,this.scale);
var _4=MQA.getRowTile(LL.lat,this.scale);
var _5=MQA.getColTileOffset(LL.lng,this.scale);
var _6=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_3)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_5);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_4)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_6);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
},isIntersectedXY:function(_7,_8){
var _9=(_7.lr.x>_8.ul.x)&&(_7.ul.x<_8.lr.x)&&(_7.lr.y>_8.ul.y)&&(_7.ul.y<_8.lr.y);
return _9;
},isIntersectedLL:function(_a,_b){
var _c=(_a.lr.lat<_b.ul.lat)&&(_a.ul.lat>_b.lr.lat)&&(_a.lr.lng>_b.ul.lng)&&(_a.ul.lng<_b.lr.lng);
return _c;
},isMouseLeaveOrEnter:function(e,_e){
if(e.type!="mouseout"&&e.type!="mouseover"){
return false;
}
var _f=e.relatedTarget?e.relatedTarget:e.type=="mouseout"?e.toElement:e.fromElement;
while(_f&&_f!=_e){
_f=_f.parentNode;
}
return (_f!=_e);
},getTop:function(_10){
var top=0;
while(_10){
top+=parseInt(_10.offsetTop);
_10=_10.offsetParent;
}
return (top);
},centreElement:function(_12){
_12.style.left=(MQA.browser.size().width-_12.offsetWidth)/2+"px";
_12.style.top=(MQA.browser.size().height-_12.offsetHeight)/2+"px";
},deleteChildElements:function(obj){
if(obj&&obj.childNodes.length>0){
for(var i=(obj.childNodes.length-1);i>=0;i--){
obj.removeChild(obj.childNodes[i]);
}
}
},deleteElement:function(obj){
if(obj){
obj.parentNode.removeChild(obj);
}
},pngFilter:function(_16){
if(!document.getElementsByTagName){
return;
}
if(MQA.browser.info.name=="msie"&&((MQA.browser.info.version<7)&&MQA.browser.info.version>5)){
var _17=(_16)?_16:document.images;
for(var i=0,l=_17.length;i<l;i++){
var img=_17[i];
var _1b=img.src;
if(_1b){
var _1c=_1b.length;
if(_1b.toLowerCase().substring(_1c-4,_1c)==".png"){
if(!img.title){
img.title=(img.alt)?img.alt:"";
}
img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"');";
img.src=MQ.art.spacer;
}
}
}
}
},_modifyImageSrc:function(src){
var _1e=MQA.browser;
var _1f=src;
if(_1e.name=="msie"&&_1e.version<7){
_1f=_1f+".gif";
}else{
_1f=_1f+".png";
}
return _1f;
},getSuperRect:function(_20,_21){
var _22=new MQA.RectLL(new MQA.PointLL(0,0),new MQA.PointLL(0,0));
_22.ul.lat=Math.max(_20.ul.lat,_21.ul.lat);
_22.ul.lng=Math.min(_20.ul.lng,_21.ul.lng);
_22.lr.lat=Math.min(_20.lr.lat,_21.lr.lat);
_22.lr.lng=Math.max(_20.lr.lng,_21.lr.lng);
return _22;
},_hasPngExtention:function(url){
var _24=url.toLowerCase();
var _25=_24.lastIndexOf(".png");
if((_25!=-1)&&(_25==(_24.length-4))){
return true;
}
return false;
},_createImage:function(url,_27,top,_29,_2a,_2b){
var img;
img=document.createElement("img");
if(_2b==null){
_2b=false;
}
if(_2b){
img.isPng=_2b;
}else{
img.isPng=this._hasPngExtention(url);
}
if(!img.isPng){
img.src=url;
}else{
if(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5)){
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='image')";
img.src="http://img.mqcdn.com/a/a";
}else{
img.src=url;
}
}
img.style.left=_27+"px";
img.style.top=top+"px";
img.style.width=_29+"px";
img.style.height=_2a+"px";
img.style.position="absolute";
img.style.zIndex=200;
img.style.MozUserSelect="none";
img.style.border="none";
img.style.display="block";
img.unselectable="on";
img.onselectstart=MQA._prEvent.falseFunction;
img.oncontextmenu=MQA._prEvent.falseFunction;
if(_2b==null){
_2b=false;
}
if(_2b){
img.isPng=_2b;
}else{
img.isPng=this._hasPngExtention(url);
}
return img;
},createImage:function(URL,_2e,TOP,_30,_31,_32){
var _33;
_33=document.createElement("IMG");
_33.galleryimg="no";
_33.lt=_2e;
_33.tp=TOP;
var _34=_33.style;
_34.width=MQA.Util.asPix(_30);
_34.height=MQA.Util.asPix(_31);
_34.position="absolute";
_34.left=MQA.Util.asPix(_2e);
_34.top=MQA.Util.asPix(TOP);
_34.zIndex=_32;
_34.MozUserSelect="none";
_34.display="block";
_34.border="0";
if(URL.length==0){
_34.visibility="hidden";
}else{
_34.visibility="visible";
_33.src=URL;
}
_33.unselectable="on";
_33.onselectstart=MQA._prEvent.falseFunction;
_33.oncontextmenu=MQA._prEvent.falseFunction;
return _33;
},pause:function(_35){
var now=new Date();
var _37=now.getTime()+_35;
while(true){
now=new Date();
if(now.getTime()>_37){
return;
}
}
},asPix:function(X){
return X+"px";
},calcPercentage:function(_39,_3a){
return Math.round((_39/_3a)*100);
},stripHTMLTags:function(s){
return s.replace(/<\/?[^>]+>/gi,"");
},panAngle:function(_3c,_3d,_3e,_3f){
var b=(_3f-_3d);
var c=(_3e-_3c);
if(b<0){
b=b*-1;
}
if(c<0){
c=c*-1;
}
var a=Math.round(Math.sqrt(b*b+c*c));
var _43=Math.round((Math.asin(b/a)*360)/(2*3.14));
return _43;
},isOverLimit:function(_44){
var _45=false;
var _46=16000;
for(var i=0;i<_44.length;i++){
if(_44[i].x>_46||_44[i].x<-_46||_44[i].y>_46||_44[i].y<-_46){
_45=true;
break;
}
}
return _45;
},InitDojo:function(_48){
window.onload=_48;
},getWindowScrollXY:function(){
var _49=new MQA.Point(0,0);
if(typeof (window.pageYOffset)=="number"){
_49.setX(window.pageXOffset);
_49.setY(window.pageYOffset);
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_49.setX(document.body.scrollLeft);
_49.setY(document.body.scrollTop);
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_49.setX(document.documentElement.scrollLeft);
_49.setY(document.documentElement.scrollTop);
}
}
}
return (_49);
},getHTMLSubstring:function(_4a,_4b,_4c){
var _4d=/<\/?[^>]+>/ig;
var _4e=new Array();
var _4f=_4a.replace(_4d,"|");
var _50=_4f.split("|");
_4e=_4a.match(_4d);
var _51="";
var _52=false;
for(var i=charCount=0;i<_50.length;i++){
charCount+=_50[i].length;
if(charCount>=_4b&&_52==false){
charCount-=_50[i].length;
_50[i]=_50[i].substr(0,(_4b-charCount))+_4c;
_52=true;
continue;
}
if(_52==true){
_50[i]="";
}
}
for(var i=0;i<_50.length;i++){
_51+=_50[i];
if(_4e&&(_4e.length>0)&&(i<_4e.length)){
_51+=_4e[i];
}
}
return (_51);
},getBrowserSize:function(){
size=new MQA.Size(0,0);
if(document.body.scrollHeight>document.body.offsetHeight){
size.width=document.body.scrollWidth;
size.height=document.body.scrollHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.body.clientWidth){
size.width=document.body.clientWidth;
size.height=document.body.clientHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.documentElement.clientWidth){
size.width=document.documentElement.clientWidth;
size.height=document.documentElement.clientHeight;
}
if(self.innerWidth){
size.width=self.innerWidth;
size.height=self.innerHeight;
}
return size;
},isSupportedBrowser:function(){
browser=MQA.browser;
switch(browser.name){
case "msie":
if(browser.version>=6){
return true;
}
return false;
break;
case "firefox":
if(browser.version>1.5){
return true;
}
return false;
break;
case "netscape":
return false;
break;
case "opera":
return false;
break;
case "safari":
if(browser.version>=2){
return true;
}
return false;
break;
}
return true;
},getParentOffset:function(_54){
var _55=0,_56=0;
do{
_55+=_54.offsetTop||0;
_56+=_54.offsetLeft||0;
_54=_54.offsetParent;
}while(_54);
return (new MQA.Point(_56,_55));
},indexOf:function(_57,_58){
for(var i=0,_5a=_57.length;i<_5a;i++){
if(_57[i]==_58){
return i;
}
}
return -1;
},getBrowserInfo:function(){
browser=new Object();
browser.name=browser.version=browser.os="unknown";
var _5b=navigator.userAgent.toLowerCase();
var _5c=new Array("firefox","msie","netscape","opera","safari");
var _5d=new Array("linux","mac","windows","x11");
for(var i=0,n=_5c.length;i<n;i++){
var _60=_5b.indexOf(_5c[i])+1;
if(_60>0){
browser.name=_5c[i];
var _61=_60+browser.name.length;
var _62=((browser.name=="safari")||(_5b.charAt(_61+4)>0&&_5b.charAt(_61+4)<9))?5:3;
browser.version=_5b.substring(_61,_61+_62);
}
}
for(var i=0,n=_5d.length;i<n;i++){
var _60=_5b.indexOf(_5d[i])+1;
if(_60>0){
browser.os=_5d[i];
}
}
return browser;
},createParentDiv:function(id,lt,tp,_66,top,_68,_69,_6a,_6b){
var _6c=document.createElement("div");
_6c.id=id;
_6c.lt=lt;
_6c.tp=tp;
_6c.style.position=_66;
_6c.style.top=top+"px";
_6c.style.left=_68+"px";
if(_69!=null){
_6c.style.zIndex=_69;
}
if(_6a!=null){
_6c.style.width=_6a+"px";
}
if(_6b!=null){
_6c.style.height=_6b+"px";
}
return _6c;
},createImgHolder:function(src,_6e,_6f,_70,_71){
var _72=document.createElement("img");
if(src!=null){
_72.src=src;
}
_72.unselectable=_6e;
_72.style.MozUserSelect=_6f;
_72.style.display=_70;
if(_71!=null){
_72.style.zIndex=_71;
}
return _72;
},createImgLogo:function(_73,_74,_75,_76,_77,_78,_79,src,_7b,_7c){
var _7d=document.createElement("img");
_7d.style.MozUserSelect=_73;
_7d.unselectable=_74;
_7d.corner=_75;
_7d.offset=_76;
_7d.style.position=_77;
_7d.style.display=_78;
_7d.style.zIndex=_79;
if(_7b!=null){
_7d.width=_7b;
}
if(_7c!=null){
_7d.height=_7c;
}
return _7d;
},createArea:function(_7e,_7f,_80,_81,alt){
var tmp=document.createElement("area");
if(_7e!=null){
tmp.shape=_7e;
}
if(_7f!=null){
tmp.coords=_7f;
}
if(_80!=null){
tmp.href=_80;
}
if(_81!=null){
tmp.title=_81;
}
if(alt!=null){
tmp.alt=alt;
}
return tmp;
},getCurrentDateObject:function(){
var _84;
iDate=new Date();
if((iDate.toString().indexOf("DT",0)!=-1)||(iDate.toString().indexOf("Daylight Time)",0)!=-1)){
_84=60;
}else{
_84=0;
}
var d=new Date();
var _86=new Object;
_86.year=d.getFullYear();
_86.month=d.getMonth();
_86.day=d.getDate();
_86.hours=d.getHours();
_86.minutes=d.getMinutes();
_86.seconds=d.getSeconds();
_86.ampm=((_86.hours>=12)&&(_86.minutes>0)?"pm":"am");
switch(d.getTimezoneOffset()+_84){
case 300:
_86.timeZone=(_84>0?"EDT":"EST");
break;
case 360:
_86.timeZone=(_84>0?"CDT":"CST");
break;
case 420:
_86.timeZone=(_84>0?"MDT":"MST");
break;
case 480:
_86.timeZone=(_84>0?"PDT":"PST");
break;
case 600:
_86.timeZone=(_84>0?"HDT":"HST");
break;
}
return _86;
},_getRandomGUID:function(n){
var p;
var _89="";
var _8a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(var i=0;i<n;i++){
p=Math.floor(Math.random()*_8a.length);
_89+=_8a.substr(p,1);
}
return _89;
},_cloneValue:function(obj){
if(typeof (obj)!=="object"||obj==null){
return obj;
}
var c=obj instanceof Array?[]:{};
for(var i in obj){
var _8f=obj[i];
if(typeof (_8f)=="object"){
if(_8f instanceof Array){
c[i]=[];
for(var j=0;j<_8f.length;j++){
if(typeof (_8f[j])!="object"){
c[i].push(_8f[j]);
}else{
c[i].push(this._cloneValue(_8f[j]));
}
}
}else{
c[i]=this._cloneValue(_8f);
}
}else{
c[i]=_8f;
}
}
if(MQA.browser.name=="msie"){
c.toString=obj.toString;
}
return c;
},_trim:function(s){
return s.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
},_nukeChildren:function(obj){
var c;
while(obj.childNodes.length>0){
c=obj.lastChild;
this._nukeChildren(c);
if(c.innerHTML){
c.innerHTML=null;
}
if(c.outerHTML){
this._setOuterHTMLToEmptyString(c);
}
if(c.parentNode){
c.parentNode.removeChild(c);
}
c=null;
delete c;
}
},_deleteDOMObject:function(obj){
this._setInnerHTMLToEmptyString(obj);
this._setOuterHTMLToEmptyString(obj);
this._nukeChildren(obj);
if(obj.parentNode){
obj.parentNode.removeChild(obj);
}
obj=null;
return null;
},_setInnerHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="msie"&&this.getBrowserInfo().name!="safari"){
obj.innerHTML=null;
}
},_setOuterHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="safari"&&this.getBrowserInfo().name!="msie"){
obj.outerHTML="";
}
},_purge:function(d){
var a=d.attributes,i,l,n;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
n=a[i].name;
if(typeof d[n]==="function"){
d[n]=null;
}
}
}
a=d.childNodes;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
this._purge(d.childNodes[i]);
}
}
},inArray:function(_9c,_9d){
for(var i=0;i<_9d.length;i++){
if(_9c==_9d[i]){
return true;
}
}
return false;
}};
MQA.browser=MQA.Util.getBrowserInfo();

MQA.Control=function(){
this.controlVersion="1.0";
};
MQA.Control.prototype={initialize:function(_1){
this.map=_1;
},getPosition:function(){
return this.position;
},getHeight:function(){
return this.getHeightInternal(this.elem);
},getHeightInternal:function(_2){
var _3=_2.childNodes;
var _4=0;
for(var i=0,j=_3.length;i<j;i++){
if(_3[i].childNodes.length>0&&_3[i].style.overflow!="hidden"){
childHeight=this.getHeightInternal(_3[i]);
if(childHeight>_4){
_4=childHeight;
}
}
if(_3[i].offsetHeight>_4){
_4=_3[i].offsetHeight;
}
}
return _4;
},getWidth:function(){
return this.getWidthInternal(this.elem);
},getWidthInternal:function(_7){
var _8=_7.childNodes;
var _9=0;
for(var i=0,j=_8.length;i<j;i++){
if(_8[i].childNodes.length>0&&_8[i].style.overflow!="hidden"){
childWidth=this.getWidthInternal(_8[i]);
if(childWidth>_9){
_9=childWidth;
}
}
if(_8[i].offsetWidth>_9){
_9=_8[i].offsetWidth;
}
}
return _9;
}};

MQA.LargeZoomControl=function(){
browser=MQA.browser;
this.pan=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(5,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ePanClick=new Array();
this.ePanMouseover=new Array();
this.ePanMouseout=new Array();
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.eZoomareaClick=new Array();
this.eZoomareaMouseover=new Array();
this.eZoomboxMouseout=null;
temp=document.createElement("div");
temp.className="map-controls-bg screen";
this.elem.appendChild(temp);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="45px";
temp1.style.margin="0";
temp1.style.padding="0 1px";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-top-bg.png', sizingMethod='image');";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-top-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="236px";
temp1.style.margin="0";
temp1.style.padding="5px 0 0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-middle-bg.png', sizingMethod='crop')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-middle-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="repeat-y";
}
if(browser.name=="msie"){
temp1.style.height="241px";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="18px";
temp1.style.margin="0";
temp1.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png', sizingMethod='image')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp=document.createElement("ul");
temp.className="map-controls screen";
this.elem.appendChild(temp);
temp1=document.createElement("li");
temp1.className="map-compass-wrapper";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="map-compass";
temp1.appendChild(temp2);
temp3=document.createElement("img");
temp3.border=0;
if(browser.name=="msie"&&browser.version<7){
temp3.src="http://img.mqcdn.com/a/a";
temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/map-compassrose.png', sizingMethod='image')";
}else{
temp3.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";
}
temp3.alt="compass rose";
temp3.className="";
temp2.appendChild(temp3);
this.compassrose=temp3;
temp3=document.createElement("img");
temp3.border=0;
temp3.src="http://img.mqcdn.com/a/a";
temp3.className="map-compass-links";
temp3.useMap="#mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassroseimg=temp3;
temp3=document.createElement("map");
temp3.name="mq-zoomcontrol-linkmap";
temp3.id="mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassrosemap=temp3;
temp3.appendChild(MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center"));
temp4=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
temp3.appendChild(temp4);
this.pan[MQA.PAN_NORTH]=temp4;
temp4=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
temp3.appendChild(temp4);
this.pan[MQA.PAN_EAST]=temp4;
temp4=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
temp3.appendChild(temp4);
this.pan[MQA.PAN_WEST]=temp4;
temp4=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
temp3.appendChild(temp4);
this.pan[MQA.PAN_SOUTH]=temp4;
temp1=document.createElement("li");
temp1.className="map-zoom";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="io map-zoom-in";
temp1.appendChild(temp2);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomin.src="http://img.mqcdn.com/a/a";
this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";
}else{
this.zoomin.src="http://img.mqcdn.com/mqtoolkit/z-in.png";
}
temp2.appendChild(this.zoomin);
var _1=document.createElement("div");
_1.className="map-zoombox";
var _2=document.createElement("img");
_2.border=0;
if(browser.name=="msie"&&browser.version<7){
_2.src="http://img.mqcdn.com/a/a";
_2.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/zoombar.png', sizingMethod='image')";
}else{
_2.src="http://img.mqcdn.com/mqmaptiled/zoombar.png";
}
_1.appendChild(_2);
strHtm="<img src='http://img.mqcdn.com/a/a' border='0' class='map-zoom-links'/>";
strHtm+="<img src='http://img.mqcdn.com/mqmaptiled/z-on.png' border='0' class='map-zoom-on'/>";
strHtm+="<map>";
var _3=1;
var _4=10;
for(var i=0;i<16;i++){
strHtm+="<area alt='Zoom to level "+(16-i)+"' title='Zoom to level "+(16-i)+"' shape='rect' coords='1, "+(_3+i*12)+", 22, "+(_4+i*12)+"' />";
}
strHtm+="</map>";
_1.innerHTML+=strHtm;
this.zoombox=_1;
this.zoomarea=_1.childNodes[3].childNodes;
temp1.appendChild(_1);
temp2=document.createElement("div");
temp2.className="io map-zoom-out";
temp1.appendChild(temp2);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomout.src="http://img.mqcdn.com/a/a";
this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";
}else{
this.zoomout.src="http://img.mqcdn.com/mqtoolkit/z-out.png";
}
temp2.appendChild(this.zoomout);
};
MQA.LargeZoomControl.prototype=new MQA.Control();
MQA.LargeZoomControl.prototype.constructor=MQA.LargeZoomControl;
MQA.LargeZoomControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.delDtor(this._dth);
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_NORTH]);
this.pan[MQA.PAN_NORTH]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_EAST]);
this.pan[MQA.PAN_EAST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_WEST]);
this.pan[MQA.PAN_WEST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_SOUTH]);
this.pan[MQA.PAN_SOUTH]=null;
this.pan=null;
for(var i=0;i<16;i++){
MQA.Util._deleteDOMObject(this.zoomarea[0]);
}
this.zoomarea=null;
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoombox.innerHTML=null;
this.zoombox.outerHTML="";
MQA.Util._deleteDOMObject(this.zoombox);
this.zoombox=null;
this.compassroseimg.src="";
MQA.Util._deleteDOMObject(this.compassroseimg);
this.compassroseimg=null;
this.compassrose.src="";
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.compassrosemap.innerHTML=null;
this.compassrosemap.outerHTML="";
MQA.Util._deleteDOMObject(this.compassrosemap);
this.compassrosemap=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.LargeZoomControl.prototype.destructor=function(){
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.LargeZoomControl.prototype.initialize=function(_8){
this.map=_8;
this.type=MQA.CONTROL_PANZOOM;
this.setZoom(this.map.getZoomLevel());
this.compassroseimg.useMap="#mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.name="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.id="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.zoombox.childNodes[1].useMap="#zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].name="zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].id="zoompositions"+this.map.uniqueMapID;
for(var i=0;i<4;i++){
this.ePanClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseout[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.observe(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.observe(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
this.eZoomareaClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomareaMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.observe(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
this.eZoomboxMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoombox,"mouseout",this.eZoomboxMouseout);
};
MQA.LargeZoomControl.prototype.eventmonitor=function(_a){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_a)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_a)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_a)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_a)==this.zoomarea[i]){
eventId=16-i;
break;
}
}
switch(_a.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
case "nil":
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_a).className="o";
break;
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
default:
this.selectZoom(eventId);
break;
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
if(MQA._prEvent.element(_a).className!="o"){
return;
}
MQA._prEvent.element(_a).className="";
break;
case "n":
case "s":
case "e":
case "w":
this.compassrose.className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
this.unselectZoom(eventId);
}
break;
}
break;
}
};
MQA.LargeZoomControl.prototype.setZoom=function(_c){
var z=this.zoombox.childNodes[2];
z.style.top=((16-_c)*12+1)+"px";
z.alt="Zoom to level "+(_c);
z.title="Zoom to level "+(_c);
};
MQA.LargeZoomControl.prototype.selectZoom=function(_e){
this.zoombox.childNodes[0].style.left=0-((17-_e)*25)+"px";
};
MQA.LargeZoomControl.prototype.unselectZoom=function(_f){
this.zoombox.childNodes[0].style.left="0";
};
MQA.LargeZoomControl.prototype.getHeight=function(){
return 298;
};
MQA.LargeZoomControl.prototype.getWidth=function(){
return 45;
};
MQA.PanControl=function(){
browser=MQA.browser;
this.pans=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.elem.appendChild(this.bgdiv);
this.boxdiv=document.createElement("div");
this.boxdiv.style.position="relative";
this.boxdiv.style.width="48px";
this.boxdiv.style.height="52px";
this.boxdiv.style.margin="0";
this.boxdiv.style.padding="0 3px";
if(browser.name=="msie"&&browser.version<7){
this.boxdiv.style.backgroundImage="none";
this.boxdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png', sizingMethod='image')";
}else{
this.boxdiv.style.backgroundColor="transparent";
this.boxdiv.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png)";
this.boxdiv.style.backgroundPosition="0 0";
this.boxdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.boxdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-box-wrapper";
this.ul.appendChild(this.li1);
this.mapcompass=document.createElement("div");
this.mapcompass.className="map-compass";
this.li1.appendChild(this.mapcompass);
this.roseimg=document.createElement("img");
this.roseimg.border=0;
if(browser.name=="msie"&&browser.version<7){
this.roseimg.src="http://img.mqcdn.com/a/a";
this.roseimg.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-compassrose.png', sizingMethod='image')";
}else{
this.roseimg.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";
}
this.roseimg.alt="compass rose";
this.roseimg.className="";
this.mapcompass.appendChild(this.roseimg);
this.compassrose=this.roseimg;
this.mapimg=document.createElement("img");
this.mapimg.border=0;
this.mapimg.src="http://img.mqcdn.com/a/a";
this.mapimg.className="map-compass-links";
this.mapimg.useMap="#mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapimg);
this.mapitem=document.createElement("map");
this.mapitem.id="mq-pancontrol-linkmap";
this.mapitem.name="mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapitem);
this.area1=MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center");
this.mapitem.appendChild(this.area1);
this.pans[MQA.PAN_NORTH]=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
this.mapitem.appendChild(this.pans[MQA.PAN_NORTH]);
this.pans[MQA.PAN_EAST]=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
this.mapitem.appendChild(this.pans[MQA.PAN_EAST]);
this.pans[MQA.PAN_WEST]=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
this.mapitem.appendChild(this.pans[MQA.PAN_WEST]);
this.pans[MQA.PAN_SOUTH]=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
this.mapitem.appendChild(this.pans[MQA.PAN_SOUTH]);
};
MQA.PanControl.prototype=new MQA.Control();
MQA.PanControl.prototype.constructor=MQA.PanControl;
MQA.PanControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.pans[MQA.PAN_NORTH]=null;
this.pans[MQA.PAN_SOUTH]=null;
this.pans[MQA.PAN_EAST]=null;
this.pans[MQA.PAN_WEST]=null;
this.pans=null;
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.mapitem.innerHTML=null;
this.mapitem.outerHTML="";
MQA.Util._deleteDOMObject(this.mapitem);
this.mapitem=null;
this.roseimg.src="";
MQA.Util._deleteDOMObject(this.roseimg);
this.roseimg=null;
this.mapimg.src="";
MQA.Util._deleteDOMObject(this.mapimg);
this.mapimg=null;
this.mapcompass.innerHTML=null;
this.mapcompass.outerHTML="";
MQA.Util._deleteDOMObject(this.mapcompass);
this.mapcompass=null;
this.area1.outerHTML="";
MQA.Util._deleteDOMObject(this.area1);
this.area1=null;
this.boxdiv.innerHTML=null;
this.boxdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.boxdiv);
this.boxdiv=null;
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.PanControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.PanControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_PAN;
this.ePanNorthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
this.ePanSouthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
this.ePanEastClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
this.ePanWestClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
};
MQA.PanControl.prototype.eventmonitors=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_WEST]){
eventId="w";
}
switch(evt.type){
case "click":
switch(eventId){
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
}
break;
case "mouseover":
switch(eventId){
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
}
break;
case "mouseout":
this.compassrose.className="";
break;
}
};
MQA.PanControl.prototype.getHeight=function(){
return 48;
};
MQA.PanControl.prototype.getWidth=function(){
return 47;
};
MQA.ZoomControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.bgdiv.style.width="60px";
this.elem.appendChild(this.bgdiv);
this.imgdiv=document.createElement("div");
this.imgdiv.style.position="relative";
this.imgdiv.style.width="60px";
this.imgdiv.style.height="45px";
this.imgdiv.style.margin="0";
this.imgdiv.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
this.imgdiv.style.backgroundImage="none";
this.imgdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png', sizingMethod='image')";
}else{
this.imgdiv.style.backgroundColor="transparent";
this.imgdiv.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png)";
this.imgdiv.style.backgroundPosition="0 0";
this.imgdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.imgdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-zoom";
this.li1.style.width="60px";
this.li1.style.height="50px";
this.ul.appendChild(this.li1);
this.indiv=document.createElement("div");
this.indiv.style.position="absolute";
this.indiv.style.left="6px";
this.indiv.style.top="8px";
this.indiv.style.width="22px";
this.indiv.className="io map-zoom-in";
this.li1.appendChild(this.indiv);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
this.zoomin.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-in");
this.indiv.appendChild(this.zoomin);
this.outdiv=document.createElement("div");
this.outdiv.style.position="absolute";
this.outdiv.style.left="29px";
this.outdiv.style.top="6px";
this.outdiv.style.width="22px";
this.outdiv.className="io map-zoom-out";
this.li1.appendChild(this.outdiv);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
this.zoomout.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-out");
this.outdiv.appendChild(this.zoomout);
};
MQA.ZoomControl.prototype=new MQA.Control();
MQA.ZoomControl.prototype.constructor=MQA.ZoomControl;
MQA.ZoomControl.prototype.dispose=function(){
this.map=null;
this.type=null;
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.outdiv.innerHTML=null;
this.outdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.outdiv);
this.outdiv=null;
this.zoomout.src="";
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoomin.src="";
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1="";
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul="";
this.imgdiv.innerHTML=null;
this.imgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.imgdiv);
this.imgdiv="";
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv="";
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem="";
};
MQA.ZoomControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ZoomControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_ZOOM;
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
};
MQA.ZoomControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(evt)==this.zoomout){
eventId="out";
}
switch(evt.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="o";
break;
default:
MQA._prEvent.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-on.png";
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
MQA._prEvent.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-"+eventId+".png";
}
}
break;
}
};
MQA.ZoomControl.prototype.getHeight=function(){
return 40;
};
MQA.ZoomControl.prototype.getWidth=function(){
return 62;
};
MQA.ViewControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(150,0));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ul=document.createElement("ul");
this.ul.className="map-view screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-view-street";
this.ul.appendChild(this.li1);
this.streetview=document.createElement("img");
this.streetview.className="";
this.streetview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.streetview.src="http://img.mqcdn.com/a/a";
this.streetview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png', sizingMethod='image')";
}else{
this.streetview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png";
}
this.streetview.alt="View Street Map";
this.streetview.title="View Street Map";
this.li1.appendChild(this.streetview);
this.li2=document.createElement("li");
this.li2.className="map-view-aerial";
this.ul.appendChild(this.li2);
this.aerialview=document.createElement("img");
this.aerialview.className="";
this.aerialview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.aerialview.src="http://img.mqcdn.com/a/a";
this.aerialview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png', sizingMethod='image')";
}else{
this.aerialview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png";
}
this.aerialview.alt="View Aerial Image";
this.aerialview.title="View Aerial Image";
this.li2.appendChild(this.aerialview);
this.li3=document.createElement("li");
this.li3.className="map-view-hybrid";
this.ul.appendChild(this.li3);
this.hybridview=document.createElement("img");
this.hybridview.className="";
this.hybridview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.hybridview.src="http://img.mqcdn.com/a/a";
this.hybridview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png', sizingMethod='image')";
}else{
this.hybridview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png";
}
this.hybridview.alt="View Hybrid Map";
this.hybridview.title="View Hybrid Map";
this.li3.appendChild(this.hybridview);
};
MQA.ViewControl.prototype=new MQA.Control();
MQA.ViewControl.prototype.constructor=MQA.ViewControl;
MQA.ViewControl.prototype.dispose=function(){
this.map=null;
this.type=null;
this.position=null;
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.streetview.src="";
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
this.aerialview.src="";
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridview.src="";
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.li2.innerHTML=null;
this.li2.outerHTML="";
MQA.Util._deleteDOMObject(this.li2);
this.li2=null;
this.li3.innerHTML=null;
this.li3.outerHTML="";
MQA.Util._deleteDOMObject(this.li3);
this.li3=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ViewControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.eStreetClick);
MQA._prEvent.observe(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.observe(this.streetview,"mouseout",this.eStreetMouseOut);
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
this.eHybridClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.observe(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.observe(this.hybridview,"mouseout",this.eHybridMouseOut);
if(this.map.getMapType()==MQA.MAP_TYPE.MAP){
this.streetview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.SAT){
this.aerialview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.HYB){
this.hybridview.className="a";
}
};
MQA.ViewControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
var _16=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_16==this.streetview){
this.selectMode("street");
}
if(_16==this.aerialview){
this.selectMode("aerial");
}
if(_16==this.hybridview){
this.selectMode("hybrid");
}
break;
case "mouseover":
if(_16.className!="a"){
_16.className="o";
}
break;
case "mouseout":
if(_16.className!="a"){
_16.className="";
}
break;
}
};
MQA.ViewControl.prototype.updateControl=function(_17){
switch(_17){
case MQA.MAP_TYPE.MAP:
this.aerialview.className="";
this.hybridview.className="";
this.streetview.className="a";
break;
case MQA.MAP_TYPE.SAT:
this.hybridview.className="";
this.streetview.className="";
this.aerialview.className="a";
break;
case MQA.MAP_TYPE.HYB:
this.aerialview.className="";
this.streetview.className="";
this.hybridview.className="a";
break;
}
};
MQA.ViewControl.prototype.selectMode=function(_18){
var _19=this.map.getMapType();
var _1a="noChange";
if(_18=="street"&&_19!=MQA.MAP_TYPE.MAP){
_1a=MQA.MAP_TYPE.MAP;
}
if(_18=="aerial"&&_19!=MQA.MAP_TYPE.SAT){
_1a=MQA.MAP_TYPE.SAT;
}
if(_18=="hybrid"&&_19!=MQA.MAP_TYPE.HYB){
_1a=MQA.MAP_TYPE.HYB;
}
if(_1a!="noChange"){
this.map.setMapType(_1a);
}
};
MQA.ViewControl.prototype.getHeight=function(){
return 22;
};
MQA.ViewControl.prototype.getWidth=function(){
return 209;
};

MQA._prEvent=new function(){
var _1=false,_2=false,_3=[],_4=[],_5=false;
function _checkUnlReg(){
if(!_5&&document.body){
_5=true;
if(document.body.attachEvent){
document.body.attachEvent("onunload",_onUnload);
}else{
document.body.addEventListener("onunload",_onUnload,false);
}
}
};
function _onLoad(){
_1=true;
_checkUnlReg();
for(var i=0;i<_3.length;i++){
_3[i]();
}
};
function _onUnload(){
};
this._onUnload=function(){
if(_2){
return;
}
if(window.detachEvent){
window.detachEvent("onload",_onLoad);
window.detachEvent("onunload",_onUnload);
if(document.body){
document.body.detachEvent("onunload",_onUnload);
}
}
for(var i=0;i<_4.length;i++){
var l=_4[i];
try{
_4[i]();
if(l){
_4[i]();
}
}
catch(e){
}
}
_2=true;
};
this.addOnUnload=function(_9){
_4.push(_9);
};
this.observe=function(_a,_b,_c){
if(typeof _a=="string"){
_a=document.getElementById(_a);
}
if(_b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_a.attachEvent)){
_b="keydown";
}
this._observe(_a,_b,_c);
};
this.stopObserving=function(_d,_e,_f){
if(typeof _d=="string"){
_d=document.getElementById(_d);
}
if(_e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_d.attachEvent)){
_e="keydown";
}
this._stopObserving(_d,_e,_f);
};
var dav=navigator.appVersion;
var _11;
if(dav.match(/\bMSIE\b/)&&window.attachEvent){
_11=parseFloat(dav.split("MSIE ")[1].split(";")[0]);
if(_11){
var _12=[];
this._observe=function(_13,_14,_15){
_13.attachEvent("on"+_14,_15);
var _16=_12.length;
_12[_16]=[_13,_14,_15];
_15["__ie6_"+_14]=_16;
};
this._stopObserving=function(_17,_18,_19){
_17.detachEvent("on"+_18,_19);
var _1a=_19["__ie6_"+_18];
if(_1a){
delete _12[_1a];
}
};
this.addOnUnload(this._evUnloadFcn=function(){
for(var k in _12){
var v=_12[k];
if(typeof v=="object"&&v.length==3){
delete _12[k];
try{
v[0].detachEvent("on"+v[1],v[2]);
}
catch(e){
}
}
}
});
}else{
this._observe=function(_1d,_1e,_1f){
_1d.attachEvent("on"+_1e,_1f);
};
this._stopObserving=function(_20,_21,_22){
_20.detachEvent("on"+_21,_22);
};
}
}else{
_11=false;
this._observe=function(_23,_24,_25){
_23.addEventListener(_24,_25,false);
};
this._stopObserving=function(_26,_27,_28){
_26.removeEventListener(_27,_28,false);
};
}
var _29=[];
this.addDtor=function(obj,_2b){
var _2c=_29.length,v;
if(arguments.length>1){
v=[obj,_2b];
}else{
v=[obj];
}
_29[_2c]=v;
return _2c;
};
this.delDtor=function(_2e){
delete _29[_2e];
};
this._dtorHandler=function(){
var k,v;
for(k in _29){
v=_29[k];
if(v&&(typeof v=="object")&&v.length){
try{
if(v.length==1){
v[0].call(null);
}else{
v[0][v[1]].call(v[0]);
}
}
catch(e){
}
try{
delete _29[k];
}
catch(e){
}
}
}
};
this.observe(window,"unload",this._onUnload);
this.addOnUnload(this._dtorHandler);
};
MQA._prEvent.element=function(_31){
return _31.target||_31.srcElement;
};
MQA._prEvent.isLeftClick=function(_32){
return ((_32.which&&(_32.which==1))||(_32.button&&(_32.button==1)));
};
MQA._prEvent.stop=function(_33){
if(_33.preventDefault){
_33.preventDefault();
_33.stopPropagation();
}else{
_33.returnValue=false;
_33.cancelBubble=true;
}
};
MQA._prEvent.falseFunction=function(){
return false;
};
MQA._prEvent.emptyFunction=function(){
};
MQA._prEvent.hitch=function(_34,_35){
var _36=[];
for(var i=2;i<arguments.length;i++){
_36.push(arguments[i]);
}
return function(){
return _34[_35].apply(_34,_36);
};
};
MQA._prEvent.EventCallback=function(_38,_39){
var _3a=_38;
return function(_3b){
if(_3a.turnEventsOff||(_3a.map&&_3a.map.turnEventsOff)){
return;
}
if(!_3b){
_3b=window.event;
}
_3a[_39](_3b);
};
};
MQA.Event=function(){
this.type="event";
this.srcObject=null;
if(arguments.length){
this.eventName=arguments[0];
}else{
this.eventName="unnamed event";
}
};
MQA.EventManager=new function(){
this.addListener=function(_3c,_3d,_3e,_3f){
_3d=_3d.toLowerCase();
if(!this.observers){
this.observers=[];
}
if(_3f==null){
_3f=_3c;
}
this.observers.push([_3c,_3d,_3e,_3f]);
};
this.removeListener=function(_40,_41,_42,_43){
_41=_41.toLowerCase();
if(this.observers){
if(_43==null){
_43=_40;
}
for(x=this.observers.length-1;x>=0;x--){
var _44=this.observers[x];
if(_44[0]==_40&&_44[1]==_41&&_44[2]==_42&&_44[3]==_43){
this.observers.splice(x,1);
}
}
}
};
this.clearListeners=function(_45,_46){
_46=_46.toLowerCase();
if(this.observers){
for(x=this.observers.length-1;x>=0;x--){
var _47=this.observers[x];
if(_47[0]==_45){
if(_46&&_47[1]!=_46){
continue;
}
this.observers.splice(x,1);
}
}
}
};
this.trigger=function(_48,_49,_4a){
_49=_49.toLowerCase();
if(this.observers){
_4a=_4a||{type:_4a};
for(var i=0,j=this.observers.length;i<j;i++){
var _4d=this.observers[i];
if(_4d[0]==_48&&_4d[1]==_49){
_4d[2].call(_4d[3],_4a);
}
}
}
};
};

MQA.tileMapCount=0;
MQA.getMapResources=function(){
return MQA.RESOURCES;
};
MQA.getStaticMapResources=function(){
return MQA.STATICRESOURCES;
};
MQA.incrTileMapCount=function(){
MQA.tileMapCount=MQA.tileMapCount+1;
return MQA.tileMapCount;
};
MQA.getTileMapCount=function(){
return MQA.tileMapCount;
};
MQA.getRowTile=function(_1,_2){
var y=(_1+90)*(MQA.PIXERSPERLATDEGREE/_2);
var RW=parseInt(y/MQA.TILESIZE);
return RW;
};
MQA.getRowTileOffset=function(_5,_6){
var y=(_5+90)*(MQA.PIXERSPERLATDEGREE/_6);
var RW=parseInt(y/MQA.TILESIZE);
return (y-RW*MQA.TILESIZE);
};
MQA.getLatTileRowOffset=function(TL,_a,_b){
var y=TL*MQA.TILESIZE+_a;
var _d=y/(MQA.PIXERSPERLATDEGREE/_b)-90;
_d=parseInt(_d*1000000)/1000000;
return _d;
};
MQA.getColTile=function(_e,_f){
var x=(_e+180)*(MQA.PIXERSPERLNGDEGREE/_f);
var _11=parseInt(x/MQA.TILESIZE);
return _11;
};
MQA.getColTileOffset=function(LNG,_13){
var x=(LNG+180)*(MQA.PIXERSPERLNGDEGREE/_13);
var _15=parseInt(x/MQA.TILESIZE);
return (x-_15*MQA.TILESIZE);
};
MQA.getLngTileColOffset=function(TL,_17,_18){
var x=TL*MQA.TILESIZE+_17;
var LNG=x/(MQA.PIXERSPERLNGDEGREE/_18)-180;
LNG=parseInt(LNG*1000000)/1000000;
while(LNG>180){
LNG-=360;
}
while(LNG<-180){
LNG+=360;
}
return LNG;
};

MQA.PointFloatXY=function(X,Y){
this.x=parseFloat(X);
this.y=parseFloat(Y);
};
MQA.PointXY=function(X,Y){
this.x=parseInt(X);
this.y=parseInt(Y);
};
MQA.PointLL=function(_5,_6){
this.lat=parseFloat(_5);
this.lng=parseFloat(_6);
};
MQA.Image=function(){
this.image=null;
};
MQA.TKObjectCollection=function(_7){
var _8=new Array();
var _9=_7||-1;
this.guid=MQA.Util._getRandomGUID(10);
this.collectionName="";
this.setName=function(n){
this.collectionName=n;
};
this.getName=function(){
return this.collectionName;
};
this._add=function(_b){
if(_9!=-1&&_8.length==_7){
return;
}
_8.push(_b);
};
this.add=function(_c){
this._add(_c);
return _8.length;
};
this.getSize=function(){
return _8.length;
};
this.getAt=function(_d){
return _8[_d];
};
this._remove=function(_e){
_8.splice(_e,1);
};
this._removeAll=function(){
while(_8.length>0){
this.remove(0);
}
};
this.remove=function(_f){
this._remove(_f);
return _8.splice(_f,1);
};
this.removeAll=function(){
this._removeAll();
};
this.contains=function(_10){
for(var _11=0,x=this.getSize();_11<x;_11++){
if(_8[_11]==_10){
return true;
}
}
return false;
};
this.getById=function(_13){
for(var _14=0,x=this.getSize();_14<x;_14++){
if(_8[_14].getId()==_13){
return _8[_14];
}
}
return null;
};
this.removeItem=function(_16){
for(i=0;i<_8.length;i++){
if(_8[i]==_16){
this.remove(i);
i=_8.length;
}
}
};
this.append=function(_17){
for(var i=0;i<_17.getSize();i++){
this.add(_17.getAt(i));
}
};
this.getItemIndex=function(_19){
var _1a=false;
for(var i=0;i<_8.length;i++){
if(_19==_8[i]){
_1a=i;
break;
}
}
return _1a;
};
};
MQA.ShapeCollection=function(){
MQA.TKObjectCollection.call(this);
this.map=null;
this.declutter=true;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.getByKey=function(key){
var j=this.getSize();
for(var i=0;i<j;i++){
if(key==this.getAt(i).getValue("key")){
return this.getAt(i);
}
}
return false;
};
this.add=function(obj){
obj.parentCollections.push(this);
if(this.map){
this.map.addShape(obj,false);
}
this._add(obj);
return this.getSize();
};
this.remove=function(_20){
if(this.getSize()>0){
var obj=this.getAt(_20);
for(var i=0;i<obj.parentCollections.length;i++){
if(obj.parentCollections[i]==this){
obj.parentCollections.splice(i,1);
}
}
if(this.map){
this.map.removeShape(obj,false);
}
this._remove(_20);
}
return this.getSize();
};
this.removeAll=function(){
if(this.map){
var _23=this.map.getDeclutter().getDeclutterMode();
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this._removeAll();
if(this.map){
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(_23);
}
}
};
this.setDeclutter=function(d){
if(this.map){
var _25=this.map.getDeclutter().getDeclutterMode();
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this.declutter=d;
if(this.map){
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(_25);
}
}
};
this.getDeclutter=function(){
return this.declutter;
};
this.setMinZoomLevel=function(z){
this.minZoomLevel=z;
};
this.getMinZoomLevel=function(){
return this.minZoomLevel;
};
this.setMaxZoomLevel=function(z){
this.maxZoomLevel=z;
};
this.getMaxZoomLevel=function(){
return this.maxZoomLevel;
};
this.inZoomWindow=function(){
if(!this.map){
return false;
}
var _28=this.map.getZoomLevel();
return (_28>=this.minZoomLevel&&_28<=this.maxZoomLevel);
};
this.isOnMap=function(){
return (this.map!=null);
};
this.getBoundingRect=function(){
if(this.getSize()==0){
return null;
}
var _29=null;
var _2a=[];
for(var i=0;i<this.getSize();i++){
_29=this.getAt(i);
if(_29 instanceof MQA.Poi){
_2a.push(_29.getValue("latLng"));
}else{
for(var j=0;j<_29.getValue("shapePoints").getSize();j++){
_2a.push(_29.getValue("shapePoints").getAt(j));
}
}
}
var _2d=new MQA.RectLL(_2a[0],_2a[0]);
for(var i=0;i<_2a.length;i++){
_2d.extend(_2a[i]);
}
return _2d;
};
};
MQA.MapLogo=function(){
throw new Error("Do NOT instantiate MapLogo - use static values");
};
MQA.MapLogo.MAPQUEST=MQA.LOGO_MQ_LOGO;
MQA.MapLogo.SCALES=MQA.LOGO_MQ_SCALES;
MQA.MapLogo.MAPQUEST_COPYRIGHT=MQA.LOGO_MQ_COPY;
MQA.MapLogo.NAVTEQ_COPYRIGHT=MQA.LOGO_NT_COPY;
MQA.MapLogo.ICUBED_COPYRIGHT=MQA.LOGO_I3_COPY;
MQA.MapCorner=function(){
throw new Error("Do NOT instantiate MapCorner - use static values");
};
MQA.MapCorner.TOP_LEFT=MQA.CORNER_TOPLEFT;
MQA.MapCorner.TOP_RIGHT=MQA.CORNER_TOPRIGHT;
MQA.MapCorner.BOTTOM_LEFT=MQA.CORNER_BOTTOMLEFT;
MQA.MapCorner.BOTTOM_RIGHT=MQA.CORNER_BOTTOMRIGHT;
MQA.MapCornerPlacement=function(_2e,_2f){
if(_2e==null){
_2e=MQA.MapCorner.TOP_LEFT;
}
if(_2f==null){
_2f=new MQA.Size(0,0);
}
this.mapCorner=_2e;
this.offsetSize=new MQA.Size(_2f.getWidth(),_2f.getHeight());
};
MQA.MapCornerPlacement.prototype.getMapCorner=function(){
return this.mapCorner;
};
MQA.MapCornerPlacement.prototype.getOffsetSize=function(){
return new MQA.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight());
};
MQA.RectLL=function(_30,_31){
if(_30==null){
_30=new MQA.LatLng(0,0);
}
if(_31==null){
_31=new MQA.LatLng(0,0);
}
this.ul=new MQA.PointLL(_30.lat,_30.lng);
this.lr=new MQA.PointLL(_31.lat,_31.lng);
};
MQA.RectLL.prototype.setLowerRight=function(_32){
this.lr=new MQA.LatLng(_32.getLatitude(),_32.getLongitude());
};
MQA.RectLL.prototype.setUpperLeft=function(_33){
this.ul=new MQA.LatLng(_33.getLatitude(),_33.getLongitude());
};
MQA.RectLL.prototype.getUpperLeft=function(){
return new MQA.LatLng(this.ul.lat,this.ul.lng);
};
MQA.RectLL.prototype.getLowerRight=function(){
return new MQA.LatLng(this.lr.lat,this.lr.lng);
};
MQA.RectLL.prototype.setBounds=function(_34){
for(var i=1;i<_34.length;i++){
var _36=_34[i];
this.extend(_36);
}
};
MQA.RectLL.prototype.extend=function(_37){
if(_37.lat>this.ul.lat){
this.ul.lat=_37.lat;
}
if(_37.lng<this.ul.lng){
this.ul.lng=_37.lng;
}
if(_37.lat<this.lr.lat){
this.lr.lat=_37.lat;
}
if(_37.lng>this.lr.lng){
this.lr.lng=_37.lng;
}
};
MQA.RectXY=function(_38,_39){
if(_38==null){
_38=new MQA.Point(0,0);
}
if(_39==null){
_39=new MQA.Point(0,0);
}
this.ul=new MQA.PointXY(_38.x,_38.y);
this.lr=new MQA.PointXY(_39.x,_39.y);
};
MQA.RectXY.prototype.setUpperLeft=function(_3a){
this.ul=new MQA.Point(_3a.getX(),_3a.getY());
};
MQA.RectXY.prototype.setLowerRight=function(_3b){
this.lr=new MQA.Point(_3b.getX(),_3b.getY());
};
MQA.RectXY.prototype.getUpperLeft=function(){
return new MQA.Point(this.ul.x,this.ul.y);
};
MQA.RectXY.prototype.getLowerRight=function(){
return new MQA.Point(this.lr.x,this.lr.y);
};
MQA.Size=function(w,h){
if(w==null){
w=0;
}
if(h==null){
h=0;
}
this.width=parseInt(w);
this.height=parseInt(h);
};
MQA.Size.prototype.constructor=MQA.Size;
MQA.Size.prototype.getWidth=function(){
return this.width;
};
MQA.Size.prototype.getHeight=function(){
return this.height;
};
MQA.Size.prototype.setWidth=function(w){
this.width=parseInt(w);
};
MQA.Size.prototype.setHeight=function(h){
this.height=parseInt(h);
};
MQA.Size.prototype.toString=function(){
return this.width+","+this.height;
};
MQA.Clip=function(_40,_41,_42,_43,vIn,_45){
var _46=new Array();
var D=(_45?3:2);
if(vIn.length<D){
return _46;
}
_46=clipAgainstEdge(0,vIn,_45);
var _48=clipAgainstEdge(1,_46,_45);
var _49=clipAgainstEdge(2,_48,_45);
var _4a=clipAgainstEdge(3,_49,_45);
return _4a;
function clipAgainstEdge(_4b,_4c,_4d){
var v1;
var _4f,_50;
var _51;
var _52=new Array();
for(var v2=0;v2<_4c.length;v2++){
if(_45){
v1=(v2==0?_4c.length-1:v2-1);
}else{
v1=(v2==0?0:v2-1);
}
_4f=inside(_4b,_4c[v1]);
_50=inside(_4b,_4c[v2]);
if(_4f&&_50){
_52.push(_4c[v2]);
}else{
if(!_4f&&_50){
_51=clipIntersection(_4b,_4c[v2],_4c[v1]);
_52.push(_51);
_52.push(_4c[v2]);
}else{
if(_4f&&!_50){
_51=clipIntersection(_4b,_4c[v1],_4c[v2]);
_52.push(_51);
}
}
}
}
return _52;
};
function clipIntersection(_54,inv,_56){
var x1=inv.x;
var y1=inv.y;
var x2=_56.x;
var y2=_56.y;
var AU=0;
var _5c={x:0,y:0};
switch(_54){
case 0:
var x3=_40;
var y3=_42;
var x4=_40;
var y4=_43;
break;
case 1:
var x3=_41;
var y3=_42;
var x4=_41;
var y4=_43;
break;
case 2:
var x3=_40;
var y3=_43;
var x4=_41;
var y4=_43;
break;
case 3:
var x3=_40;
var y3=_42;
var x4=_41;
var y4=_42;
break;
}
UA=(((x4-x3)*(y1-y3))-((y4-y3)*(x1-x3)))/(((y4-y3)*(x2-x1))-((x4-x3)*(y2-y1)));
_5c.x=x1+(UA*(x2-x1));
_5c.y=y1+(UA*(y2-y1));
return _5c;
};
function inside(_61,v){
switch(_61){
case 0:
return (v.x>_40);
case 1:
return (v.x<_41);
case 2:
return (v.y<_43);
case 3:
return (v.y>_42);
}
return false;
};
};
MQA.MapInit=function(){
this.bestFitRect=null;
this.bestFitMargin=0;
this.keepCenter=false;
this.minZoom=1;
this.maxZoom=16;
};
MQA.MapInit.prototype={setBestFitRect:function(_63){
this.bestFitRect=_63;
},getBestFitRect:function(){
return this.bestFitRect;
},setBestFitMargin:function(_64){
this.bestFitMargin=_64;
},getBestFitMargin:function(){
return this.bestFitMargin;
},setKeepCenter:function(_65){
this.keepCenter=_65;
},isKeepCenter:function(){
return this.keepCenter;
},setMinZoom:function(_66){
_66=parseInt(_66);
if(_66<1||_66>15){
this.minZoom=1;
}else{
this.minZoom=_66;
}
if(this.minZoom>this.maxZoom){
this.minZoom=this.maxZoom;
}
},getMinZoom:function(){
return this.minZoom;
},setMaxZoom:function(_67){
_67=parseInt(_67);
if(_67<1||_67>16){
this.maxZoom=16;
}else{
this.maxZoom=_67;
}
if(this.maxZoom<this.minZoom){
this.maxZoom=this.minZoom;
}
},getMaxZoom:function(){
return this.maxZoom;
}};
MQA.Copyright=function(map,id,_6a,_6b,_6c,_6d){
this.map=map;
this.id=id;
this.text=_6a;
this.position=_6b;
this.handleEvents=false;
this.left=0;
this.top=0;
this.width=(_6c!=null)?100:_6c;
this.height=(_6d!=null)?15:_6d;
this.copyrightLayerDiv=null;
this.positionControl();
};
MQA.Copyright.prototype.positionControl=function(){
if(this.position.getMapCorner()==MQA.CORNER_TOPLEFT){
this.left=0;
this.top=0;
}else{
if(this.position.getMapCorner()==MQA.CORNER_TOPRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=0;
this.position.offsetSize.width*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMLEFT){
this.left=0;
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.height*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.width*=-1;
this.position.offsetSize.height*=-1;
}
}
}
}
this.left+=this.position.offsetSize.width;
this.top+=this.position.offsetSize.height;
};
MQA.Copyright.prototype.draw=function(){
if(this.copyrightLayerDiv==null){
this.copyrightLayerDiv=MQA.Util.createParentDiv(this.id,0,0,"absolute",0,0,100,null,null);
this.copyrightLayerDiv.style.color="black";
this.copyrightLayerDiv.style.fontFamily="Arial,sans-serif";
this.copyrightLayerDiv.style.fontSize="11px";
this.copyrightLayerDiv.style.whiteSpace="nowrap";
this.copyrightLayerDiv.style.align="right";
this.copyrightLayerDiv.style.MozUserSelect="none";
this.copyrightLayerDiv.style.right="3px";
this.copyrightLayerDiv.style.bottom="2px";
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
this.copyrightLayerDiv.innerHTML="<span>"+this.text+"</span>";
this.copyrightLayerDiv.style.width=this.width+"px";
this.copyrightLayerDiv.style.height=this.height+"px";
if(this.handleEvents){
this.copyrightLayerDiv.style.cursor="pointer";
this.copyrightLayerDiv.style.cursor="hand";
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"click",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseover",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseout",this.eCopyrightClick);
}
this.map.parent.appendChild(this.copyrightLayerDiv);
}
return this.copyrightLayerDiv;
};
MQA.Copyright.prototype.eventmonitor=function(evt){
var _6f=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
var e=new MQA.Event("MQA.Copyright.click");
e.srcObject=this;
this.onClick(e);
case "mouseover":
var e=new MQA.Event("MQA.Copyright.mouseover");
e.srcObject=this;
this.onMouseOver(e);
break;
case "mouseout":
var e=new MQA.Event("MQA.Copyright.mouseout");
e.srcObject=this;
this.onMouseOver(e);
break;
}
};
MQA.Copyright.prototype.dispose=function(){
this.remove();
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv=null;
}
this.map=null;
this.corner=null;
};
MQA.Copyright.prototype.remove=function(){
this.map.parent.removeChild(this.copyrightLayerDiv);
};
MQA.Copyright.prototype.setPosition=function(_71){
this.position=_71;
this.positionControl();
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
};
MQA.Copyright.prototype.show=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="visible";
this.copyrightLayerDiv.style.display="block";
}
};
MQA.Copyright.prototype.hide=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="hidden";
this.copyrightLayerDiv.style.display="none";
}
};
MQA.Copyright.prototype.onClick=function(e){
MQA.EventManager.trigger(this,"click",e);
};
MQA.Copyright.prototype.onMouseOver=function(e){
MQA.EventManager.trigger(this,"mouseover",e);
};
MQA.Copyright.prototype.onMouseOut=function(e){
MQA.EventManager.trigger(this,"mouseout",e);
};
MQA.CopyrightCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.CopyrightCollection.prototype=new MQA.TKObjectCollection();
MQA.CopyrightCollection.prototype.constructor=MQA.CopyrightCollection;

MQA.InitOverlays=function(_1){
window.onload=_1;
};
MQA.ShapeOverlay=function(){
MQA.Base.call(this);
this.map=null;
this.className="MQA.ShapeOverlay";
this.key="";
this.color="#000000";
this.altColor=null;
this.colorAlpha="1";
this.altColorAlpha=null;
this.fillColor="#000000";
this.altFillColor=null;
this.fillColorAlpha="1";
this.altFillColorAlpha=null;
this.borderWidth="3";
this.altBorderWidth=null;
this.altStateFlag=false;
this.visible=true;
this.shapePoints=null;
this.shape=null;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.imageURL="";
this.imageLevels=null;
this.imageOpacity=1;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_2,_3){
switch(_2){
case "color":
this._setColor(_3);
break;
case "altColor":
this._setAltColor(_3);
break;
case "colorAlpha":
this._setColorAlpha(_3);
break;
case "altColorAlpha":
this._setAltColorAlpha(_3);
break;
case "fillColor":
this._setFillColor(_3);
break;
case "altFillColor":
this._setAltFillColor(_3);
break;
case "fillColorAlpha":
this._setFillColorAlpha(_3);
break;
case "altFillColorAlpha":
this._setAltFillColorAlpha(_3);
break;
case "borderWidth":
this._setBorderWidth(_3);
break;
case "altBorderWidth":
this._setAltBorderWidth(_3);
break;
case "altStateFlag":
this._setAltStateFlag(_3);
break;
case "visible":
this._setVisible(_3);
break;
case "shapePoints":
this._setShapePoints(_3);
break;
case "maxZoomLevel":
this._setMaxZoomLevel(_3);
break;
case "minZoomLevel":
this._setMinZoomLevel(_3);
break;
case "imageURL":
this._setImageURL();
break;
case "imageLevels":
this._setImageOverlayLevels();
break;
case "imageOpacity":
this._setImageOpacity(_3);
break;
}
};
this._duco=function(_4){
switch(_4){
case "altColor":
return (this.altColor!=null?this.altColor:this.color);
break;
case "altColorAlpha":
return (this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
break;
case "altFillColor":
return (this.altFillColor!=null?this.altFillColor:this.fillColor);
break;
case "altFillColorAlpha":
return (this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
break;
case "altBorderWidth":
return (this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
break;
}
};
this.dispose=function(_5){
};
this._adjustXY=function(_6){
_6.x=_6.x+(MQA.SURFACE_OFFSET);
_6.y=_6.y+(MQA.SURFACE_OFFSET);
return _6;
};
this._setColor=function(_7){
if(this.shape&&!this.altStateFlag){
var _8=MQA.Graphics.normalizeColor(_7);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_8.hex);
break;
case "vml":
this.shape.stroke.color=_8.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColor=function(_9){
if(this.shape&&this.altStateFlag){
var _a=MQA.Graphics.normalizeColor(_9);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_a.hex);
break;
case "vml":
this.shape.stroke.color=_a.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setColorAlpha=function(_b){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_b);
break;
case "vml":
this.shape.stroke.opacity=_b;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColorAlpha=function(_c){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_c);
break;
case "vml":
this.shape.stroke.opacity=_c;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColor=function(_d){
if(this.shape&&!this.altStateFlag){
var _e=MQA.Graphics.normalizeColor(_d);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_e.hex);
break;
case "vml":
this.shape.fill.color=_e.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColor=function(_f){
if(this.shape&&this.altStateFlag){
var _10=MQA.Graphics.normalizeColor(_f);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_10.hex);
break;
case "vml":
this.shape.fill.color=_10.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColorAlpha=function(_11){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_11);
break;
case "vml":
this.shape.fill.opacity=_11;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColorAlpha=function(_12){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_12);
break;
case "vml":
this.shape.fill.opacity=_12;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setBorderWidth=function(_13){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_13);
break;
case "vml":
this.shape.stroke.weight=_13;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltBorderWidth=function(_14){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_14);
break;
case "vml":
this.shape.stroke.weight=_14;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltStateFlag=function(_15){
if(this.shape&&(this.className!="MQA.ImageOverlay")){
var _16=this._getCurrentState();
_16.color=MQA.Graphics.normalizeColor(_16.color).hex;
_16.fillColor=MQA.Graphics.normalizeColor(_16.fillColor).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_16.color);
this.shape.setAttribute("stroke-opacity",_16.colorAlpha);
if(this.className!="MQA.LineOverlay"){
this.shape.setAttribute("fill",_16.fillColor);
this.shape.setAttribute("fill-opacity",_16.fillColorAlpha);
}
this.shape.setAttribute("stroke-width",_16.borderWidth);
break;
case "vml":
this.shape.stroke.color=_16.color;
this.shape.stroke.opacity=_16.colorAlpha;
if(this.className!="MQA.LineOverlay"){
this.shape.fill.color=_16.fillColor;
this.shape.fill.opacity=_16.fillColorAlpha;
}
this.shape.stroke.weight=_16.borderWidth;
break;
case "canvas":
this.drawShape();
break;
}
var _17=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_17.style.display=(_16.visible?"inline":"none");
}
};
this._setVisible=function(_18){
if(this.shape){
var _19=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_19.style.display=(_18?"inline":"none");
}
};
this._setMaxZoomLevel=function(_1a){
var _1b=parseInt(_1a);
if(isNaN(_1b)){
return;
}
this.maxZoomLevel=((_1b>16)?16:((_1b<this.minZoomLevel)?this.minZoomLevel:_1b));
this.redraw();
};
this._setMinZoomLevel=function(_1c){
var _1d=parseInt(_1c);
if(isNaN(_1d)){
return;
}
this.minZoomLevel=((_1d<1)?1:((_1d>this.maxZoomLevel)?this.maxZoomLevel:_1d));
this.redraw();
};
this._setShapePoints=function(_1e){
if(_1e.setLowerRight){
var _1f=new MQA.LatLngCollection();
_1f.add(new MQA.LatLng(_1e.ul.lat,_1e.ul.lng));
_1f.add(new MQA.LatLng(_1e.lr.lat,_1e.lr.lng));
_1e=_1f;
this.shapePoints=_1e;
}
if(this.shape){
this.drawShape();
}
};
this._getCurrentState=function(){
var _20=new Object();
if(!this.altStateFlag){
_20.color=this.color;
_20.colorAlpha=this.colorAlpha;
_20.fillColor=this.fillColor;
_20.fillColorAlpha=this.fillColorAlpha;
_20.borderWidth=this.borderWidth;
}else{
_20.color=(this.altColor!=null?this.altColor:this.color);
_20.colorAlpha=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
_20.fillColor=(this.altFillColor!=null?this.altFillColor:this.fillColor);
_20.fillColorAlpha=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
_20.borderWidth=(this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
}
_20.visible=this.visible;
_20.url=this.url;
_20.maxZoomLevel=this.maxZoomLevel;
_20.minZoomLevel=this.minZoomLevel;
return _20;
};
this._cloneOverlay=function(_21){
this.key=_21.key;
this.color=_21.color;
this.altColor=_21.altColor;
this.colorAlpha=_21.colorAlpha;
this.altColorAlpha=_21.altColorAlpha;
this.fillColor=_21.fillColor;
this.altFillColor=_21.altFillColor;
this.fillColorAlpha=_21.fillColorAlpha;
this.altFillColorAlpha=_21.altFillColorAlpha;
this.borderWidth=_21.borderWidth;
this.altBorderWidth=_21.altBorderWidth;
this.altStateFlag=_21.altStateFlag;
this.visible=_21.visible;
this.maxZoomLevel=_21.maxZoomLevel;
this.minZoomLevel=_21.minZoomLevel;
this.shapePoints=_21.shapePoints;
if(this.className=="MQA.ImageOverlay"){
this.imageURL=_21.imageURL;
this.imageLevels=_21.imageLevels;
this.imageOpacity=_21.imageOpacity;
}
this.shape=null;
this.map=null;
},this.redraw=function(){
if(!this.map){
return;
}
this.drawShape();
};
this.onClick=function(e){
var mqe=new MQA.Event(this.className+".click");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event(this.className+".doubleClick");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event(this.className+".mouseDown");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event(this.className+".mouseUp");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.onMouseOver=function(e){
var mqe=new MQA.Event(this.className+".mouseOver");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseover",mqe);
MQA._prEvent.stop(e);
};
this.onMouseOut=function(e){
var mqe=new MQA.Event(this.className+".mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
MQA._prEvent.stop(e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this.drawShape=function(){
this.draw();
};
this.isOnMap=function(){
return (this.map!=null);
};
this.setKey=function(t){
this.setValue("key",t);
};
this.getKey=function(){
return this.getValue("key");
};
this.setAltBorderWidth=function(t){
this.setValue("altBorderWidth",t);
};
this.getAltBorderWidth=function(){
return this.getValue("altBorderWidth");
};
this.setAltColor=function(t){
this.setValue("altColor",t);
};
this.getAltColor=function(){
return this.getValue("altColor");
};
this.setAltColorAlpha=function(t){
this.setValue("altColorAlpha",t);
};
this.getAltColorAlpha=function(){
return this.getValue("altColorAlpha");
};
this.setAltFillColor=function(t){
this.setValue("altFillColor",t);
};
this.getAltFillColor=function(){
return this.getValue("altFillColor");
};
this.setAltFillColorAlpha=function(t){
this.setValue("altFillColorAlpha",t);
};
this.getAltFillColorAlpha=function(){
return this.getValue("altFillColorAlpha");
};
this.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
this.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
this.setBorderWidth=function(t){
this.setValue("borderWidth",t);
};
this.getBorderWidth=function(){
return this.getValue("borderWidth");
};
this.getClassName=function(){
return this.getValue("className");
};
this.setColor=function(t){
this.setValue("color",t);
};
this.getColor=function(){
return this.getValue("color");
};
this.setColorAlpha=function(t){
this.setValue("colorAlpha",t);
};
this.getColorAlpha=function(){
return this.getValue("colorAlpha");
};
this.setFillColor=function(t){
this.setValue("fillColor",t);
};
this.getFillColor=function(){
return this.getValue("fillColor");
};
this.setFillColorAlpha=function(t){
this.setValue("fillColorAlpha",t);
};
this.getFillColorAlpha=function(){
return this.getValue("fillColorAlpha");
};
this.setMaxZoomLevel=function(t){
this.setValue("maxZoomLevel",t);
};
this.getMaxZoomLevel=function(){
return this.getValue("maxZoomLevel");
};
this.setMinZoomLevel=function(t){
this.setValue("minZoomLevel",t);
};
this.getMinZoomLevel=function(){
return this.getValue("minZoomLevel");
};
this.setShapePoints=function(t){
this.setValue("shapePoints",t);
};
this.getShapePoints=function(){
return this.getValue("shapePoints");
};
this.setVisible=function(t){
this.setValue("visible",t);
};
this.getVisible=function(){
return this.getValue("visible");
};
};
MQA.RectangleOverlay=function(_3f){
MQA.ShapeOverlay.call(this);
this.className="MQA.RectangleOverlay";
if(_3f){
if(_3f.getValue("className")==this.className){
this._cloneOverlay(_3f);
}
}
this.draw=function(){
var xy1,xy2,_42,_43,_44,_45,_46,_47,_48;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_45=xy1.x;
_46=xy2.x;
_47=xy1.y;
_48=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_46;
xy2.x=_45;
}
if(xy1.y>xy2.y){
xy1.y=_48;
xy2.y=_47;
}
_44=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_44.minZoomLevel)||(this.map.getZoomLevel()>_44.maxZoomLevel)){
return;
}
var _49=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _4a=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
xy1.x=(xy1.x<0?0:xy1.x);
xy1.y=(xy1.y<0?0:xy1.y);
xy2.x=(xy2.x>_49?_49:xy2.x);
xy2.y=(xy2.y>_4a?_4a:xy2.y);
_42=xy2.y-xy1.y;
_43=xy2.x-xy1.x;
_42=(_42>_4a?_4a:_42);
_43=(_43>_49?_49:_43);
if(!(_42<1||_43<1)){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawRectangle(p,_44.color,_44.colorAlpha,_44.borderWidth,_44.fillColor,_44.fillColorAlpha,_44.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_4c){
if(this.shape==null){
return;
}
var _4c=(typeof (_4c)=="undefined"?false:_4c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_4c){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.LineOverlay=function(_4d){
MQA.ShapeOverlay.call(this);
this.className="MQA.LineOverlay";
this.fillColorAlpha="0.0";
this.altFillColorAlpha="0.0";
if(_4d){
if(_4d.getValue("className")==this.className){
this._cloneOverlay(_4d);
}
}
this.override(["fillColor","altFillColor","fillColorAlpha","altFillColorAlpha"]);
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _52=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_52.minZoomLevel)||(this.map.getZoomLevel()>_52.maxZoomLevel)){
return;
}
var _53=new Array();
if(MQA.Util.isOverLimit(xy)){
var _54=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _55=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_53=MQA.Clip(0,_54,0,_55,xy,false);
}else{
_53=xy;
}
if(_53.length){
this.shape=MQA.Graphics.drawLine(_53,_52.color,_52.colorAlpha,_52.borderWidth,_52.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_56){
if(this.shape==null){
return;
}
var _56=(typeof (_56)=="undefined"?false:_56);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_56){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.PolygonOverlay=function(_57){
MQA.ShapeOverlay.call(this);
this.className="MQA.PolygonOverlay";
if(_57){
if(_57.getValue("className")==this.className){
this._cloneOverlay(_57);
}
}
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _5c=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_5c.minZoomLevel)||(this.map.getZoomLevel()>_5c.maxZoomLevel)){
return;
}
var _5d=new Array();
if(MQA.Util.isOverLimit(xy)){
var _5e=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _5f=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_5d=MQA.Clip(0,_5e,0,_5f,xy,true);
}else{
_5d=xy;
}
if(_5d.length){
this.shape=MQA.Graphics.drawPolygon(_5d,_5c.color,_5c.colorAlpha,_5c.borderWidth,_5c.fillColor,_5c.fillColorAlpha,_5c.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_60){
if(this.shape==null){
return;
}
var _60=(typeof (_60)=="undefined"?false:_60);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_60){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.EllipseOverlay=function(_61){
MQA.ShapeOverlay.call(this);
this.className="MQA.EllipseOverlay";
if(_61){
if(_61.getValue("className")==this.className){
this._cloneOverlay(_61);
}
}
this.draw=function(){
var xy1,xy2,_64,_65,_66,_67,_68,_69,_6a;
var _6b,_6c,_6d,_6e;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_67=xy1.x;
_68=xy2.x;
_69=xy1.y;
_6a=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_68;
xy2.x=_67;
}
if(xy1.y>xy2.y){
xy1.y=_6a;
xy2.y=_69;
}
_6b=Math.round((xy2.x-xy1.x)/2);
_6c=Math.round((xy2.y-xy1.y)/2);
_6d=xy1.x+_6b;
_6e=xy1.y+_6c;
var _6f=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _70=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
var _71=0;
if((xy1.x>_6f)||(xy2.x<0)||(xy1.y>_70)||(xy2.y<0)){
_71=1;
}
if(!_71){
var x,y,c;
var _75=false;
x=0;
y=0;
_75=((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1;
if(_75){
x=_6f;
y=0;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=0;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=_6f;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
}
}
}
if(_75){
_71=2;
}
}
if(!_71){
if((_6b*2)>32000||(_6c*2)>32000){
_71=3;
}
}
var _66=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_66.minZoomLevel)||(this.map.getZoomLevel()>_66.maxZoomLevel)){
return;
}
switch(_71){
case 0:
if(_6b>1&&_6c>1){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawEllipse(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
}
break;
case 1:
break;
case 2:
this.shape=MQA.Graphics.drawRectangle(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
break;
case 3:
break;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_77){
if(this.shape==null){
return;
}
var _77=(typeof (_77)=="undefined"?false:_77);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_77){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.ImageOverlay=function(_78){
MQA.ShapeOverlay.call(this);
this.className="MQA.ImageOverlay";
this.imageURL=null;
this.imageLevels=null;
this.imageOpacity=1;
if(_78){
if(_78.getValue("className")==this.className){
this._cloneOverlay(_78);
}
}
this.draw=function(){
var xy1,xy2,_7b,_7c,_7d,_7e,_7f,_80,_81,_82,_83,_84,_85,_86;
_7d=this._getCurrentState();
if(this.imageLevels){
_83=this.map.getZoomLevel();
_84=17;
for(var i=0,j=this.imageLevels.length;i<j;i++){
if(this.imageLevels[i].zoomLevel==_83){
_82=this.imageLevels[i].url;
break;
}else{
_85=Math.abs(this.imageLevels[i].zoomLevel-_83);
if(_85<_84){
_82=this.imageLevels[i].url;
_84=_85;
}
}
}
_7d.imageURL=_82;
}else{
_7d.imageURL=this.imageURL;
}
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_7e=xy1.x;
_7f=xy2.x;
_80=xy1.y;
_81=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_7f;
xy2.x=_7e;
}
if(xy1.y>xy2.y){
xy1.y=_81;
xy2.y=_80;
}
if(this.shape!=null){
this.shape.firstChild.style.width="0px";
this.shape.firstChild.height="0px";
this.shape.firstChild.src="";
this.shape.removeChild(this.shape.firstChild);
this.shape=this.map.overlaydiv.removeChild(this.shape);
this.shape=null;
}
if((this.map.getZoomLevel()<_7d.minZoomLevel)||(this.map.getZoomLevel()>_7d.maxZoomLevel)){
return;
}
if(this.map.getDragOffset().x!=this.map.overlayOffsetX||this.map.getDragOffset().y!=this.map.overlayOffsetY){
this.map.overlayOffsetX=this.map.getDragOffset().x;
this.map.overlayOffsetY=this.map.getDragOffset().y;
if(this.map.overlaydiv){
this.map.overlaydiv.style.left=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetX)+"px";
this.map.overlaydiv.style.top=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetY)+"px";
}
}
_7b=xy2.y-xy1.y;
_7c=xy2.x-xy1.x;
if(!(_7b<1||_7c<1)){
this.shape=document.createElement("div");
this.shape.style.position="absolute";
this.shape.style.left=xy1.x+"px";
this.shape.style.top=xy1.y+"px";
this.map.overlaydiv.appendChild(this.shape);
var _89=document.createElement("img");
_89.GALLERYIMG="no";
_89.width=_7c;
_89.height=_7b;
_89.style.height=_7b+"px";
_89.style.width=_7c+"px";
_89.src=_7d.imageURL;
_89.UNSELECTABLE="on";
_89.MozUserSelect="none";
this.shape.appendChild(_89);
this.shape.firstChild.style.display=(_7d.visible?"inline":"none");
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(this.imageOpacity*100)+")";
}
this.shape.firstChild.style.MozOpacity=this.imageOpacity;
this.shape.firstChild.style.opacity=this.imageOpacity;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this._setImageURL=function(){
if(this.imageLevels==null&&this.shape!=null){
this.drawShape();
}
};
this._setImageOverlayLevels=function(){
if(this.shape!=null){
this.drawShape();
}
};
this._setImageOpacity=function(op){
if(this.shape){
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(op*100)+")";
}
this.shape.firstChild.style.MozOpacity=op;
this.shape.firstChild.style.opacity=op;
}
};
this.dispose=function(_8b){
if(this.shape==null){
return;
}
var _8b=(typeof (_8b)=="undefined"?false:_8b);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_8b){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._deleteDOMObject(this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
this.setImageOpacity=function(t){
this.setValue("imageOpacity",t);
};
this.getImageOpacity=function(){
return this.getValue("imageOpacity");
};
this.setImageOverlayLevels=function(t){
this.setValue("imageLevels",t);
};
this.getImageOverlayLevels=function(){
return this.getValue("imageLevels");
};
this.setImageURL=function(t){
this.setValue("imageURL",t);
};
this.getImageURL=function(){
return this.getValue("imageURL");
};
};
MQA.ImageLevel=function(url,_90){
this.url=url;
this.zoomLevel=_90;
};
ImageOverlayLevel=MQA.ImageLevel;

MQA.Icon=function(_1,_2,_3){
this.imageURL=_1;
this.width=parseInt(_2);
this.height=parseInt(_3);
};
MQA.Poi=function(_4,_5){
MQA.Base.call(this);
this.map=null;
this.className="MQA.Poi";
this.key="";
this.shape=null;
this._icon=null;
this._shadow=null;
this._label=null;
this._leaderLineDotIconDiv=null;
this.latLng=MQA.Util._cloneValue(_4);
if(typeof (_5)!="undefined"&&_5 instanceof MQA.Icon){
this.icon=MQA.Util._cloneValue(_5);
}else{
this.icon=new MQA.Icon("http://img.mqcdn.com/mqtoolkit/star.png",29,29);
}
this.iconOffset=new MQA.PointXY(-Math.round(this.icon.width/2),-Math.round(this.icon.height/2));
this.shadow=new MQA.Icon("http://img.mqcdn.com/mqtoolkit/shadow.png",23,7);
this.shadowOffset=new MQA.Point(6,0);
this.infoWindowOffset=new MQA.Point(Math.round(this.icon.width/2),0);
this.altIcon=null;
this.altIconOffset=null;
this.altShadow=null;
this.altShadowOffset=null;
this.altInfoWindowOffset=null;
this.declutterIcon=null;
this.declutterIconOffset=null;
this.declutterShadow=null;
this.declutterShadowOffset=null;
this.declutterInfoWindowOffset=null;
this.HTMLContent=null;
this.HTMLOffset=null;
this.HTMLInfoWindowOffset=null;
this.blankImageURL="http://img.mqcdn.com/a/a";
this.altStateFlag=false;
this.visible=true;
this.infoContentHTML=null;
this.infoTitleHTML=null;
this.rolloverEnabled=true;
this.showInfoWindowOnClick=true;
this.showingInfo=false;
this.mqrw=null;
this.mqiw=null;
this.labelText=null;
this.labelClass="mq-poi-label";
this.labelVisible=true;
this.draggable=false;
this.isDragging=false;
this.dragFlag=false;
this.snapback=false;
this.keepRolloverOnDrag=true;
this.mouseStartX=null;
this.mouseStartY=null;
this.shapeStartX=null;
this.shapeStartY=null;
this.isMouseOver=false;
this.leaderLine=false;
this.leaderLineDot=false;
this.leaderLineDotIcon=null;
this.leaderLineColor=null;
this.leaderLineDotImage=null;
this.dragTop=null;
this.dragLeft=null;
this.isDecluttered=false;
this.minZoomLevel=1;
this.maxZoomLevel=16;
this.maxInfoWindowWidth=null;
this.titleBackgroundColor=null;
this.infoWindowTitleText=null;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_6,_7){
switch(_6){
case "HTMLContent":
this.HTMLOffset=(this.HTMLOffset?this.HTMLOffset:new MQA.Point(0,0));
if(this.shape){
this.draw();
}
break;
case "HTMLOffset":
if(this.shape){
this.draw();
}
break;
case "icon":
if(!this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "iconOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadow":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadowOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "altIcon":
this.altIconOffset=(this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(this.altIcon.width/2),-Math.round(this.altIcon.height/2)));
if(this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altIconOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altShadow":
if(this.shape&&this.altStateFlag){
this.draw();
}
break;
case "altShadowOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIcon":
this.declutterIconOffset=(this.declutterIconOffset?this.declutterIconOffset:new MQA.PointXY(-Math.round(this.declutterIcon.width/2),-Math.round(this.declutterIcon.height/2)));
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIconOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterShadow":
if(this.shape&&!this.altStateFlag&&this.isDecluttered){
this.draw();
}
break;
case "declutterShadowOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "visible":
if(this.shape){
this.shape.style.display=(_7?"block":"none");
}
if(this.map){
if(!_7&&this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}else{
if(this.dragTop||this.dragLeft){
if(!this.leaderLine){
this.map.getDeclutter().drawLeaderLine(this);
}
}
}
}
break;
case "latLng":
if(this.shape){
this.draw();
}
break;
case "altStateFlag":
if(this.shape){
this.draw();
}
break;
case "isDecluttered":
if(this.shape){
this.draw();
}
break;
case "labelText":
this._setLabelText();
break;
case "labelVisible":
if(this.shape&&this._label){
var _8=1;
if(theShadowImage!=null){
_8+=1;
}
this.shape.childNodes[_8].style.display=(_7?"block":"none");
this._centerLabel();
}
break;
case "labelClass":
if(this.shape&&this._label){
this.draw();
}
break;
case "zIndex":
this._setZIndex(_7);
break;
case "infoTitleHTML":
this._setInfoTitleHTML(_7);
break;
case "infoContentHTML":
this._setInfoContentHTML(_7);
break;
case "leaderLineColor":
this._setLeaderLineColor(_7);
break;
case "leaderLineDotImage":
this._setLeaderLineDotImage(_7);
break;
case "minZoomLevel":
if(this.map){
if(this.map.getZoomLevel()<this.minZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
case "maxZoomLevel":
if(this.map){
if(this.map.getZoomLevel()>this.maxZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
}
};
this._duco=function(_9){
switch(_9){
case "latLng":
return MQA.Util._cloneValue(this.latLng);
break;
case "altIcon":
return (this.altIcon?this.altIcon:this.icon);
break;
case "altIconOffset":
var _a=this.getValue("altIcon");
return (this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "altShadow":
return (this.altShadow?this.altShadow:this.shadow);
break;
case "altShadowOffset":
return (this.altShadowOffset?this.altShadowOffset:this.shadowOffset);
break;
case "altInfoWindowOffset":
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
break;
case "declutterIcon":
return (this.declutterIcon?this.declutterIcon:this.icon);
break;
case "declutterIconOffset":
var _a=this.getValue("declutterIcon");
return (this.declutterOffset?this.declutterOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "declutterShadow":
return (this.declutterShadow?this.declutterShadow:this.shadow);
break;
case "declutterShadowOffset":
return (this.declutterShadowOffset?this.declutterShadowOffset:this.shadowOffset);
break;
case "declutterInfoWindowOffset":
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
break;
case "draggable":
return this._getDraggable();
break;
case "leaderLineColor":
return this._getLeaderLineColor();
break;
case "leaderLineDotImage":
return this._getLeaderLineDotImage();
break;
}
};
this.draw=function(){
var _b=(this.shape?false:true);
var _c;
var _d,_e,_f;
var _10=null;
var _11=null;
var _12=null;
var _13=null;
var _14=this._getCurrentInfo();
_10=_14.icon;
_11=_14.offset;
theShadowImage=_14.shadow;
_13=_14.shadowOffset;
if(!_b){
_c={x:parseInt(this.shape.style.left),y:parseInt(this.shape.style.top)};
}else{
_c={x:0,y:0};
}
if(_b){
this.shape=document.createElement("div");
this.shape.style.cursor="pointer";
this.shape.className="MQA_Poi_Shape";
var _15=this.map.llToPix(this.latLng);
this.shape.style.left=((_15.x+_11.x)-this.map.getDragOffset().x)+"px";
this.shape.style.top=((_15.y+_11.y)-this.map.getDragOffset().y)+"px";
this.shape.style.display=(this.visible?"block":"none");
var _16=this.map.getZoomLevel();
if(_16<this.minZoomLevel||_16>this.maxZoomLevel){
this.shape.style.display="none";
}
this.shape.style.position="absolute";
this.shape.setAttribute("unselectable","on");
this.shape.style.MozUserSelect="none";
this.shape.style.zIndex=90;
}else{
if(this.getValue("isDecluttered")){
var myX=this.shapeStartX-this.dragLeft;
var myY=this.shapeStartY-this.dragTop;
var _19={x:(_c.x),y:(_c.y)};
}else{
var _15=this.map.llToPix(this.latLng);
var _19={x:(_15.x+_11.x)-this.map.getDragOffset().x,y:(_15.y+_11.y)-this.map.getDragOffset().y};
}
this.shape.style.left=_19.x+"px";
this.shape.style.top=_19.y+"px";
}
if(this.HTMLContent){
this.shape.innerHTML=this.HTMLContent;
this._icon=false;
this._shadow=false;
this._label=false;
}else{
if(!this._icon&&!this._shadow&&!this._label){
this.shape.innerHTML="";
}
var _1a=(this._icon?false:true);
if(_1a){
_d=document.createElement("img");
_d.setAttribute("unselectable","on");
_d.style.MozUserSelect="none";
_d.style.display="block";
}else{
_d=this.shape.firstChild;
}
if((MQA.Util._hasPngExtention(_10.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_10.imageURL+"', sizingMethod='image')";
_d.src=this.blankImageURL;
}else{
_d.src=_10.imageURL;
}
if(_10.width){
_d.width=_10.width;
_d.style.width=_10.width+"px";
}
if(_10.height){
_d.height=_10.height;
_d.style.height=_10.height+"px";
}
if(_1a){
this.shape.appendChild(_d);
}
_d=null;
this._icon=true;
if(theShadowImage!=null){
var _1b=(this._shadow?false:true);
if(_1b){
_e=document.createElement("img");
_e.setAttribute("unselectable","on");
_e.style.MozUserSelect="none";
_e.style.display="block";
}else{
_e=this.shape.childNodes[1];
}
if((MQA.Util._hasPngExtention(theShadowImage.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+theShadowImage.imageURL+"', sizingMethod='image')";
_e.src=this.blankImageURL;
}else{
_e.src=theShadowImage.imageURL;
}
_e.width=theShadowImage.width;
_e.height=theShadowImage.height;
_e.style.marginLeft=_13.x+"px";
_e.style.marginTop=_13.y+"px";
if(_1b){
this.shape.appendChild(_e);
}
_e=null;
this._shadow=true;
}else{
if(this._shadow){
this.shape.removeChild(this.shape.childNodes[1]);
this._shadow=false;
}
}
if(!this._label&&this.labelText){
_f=this._createLabel();
this.shape.appendChild(_f);
_f=null;
this._label=true;
}
}
if(_b){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
this.map.div.poidiv.appendChild(this.shape);
this.mqrw=this.map.getRolloverWindow();
this.mqiw=this.map.getInfoWindow();
}
this._centerLabel();
if(!this.icon.width){
this.icon.width=this.shape.firstChild.offsetWidth;
}
if(!this.icon.height){
this.icon.height=this.shape.firstChild.offsetHeight;
}
};
this.dispose=function(_1c){
var _1c=(typeof (_1c)=="undefined"?false:_1c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}
this._icon=false;
this._label=false;
this._shadow=false;
this.map=null;
if(this.showingInfo){
this.mqiw.hide();
}
if(_1c){
if(this.infoContentHTML){
this.infoContentHTML.innerHTML=null;
this.infoContentHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoContentHTML);
this.infoContentHTML=null;
}
if(this.infoTitleHTML){
this.infoTitleHTML.innerHTML=null;
this.infoTitleHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoTitleHTML);
this.infoTitleHTML=null;
}
this.mqrw=null;
this.mqiw=null;
this._parentCollections=null;
this.shape.innerHTML=null;
this.shape.outerHTML="";
MQA.Util._deleteDOMObject(this.shape);
this.shape=null;
}else{
if(this.mqiw.popup.parentNode==this.shape){
this.shape.removeChild(this.mqiw.popup);
}
if(this.mqrw.minipopup.parentNode==this.shape){
this.shape.removeChild(this.mqrw.minipopup);
}
MQA.Util._nukeChildren(this.shape);
this.mqrw=null;
this.mqiw=null;
this.shape=null;
}
};
this.onClick=function(e){
if(MQA._prEvent.element(e).id=="poiclose"||MQA._prEvent.element(e).parentNode.id=="poiclose"){
return;
}
if(!this.dragFlag||(this.dragFlag&&(Math.abs(this.mouseStartX-e.clientX)<3&&Math.abs(this.mouseStartY-e.clientY)<3))){
if(this.getValue("showInfoWindowOnClick")){
this.showInfoWindow();
}
var mqe=new MQA.Event("MQA.Poi.click");
var _1f=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_1f.x;
var cy=e.clientY-_1f.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
}
if(this.mqiw!=null&&this.mqiw.opener==this){
return;
}
this.dragFlag=false;
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event("MQA.Poi.dblClick");
var _24=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_24.x;
var cy=e.clientY-_24.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
mqe.srcObject=this;
this.map.onDoubleClick(mqe);
MQA._prEvent.stop(e);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseDown");
var _29=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_29.x;
var cy=e.clientY-_29.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.getValue("draggable")){
poiMouseDownFlg=this._isMouseOnPoi(e);
if(!poiMouseDownFlg){
MQA.EventManager.trigger(this,"mousedown",mqe);
return;
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart=MQA._prEvent.falseFunction;
}
this.shape.style.zIndex=110;
if(isNaN(parseInt(this.shape.style.left))){
this.shape.style.left=0;
}
if(isNaN(parseInt(this.shape.style.top))){
this.shape.style.top=0;
}
this.shapeStartX=parseInt(this.shape.style.left);
this.shapeStartY=parseInt(this.shape.style.top);
this.mouseStartX=e.clientX;
this.mouseStartY=e.clientY;
this.isDragging=true;
this.map.draggedObject=this;
if(this.map.getDeclutter()){
this.map.getDeclutter().leaderLineDispose(this);
}
if(this.map.getDeclutter()){
if(!this.map.getDeclutter().keepRolloversOnDrag&&this.map.getDeclutter().getDeclutterMode()==2){
if(this._isRolloverShowable()){
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
if(e.preventDefault){
e.preventDefault();
}
MQA._prEvent.stop(e);
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("hidden");
}
}
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseUp");
var _2e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_2e.x;
var cy=e.clientY-_2e.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.isDragging){
if(this._isRolloverShowable()&&!this.map.getDeclutter().keepRolloversOnDrag){
this.mqrw.setOpenerAndShow(this);
this.shape.style.zIndex=110;
}
this.finishDrag(mqe);
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart="";
}
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.finishDrag=function(mqe){
var _32=(MQA.browser.name=="safari");
this.isDragging=false;
var _33=this.map.getDragOffset();
if(this.HTMLContent){
var _34=this.getValue("HTMLOffset").x;
var _35=this.getValue("HTMLOffset").y;
}else{
if(this.getValue("altStateFlag")){
var _34=this.getValue("altIconOffset").x;
var _35=this.getValue("altIconOffset").y;
}else{
var _34=this.getValue("iconOffset").x;
var _35=this.getValue("iconOffset").y;
}
}
var _36=(parseInt(this.shape.style.left)-_34)+_33.x;
var _37=(parseInt(this.shape.style.top)-_35)+_33.y;
this.dragFlag=true;
if((Math.abs(this.shapeStartX-parseInt(this.shape.style.left))>3)||(Math.abs(this.shapeStartY-parseInt(this.shape.style.top)>3))){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2&&!this.getValue("altStateFlag")){
this.setValue("isDecluttered",true);
}
}
}else{
}
var _38=(this.map.getDeclutter()?this.map.getDeclutter().getDeclutterMode():0);
if(this.snapback&&_38!=2){
this.shape.style.left=this.shapeStartX+"px";
this.shape.style.top=this.shapeStartY+"px";
}else{
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==0){
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}else{
if(this.map.getDeclutter().getDeclutterMode()==2){
theLatLngXY=this.map.llToPix(this.getValue("latLng"));
this.dragLeft=theLatLngXY.x-(_33.x+parseInt(this.shape.style.left));
this.dragTop=theLatLngXY.y-(_33.y+parseInt(this.shape.style.top));
if(this.isDecluttered||this.getValue("altStateFlag")){
if(!_32){
this.map.getDeclutter().drawLeaderLine(this);
}else{
this.map.getDeclutter().redrawLeaderLines();
}
}
}else{
}
}
}else{
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}
}
this.map.draggedObject=null;
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("auto");
}
};
this.onMouseOver=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
this.isMouseOver=true;
var mqe=new MQA.Event("MQA.Poi.mouseOver");
mqe.domEvent=e;
var _3b=(this.map.draggedObject&&this.map._mapShapes.contains(this.map.draggedObject)&&this.map.draggedObject.isDragging)?true:false;
if(!this.isDragging&&!_3b&&(this.mqrw.isHidden()||this.mqrw.opener!=this)){
this.showRolloverWindow(mqe);
}
MQA.EventManager.trigger(this,"mouseover",mqe);
}
};
this.onMouseOut=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
if(this._isRolloverShowable()&&!this.isDragging&&this.mqrw.opener==this){
this.mqrw.hide();
}
var mqe=new MQA.Event("MQA.Poi.mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
}
};
this.onInfoWindowOpen=function(e){
this.shape.style.zIndex=110;
var mqe=new MQA.Event("MQA.Poi.infoWindowOpen");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowopen",mqe);
};
this.onInfoWindowClose=function(e){
this.showingInfo=false;
this.shape.style.zIndex=90;
if(this.isDecluttered&&this.map.getDeclutter()&&this.map.getDeclutter().getDeclutterMode()==1){
this.setVisible(false);
}
var mqe=new MQA.Event("MQA.Poi.infoWindowClose");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowclose",mqe);
};
this.onRolloverOpen=function(e){
this.shape.style.zIndex=115;
MQA.EventManager.trigger(this,"rolloveropen",e);
};
this.onRolloverClose=function(e){
this.shape.style.zIndex=90;
MQA.EventManager.trigger(this,"rolloverclose",e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this._setZIndex=function(i){
this.shape.style.zIndex=i;
};
this._createLabel=function(){
var _46=document.createElement("div");
_46.id="poi.label.div";
_46.style.display=(this.labelVisible?"block":"none");
_46.style.position="absolute";
_46.className=this.labelClass;
var _47=document.createTextNode(this.labelText);
_46.appendChild(_47);
return _46;
};
this._setLabelText=function(){
if(MQA.Util._trim(this.labelText)==""){
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
this._label=false;
}else{
if(!this.shape&&this._label){
this._label=false;
}
}
}else{
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
var _48=this._createLabel();
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}else{
if(this.shape&&!this._label){
var _48=this._createLabel();
if(this.shape){
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}
}
}
}
};
this._centerLabel=function(){
if(this._label&&this.labelVisible){
var _49=this.shape.childNodes;
if(this.mqrw==null&&this.mqiw==null){
var _4a=1;
}else{
if(this.mqrw!==null&&this.mqiw!==null){
var _4a=3;
}else{
var _4a=2;
}
}
_49[_49.length-_4a].style.width=_49[_49.length-_4a].offsetWidth+"px";
var _4b=parseInt(_49[_49.length-_4a].style.width);
var _4c=_49[0].width;
_49[_49.length-_4a].style.marginLeft=-((_4b-_4c)/2)+"px";
}
};
this._getCurrentInfoWindowOffset=function(){
if(this.HTMLContent){
return this.HTMLInfoWindowOffset;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
return this.infoWindowOffset;
}else{
if(this.altStateFlag){
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
}else{
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
}
}
}
};
this.redraw=function(){
this.draw();
};
this.showRolloverWindow=function(){
var _4d=this._getCurrentInfoWindowOffset();
if(this.mqrw==null){
this.mqrw=this.map.getRolloverWindow();
}
if(this._isRolloverShowable()){
this.shape.appendChild(this.mqrw.minipopup);
var _4e=document.createElement("div");
_4e.innerHTML="<div>"+this.infoTitleHTML+"</div>";
this.mqrw.modify(this.map.getLLToXY(this.latLng),_4e,_4d,this);
this.mqrw.setOpenerAndShow(this);
this.onRolloverOpen(new MQA.Event("MQA.Poi.rolloverOpen"));
}
};
this.showInfoWindow=function(){
var _4f=this._getCurrentInfoWindowOffset();
if(this.infoContentHTML!=null){
if(this.mqiw==null){
this.mqiw=this.map.getInfoWindow();
}
if(this._isRolloverShowable()){
this.mqrw.hide();
}
var _50=this.mqiw.getMaxWidth();
var _51=this.mqiw.getTitleBackgroundColor();
if(this.titleBackgroundColor){
this.mqiw.setTitleBackgroundColor(this.titleBackgroundColor);
}
if(this.maxInfoWindowWidth){
this.mqiw.setMaxWidth(this.maxInfoWindowWidth);
}
this.mqiw.isAttachedToPoi=true;
this.shape.appendChild(this.mqiw.popup);
var _52=document.createElement("div");
var _53=(this.infoWindowTitleText?this.infoWindowTitleText:this.infoTitleHTML);
_52.innerHTML="<div>"+_53+"</div>";
var _54=document.createElement("div");
_54.innerHTML="<div>"+this.infoContentHTML+"</div>";
this.mqiw.modify(this.map.getLLToXY(this.latLng),_52,_54,_4f);
this.mqiw.setOpenerAndShow(this);
this.showingInfo=true;
this.onInfoWindowOpen(new MQA.Event("MQA.Poi.infoWindowOpen"));
this.mqiw.setMaxWidth(_50);
this.mqiw.setTitleBackgroundColor(_51);
}
};
this._setInfoTitleHTML=function(_55){
this.infoTitleHTML=_55;
};
this._setInfoContentHTML=function(_56){
if(_56==undefined){
return;
}
if(_56!=""){
this.infoContentExists=true;
}
this.infoContentHTML=_56;
};
this._isRolloverShowable=function(){
return this.rolloverEnabled&&this.map.getRolloversEnabled()&&(this.infoTitleHTML!=null)&&!this.showingInfo;
};
this._getDraggable=function(){
if(this.map){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
return true;
}
}
}
return this.draggable;
};
this._getLeaderLineColor=function(){
if(this.leaderLineColor){
return this.leaderLineColor;
}else{
if(this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineColor;
}else{
return "#000000";
}
}
};
this._getLeaderLineDotImage=function(){
if(this.leaderLineDotImage){
return this.leaderLineDotImage;
}else{
if(this.map&&this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineDotImage;
}else{
return null;
}
}
};
this._setLeaderLineColor=function(c){
if(!this.map){
return;
}
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
c=MQA.Graphics.normalizeColor(c).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.leaderLine.setAttribute("stroke",c);
if(this.map.getDeclutter().getLeaderLineDotMode()!=2){
this.leaderLineDot.setAttribute("stroke",c);
this.leaderLineDot.setAttribute("fill",c);
}
break;
case "vml":
this.leaderLine.stroke.color=c;
this.leaderLine.stroke.opacity=1;
this.leaderLine.fill.color=c;
this.leaderLineDot.stroke.color=c;
this.leaderLineDot.stroke.opacity=1;
this.leaderLineDot.fill.color=c;
break;
case "canvas":
this.map.getDeclutter().redrawLeaderLines();
break;
}
}
}
};
this._setLeaderLineDotImage=function(_58){
if(this.map&&this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().leaderLineDispose(this);
this.map.getDeclutter().drawLeaderLine(this);
if(MQA.Graphics.drawMethod=="canvas"){
this.map.getDeclutter().redrawLeaderLines();
}
}
}
};
this._getCurrentInfo=function(){
var _59,_5a,_5b,_5c;
if(this.HTMLContent){
_5a=this.getValue("HTMLOffset");
_59=null;
_5b=null;
_5c=null;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
_59=this.getValue("icon");
_5a=this.getValue("iconOffset");
_5b=this.getValue("shadow");
_5c=this.getValue("shadowOffset");
}else{
if(this.altStateFlag){
_59=this.getValue("altIcon");
_5a=this.getValue("altIconOffset");
_5b=this.getValue("altShadow");
_5c=this.getValue("altShadowOffset");
}else{
_59=this.getValue("declutterIcon");
_5a=this.getValue("declutterIconOffset");
_5b=this.getValue("declutterShadow");
_5c=this.getValue("declutterShadowOffset");
}
}
}
return {icon:_59,offset:_5a,shadow:_5b,shadowOffset:_5c};
};
this.isOnMap=function(){
return (this.map!=null);
};
this._isMouseOnPoi=function(e){
var _5e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_5e.x;
var cy=e.clientY-_5e.y;
var _61=new MQA.Point(this.shape.offsetWidth,this.shape.offsetHeight);
var _62=this.map.getDragOffset();
var _63=MQA.Util.getWindowScrollXY();
var _64=cx+_63.x;
var _65=cy+_63.y;
var _66=parseInt(this.shape.style.left)+_62.x;
var _67=parseInt(this.shape.style.top)+_62.y;
var _68=(_65>=_67)&&(_65<=(_67+parseInt(_61.y)));
_68=_68&&(_64>=_66)&&_64<=(_66+parseInt(_61.x));
return _68;
};
};
MQA.Poi.prototype.setLabel=function(t){
this.setValue("labelText",t);
};
MQA.Poi.prototype.getLabel=function(){
return this.getValue("labelText");
};
MQA.Poi.prototype.setAltIcon=function(t){
this.setValue("altIcon",t);
};
MQA.Poi.prototype.getAltIcon=function(){
return this.getValue("altIcon");
};
MQA.Poi.prototype.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
MQA.Poi.prototype.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
MQA.Poi.prototype.setDraggable=function(t){
this.setValue("draggable",t);
};
MQA.Poi.prototype.getDraggable=function(){
return this.getValue("draggable");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setIconVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.getIconVisible=function(){
return this.getValue("visible");
};
MQA.Poi.prototype.setInfoContentHTML=function(t){
this.setValue("infoContentHTML",t);
};
MQA.Poi.prototype.setInfoTitleHTML=function(t){
this.setValue("infoTitleHTML",t);
};
MQA.Poi.prototype.setKey=function(t){
this.setValue("key",t);
};
MQA.Poi.prototype.getKey=function(){
return this.getValue("key");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setLabelVisible=function(t){
this.setValue("labelVisible",t);
};
MQA.Poi.prototype.isLabelVisible=function(){
return this.getValue("labelVisible");
};
MQA.Poi.prototype.setLatLng=function(t){
this.setValue("latLng",t);
};
MQA.Poi.prototype.getLatLng=function(){
return this.getValue("latLng");
};
MQA.Poi.prototype.setLeaderLineColor=function(t){
this.setValue("leaderLineColor",t);
};
MQA.Poi.prototype.getLeaderLineColor=function(){
return this.getValue("leaderLineColor");
};
MQA.Poi.prototype.setLeaderLineDotImage=function(t){
this.setValue("leaderLineDotImage",t);
};
MQA.Poi.prototype.getLeaderLineDotImage=function(){
return this.getValue("leaderLineDotImage");
};
MQA.Poi.prototype.setRolloverDrag=function(t){
this.setValue("keepRolloverOnDrag",t);
};
MQA.Poi.prototype.getRolloverDrag=function(){
return this.getValue("keepRolloverOnDrag");
};
MQA.Poi.prototype.setRolloverEnabled=function(t){
this.setValue("rolloverEnabled",t);
};
MQA.Poi.prototype.isRolloverEnabled=function(){
return this.getValue("rolloverEnabled");
};
MQA.Poi.prototype.setSnapback=function(t){
this.setValue("snapback",t);
};
MQA.Poi.prototype.getSnapback=function(){
return this.getValue("snapback");
};
MQA.Poi.prototype.setVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.isVisible=function(){
return this.getValue("visible");
};

MQA.Declutter=function(_1){
this.map=_1;
this.mode=0;
this.declutterCleared=true;
this.declutterIcon=null;
this.declutterAltIcon=null;
this.declutterOverIcon=null;
this.declutterOverAltIcon=null;
this.dcCollection=null;
this.pnCollection=null;
this.nextPageIcon=null;
this.prevPageIcon=null;
this.pageBarIcon=null;
this.pageMarkIcon=null;
this.stackHeight=1;
this.stackWidth=3;
this.currentPage=1;
this.keepRolloversOnDrag=true;
this.leaderLineColor="#000000";
this.leaderLineDotMode=1;
this.leaderLineDotImage=null;
this.poiCollection=null;
this.cpCollection=null;
};
MQA.Declutter.prototype.setDeclutterMode=function(_2){
if(_2!=0&&this.map.batchCount==0){
if(this.mode!=0&&!this.declutterCleared){
this.doDeclutter(0);
}
if(!this.declutterIcon){
this.setDeclutterIcon("http://img.mqcdn.com/mqtoolkit/declut_star.png",29,29);
}
if(!this.declutterOverIcon){
this.setDeclutterOverIcon("http://img.mqcdn.com/mqtoolkit/declut_star_over.png",29,29);
}
if(!this.nextPageIcon){
this.setNextPageIcon("http://img.mqcdn.com/mqtoolkit/page_right.png",29,19);
}
if(!this.prevPageIcon){
this.setPrevPageIcon("http://img.mqcdn.com/mqtoolkit/page_left.png",29,19);
}
if(!this.pageBarIcon){
this.pageBarIcon=new MQA.DeclutterIcon("http://img.mqcdn.com/mqtoolkit/page_bar.png",29,19);
}
if(!this.pageMarkIcon){
this.pageMarkIcon=new MQA.DeclutterIcon("http://img.mqcdn.com/mqtoolkit/page_mark.png",7,19);
}
this.dcCollection=new Array;
this.pnCollection=new Array;
this.cpCollection=new Array;
if(this.map){
this.map.getInfoWindow().hide();
this.doDeclutter(_2);
}
}else{
if(!this.declutterCleared){
this.doDeclutter(0);
}
}
this.mode=_2;
};
MQA.Declutter.prototype.getDeclutterMode=function(){
return this.mode;
};
MQA.Declutter.prototype.setDeclutterIcon=function(_3,_4,_5){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterIcon=new MQA.DeclutterIcon(_3,_4,_5);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.setDeclutterOverIcon=function(_7,_8,_9){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterOverIcon=new MQA.DeclutterIcon(_7,_8,_9);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getDeclutterIcon=function(){
return this.declutterIcon;
};
MQA.Declutter.prototype.setNextPageIcon=function(_b,_c,_d){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.nextPageIcon=new MQA.DeclutterIcon(_b,_c,_d);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getNextPageIcon=function(){
return this.nextPageIcon;
};
MQA.Declutter.prototype.setPrevPageIcon=function(_f,_10,_11){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.prevPageIcon=new MQA.DeclutterIcon(_f,_10,_11);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getPrevPageIcon=function(){
return this.prevPageIcon;
};
MQA.Declutter.prototype.setStackHeight=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackHeight=(n<1?1:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackHeight=function(){
return this.stackHeight;
};
MQA.Declutter.prototype.setStackWidth=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackWidth=(n<2?2:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackWidth=function(){
return this.stackWidth;
};
MQA.Declutter.prototype.setRolloverDrag=function(b){
this.keepRolloversOnDrag=b;
};
MQA.Declutter.prototype.getRolloverDrag=function(){
return this.keepRolloversOnDrag;
};
MQA.Declutter.prototype.setLeaderLineColor=function(c){
this.leaderLineColor=c;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineColor=function(){
return this.leaderLineColor;
};
MQA.Declutter.prototype.setLeaderLineDotMode=function(m){
this.leaderLineDotMode=m;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotMode=function(){
return this.leaderLineDotMode;
};
MQA.Declutter.prototype.setLeaderLineDotImage=function(url,_1b,_1c){
this.leaderLineDotImage=new MQA.Icon(url,_1b,_1c);
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotImage=function(){
return this.leaderLineDotImage;
};
MQA.Declutter.prototype.doDeclutter=function(_1d){
var i,j;
var x=100;
var y=50;
var _22=this.stackHeight*this.stackWidth;
var _23=1;
var _24=false;
var _25;
var _26;
var _27;
var _28;
var _29=1;
var _2a=true;
_1d=parseInt(_1d);
switch(_1d){
case 0:
this.declutterCleared=true;
if(this.mode==1){
for(var i=0,x=this.dcCollection.length;i<x;i++){
for(var j=0,y=this.dcCollection[i].length;j<y;j++){
this.dcCollection[i][j].poi.setValue("visible",true);
this.dcCollection[i][j].poi.setValue("isDecluttered",false);
this.dcCollection[i][j].dispose();
}
this.dcCollection[i]=null;
}
for(var i=0,x=this.pnCollection.length;i<x;i++){
if(this.pnCollection[i]!=null){
this.pnCollection[i][0].remove();
this.pnCollection[i][1].remove();
this.pnCollection[i][2].remove();
this.pnCollection[i][0]=null;
this.pnCollection[i][1]=null;
this.pnCollection[i][2]=null;
}
}
}else{
if(this.mode==2){
this.removeLeaderLines();
var _2b=this.getDeclutteredPois();
for(var i=0,x=_2b.getSize();i<x;i++){
_2b.getAt(i).dragLeft=0;
_2b.getAt(i).dragTop=0;
_2b.getAt(i).setValue("isDecluttered",false);
}
}
}
break;
case 1:
this.declutterCleared=false;
var _2c,_2d;
var _2e,_2f;
var _30;
var _31;
var b;
var _33=this.getDeclutterablePois();
var _34=new Array;
var _35=new Array;
var _36=0;
var y=_33.getSize();
for(var a=0,x=y;a<x;a++){
var _38=_33.getAt(a);
_34[a]=new Array(_33.getAt(a).getValue("latLng").getLatitude(),_33.getAt(a).getValue("latLng").getLongitude(),a);
}
_34.sort(this.sortPoisRL);
for(var a=0,e=_34.length;a<e;a++){
_2c=_33.getAt(_34[a][2]).getValue("icon").width;
_2d=_33.getAt(_34[a][2]).getValue("icon").height;
_2e=this.map.getLLToXY(new MQA.PointLL(_34[a][0],_34[a][1]));
_2e.x=parseInt(_33.getAt(_34[a][2]).shape.style.left);
_2e.y=parseInt(_33.getAt(_34[a][2]).shape.style.top);
_2f=new MQA.PointXY(_2e.x+_2c,_2e.y+_2d);
if(this.declutterIcon.height>_2d){
_2e.y-=(this.declutterIcon.height-_2d);
}
_2e.y-=(this.nextPageIcon.height+_29);
if(this.declutterIcon.width>_2c){
_2f.x-=(this.declutterIcon.width-_2c);
}
_30=new MQA.RectXY(_2e,_2f);
_31=false;
for(b=0;!_31&&b<_35.length;b++){
_31=this.isIntersected(_30,_35[b][0]);
}
if(_31){
b=b-1;
_35[b][1][_35[b][1].length]=a;
var _3a=_35[b][1].length;
var _3b=parseInt((_3a-1)%_22);
var _3c=parseInt(_3b/this.stackWidth);
var _3d=parseInt(_3b%this.stackWidth);
_25=_35[b][3].x-(_3d+1)*(this.declutterIcon.width+_29);
_26=_35[b][3].y-((_3c+1)*(this.declutterIcon.height+_29));
_2a=(_3a<=_22);
if(_3a<=this.stackWidth){
_35[b][0].ul.x-=(this.declutterIcon.width+_29);
}
if(_3d==0&&_3c>0&&_3c<this.stackHeight){
_35[b][0].ul.y-=(this.declutterIcon.height+_29)+(this.pageMarkIcon.height+_29);
}
this.addDeclutterPoi(_25,_26,_33.getAt(_34[a][2]),_2a,b);
if(_3a>_22&&this.pnCollection[b]==null){
this.pnCollection[b]=new Array();
var _3e=_35[b][3].y-(this.stackHeight*(this.declutterIcon.height+_29)+(Math.max(this.nextPageIcon.height,this.pageBarIcon.height)+_29));
this.pnCollection[b][0]=new MQA.PrevNextIcon(this.prevPageIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+this.prevPageIcon.width+(3*_29)),_3e,this.map,false,-1,b);
this.pnCollection[b][1]=new MQA.PrevNextIcon(this.nextPageIcon,_35[b][3].x-(this.nextPageIcon.width+_29),_3e,this.map,true,1,b);
this.pnCollection[b][2]=new MQA.PageMarkIcon(this.pageBarIcon,this.pageMarkIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+(2*_29)),_3e,this.map,b);
}
}else{
if(this.declutterIcon.height>_2d){
_2e.y-=parseInt((this.declutterIcon.height-_2d)/2);
}
_2e.y+=(this.declutterIcon.height+_29);
var _3f=new Array();
_3f[0]=_30;
_3f[1]=new Array();
_3f[2]=a;
_3f[3]=_2e;
_35[_35.length]=_3f;
this.pnCollection[this.pnCollection.length]=null;
this.dcCollection[this.dcCollection.length]=new Array();
this.cpCollection[this.cpCollection.length]=1;
}
}
break;
case 2:
this.declutterCleared=false;
this.getPoiDims();
var _40=this.createDeclutterGrps();
this.doDeclutterM2(_40);
break;
}
};
MQA.Declutter.prototype.resetIsDeclutteredFlag=function(){
var _41=this.map.getShapeCollections(true);
for(var i=0;i<_41.length;i++){
for(var x=0;x<_41[i].getSize();x++){
if(_41[i].getAt(x) instanceof MQA.Poi){
_41[i].getAt(x).isDecluttered=false;
}
}
}
};
MQA.Declutter.prototype.getDeclutterablePois=function(){
var _44=new MQA.ShapeCollection();
var _45=this.map.getShapeCollections(true);
for(var i=0;i<_45.length;i++){
var _47=this.map.getZoomLevel();
var _48=_45[i].getMinZoomLevel();
var _49=_45[i].getMaxZoomLevel();
if(_47<=_49&&_47>=_48){
if(_45[i].getDeclutter()){
for(var x=0;x<_45[i].getSize();x++){
if(_45[i].getAt(x) instanceof MQA.Poi){
if(!_44.contains(_45[i].getAt(x))){
_44.add(_45[i].getAt(x));
}
}
}
}
}
}
return _44;
};
MQA.Declutter.prototype.getDeclutteredPois=function(){
var _4b=new MQA.ShapeCollection();
var _4c=this.map.getShapeCollections(true);
for(var i=0;i<_4c.length;i++){
for(var x=0;x<_4c[i].getSize();x++){
if(_4c[i].getAt(x) instanceof MQA.Poi&&_4c[i].getAt(x).isDecluttered){
if(!_4b.contains(_4c[i].getAt(x))){
_4b.add(_4c[i].getAt(x));
}
}
}
}
return _4b;
};
MQA.Declutter.prototype.getPoiDims=function(){
var _4f=this.getDeclutterablePois();
var _50=_4f.getSize();
this.poiCollection={length:_50};
var _51=new Array;
for(var i=0;i<_50;i++){
_51[i]=new Array(_4f.getAt(i).getValue("latLng").getLatitude(),_4f.getAt(i).getValue("latLng").getLongitude(),i);
}
_51.sort(this.sortPois);
for(var i=0,j=_51.length;i<j;i++){
tmpHW=_4f.getAt(_51[i][2]).getValue("icon");
tmpXY=this.map.getLLToXY(_4f.getAt(_51[i][2]).getValue("latLng"));
tmpXY.x-=Math.ceil(tmpHW.width/2);
tmpXY.y-=Math.ceil(tmpHW.height/2);
this.poiCollection[i]={ix:tmpXY.x,iy:tmpXY.y,x:tmpXY.x,y:tmpXY.y,h:tmpHW.height,w:tmpHW.width,indx:_51[i][2]};
}
};
MQA.Declutter.prototype.createDeclutterGrps=function(){
var _54=new Array();
var _55=new Array;
var _56=0;
var _57;
for(var i=0,k=this.poiCollection.length;i<k;i++){
if(MQA.Util.indexOf(_54,i)>=0){
continue;
}
_57=false;
for(var j=i+1;j<k;j++){
if(MQA.Util.indexOf(_54,j)>=0){
continue;
}
if(this.isOverlapped(this.poiCollection[i],this.poiCollection[j])){
if(!_57){
_55[_56]=new Array();
_55[_56].push(i);
_54.push(i);
_57=true;
}
_55[_56].push(j);
_54.push(j);
}
}
if(_55[_56]&&_55[_56].length>0){
_56++;
}
}
return _55;
};
MQA.Declutter.prototype.doDeclutterM2=function(_5b){
var _5c={x:0,y:0,h:0,w:0};
var PI=3.14;
var _5e,_5f;
var nx,ny;
var n,_63;
var _64;
var _65;
var _66;
var _67;
var _68=false;
var _69;
if(_5b.length==1&&_5b[0].length==this.poiCollection.length){
_68=true;
_5e=360/_5b[0].length;
_5f=1350/_5e;
_5f=(_5f<75)?75:_5f;
}else{
_5e=10;
_5f=75;
}
var _6a;
var _6b,_6c;
var _6d=this.map.getDragOffset();
for(var i=0,p=_5b.length;i<p;i++){
n=-180;
_63=this.getDeclutCenterPt(_5b[i]);
_64=1;
_6a=_5f;
for(var k=0,q=_5b[i].length;k<q;k++){
_65=this.poiCollection[_5b[i][k]];
_6b=Math.ceil(_65.w/2);
_6c=Math.ceil(_65.h/2);
for(var _72=n;;_72+=_5e){
if(_72>=180){
++_64;
_72-=360;
if(_64>2){
_6a+=30;
}
}
if(_64>4){
break;
}
nx=Math.round(_6a*Math.cos(PI*_72/180));
ny=Math.round(_6a*Math.sin(PI*_72/180));
_5c.x=_63.x+nx-_6b;
_5c.y=_63.y+ny-_6c;
_5c.h=_65.h;
_5c.w=_65.w;
if(_63.x>0&&_63.y>0&&_63.x<this.map.width&&_63.y<this.map.height){
if(_5c.x<=_5c.w||_5c.y<=_5c.h||_5c.x+_5c.w>=this.map.width||_5c.y+_5c.h>=this.map.height){
continue;
}
}
_66=false;
for(var m=0,r=this.poiCollection.length;m<r;m++){
_69=MQA.Util.indexOf(_5b[i],m);
if((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y)){
if(this.checkLLIntersection(this.poiCollection[m].ix+_6b,this.poiCollection[m].iy+_6c,this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_65.ix+_6b,_65.iy+_6c,_5c.x+_6b,_5c.y+_6c)){
_66=true;
break;
}
}
if(_69<0){
if((this.isOverlapped(_5c,this.poiCollection[m]))||((_64<2)&&this.checkLPIntersection((_65.ix+_6b),(_65.iy+_6c),_5c.x+_6b,_5c.y+_6c,this.poiCollection[m]))){
_66=true;
break;
}else{
if((_64<2)&&((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y))){
if(this.checkLPIntersection(this.poiCollection[m].ix+(this.poiCollection[m].w/2),this.poiCollection[m].iy+(this.poiCollection[m].h/2),this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_5c)){
_66=true;
break;
}
}
}
}else{
if((_69>=0)&&(_69<k)&&(this.isOverlapped(_5c,this.poiCollection[m]))){
_66=true;
break;
}
}
}
if(_66){
continue;
}
n=_72+_5e;
_67=this.getDeclutterablePois().getAt(_65.indx);
_67.setValue("isDecluttered",true);
_67.shape.style.left=_5c.x-_6d.x+"px";
_67.shape.style.top=_5c.y-_6d.y+"px";
this.drawLeaderLine(_67);
theLatLngXY=this.map.llToPix(_67.getValue("latLng"));
_67.dragLeft=theLatLngXY.x-_5c.x;
_67.dragTop=theLatLngXY.y-_5c.y;
_65.x=_5c.x;
_65.y=_5c.y;
break;
}
}
}
};
MQA.Declutter.prototype.checkLPIntersection=function(x1,y1,x2,y2,poi){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var hm2=0;
var vm2=poi.h/1e-8;
var u1,v1,u2,v2;
var a2,xi,yi;
for(var i=1;i<=4;i++){
switch(i){
case 1:
u1=poi.x;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y;
break;
case 2:
u1=poi.x+poi.w;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 3:
u1=poi.x;
v1=poi.y+poi.h;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 4:
u1=poi.x;
v1=poi.y;
u2=poi.x;
v2=poi.y+poi.h;
break;
}
if(i%2==1){
a2=v1;
xi=Math.round(0-(a1-a2)/m1);
yi=a2;
}else{
a2=v1-vm2*u1;
xi=Math.round(0-(a1-a2)/(m1-vm2));
yi=(Math.abs(m1)<Math.abs(vm2))?Math.round(a1+m1*xi):Math.round(a2+vm2*xi);
}
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
return (true);
}
}
return (false);
};
MQA.Declutter.prototype.checkLLIntersection=function(x1,y1,x2,y2,u1,v1,u2,v2){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var m2=(u2-u1==0)?(v2-v1)/1e-8:(v2-v1)/(u2-u1);
var a2=v1-m2*u1;
var xi,yi;
xi=Math.round(0-(a1-a2)/(m1-m2));
yi=(Math.abs(m1)<Math.abs(m2))?Math.round(a1+m1*xi):Math.round(a2+m2*xi);
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
var _94=3;
if(((Math.abs(x1-xi)<=_94)&&(Math.abs(y1-yi)<=_94))||((Math.abs(u1-xi)<=_94)&&(Math.abs(v1-yi)<=_94))||((Math.abs(x2-xi)<=_94)&&(Math.abs(y2-yi)<=_94))||((Math.abs(u2-xi)<=_94)&&(Math.abs(v2-yi)<=_94))){
return (false);
}
return (true);
}
return (false);
};
MQA.Declutter.prototype.getDeclutCenterPt=function(_95){
var _96=0;
var _97=0;
var poi;
var _99=_95.length;
for(var i=0;i<_99;i++){
poi=this.poiCollection[_95[i]];
_96+=poi.ix+poi.w/2;
_97+=poi.iy+poi.h/2;
}
return (new MQA.PointXY(Math.round(_96/_99),Math.round(_97/_99)));
};
MQA.Declutter.prototype.isOverlapped=function(_9b,_9c){
var x1,x2,y1,y2,w1,w2,h1,h2;
x1=_9b.x;
y1=_9b.y;
h1=_9b.h;
w1=_9b.w;
x2=_9c.x;
y2=_9c.y;
h2=_9c.h;
w2=_9c.w;
if((((x1<=x2)&&((x1+w1)>=x2))&&(((y1<=y2)&&((y1+h1)>=y2))||((y1>=y2)&&((y2+h2)>=y1))))||(((x1>=x2)&&((x2+w2)>=x1))&&(((y1>=y2)&&((y2+h2)>=y1))||((y1<=y2)&&((y1+h1)>=y2))))){
return (true);
}
return (false);
};
MQA.Declutter.prototype.sortPois=function(a,b){
return (a[1]-b[1]);
};
MQA.Declutter.prototype.sortPoisRL=function(a,b){
return (b[1]-a[1]);
};
MQA.Declutter.prototype.isIntersected=function(_a9,_aa){
var _ab=(_a9.lr.x>_aa.ul.x)&&(_a9.ul.x<_aa.lr.x)&&(_a9.lr.y>_aa.ul.y)&&(_a9.ul.y<_aa.lr.y);
return _ab;
};
MQA.Declutter.prototype.setMap=function(map){
this.map=map;
};
MQA.Declutter.prototype.addDeclutterPoi=function(x,y,poi,_b0,_b1){
var _b2=new MQA.DeclutterPoi(this.map,poi,_b0);
this.dcCollection[_b1].push(_b2);
poi.isDecluttered=true;
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),_b2.div);
};
MQA.Declutter.prototype.turnPage=function(_b4,_b5){
var i;
var _b7=this.stackHeight*this.stackWidth;
var _b8=this.dcCollection[_b5].length;
if(this.cpCollection[_b5]==1&&_b4==-1){
return;
}
if(((this.cpCollection[_b5]*_b7)>=_b8)&&_b4==1){
return;
}
this.cpCollection[_b5]=this.cpCollection[_b5]+_b4;
for(i=0;i<_b8;i++){
this.dcCollection[_b5][i].setVisible(false);
}
var _b9=(this.cpCollection[_b5]*_b7);
if(_b9>_b8){
_b9=_b8;
}
var _ba=(this.cpCollection[_b5]*_b7)-_b7;
for(i=_ba;i<_b9;i++){
this.dcCollection[_b5][i].setVisible(true);
}
if(_ba>0){
this.pnCollection[_b5][0].setVisible(true);
}else{
this.pnCollection[_b5][0].setVisible(false);
}
if(_b9<_b8){
this.pnCollection[_b5][1].setVisible(true);
}else{
this.pnCollection[_b5][1].setVisible(false);
}
var _bb=this.cpCollection[_b5]-1;
var _bc=parseInt(Math.ceil(_b8/_b7))-1;
var _bd=this.pageBarIcon.width-6;
this.pnCollection[_b5][2].div.mar.style.left=parseInt(_bd*(_bb/_bc))+"px";
};
MQA.Declutter.prototype.adjustLeaderLineSurface=function(){
var _be=false;
if(this.map.poisurface){
if(this.map.getDragOffset().x!=this.map.poiLineOffsetX||this.map.getDragOffset().y!=this.map.poiLineOffsetY){
this.map.poiLineOffsetX=this.map.getDragOffset().x;
this.map.poiLineOffsetY=this.map.getDragOffset().y;
if(this.map.poilinediv){
this.map.poilinediv.style.left=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetX)+"px";
this.map.poilinediv.style.top=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetY)+"px";
}
_be=true;
}
}
if(this.map.dcCanvasDiv){
if(this.map.getDragOffset().x!=this.map.canvasOffsetX||this.map.getDragOffset().y!=this.map.canvasOffsetY){
this.map.canvasOffsetX=this.map.getDragOffset().x;
this.map.canvasOffsetY=this.map.getDragOffset().y;
if(this.map.dcCanvasDiv){
this.map.dcCanvasDiv.style.left=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetX)+"px";
this.map.dcCanvasDiv.style.top=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetY)+"px";
}
_be=true;
}
}
return _be;
};
MQA.Declutter.prototype.drawLeaderLine=function(poi){
if(poi.shape.style.display=="none"){
return;
}
var xy=new Object;
var _c1=(MQA.browser.name=="safari");
if(!_c1){
if(!this.map.poisurface){
this.map.createPoiDrawingSurface();
}
}else{
if(!this.map.dcCanvasDiv){
this.map.createCanvas();
}
}
if(!_c1){
if(!poi.map.poisurface){
throw ("Leader line drawing surface does not exist.");
}
}else{
if(!this.map.dcCanvasDiv){
throw ("Leaderline drawing canvas does not exist.");
}
}
if(!this.adjustLeaderLineSurface()){
var _c2=this.map.getDragOffset();
var _c3=new Array();
_c3[0]=new Object;
_c3[0]=this.map.llToPix(poi.getValue("latLng"));
_c3[0].x+=(MQA.SURFACE_OFFSET);
_c3[0].y+=(MQA.SURFACE_OFFSET);
_c3[1]=new Object;
var _c4=parseInt(this.map.div1.style.left)+_c2.x;
var _c5=parseInt(this.map.div1.style.top)+_c2.y;
if(poi.getValue("altStateFlag")){
var _c6=poi.getValue("altIconOffset").x;
var _c7=poi.getValue("altIconOffset").y;
}else{
var _c6=poi.getValue("declutterIconOffset").x;
var _c7=poi.getValue("declutterIconOffset").y;
}
_c3[1].x=(parseInt(poi.shape.style.left)+MQA.SURFACE_OFFSET)-_c6+_c4;
_c3[1].y=(parseInt(poi.shape.style.top)+MQA.SURFACE_OFFSET)-_c7+_c5;
cpnts=new Array();
if(MQA.Util.isOverLimit(xy)){
if(!_c1){
var _c8=parseInt(this.map.poilinediv.style.height.substr(0,(this.map.poilinediv.style.height.length)-2));
var _c9=parseInt(this.map.poilinediv.style.width.substr(0,(this.map.poilinediv.style.width.length)-2));
}else{
var _c8=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));
var _c9=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));
}
cpnts=MQA.Clip(0,_c8,0,_c9,_c3,false);
}else{
cpnts=_c3;
}
var _ca=poi.getValue("leaderLineColor");
if(!_c1){
poi.leaderLine=MQA.Graphics.drawLine(cpnts,_ca,1,2,true,{x:MQA.Graphics.surfaceWidth,y:MQA.Graphics.surfaceHeight});
this.map.poisurface.appendChild(poi.leaderLine);
poi.leaderLine.setAttribute("zIndex",80);
}else{
this.map.dcCanvasContext.strokeStyle=_ca;
this.map.dcCanvasContext.lineWidth=2;
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.moveTo(cpnts[1].x,cpnts[1].y);
this.map.dcCanvasContext.lineTo(cpnts[0].x,cpnts[0].y);
this.map.dcCanvasContext.stroke();
}
var _cb=parseInt(this.getLeaderLineDotMode());
switch(_cb){
case 0:
break;
case 1:
if(!_c1){
var c=new Array({x:cpnts[0].x-3,y:cpnts[0].y-3},{x:cpnts[0].x+3,y:cpnts[0].y+3});
var _cd=this.map.llToPix(poi.getValue("latLng")).x;
var _ce=this.map.llToPix(poi.getValue("latLng")).y;
var _cf=-MQA.SURFACE_OFFSET;
var _d0=-MQA.SURFACE_OFFSET;
if(!((_cd<_cf)||(_cd>_cf+MQA.Graphics.surfaceWidth)||(_ce<_d0)||(_ce>_d0+MQA.Graphics.surfaceHeight))){
poi.leaderLineDot=MQA.Graphics.drawEllipse(c,_ca,1,1,_ca,1,true);
this.map.poisurface.appendChild(poi.leaderLineDot);
poi.leaderLineDot.setAttribute("zIndex",80);
}
}else{
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,3,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,2,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,1,0,Math.PI*2,true);
this.map.dcCanvasContext.stroke();
}
break;
case 2:
var _d1=poi.getValue("leaderLineDotImage");
if(_d1){
poi._leaderLineDotIconDiv=document.createElement("div");
poi._leaderLineDotIconDiv.style.position="absolute";
poi._leaderLineDotIconDiv.style.display="block";
poi._leaderLineDotIconDiv.style.height=_d1.height;
poi._leaderLineDotIconDiv.style.width=_d1.width;
poi._leaderLineDotIconDiv.style.MozUserSelect="none";
poi._leaderLineDotIconDiv.unselectable="on";
var _d2=document.createElement("img");
_d2.src=_d1.imageURL;
_d2.unselectable="on";
_d2.style.height=_d1.height;
_d2.style.width=_d1.width;
poi._leaderLineDotIconDiv.appendChild(_d2);
poi.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_d1.width/2,-_d1.height/2),poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv.style.zIndex=85;
}
break;
default:
break;
}
}else{
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.redrawLeaderLines=function(){
var _d3=null;
var _d4=(MQA.browser.name=="safari");
if(arguments.length>0){
_d3=arguments[0];
}
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
var _d5=this.getDeclutteredPois();
for(var i=0,x=_d5.getSize();i<x;i++){
var _d8=_d5.getAt(i);
if(_d8.getValue("isDecluttered")){
if(!_d4||(x==0)){
this.leaderLineDispose(_d8);
}else{
if(_d4&&(x>0)){
this.leaderLineDispose(_d8,true);
}
}
this.drawLeaderLine(_d8);
}
}
};
MQA.Declutter.prototype.removeLeaderLines=function(){
var _d9=this.getDeclutteredPois();
for(var i=0,x=_d9.getSize();i<x;i++){
var _dc=_d9.getAt(i);
this.leaderLineDispose(_dc);
}
if(MQA.browser.name=="safari"){
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
}
};
MQA.Declutter.prototype.resetDraggedPois=function(){
var _dd;
var _de=this.getDeclutterablePois();
for(var i=0,j=_de.getSize();i<j;i++){
_dd=_de.getAt(i);
theLatLngXY=this.map.llToPix(_dd.getValue("latLng"));
if(_dd.dragLeft!=null){
_dd.shape.style.left=theLatLngXY.x-_dd.dragLeft+"px";
_dd.shape.style.top=theLatLngXY.y-_dd.dragTop+"px";
}
}
};
MQA.Declutter.prototype.leaderLineDispose=function(poi,_e2){
var _e2=(typeof (_e2)=="undefined"?false:_e2);
if(!poi.map&&!_e2){
return;
}
if(!_e2){
if(!poi.map.dcCanvasContext){
if(poi.leaderLine){
poi.leaderLine.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLine);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLine);
poi.leaderLine=null;
}
if(poi.leaderLineDot){
poi.leaderLineDot.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLineDot);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLineDot);
poi.leaderLineDot=null;
}
}else{
poi.map.dcCanvasContext.clearRect(0,0,parseInt(poi.map.dcCanvasDiv.style.width),parseInt(poi.map.dcCanvasDiv.style.height));
}
}
if(poi._leaderLineDotIconDiv){
poi._leaderLineDotIconDiv.style.display="none";
poi._leaderLineDotIconDiv.innerHTML=null;
MQA.Util._deleteDOMObject(poi._leaderLineDotIconDiv);
MQA.Util._setOuterHTMLToEmptyString(poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv=null;
}
};
MQA.DeclutterPoi=function(map,poi,_e5){
this.map=map;
this.poi=poi;
this.div=document.createElement("div");
this.div.id="dc_"+poi.getValue("labelText");
this.div.className="pois";
this.div.im=document.createElement("img");
var _e6;
if(poi.getValue("altIcon")!=poi.getValue("icon")){
_e6=new MQA.DeclutterIcon(poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e6=this.map.getDeclutter().getDeclutterIcon();
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.getDeclutter().declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e6.imageURL)){
this.div.im.src="http://img.mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e6.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e6.imageURL;
}
this.div.im.style.height=_e6.height+"px";
this.div.im.style.width=_e6.width+"px";
this.div.im.style.position="absolute";
if(_e5){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.click=MQA._prEvent.EventCallback(poi,"onClick");
this.dblclick=MQA._prEvent.EventCallback(poi,"onDoubleClick");
this.mousedown=MQA._prEvent.EventCallback(poi,"onMouseDown");
this.mouseup=MQA._prEvent.EventCallback(poi,"onMouseUp");
this.mouseover=MQA._prEvent.EventCallback(this,"onMouseOver");
this.mouseout=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.div.im,"click",this.click);
MQA._prEvent.observe(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.observe(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.observe(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.observe(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.observe(this.div.im,"mouseout",this.mouseout);
poi.setValue("visible",false);
};
MQA.DeclutterPoi.prototype={dispose:function(){
MQA._prEvent.stopObserving(this.div.im,"click",this.click);
MQA._prEvent.stopObserving(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.stopObserving(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.stopObserving(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.stopObserving(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.stopObserving(this.div.im,"mouseout",this.mouseout);
this.div.im.outerHTML="";
MQA.Util._deleteDOMObject(this.div.im);
this.div.im=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},onMouseOut:function(e){
if(this.poi.showingInfo!=true){
this.poi.setValue("visible",false);
this.poi.setValue("zIndex",90);
}
this.poi.onMouseOut(e);
var _e8;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_e8=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e8=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e8.imageURL)){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e8.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e8.imageURL;
}
},onMouseOver:function(e){
this.poi.setValue("zIndex",100);
this.poi.setValue("visible",true);
this.poi.onMouseOver(e);
var _ea;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_ea=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_ea=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_ea.imageURL)){
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.map.mydeclutter.declutterOverIcon.imageURL+"', sizingMethod='image') ";
}
}else{
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.src=this.map.mydeclutter.declutterOverIcon.imageURL;
}
}
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
}};
MQA.PageMarkIcon=function(bar,_ed,x,y,map,_f1){
this.map=map;
this.index=_f1;
this.div=document.createElement("div");
this.div.className="pois";
this.div.bar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(bar.imageURL)){
this.div.bar.src="http://img.mqcdn.com/a/a";
this.div.bar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bar.imageURL+"', sizingMethod='image');";
}else{
this.div.bar.src=bar.imageURL;
}
this.div.bar.style.position="absolute";
this.div.bar.style.display="block";
this.div.bar.style.height=bar.height;
this.div.bar.style.width=bar.width;
this.div.mar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_ed.imageURL)){
this.div.mar.src="http://img.mqcdn.com/a/a";
this.div.mar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_ed.imageURL+"', sizingMethod='image');";
}else{
this.div.mar.src=_ed.imageURL;
}
this.div.mar.style.position="absolute";
this.div.mar.style.display="block";
this.div.mar.style.height=_ed.height;
this.div.mar.style.width=_ed.width;
this.div.mar.style.left="0px";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.bar);
this.div.appendChild(this.div.mar);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
};
MQA.PageMarkIcon.prototype={dispose:function(){
this.div.bar.style.display="block";
this.div.mar.style.display="block";
this.div.removeChild(this.div.bar);
this.div.removeChild(this.div.mar);
this.div.bar=null;
this.div.mar=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
}};
MQA.PrevNextIcon=function(_f3,x,y,map,_f7,_f8,_f9){
this.map=map;
this.increment=_f8;
this.index=_f9;
this.div=document.createElement("div");
this.div.className="pois";
this.div.im=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_f3.imageURL)){
this.div.im.src="http://img.mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_f3.imageURL+"', sizingMethod='image');";
}else{
this.div.im.src=_f3.imageURL;
}
this.div.im.style.position="absolute";
if(_f7){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.im.style.height=_f3.height;
this.div.im.style.width=_f3.width;
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
MQA._prEvent.observe(this.div.im,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.div.im,"dblclick",MQA._prEvent.EventCallback(this,"onDblClick"));
};
MQA.PrevNextIcon.prototype={dispose:function(){
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
},onClick:function(e){
this.map.getDeclutter().turnPage(this.increment,this.index);
},onDblClick:function(e){
e.stop;
}};
MQA.DeclutterIcon=function(url,_ff,_100){
this.url=url;
this.imageURL=url;
this.width=_ff;
this.height=_100;
};
MQA.LeaderLineDotImage=function(url,_102,_103){
this.imageURL=url;
this.width=_102;
this.height=_103;
};
MQA.LeaderLineDotIcon=function(_104,map,poi){
this.map=map;
this.div=document.createElement("div");
this.div.im=document.createElement("img");
this.div.im.src=_104.imageURL;
this.div.im.style.height=_104.height;
this.div.im.style.width=_104.width;
this.div.im.style.position="absolute";
this.div.im.style.display="block";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_104.width/2,-_104.height/2),this.div);
};

MQA.InfoWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=null;
this.maxwidth=this.map.width-50;
this.minwidth=60;
this.maxheight=this.map.height-50;
this.contentwidth=null;
this.titlebackgroundcolor=null;
this.opener=null;
this.infoWindowSrc="http://img.mqcdn.com/mqtoolkit/infopopup.png";
this.isAttachedToPoi=false;
this.popup=document.createElement("div");
this.popup.id="popupcontainer";
this.popup.className="mqpoipopup";
this.popup.currentElement=null;
this.popup.oncontextmenu=function(){
return false;
};
var _2="<div id='poiclose' class='mqpoiclose'><div style='width:650px;height:685px;margin-left:-180px;margin-top:-650px;'></div></div>";
_2+="<div id='popup-topleft' style='position:absolute;overflow:hidden;'><div style='width:650px;height:685px;'></div></div>";
_2+="<div id='popup-topright' style='position:absolute;width:20px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;'></div></div>";
_2+="<div id='popup-bottomleft' style='position:absolute;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-bottomright' style='position:absolute;width:20px;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-pointer' style='position:absolute;width:20px;height:22px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-50px;margin-top:-654px;'></div></div>";
_2+="<div id='popup-fillercontainer'></div>";
_2+="<div id='popup-content' style='position:absolute;left:13px;top:13px;overflow:auto;z-index:1;'></div></div>";
this.popup.innerHTML=_2;
this.popup.style.position="absolute";
this.popup.style.visibility="hidden";
this.popup.style.left="-1000px";
this.popup.style.top="-1000px";
document.body.appendChild(this.popup);
var _3=this.popup.childNodes[0];
var _4=this.popup.childNodes[1];
var _5=this.popup.childNodes[2];
var _6=this.popup.childNodes[3];
var _7=this.popup.childNodes[4];
var _8=this.popup.childNodes[5];
var _9=this.popup.childNodes[6];
this.eClickClose=MQA._prEvent.EventCallback(this,"clickClose");
MQA._prEvent.observe(_3,"click",this.eClickClose);
this.popup.content=this.popup.childNodes[7];
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.popup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.popup,"dblclick",this.eClick);
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(this.popup,"mousedown",this.eMouseDown);
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
_4.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_5.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_6.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_7.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_8.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_3.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_4.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_5.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_6.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_7.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_8.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_3.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
};
MQA.InfoWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.popup.childNodes[0],"click",this.eClickClose);
MQA._prEvent.stopObserving(this.popup,"click",this.eClick);
MQA._prEvent.stopObserving(this.popup,"dblClick",this.eDblClick);
this.map=null;
this.opener=null;
this.content=null;
this.popup.oncontextmenu=null;
this.popup.innerHTML=null;
this.popup.content=null;
this.popup.id;
this.popup.innerHTML=null;
this.popup.outerHTML="";
MQA.Util._deleteDOMObject(this.popup);
this.popup=null;
delete this.popup;
};
MQA.InfoWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.InfoWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.InfoWindow.prototype.onClickedClosed=function(e){
e=new MQA.Event("MQA.InfoWindow.clickedClosed");
MQA.EventManager.trigger(this,"clickedclosed",e);
MQA._prEvent.stop(e);
};
MQA.InfoWindow.prototype.clickClose=function(_d){
this.hide();
this.onClickedClosed(_d);
MQA._prEvent.stop(_d);
};
MQA.InfoWindow.prototype.onClick=function(_e){
_e.cancelBubble=true;
};
MQA.InfoWindow.prototype.onDoubleClick=function(_f){
_f.cancelBubble=true;
};
MQA.InfoWindow.prototype.onMouseDown=function(evt){
MQA._prEvent.stop(evt);
};
MQA.InfoWindow.prototype.hide=function(){
if(!this.isHidden()){
if(this.popup.style.visibility!="hidden"){
this.popup.style.visibility="hidden";
this.popup.style.display="none";
}
if(this.opener!=null){
if(this.map.getDeclutter()){
if((this.map.getDeclutter().getDeclutterMode()!=0)&&this.opener.decluttered){
this.opener.setVisible(false);
}
}
this.opener.onInfoWindowClose(new MQA.Event("MQTileMap.infoWindowClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.InfoWindow.close"));
}
};
MQA.InfoWindow.prototype.setOpenerAndShow=function(_11){
this.show();
this.opener=_11;
};
MQA.InfoWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
this.popup.style.display="block";
if(this.isAttachedToPoi){
var _12=this.offset.y;
var _13=this.offset.x;
}else{
var _12=this.point.y;
var _13=this.point.x;
}
var _14=this.popup.offsetHeight+3;
var _15=25;
this.popup.style.top=(_12-_14)+"px";
this.popup.style.left=(_13-_15)+"px";
this.popup.style.visibility="visible";
this.avoidPopupCollisions(this.popup);
this.onOpen(new MQA.Event("MQA.InfoWindow.open"));
};
MQA.InfoWindow.prototype.isHidden=function(){
return (this.popup.style.visibility=="hidden");
};
MQA.InfoWindow.prototype.modify=function(_16,_17,_18,_19){
if(_16){
this.point=_16;
}
if(_17){
this.title=_17;
}
if(_18){
this.content=_18;
}
this.offset=new MQA.PointXY(0,0);
if(_19){
this.offset=_19;
}
this.popup.style.position="absolute";
this.resize(false);
};
MQA.InfoWindow.prototype.getMaxWidth=function(){
return this.maxwidth;
};
MQA.InfoWindow.prototype.setMaxWidth=function(_1a){
_1a=parseInt(_1a);
if(isNaN(_1a)){
return;
}
this.maxwidth=(_1a>this.map.width-50)?(this.map.width-50):(_1a<this.minwidth)?this.minwidth:_1a;
};
MQA.InfoWindow.prototype.getMinWidth=function(){
return this.minwidth;
};
MQA.InfoWindow.prototype.setMinWidth=function(_1b){
_1b=parseInt(_1b);
if(isNaN(_1b)){
return;
}
this.minwidth=(_1b<60)?60:(_1b>this.maxwidth)?this.maxwidth:_1b;
};
MQA.InfoWindow.prototype.getContentWidth=function(){
return this.contentwidth;
};
MQA.InfoWindow.prototype.setContentWidth=function(_1c){
this.contentwidth=_1c;
};
MQA.InfoWindow.prototype.getTitleBackgroundColor=function(){
return this.titlebackgroundcolor;
};
MQA.InfoWindow.prototype.setTitleBackgroundColor=function(_1d){
this.titlebackgroundcolor=_1d;
};
MQA.InfoWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.InfoWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.InfoWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.InfoWindow.prototype.avoidPopupCollisions=function(_1e){
var _1f=this.getCollisionInfo(_1e);
if(_1f.panX!=0||_1f.panY!=0){
this.map.slideMapByOffset(new MQA.PointXY(_1f.panX,_1f.panY));
}
};
MQA.InfoWindow.prototype.getCollisionInfo=function(_20){
var _21=this.map.parent;
var _22={panX:0,panY:0};
var _23=MQA.Util.getParentOffset(_21);
var _24=MQA.Util.getParentOffset(_20);
var _25=10;
_24.x=_24.x-_23.x-_25;
_24.y=_24.y-_23.y-_25;
var _26={width:37,height:300};
var _27={width:139,height:15};
var _28=(_24.x<_26.width&&_24.y<_26.height+_25)?_26.width:0;
var _29=(_24.x+_20.clientWidth>_21.clientWidth-_27.width&&_24.y<_27.height+_25)?_27.height:0;
if(_20.clientWidth>0&&_20.clientHeight>0){
if(_24.x<_28){
_22.panX=Math.abs(_24.x-_28);
}else{
if(_24.x+_25+_20.clientWidth>_21.clientWidth){
_22.panX=-1*(_20.clientWidth+_24.x+_25-_21.clientWidth);
}
}
if(_24.y<_29){
_22.panY=Math.abs(_24.y-_29);
}else{
if(_24.y+_20.clientHeight>_21.clientHeight){
_22.panY=_21.clientHeight-_24.y-_20.clientHeight;
}
}
}
return _22;
};
MQA.InfoWindow.prototype.getOpener=function(){
return this.opener;
};
MQA.InfoWindow.prototype.resize=function(_2a){
var _2b=this.popup.childNodes[0];
var _2c=this.popup.childNodes[1];
var _2d=this.popup.childNodes[2];
var _2e=this.popup.childNodes[3];
var _2f=this.popup.childNodes[4];
var _30=this.popup.childNodes[5];
var _31=this.popup.childNodes[6];
var _32="";
if(this.getTitleBackgroundColor()){
_32=" style=background:"+this.getTitleBackgroundColor();
}
_31.innerHTML="";
this.popup.style.display="block";
this.popup.content.style.width="auto";
this.popup.content.style.height="auto";
this.popup.content.style.overflow="visible";
var _33="";
if(_2a){
if(this.popup.content){
_33=this.popup.content.innerHTML;
}
}else{
_33="<div class='mqpoiheading'"+_32+" title='"+MQA.Util.stripHTMLTags(this.title.innerHTML)+"'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";
}
this.popup.content.innerHTML=_33;
var _34=this.popup.content.childNodes[0];
var _35=this.popup.content.childNodes[1];
_34.style.display="none";
_35.style.whiteSpace="nowrap";
_35.style.overflow="visible";
_35.style.width="auto";
_35.style.height="auto";
var _36=this.popup.content.offsetWidth+35+2;
var _37=(_36>this.maxwidth)?18:0;
_36=(_36>this.maxwidth)?this.maxwidth:(_36<this.minwidth)?this.minwidth:_36;
var _38=_36-35;
_35.style.width=_38+"px";
_34.style.display="";
_35.style.whiteSpace="";
var _39=this.popup.content.offsetHeight+_37+30+2;
var _3a=(_39>this.maxheight)?18:0;
_38+=_3a;
_36+=_3a;
_34.style.width=(_38-18)+"px";
var _3b=_34.childNodes[0];
if(typeof (_3b.tagName)=="undefined"){
_34.innerHTML="<div>"+this.title.innerHTML+"</div>";
_3b=_34.childNodes[0];
}
_3b.style.display="inline";
if((_3b.offsetWidth>(_38-18))&&((_38-18)>25)){
var _3c=MQA.Util.stripHTMLTags(this.title.innerHTML);
var _3d=_3b.innerHTML;
for(var i=_3c.length;(_3b.offsetWidth>=(_38-18)&&i>0);i--){
_3b.innerHTML=MQA.Util.getHTMLSubstring(_3d,i,"&nbsp;...");
}
}
_39=this.popup.content.offsetHeight+_37+30+2;
_39=(_39>this.maxheight)?this.maxheight:_39;
var _3f=_39-30+2;
var _40=Math.ceil(_38/600);
var _41=_38%600;
var _42=Math.ceil(_3f/600);
var _43=_3f%600;
var _44,_45,_46,_47;
var _48,_49;
var _4a,_4b;
var _4c,_4d,_4e,_4f;
var _50=600;
var _51=600;
for(var i=1;i<=_42;i++){
for(var j=1;j<=_40;j++){
if(i==1&&j==1){
continue;
}
_44=(j==_40&&_41!=0)?_41:_50;
_45=(i==_42&&_43!=0)?_43:_51;
_48=(j==1)?15:0;
_49=(i==1)?15:0;
_4a=(i==1)?0:15;
_4b=(j==1)?0:15;
_4c=(-1*_4b);
_4d=(-1*_4a);
_46=(_44+_48);
_47=(_45+_49);
_4e=(((j-1)*_50)+_4b);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
if(i==1){
_4c=-15;
_4d=-630;
_46=(_44+_48);
_47=15;
_4e=(((j-1)*_50)+_4b);
_4f=(_3f+15);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
if(i>1){
_4c=-630;
_4d=-15;
_46=20;
_47=(_45+_49);
_4e=(_38+15);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
var _53=(_38>_50)?_50:_38;
var _54=(_3f>_51)?_51:_3f;
this.popup.style.width=(_36)+"px";
this.popup.style.height=(_39)+"px";
this.popup.content.style.width=_38+"px";
this.popup.content.style.height=_3f+"px";
_2b.style.left=(_36-38)+"px";
_2b.style.top="12px";
_34.style.width=(_38-18)+"px";
_35.style.width=_38+"px";
_35.style.height=(_3f-_34.offsetHeight-5)+"px";
_35.style.overflow="auto";
_2c.style.width=_53+15+"px";
_2c.style.height=_54+15+"px";
_2d.style.left=_38+15+"px";
_2d.style.height=_54+15+"px";
_2e.style.top=_3f+15+"px";
_2e.style.width=_53+15+"px";
_2f.style.top=_3f+15+"px";
_2f.style.left=_38+15+"px";
_30.style.left="14px";
_30.style.top=_3f+15+"px";
if(_2a){
this.popup.style.visibility="hidden";
this.show();
}
};
MQA.InfoWindow.prototype.createFillerDiv=function(_55,_56,_57,_58,_59,_5a){
var _5b=this.popup.childNodes[6];
var _5c=document.createElement("div");
_5c.style.position="absolute";
_5c.style.overflow="hidden";
var str="<div style='width:650px;height:685px;'></div>";
_5c.innerHTML=str;
_5b.appendChild(_5c);
if((MQA.browser.name=="msie")&&(parseFloat(MQA.browser.version)<7)){
_5c.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_5c.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
_5c.childNodes[0].style.marginLeft=_55+"px";
_5c.childNodes[0].style.marginTop=_56+"px";
_5c.style.width=_57+"px";
_5c.style.height=_58+"px";
_5c.style.left=_59+"px";
_5c.style.top=_5a+"px";
};
MQA.InfoWindow.prototype.setPopupContentOverflow=function(_5e){
if(_5e&&(MQA.browser.name=="firefox")&&this.popup.content.childNodes[1]){
var _5f=this.popup.content.childNodes[1].scrollLeft;
var top=this.popup.content.childNodes[1].scrollTop;
this.popup.content.childNodes[1].style.overflow=_5e;
this.popup.content.childNodes[1].scrollLeft=_5f;
this.popup.content.childNodes[1].scrollTop=top;
}
};

MQA.RolloverWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=new MQA.Point(0,0);
this.opener=null;
this.maxwidth=null;
this.artUrl="http://img.mqcdn.com/mqtoolkit/";
this.flipStateEnabled=false;
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.minipopup=null;
this.textLength=31;
this.leftRolloverOffsetX=-25;
this.rightRolloverOffsetX=-193;
this.createRolloverWindow();
this.rolloverOffsetY=13-this.minipopup.offsetHeight;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.minipopup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.minipopup,"dblclick",this.eDblClick);
};
MQA.RolloverWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.minipopup,"click",this.eClick);
MQA._prEvent.stopObserving(this.minipopup,"dblclick",this.eDblClick);
this.map=null;
this.opener=null;
this.minipopup.oncontextmenu=null;
this.minipopup.innerHTML=null;
this.minipopup.outerHTML="";
MQA.Util._deleteDOMObject(this.minipopup);
this.minipopup=null;
};
MQA.RolloverWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.RolloverWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.RolloverWindow.prototype.onClick=function(_4){
_4.cancelBubble=true;
};
MQA.RolloverWindow.prototype.onDoubleClick=function(_5){
_5.cancelBubble=true;
};
MQA.RolloverWindow.prototype.hide=function(_6){
if(!this.isHidden()){
if(this.minipopup.style.visibility!="hidden"){
this.minipopup.style.visibility="hidden";
}
if(this.opener!=null){
this.opener.onRolloverClose(new MQA.Event("MQPoi.rolloverClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.RolloverWindow.close"));
}
};
MQA.RolloverWindow.prototype.setOpenerAndShow=function(_7){
this.show();
this.opener=_7;
};
MQA.RolloverWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
var _8=this.offset.y;
var _9=this.offset.x;
var _a=this.leftRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.leftRolloverOffsetX)+"px";
this.minipopup.style.zIndex=-1;
if(this.flipStateEnabled){
var _b=this.getCollisionInfo(this.minipopup);
if(_b.panX<0){
_a=this.rightRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.rightRolloverOffsetX)+"px";
}
}
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
this.minipopup.style.display="none";
this.minipopup.style.visibility="visible";
this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_a+"', sizingMethod='scale')";
this.minipopup.style.display="block";
}else{
this.minipopup.style.background="";
this.minipopup.style.background="url("+_a+") left";
}
this.minipopup.style.visibility="visible";
this.onOpen(new MQA.Event("MQA.RolloverWindow.open"));
};
MQA.RolloverWindow.prototype.isHidden=function(){
return (this.minipopup.style.visibility=="hidden");
};
MQA.RolloverWindow.prototype.modify=function(_c,_d,_e,_f){
if(_c){
this.point=_c;
}
if(_d){
this.content=_d;
}
if(_e){
this.offset=_e;
}
this.minipopup.style.position="absolute";
this.minipopup.style.zIndex=9;
var _10=MQA.Util.stripHTMLTags(this.content.innerHTML);
if(_f.infoWindowContent&&this.textLength==31){
this.textLength-=2;
}
if(_f.infoWindowContent){
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;...&nbsp;&raquo;"):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"&nbsp;&raquo;");
}else{
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;..."):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"");
}
this.minipopup.innerHTML="<div class='mqminipopuphead'>"+_10+"</div>";
};
MQA.RolloverWindow.prototype.getMaxWidth=function(){
return this.maxWidth;
};
MQA.RolloverWindow.prototype.setMaxWidth=function(_11){
this.maxWidth=_11;
};
MQA.RolloverWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.RolloverWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.RolloverWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.RolloverWindow.prototype.setRolloverGraphic=function(_12,_13){
if(typeof _12=="undefined"&&typeof _13=="undefined"){
this.setDefaultRollover();
}else{
if(typeof _12!="undefined"){
this.leftRolloverSrc=_12;
}
if(typeof _13!="undefined"){
this.rightRolloverSrc=_13;
}
}
};
MQA.RolloverWindow.prototype.getRolloverGraphic=function(_14){
var _15="";
if(typeof _14=="undefined"||_14=="left"){
_15=this.leftRolloverSrc;
}else{
if(_14=="right"){
_15=this.rightRolloverSrc;
}
}
return _15;
};
MQA.RolloverWindow.prototype.setDefaultRollover=function(){
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.setRolloverGraphic(this.leftRolloverSrc,this.rightRolloverSrc);
};
MQA.RolloverWindow.prototype.setFlipStateEnabled=function(_16){
if(typeof _16=="undefined"||typeof _16!="boolean"){
this.flipStateEnabled=false;
}else{
this.flipStateEnabled=_16;
}
};
MQA.RolloverWindow.prototype.getFlipStateEnabled=function(){
return this.flipStateEnabled;
};
MQA.RolloverWindow.prototype.getCollisionInfo=function(_17,_18,_19){
var _1a=this.map.parent;
var _1b={panX:0,panY:0};
var _1c=(_18)?_18:false;
var _1d=(_19)?_19:false;
var _1e=MQA.Util.getParentOffset(_1a);
var _1f=MQA.Util.getParentOffset(_17);
var _20=0;
_1f.x=_1f.x-_1e.x-_20;
_1f.y=_1f.y-_1e.y-_20;
var _21=(_1c)?{width:37,height:300}:{width:0,height:0};
var _22=(_1d)?{width:139,height:15}:{width:0,height:0};
var _23=(_1f.x<_21.width&&_1f.y<_21.height+_20)?_21.width:0;
var _24=(_1f.x+_17.clientWidth>_1a.clientWidth-_22.width&&_1f.y<_22.height+_20)?_22.height:0;
if(_17.clientWidth>0&&_17.clientHeight>0){
if(_1f.x<_23){
_1b.panX=Math.abs(_1f.x-_23);
}else{
if(_1f.x+_20+_17.clientWidth>_1a.clientWidth){
_1b.panX=-1*(_17.clientWidth+_1f.x+_20-_1a.clientWidth);
}
}
if(_1f.y<_24){
_1b.panY=Math.abs(_1f.y-_24);
}else{
if(_1f.y+_17.clientHeight>_1a.clientHeight){
_1b.panY=_1a.clientHeight-_1f.y-_17.clientHeight;
}
}
}
return _1b;
};
MQA.RolloverWindow.prototype.createRolloverWindow=function(){
if(this.minipopup){
this.minipopup.parentNode.removeChild(this.minipopup);
this.minipopup=null;
}
this.minipopup=document.createElement("div");
this.minipopup.id="minipopup";
this.minipopup.className="mqminipopup";
this.minipopup.currentElement=null;
this.minipopup.style.left="-1000px";
this.minipopup.style.top="-1000px";
this.minipopup.oncontextmenu=function(){
return false;
};
document.body.appendChild(this.minipopup);
this.minipopup.style.position="absolute";
this.minipopup.style.visibility="hidden";
};
MQA.RolloverWindow.prototype.setTextLength=function(_25){
if(typeof _25=="undefined"||isNaN(parseInt(_25))){
this.textLength=31;
}else{
this.textLength=parseInt(_25);
}
};
MQA.RolloverWindow.prototype.getTextLength=function(){
return this.textLength;
};
MQA.RolloverWindow.prototype.setLeftRolloverOffsetX=function(_26){
if(typeof _26=="undefined"||isNaN(parseInt(_26))){
this.leftRolloverOffsetX=-25;
}else{
this.leftRolloverOffsetX=parseInt(_26);
}
};
MQA.RolloverWindow.prototype.getLeftRolloverOffsetX=function(){
return this.leftRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRightRolloverOffsetX=function(_27){
if(typeof _27=="undefined"||isNaN(parseInt(_27))){
this.rightRolloverOffsetX=-193;
}else{
this.rightRolloverOffsetX=parseInt(_27);
}
};
MQA.RolloverWindow.prototype.getRightRolloverOffsetX=function(){
return this.rightRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRolloverOffsetY=function(_28){
if(typeof _28=="undefined"||isNaN(parseInt(_28))){
this.rolloverOffsetY=(13-this.minipopup.offsetHeight);
}else{
this.rolloverOffsetY=parseInt(_28);
}
};
MQA.RolloverWindow.prototype.getRolloverOffsetY=function(){
return this.rolloverOffsetY;
};


MQA.TileMap=function(_1,_2,_3,_4,_5){
this.tileLayers=new MQA.TileLayerCollection;
this.showOurMaps=true;
var _6=new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.satLayer=new MQA.SatTileLayer(this,MQA.TILE_LAYER_ID.SAT,MQA.SatImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.satLayer);
this.strlblbLayer=new MQA.StrlblTileLayer(this,MQA.TILE_LAYER_ID.HYB,MQA.StrlblImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.strlblbLayer);
this.mapLayer=new MQA.MapTileLayer(this,MQA.TILE_LAYER_ID.MAP,MQA.MapImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.mapLayer);
this.div1=document.createElement("div");
this.div1.id="map.div1";
this.div1.style.width=_1.style.width;
this.div1.style.height=_1.style.height;
this.div1.style.zIndex=0;
_1.style.position="relative";
this.parent2=_1;
_1.appendChild(this.div1);
this.controls=[];
this._mapShapes=new MQA.ShapeCollection();
this._mapShapes.setName(this._mapShapes.guid);
this._mapShapes.setDeclutter(true);
this._shapeCollections=[this._mapShapes];
try{
this.mydeclutter=new MQA.Declutter(this);
}
catch(err){
this.mydeclutter=null;
}
this.iwparent=document.createElement("div");
if(_2==null){
_2=1;
}
if(_3==null){
_3=new MQA.LatLng(38.134557,-98.4375);
}
this.showRte=false;
this.updateOverlaysX=true;
this.updateOverlaysY=true;
this.tileMode=MQA.MAP_TYPE.MAP;
this.bestFitRect=null;
this.keepCenter=null;
this.bestFitMargin=0;
if(_4==MQA.MAP_TYPE.SAT){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.HYB){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.NONE){
this.showOurMaps=false;
}
var me=this;
if(MQA.MASTER_BROKER==null){
MQA.MASTER_BROKER=new MQA.SlideBroker();
}
this.brokerKey=MQA.MASTER_BROKER.addListener(me);
this.parent=this.div1;
if(!this.parent.style.height||parseInt(this.parent.style.height)<100){
this.parent.style.width="550px";
this.parent.style.height="475px";
}
this.width=parseInt(this.parent.style.width);
this.height=parseInt(this.parent.style.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
if(_5!=null){
if(_5.getBestFitMargin()!=null){
this.setBestFitMargin(_5.getBestFitMargin());
}
if(_5.getBestFitRect()!=null){
this.bestFitRect=_5.getBestFitRect();
this.keepCenter=_5.isKeepCenter();
_2=this.getZoom(_5.getBestFitRect(),_3,_5.isKeepCenter(),_5.getMinZoom(),_5.getMaxZoom());
if(_5.isKeepCenter()==false){
var _8=_5.getBestFitRect();
var _9=new MQA.PointLL(_8.ul.lat,_8.ul.lng);
var _a=new MQA.PointLL(_8.lr.lat,_8.lr.lng);
_3=new MQA.PointLL(((_9.lat+_a.lat)/2),((_9.lng+_a.lng)/2));
}
}
}
this.zoom=(_2>16)?16:parseInt(_2);
this.scale=MQA.SCALES[this.zoom];
this.tilesize=MQA.TILESIZE;
this.centerlat=_3.lat;
this.centerlng=_3.lng;
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.maprows=Math.ceil(this.height/this.tilesize)+2;
this.mapcols=Math.ceil(this.width/this.tilesize)+2;
this.disabled=false;
this.drag=false;
this.slide=false;
this.routerect=null;
this.clickEvent=MQA.EVENT_NONE;
this.clickOper=-1;
this.rteserver="";
this.rtesession="";
this.routebestfit=false;
this.mapaccum1=0;
this.sataccum1=0;
this.hybaccum1=0;
this.mapaccum2=0;
this.sataccum2=0;
this.hybaccum2=0;
this.diffaccum=0;
this.moving=false;
this.startingToMove=false;
this.div=MQA.Util.createParentDiv("mqtiledmap",0,0,"absolute",0,0,0,null,null);
this.parent.style.overflow="hidden";
this.parent.style.background="#FFFFFF";
this.parent.style.position="relative";
this.parent.style.top="0px";
this.parent.style.left="0px";
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
this.parent.appendChild(this.div);
if(navigator.userAgent.indexOf("MSIE")>=0){
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
}
if(this.showOurMaps){
this.div.ldiv=MQA.Util.createParentDiv("mqloading",0,0,"absolute",0,0,0,(this.mapcols*MQA.TILESIZE),(this.maprows*MQA.TILESIZE));
this.div.ldiv.id="map.div.ldiv";
this.div.ldiv.style.backgroundImage="url("+MQA.RESOURCES+"loading.gif)";
this.div.ldiv.style.backgroundRepeat="repeat";
this.div.appendChild(this.div.ldiv);
}
this.eMouseMove=MQA._prEvent.EventCallback(this,"onMouseMove");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(document,"mousemove",this.eMouseMove);
MQA._prEvent.observe(document,"mouseup",this.eMouseUp);
MQA._prEvent.observe(document,"mouseout",this.eMouseOut);
MQA._prEvent.observe(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.parent,"mousedown",this.eMouseDown);
this.rtehighlight=MQA.Util.createImgHolder(null,"on","none","none",80);
this.rtehighlight.id="mqrtehl";
this.rtehighlight.onload=MQA._prEvent.hitch(this,"showRouteHighlight");
this.rtehighlight.onselectstart=MQA._prEvent.falseFunction;
this.rtehighlight.oncontextmenu=MQA._prEvent.falseFunction;
this.rtehighlight.style.position="absolute";
this.rtehighlight.style.opacity="0.6";
this.rtehighlight.style.filter="alpha(opacity='60')";
this.rtehighlight.GALLERYIMG="no";
this.div.appendChild(this.rtehighlight);
this.prnstyle=document.createElement("style");
this.prnstyle.type="text/css";
this.prnstyle.media="print";
var _b="img#mqrtehl { visibility:hidden; display:none }";
if(this.prnstyle.styleSheet){
this.prnstyle.styleSheet.cssText=_b;
}else{
var _c=document.createTextNode(_b);
this.prnstyle.appendChild(_c);
}
document.body.appendChild(this.prnstyle);
this.loading=MQA.Util.createImgHolder(null,"on","none","none",null);
this.loading.src=MQA.RESOURCES+"loading.gif";
this.parent.appendChild(this.loading);
this.maptiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.maptiler);
this.sattiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.sattiler);
this.hybtiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.hybtiler);
this.logos=new Array(5);
this.logos[MQA.LOGO_MQ_LOGO]=MQA.Util.createImgLogo("none","on",MQA.CORNER_TOPLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,95,15);
this.logos[MQA.LOGO_MQ_LOGO].src=MQA.RESOURCES+"mqlogo.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_LOGO]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_LOGO]);
this.logos[MQA.LOGO_MQ_SCALES]=document.createElement("div");
this.logos[MQA.LOGO_MQ_SCALES].corner=MQA.CORNER_TOPRIGHT;
this.logos[MQA.LOGO_MQ_SCALES].offset=new MQA.PointXY(0,0);
this.logos[MQA.LOGO_MQ_SCALES].style.position="absolute";
this.logos[MQA.LOGO_MQ_SCALES].style.display="block";
this.logos[MQA.LOGO_MQ_SCALES].style.zIndex=22;
this.logos[MQA.LOGO_MQ_SCALES].width="124";
this.logos[MQA.LOGO_MQ_SCALES].height="18";
this.logos[MQA.LOGO_MQ_SCALES].style.overflow="hidden";
this.logos[MQA.LOGO_MQ_SCALES].style.width="124px";
this.logos[MQA.LOGO_MQ_SCALES].style.height="18px";
this.logos[MQA.LOGO_MQ_SCALES].innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='http://"+RESSERVER+"/scales/scalebar.gif' />";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_SCALES]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_SCALES]);
this.logos[MQA.LOGO_MQ_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,103,12);
this.logos[MQA.LOGO_MQ_COPY].src=MQA.RESOURCES+"mqcopy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.SAT)?"block":"none";
this.logos[MQA.LOGO_MAP_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,0),"absolute",logoDisplay,22,null,190,12);
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[1];
this.setLogoPosition(this.logos[MQA.LOGO_MAP_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MAP_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.MAP)?"block":"none";
this.logos[MQA.LOGO_SAT_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,-13),"absolute",logoDisplay,22,null,115,12);
this.logos[MQA.LOGO_SAT_COPY].src=MQA.RESOURCES+"sz1copy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_SAT_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_SAT_COPY]);
this.grab_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grab.cur":"-moz-grab";
this.grabbing_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grabbing.cur":"-moz-grabbing";
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
this.div.staticmapdiv=MQA.Util.createParentDiv("mqstaticmapdiv",0,0,"absolute",0,0,60,null,null);
this.div.appendChild(this.div.staticmapdiv);
this.div.poidiv=MQA.Util.createParentDiv("mqpoidiv",0,0,"absolute",0,0,90,null,null);
this.div.poidiv.style.cursor="auto";
this.div.poidiv.UNSELECTABLE="off";
this.div.appendChild(this.div.poidiv);
this.rebuildTiles();
this.mapShadowTop=document.createElement("div");
this.mapShadowTop.style.background="transparent url(http://img.mqcdn.com/mqmaptiled/mapshadow-top.png) repeat-y scroll 0pt";
this.mapShadowTop.style.height="14px";
this.mapShadowTop.style.left="0pt";
this.mapShadowTop.style.position="absolute";
this.mapShadowTop.style.top="0pt";
this.mapShadowTop.style.width="5000px";
this.mapShadowTop.style.zIndex="20";
this.mapShadowTop.style.display="none";
this.div1.appendChild(this.mapShadowTop);
this.mapShadowLeft=document.createElement("div");
this.mapShadowLeft.style.background="transparent url(http://img.mqcdn.com/mqmaptiled/mapshadow-side.png) repeat-y scroll 0pt";
this.mapShadowLeft.style.height="5000px";
this.mapShadowLeft.style.left="0pt";
this.mapShadowLeft.style.position="absolute";
this.mapShadowLeft.style.top="0pt";
this.mapShadowLeft.style.width="16px";
this.mapShadowLeft.style.zIndex="20";
this.mapShadowLeft.style.display="none";
this.div1.appendChild(this.mapShadowLeft);
this.surface=null;
this.overlayOffsetX=null;
this.overlayOffsetY=null;
this.poisurface=null;
this.poiLineOffsetX=null;
this.poiLineOffsetY=null;
this.traffic=null;
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
this.canvasOffsetX=null;
this.canvasOffsetY=null;
this.infowindow=new MQA.InfoWindow(this);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow=new MQA.RolloverWindow(this);
this.rolloversEnabled=true;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.div1,"click",this.eClick);
MQA._prEvent.observe(this.div1,"dblclick",this.eDoubleClick);
this.savedCenter=null;
this.savedZoomLevel=null;
this.savedMapType=null;
this.saveState();
MQA.incrTileMapCount();
this.uniqueMapID=MQA.getTileMapCount();
this.startDragPoint=new MQA.Point(0,0);
this.endDragPoint=new MQA.Point(0,0);
this.draggedObject=null;
this.staticMapEnabled=false;
this.turnEventsOff=false;
this.batchCount=0;
if(_5!=null){
this.showDraggableMap();
}
};
MQA.TileMap.prototype.getTileLayerById=function(id){
return this.tileLayers.getById(id);
};
MQA.TileMap.prototype.removeAllTileLayers=function(){
var y=this.tileLayers.getSize();
for(var x=3;x<y;x++){
this.tileLayers.getAt(x).remove();
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=this.tileLayers.getAt(x);
this.onLayerRemoved(mqe);
}
for(var y=this.tileLayers.getSize();y>3;y--){
this.tileLayers.remove(y-1);
}
};
MQA.TileMap.prototype.removeTileLayer=function(_11){
_11.remove();
this.tileLayers.removeItem(_11);
_11.isAdded=false;
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=_11;
this.onLayerRemoved(mqe);
};
MQA.TileMap.prototype.addTileLayer=function(_13){
if((_13.tileLayerId!=MQA.TILE_LAYER_ID.SAT)&&(_13.tileLayerId!=MQA.TILE_LAYER_ID.HYB)&&(_13.tileLayerId!=MQA.TILE_LAYER_ID.MAP)){
this.tileLayers.add(_13);
_13.isAdded=true;
}
_13.draw();
var mqe=new MQA.Event("MQA.TileMap.layerAdded");
mqe.layer=_13;
this.onLayerAdded(mqe);
};
MQA.TileMap.prototype.addTileLayers=function(_15){
if(_15){
var h=_15.getSize();
for(i=0;i<h;i++){
this.addTileLayer(_15.getAt(i));
}
}
};
MQA.TileMap.prototype.replaceTileLayers=function(_17){
this.removeAllTileLayers();
this.addTileLayers(_17);
};
MQA.TileMap.prototype.onLayerDrawn=function(e){
MQA.EventManager.trigger(this,"layerdrawn",e);
};
MQA.TileMap.prototype.onLayerAdded=function(e){
MQA.EventManager.trigger(this,"layeradded",e);
};
MQA.TileMap.prototype.onLayerRemoved=function(e){
MQA.EventManager.trigger(this,"layerremoved",e);
};
MQA.TileMap.prototype._subDispose=function(){
for(var k in this){
try{
delete this[k];
}
catch(e){
}
}
};
MQA.TileMap.prototype.setBatchMode=function(_1c){
if(_1c){
this.batchCount+=1;
}else{
this.batchCount-=1;
if(this.batchCount<0){
this.batchCount=0;
}
if(this.batchCount==0){
var dc=this.getDeclutter();
if(dc){
dc.setDeclutterMode(dc.getDeclutterMode());
}
}
}
};
MQA.TileMap.prototype.getDragOffset=function(){
return new MQA.Point(this.m_dragoffX,this.m_dragoffY);
};
MQA.TileMap.prototype.onClick=function(e){
if((this.click)?this.click:false){
var _1f=MQA.Util.getParentOffset(this.parent);
var _20=0;
var _21=0;
if(typeof (window.pageYOffset)=="number"){
_21=window.pageYOffset;
_20=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_21=document.body.scrollTop;
_20=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_21=document.documentElement.scrollTop;
_20=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_20)-_1f.x;
var cy=(mqe.domEvent.clientY+_21)-_1f.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.click";
MQA.EventManager.trigger(this,"click",mqe);
}
};
MQA.TileMap.prototype.onDoubleClick=function(e){
var _26=MQA.Util.getParentOffset(this.parent);
var _27=0;
var _28=0;
if(typeof (window.pageYOffset)=="number"){
_28=window.pageYOffset;
_27=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_28=document.body.scrollTop;
_27=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_28=document.documentElement.scrollTop;
_27=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_27)-_26.x;
var cy=(mqe.domEvent.clientY+_28)-_26.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.dblclick";
MQA.EventManager.trigger(this,"dblclick",mqe);
};
MQA.TileMap.prototype.onZoomStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"zoomstart",e);
};
MQA.TileMap.prototype.onZoomEnd=function(e){
this.updateShapeCollections();
this.handleOverlays();
if(this.traffic){
this.handleTraffic(true);
}
this.updatePois();
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"zoomend",e);
};
MQA.TileMap.prototype.onMapTypeChanged=function(e){
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.handleOverlays();
}
MQA.EventManager.trigger(this,"maptypechanged",e);
};
MQA.TileMap.prototype.onShapeAdded=function(e){
MQA.EventManager.trigger(this,"shapeadded",e);
};
MQA.TileMap.prototype.onShapeRemoved=function(e){
MQA.EventManager.trigger(this,"shaperemoved",e);
};
MQA.TileMap.prototype.onMapCleared=function(e){
MQA.EventManager.trigger(this,"mapcleared",e);
};
MQA.TileMap.prototype.onInfoWindowOpen=function(e){
MQA.EventManager.trigger(this,"infowindowopen",e);
};
MQA.TileMap.prototype.onInfoWindowClose=function(e){
MQA.EventManager.trigger(this,"infowindowclose",e);
};
MQA.TileMap.prototype.onMoveStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"movestart",e);
};
MQA.TileMap.prototype.onMove=function(e){
MQA.EventManager.trigger(this,"move",e);
};
MQA.TileMap.prototype.onMoveEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"moveend",e);
};
MQA.TileMap.prototype.handleMove=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _38=arguments[0];
if(_38=="move"){
e.eventName="MQA.TileMap.move";
this.onMove(e);
}else{
if(_38=="movestart"){
e.eventName="MQA.TileMap.movestart";
this.onMoveStart(e);
}else{
if(_38=="moveend"){
e.eventName="MQA.TileMap.moveend";
this.onMoveEnd(e);
}
}
}
}
};
MQA.TileMap.prototype.onDragStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"dragstart",e);
};
MQA.TileMap.prototype.onDrag=function(e){
MQA.EventManager.trigger(this,"drag",e);
};
MQA.TileMap.prototype.onDragEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"dragend",e);
};
MQA.TileMap.prototype.handleDrag=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _3d=arguments[0];
if(_3d=="drag"){
e.eventName="MQA.TileMap.drag";
this.onDrag(e);
}else{
if(_3d=="dragstart"){
e.eventName="MQA.TileMap.dragStart";
this.onDragStart(e);
}else{
if(_3d=="dragend"){
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
}else{
if(arguments.length==2){
var e=new MQA.Event();
var _3d=arguments[0];
if(_3d=="dragend"){
var _3e=arguments[1];
var _3f=MQA.Util.getParentOffset(this.parent);
e.clientX=_3e.clientX-_3f.x;
e.clientY=_3e.clientY-_3f.y;
this.endDragPoint=new MQA.Point(e.clientX,e.clientY);
e.dragDirection=this.direction(this.startDragPoint.x,this.startDragPoint.y,this.endDragPoint.x,this.endDragPoint.y);
var _40=this.endDragPoint.x-this.startDragPoint.x;
var _41=this.endDragPoint.y-this.startDragPoint.y;
var _42=this.percentage(0,0,_40,_41,false);
e.dragPercentage=Math.round(Math.sqrt(_42.shiftX*_42.shiftX+_42.shiftY*_42.shiftY));
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
};
MQA.TileMap.prototype.direction=function(_43,_44,_45,_46){
var _47="";
if(_46<_44){
_47="n";
}else{
if(_46>_44){
_47="s";
}
}
if(_45>_43){
_47+="e";
}else{
if(_45<_43){
_47+="w";
}
}
var _48=MQA.Util.panAngle(_43,_44,_45,_46);
if(_47=="ne"){
if(_48<22){
_47="e";
}else{
if(_48>68){
_47="n";
}
}
}else{
if(_47=="nw"){
if(_48<22){
_47="w";
}else{
if(_48>68){
_47="n";
}
}
}else{
if(_47=="se"){
if(_48<22){
_47="e";
}else{
if(_48>68){
_47="s";
}
}
}else{
if(_47=="sw"){
if(_48<22){
_47="w";
}else{
if(_48>68){
_47="s";
}
}
}
}
}
}
return _47;
};
MQA.TileMap.prototype.percentage=function(_49,_4a,_4b,_4c,_4d){
var _4e={shiftX:0,shiftY:0};
if(parseInt(_4b)>parseInt(_49)){
_4e.shiftX=parseInt(_4b)-parseInt(_49);
}else{
_4e.shiftX=parseInt(_49)-parseInt(_4b);
}
if(parseInt(_4c)>parseInt(_4a)){
_4e.shiftY=parseInt(_4c)-parseInt(_4a);
}else{
_4e.shiftY=parseInt(_4a)-parseInt(_4c);
}
if(!_4d||typeof (_4d)=="undefined"){
_4e.shiftY=MQA.Util.calcPercentage(_4e.shiftY,this.height);
_4e.shiftX=MQA.Util.calcPercentage(_4e.shiftX,this.width);
}
return _4e;
};
MQA.TileMap.prototype.onTKMouseDown=function(e){
MQA.EventManager.trigger(this,"mousedown",e);
};
MQA.TileMap.prototype.onTKMouseUp=function(e){
MQA.EventManager.trigger(this,"mouseup",e);
};
MQA.TileMap.prototype.handleMouse=function(){
if(arguments.length==2){
var _51=arguments[1];
var str="";
var e=new MQA.Event();
var _54=MQA.Util.getParentOffset(this.parent);
e.button=(MQA._prEvent.isLeftClick(_51))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
e.clientX=_51.clientX-_54.x;
e.clientY=_51.clientY-_54.y;
var _55=arguments[0];
if(_55=="mousedown"){
this.startDragPoint=new MQA.Point(e.clientX,e.clientY);
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseDown";
this.onTKMouseDown(e);
}else{
if(_55=="mouseup"){
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseUp";
this.onTKMouseUp(e);
}
}
}
};
MQA.TileMap.prototype.addControl=function(_56,_57){
if(_56.controlVersion=="1.0"){
if(this.controls[_56.type]){
this.removeControl(_56);
}
_56.initialize(this);
this.controls[_56.type]=_56;
if(_57!=null){
_56.position=_57;
}
this.parent2.appendChild(_56.elem);
this.placeControl(_56);
var _58=_56.elem.style;
_58.display="block";
_58.zIndex=0;
}else{
_56.map=this;
this.controls[_56.type]=_56;
if(_57!=null){
_56.position=_57;
}
_56.draw();
}
};
MQA.TileMap.prototype.removeControl=function(_59){
this.controls[_59.type]=null;
if(_59.controlVersion=="1.0"){
if(_59.destructor){
_59.destructor();
}
}else{
_59.dispose(false);
}
};
MQA.TileMap.prototype.updateZoom=function(_5a){
for(var _5b in this.controls){
if(this.controls[_5b]){
if(this.controls[_5b].setZoom){
this.controls[_5b].setZoom(this.getZoomLevel());
}
if(this.controls[_5b].unselectZoom){
this.controls[_5b].unselectZoom(0);
}
}
}
};
MQA.TileMap.prototype.placeControl=function(_5c){
var pos=_5c.getPosition();
if(_5c.controlVersion=="2.0"){
_5c.setValue("position",pos);
}else{
var _5e=pos.getMapCorner();
var _5f;
var top;
if(_5e==MQA.MapCorner.TOP_LEFT){
_5f=0;
top=0;
}else{
if(_5e==MQA.MapCorner.TOP_RIGHT){
_5f=this.width-_5c.getWidth();
top=0;
var _61=arguments;
if(typeof _61[1]=="undefined"){
pos.offsetSize.width*=-1;
}
}else{
if(_5e==MQA.MapCorner.BOTTOM_LEFT){
_5f=0;
top=this.height-_5c.getHeight();
var _61=arguments;
if(typeof _61[1]=="undefined"){
pos.offsetSize.height*=-1;
}
}else{
if(_5e==MQA.MapCorner.BOTTOM_RIGHT){
_5f=this.width-_5c.getWidth();
top=this.height-_5c.getHeight();
var _61=arguments;
if(typeof _61[1]=="undefined"){
pos.offsetSize.width*=-1;
pos.offsetSize.height*=-1;
}
}
}
}
}
_5f+=pos.offsetSize.width;
top+=pos.offsetSize.height;
_5c.elem.style.left=_5f+"px";
_5c.elem.style.top=top+"px";
}
};
MQA.TileMap.prototype.setLogoZindex=function(_62,_63){
var _64=parseInt(_62);
var _65=parseInt(_63);
var _66=this.logos[_64];
if(_66.style){
_66.style.zIndex=_65;
}
};
MQA.TileMap.prototype.setLogoPlacement=function(_67,_68){
var _69=_68.getMapCorner();
var _6a=Math.abs(_68.getOffsetSize().getWidth());
var _6b=Math.abs(_68.getOffsetSize().getHeight());
var _6c=0;
var _6d=0;
if(_69==MQA.MapCorner.TOP_LEFT){
_6c=_6a;
_6d=_6b;
}else{
if(_69==MQA.MapCorner.TOP_RIGHT){
_6c=(-_6a);
_6d=_6b;
}else{
if(_69==MQA.MapCorner.BOTTOM_LEFT){
_6c=_6a;
_6d=(-_6b);
}else{
if(_69==MQA.MapCorner.BOTTOM_RIGHT){
_6c=(-_6a);
_6d=(-_6b);
}else{
return;
}
}
}
}
_67=parseInt(_67);
_69=parseInt(_69);
if(_67>=MQA.LOGO_MQ_LOGO&&_67<=MQA.LOGO_SAT_COPY&&_69>=MQA.CORNER_TOPLEFT&&_69<=MQA.CORNER_BOTTOMRIGHT){
this.logos[_67].corner=_69;
this.logos[_67].offset=new MQA.Point(_6c,_6d);
this.setLogoPosition(this.logos[_67]);
}
};
MQA.TileMap.prototype.addShapes=function(_6e){
if(_6e){
var h=_6e.getSize();
for(i=0;i<h;i++){
this.addShape(_6e.getAt(i));
}
}
};
MQA.TileMap.prototype.addShape=function(_70,_71){
_71=(typeof (_71)=="undefined"?true:_71);
if(_70.map){
return;
}
_70.map=this;
if(!(_70 instanceof MQA.Poi)){
if(!this.surface){
this.createDrawingSurface();
}
if(!this.surface){
throw ("Overlay drawing surface does not exist.");
}
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
}
}
if(_71){
this._mapShapes.add(_70);
}
_70.draw();
var e=new MQA.Event("MQA.TileMap.shapeAdded");
e.shape=_70;
this.onShapeAdded(e);
e=null;
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._addPoi=function(_73,_74,_75){
var xy=this.getLLToXY(_73);
_75.ll=_73;
_75.offset=_74;
_75.style.position="absolute";
_75.style.zIndex=90;
_75.style.left=(xy.x+_74.x-this.m_dragoffX)+"px";
_75.style.top=(xy.y+_74.y-this.m_dragoffY)+"px";
_75.oncontextmenu=MQA._prEvent.falseFunction;
this.div.poidiv.appendChild(_75);
};
MQA.TileMap.prototype.removeAllShapes=function(){
if(this.getDeclutter()){
var _77=this.getDeclutter().getDeclutterMode();
}
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
while(this._mapShapes.getSize()>0){
var _78=false;
for(var x=1;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(this._mapShapes.getAt(0))){
_78=true;
break;
}
}
if(!_78){
this.removeShape(this._mapShapes.getAt(0),true);
}else{
this._mapShapes._remove(0);
}
}
if(this.getDeclutter()){
if(_77!=0){
this.getDeclutter().setDeclutterMode(_77);
}
}
this.onMapCleared(new MQA.Event("MQA.TileMap.mapCleared"));
};
MQA.TileMap.prototype.createDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.overlayOffsetX=0;
this.overlayOffsetY=0;
this.overlaydiv=document.createElement("div");
this.overlaydiv.id="mqOverlayDiv";
var _7a=parseInt(this.div1.style.width);
var _7b=parseInt(this.div1.style.height);
var _7c=Math.ceil(_7a/this.TILESIZE)*this.TILESIZE;
var _7d=Math.ceil(_7b/this.TILESIZE)*this.TILESIZE;
var _7e=_7c+(2*this.SURFACE_OFFSET);
var _7f=_7d+(2*this.SURFACE_OFFSET);
var _80=-(this.SURFACE_OFFSET);
var _81=-(this.SURFACE_OFFSET);
this.overlaydiv.lt=_80+"px";
this.overlaydiv.tp=_81+"px";
this.overlaydiv.style.position="absolute";
this.overlaydiv.style.top=_81+"px";
this.overlaydiv.style.left=_80+"px";
this.overlaydiv.style.height=_7f+"px";
this.overlaydiv.style.width=_7e+"px";
this.overlaydiv.style.zIndex=70;
this.overlaydiv.UNSELECTABLE="on";
this.overlaydiv.style.MozUserSelect="none";
this.overlaydiv.onselectstart=MQA._prEvent.falseFunction;
this.overlaydiv.style.cursor=this.current_mousecursor;
this.overlaydiv.style.backgroundColor="transparent";
this.overlaydiv.style.background="none";
this.div.appendChild(this.overlaydiv);
this.surface=MQA.Graphics.createSurface(this.overlaydiv,_7e,_7f);
}else{
this.surface=null;
}
}
catch(err){
this.surface=null;
}
};
MQA.TileMap.prototype.createPoiDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.poiLineOffsetX=0;
this.poiLineOffsetY=0;
this.poilinediv=document.createElement("div");
this.poilinediv.id="mqPoiLineDiv";
var _82=this.div1.style.width.replace("px","");
var _83=this.div1.style.height.replace("px","");
var _84=Math.ceil(_82/this.TILESIZE)*this.TILESIZE;
var _85=Math.ceil(_83/this.TILESIZE)*this.TILESIZE;
var _86=_84+(2*this.SURFACE_OFFSET);
var _87=_85+(2*this.SURFACE_OFFSET);
var _88=-(Math.round((_84-_82)/2)+this.SURFACE_OFFSET);
var _89=-(Math.round((_85-_83)/2)+this.SURFACE_OFFSET);
var _88=-(this.SURFACE_OFFSET);
var _89=-(this.SURFACE_OFFSET);
this.poilinediv.lt=_88+"px";
this.poilinediv.tp=_89+"px";
this.poilinediv.style.position="absolute";
this.poilinediv.style.top=_89+"px";
this.poilinediv.style.left=_88+"px";
this.poilinediv.style.height=_87+"px";
this.poilinediv.style.width=_86+"px";
this.poilinediv.style.zIndex=70;
this.poilinediv.UNSELECTABLE="on";
this.poilinediv.style.MozUserSelect="none";
this.poilinediv.onselectstart=MQA._prEvent.falseFunction;
this.poilinediv.style.cursor=this.current_mousecursor;
this.poilinediv.style.backgroundColor="transparent";
this.poilinediv.style.background="none";
this.div.appendChild(this.poilinediv);
this.poisurface=MQA.Graphics.createSurface(this.poilinediv,_86,_87);
}else{
this.poisurface=null;
}
}
catch(err){
this.poisurface=null;
}
};
MQA.TileMap.prototype.createCanvas=function(){
try{
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.canvasOffsetX=0;
this.canvasOffsetY=0;
this.dcCanvasDiv=document.createElement("div");
this.dcCanvasDiv.id="mqCanvasDiv";
var _8a=this.div1.style.width.replace("px","");
var _8b=this.div1.style.height.replace("px","");
var _8c=Math.ceil(_8a/this.TILESIZE)*this.TILESIZE;
var _8d=Math.ceil(_8b/this.TILESIZE)*this.TILESIZE;
var _8e=_8c+(2*this.SURFACE_OFFSET);
var _8f=_8d+(2*this.SURFACE_OFFSET);
var _90=-(Math.round((_8c-_8a)/2)+this.SURFACE_OFFSET);
var _91=-(Math.round((_8d-_8b)/2)+this.SURFACE_OFFSET);
var _90=-(this.SURFACE_OFFSET);
var _91=-(this.SURFACE_OFFSET);
this.dcCanvasDiv.style.position="absolute";
this.dcCanvasDiv.style.top=_91+"px";
this.dcCanvasDiv.style.left=_90+"px";
this.dcCanvasDiv.style.height=_8f+"px";
this.dcCanvasDiv.style.width=_8e+"px";
this.dcCanvasDiv.style.cursor="auto";
this.dcCanvasDiv.style.zIndex=70;
this.dcCanvasDiv.UNSELECTABLE="off";
this.div.appendChild(this.dcCanvasDiv);
var c=document.createElement("canvas");
c.setAttribute("height",parseInt(this.dcCanvasDiv.style.height));
c.setAttribute("width",parseInt(this.dcCanvasDiv.style.width));
c.setAttribute("id","mqCanvas");
this.dcCanvasDiv.appendChild(c);
this.dcCanvasContext=c.getContext("2d");
}
catch(err){
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
}
};
MQA.TileMap.prototype.removeShape=function(_93,_94){
if(typeof (_93)=="undefined"){
return;
}
_94=(typeof (_94)=="undefined"?true:_94);
var i,j;
if(_93.map&&!_94){
_93.dispose(false);
}
if(_94&&this._mapShapes.contains(_93)){
_93.dispose(false);
this._mapShapes.remove(this._mapShapes.getItemIndex(_93));
}
var e=new MQA.Event("MQA.TileMap.shapeRemoved");
e.shape=_93;
this.onShapeRemoved(e);
var e=new MQA.Event("MQA.Shape.removed");
_93.onRemoved(e);
};
MQA.TileMap.prototype.replaceShapes=function(_98){
var i;
this.removeAllShapes();
for(i=0;i<_98.getSize();i++){
this.addShape(_98.getAt(i));
}
};
MQA.TileMap.prototype.redrawOverlays=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _9a=this.getShapeCollections(true,true);
for(var x=0;x<_9a.length;x++){
var _9c=_9a[x];
var j=_9c.getSize();
for(var i=0;i<j;i++){
if(!(_9c.getAt(i).isOnMap())){
continue;
}
if(!(_9c.getAt(i) instanceof MQA.Poi)){
_9c.getAt(i).draw();
}
}
}
};
MQA.TileMap.prototype.handleOverlays=function(){
if(this.surface){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.handlePoiLines=function(){
if(this.surface){
this.poiLineOffsetX=this.getDragOffset().x;
this.poiLineOffsetY=this.getDragOffset().y;
this.poilinediv.style.left=-(this.SURFACE_OFFSET+this.poiLineOffsetX)+"px";
this.poilinediv.style.top=-(this.SURFACE_OFFSET+this.poiLineOffsetY)+"px";
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.getMapType=function(){
return this.tileMode;
};
MQA.TileMap.prototype.pixToLL=function(_9f){
var ll=this.getXYToLL(_9f);
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.llToPix=function(_a1){
var xy=this.getLLToXY(_a1);
return new MQA.Point(xy.x,xy.y);
};
MQA.TileMap.prototype.setMapType=function(_a3,_a4){
var _a5=this.getMapType();
if(_a5!=_a3){
var _a6="";
switch(_a3){
case MQA.MAP_TYPE.MAP:
case MQA.MAP_TYPE.SAT:
case MQA.MAP_TYPE.HYB:
break;
default:
return;
}
if(_a3==MQA.MAP_TYPE.MAP||_a3==MQA.MAP_TYPE.SAT||_a3==MQA.MAP_TYPE.HYB&&(this.tileMode!=_a3)){
this.sendTransactions();
if(_a3==MQA.MAP_TYPE.MAP){
if(!this.mapLayer.tileLayerDiv){
this.addTileLayer(this.mapLayer);
}
this.mapLayer.show();
if(this.satLayer.tileLayerDiv){
this.satLayer.hide();
}
if(this.strlblbLayer.tileLayerDiv){
this.strlblbLayer.hide();
}
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="none";
}
if(_a3==MQA.MAP_TYPE.SAT){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
}
if(!this.satLayer.visible){
this.satLayer.show();
}
if(this.strlblbLayer.tileLayerDiv){
this.strlblbLayer.hide();
}
this.logos[MQA.LOGO_MAP_COPY].style.display="none";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
if(_a3==MQA.MAP_TYPE.HYB){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
if(!this.strlblbLayer.tileLayerDiv){
this.addTileLayer(this.strlblbLayer);
}
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
}
if(!this.satLayer.visible){
this.satLayer.show();
}
this.strlblbLayer.show();
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
this.tileMode=_a3;
_a4=(typeof (_a4)=="undefined")?false:_a4;
if(!_a4){
var _a7=this.getCenterLatLng();
this.centerlat=_a7.lat;
this.centerlng=_a7.lng;
this.rebuildTiles();
}
}
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().resetDraggedPois();
this.getDeclutter().redrawLeaderLines();
}
}
if(this.controls[MQA.CONTROL_TYPE]!=null){
this.controls[MQA.CONTROL_TYPE].updateControl(_a3);
}
var evt=new MQA.Event("MQA.TileMap.mapTypeChanged");
evt.prevMapType=_a5;
evt.mapType=_a3;
this.onMapTypeChanged(evt);
}
};
MQA.TileMap.prototype.zoomIn=function(){
var _a9=this.getZoomLevel();
_a9++;
this.setZoomLevel(_a9);
};
MQA.TileMap.prototype.zoomOut=function(){
var _aa=this.getZoomLevel();
_aa--;
this.setZoomLevel(_aa);
};
MQA.TileMap.prototype.setZoomLevel=function(_ab){
var _ac=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_ac;
this.onZoomStart(evt);
this._setZoomLevel(_ab);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_ac;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._setZoomLevel=function(_af){
_af=parseInt(_af);
if(_af<1||_af>16||this.drag||this.slide||_af==this.zoom){
return;
}
var _b0=this.getCenterLatLng();
this.sendTransactions();
this.centerlat=_b0.lat;
this.centerlng=_b0.lng;
this.zoom=_af;
this.scale=MQA.SCALES[this.zoom];
this.rebuildTiles();
};
MQA.TileMap.prototype.getZoomLevel=function(){
return this.zoom;
};
MQA.TileMap.prototype.zoomToRect=function(_b1,_b2,_b3,_b4){
var _b5=this.getZoomLevel();
if(_b2==null){
_b2=false;
}
if(_b3==null){
_b3=1;
}
if(_b4==null){
_b4=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_b5;
this.onZoomStart(evt);
this.updateZoom("off");
this._bestFit(_b1,_b2,_b3,_b4);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_b5;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype.getScale=function(){
return this.getScaleFromZoom(this.getZoomLevel());
};
MQA.TileMap.prototype.getScaleFromZoom=function(_b8){
var i=(_b8)?(((_b8>=1)&&(_b8<=16))?_b8:0):0;
return MQA.SCALES[i];
};
MQA.TileMap.prototype.bestFit=function(_ba,_bb,_bc){
var _bd=this.getZoomLevel();
if(_ba==null){
_ba=false;
}
if(_bb==null){
_bb=1;
}
if(_bc==null){
_bc=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_bd;
this.onZoomStart(evt);
this.updateZoom("off");
var _bf=this.getShapes(true).getBoundingRect();
var _c0=this.getShapeCollections(true,false);
for(var x=1;x<_c0.length;x++){
var _c2=_c0[x];
if(_c2.getBoundingRect()!=null){
if(!_bf){
_bf=new MQA.RectLL(_c2.getAt(0).getValue("latLng"),_c2.getAt(0).getValue("latLng"));
}
_bf.extend(_c2.getBoundingRect().getUpperLeft());
_bf.extend(_c2.getBoundingRect().getLowerRight());
}
}
this._bestFit(_bf,_ba,_bb,_bc);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_bd;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._bestFit=function(_c4,_c5,_c6,_c7){
var _c8,_c9,_ca,_cb,_cc,_cd;
if(_c5==null){
_c5=false;
}
if(_c6==null){
_cc=1;
}else{
_c6=parseInt(_c6);
if(_c6<1||_c6>15){
_cc=1;
}else{
_cc=_c6+1;
}
}
if(_c7==null){
_cd=16;
}else{
_c7=parseInt(_c7);
if(_c7<1||_c7>16){
_cd=16;
}else{
_cd=_c7;
}
if(_cd<_cc){
_cd=_cc+1;
}
}
if(_c4.ul.x){
_c8=new MQA.PointXY(_c4.ul.x,_c4.ul.y);
_c9=new MQA.PointXY(_c4.lr.x,_c4.lr.y);
_ca=this.getXYToLL(new MQA.PointXY(_c4.ul.x,_c4.ul.y));
_cb=this.getXYToLL(new MQA.PointXY(_c4.lr.x,_c4.lr.y));
}else{
_c8=this.getLLToXY(new MQA.PointLL(_c4.ul.lat,_c4.ul.lng));
_c9=this.getLLToXY(new MQA.PointLL(_c4.lr.lat,_c4.lr.lng));
_ca=new MQA.PointLL(_c4.ul.lat,_c4.ul.lng);
_cb=new MQA.PointLL(_c4.lr.lat,_c4.lr.lng);
}
var _ce=Math.abs(_cb.lng-_ca.lng)*(MQA.PIXERSPERLNGDEGREE/this.scale);
var _cf=Math.abs(_cb.lat-_ca.lat)*(MQA.PIXERSPERLATDEGREE/this.scale);
if(_c5==true){
var _d0=this.getCenterLatLng();
var _d1=Math.max(Math.abs(_d0.lng-_ca.lng),Math.abs(_d0.lng-_cb.lng));
var _d2=Math.max(Math.abs(_d0.lat-_ca.lat),Math.abs(_d0.lat-_cb.lat));
_ce=(_d1*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
_cf=(_d2*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
}
var _d3=(this.bestFitMargin<(this.width/2)&&this.bestFitMargin<(this.height/2)?this.bestFitMargin:Math.round(Math.min(((this.width/2)-1),((this.height/2)-1))));
var _d4=Math.max((this.scale*(_ce/(this.width-(_d3*2)))),(this.scale*(_cf/(this.height-(_d3*2)))));
while(_d4<MQA.SCALES[_cc]&&_cc<=_cd){
_cc++;
}
if(_c5==true){
this._setZoomLevel((_cc-1));
}else{
this.setCenterLatLngZoomLevel(new MQA.PointLL(((_ca.lat+_cb.lat)/2),((_ca.lng+_cb.lng)/2)),(_cc-1));
}
};
MQA.TileMap.prototype.bestFitLL=function(_d5,_d6,_d7,_d8){
if(!_d5.length){
return;
}
if(_d6==null){
_d6=false;
}
if(_d7==null){
_d7=1;
}
if(_d8==null){
_d8=16;
}
var _d9=new MQA.RectLL(_d5[0],_d5[0]);
_d9.setBounds(_d5);
this.zoomToRect(_d9,_d6,_d7,_d8);
};
MQA.TileMap.prototype.getCenter=function(){
var ll=this.getCenterLatLng();
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.setCenter=function(_db,_dc){
if(_dc==null){
this.setCenterLatLng(_db);
}else{
var _dd=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_dd;
this.onZoomStart(evt);
this.updateZoom("off");
this.setCenterLatLngZoomLevel(_db,_dc);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_dd;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
if(this.surface){
this.redrawOverlays();
}
};
MQA.TileMap.prototype.panToLatLng=function(_e0){
var pnt=this.llToPix(_e0);
if((pnt.getX()>-100&&pnt.getX()<this.width+100)||(pnt.getY()>-100&&pnt.getY()<this.height+100)){
this.slideMapToPoint(pnt);
}else{
this.setCenter(_e0);
}
};
MQA.TileMap.prototype.getRolloverWindow=function(){
return this.rolloverwindow;
};
MQA.TileMap.prototype.getInfoWindow=function(){
return this.infowindow;
};
MQA.TileMap.prototype.setInfoTitleHTML=function(_e2){
var _e3=document.createElement("div");
_e3.innerHTML="<div>"+_e2+"</div>";
this.infoWindowTitle=_e3;
};
MQA.TileMap.prototype.setInfoContentHTML=function(_e4){
var _e5=document.createElement("div");
_e5.innerHTML="<div>"+_e4+"</div>";
this.infoWindowContent=_e5;
};
MQA.TileMap.prototype.setInfoTitleElement=function(_e6){
this.infoWindowTitle=_e6;
};
MQA.TileMap.prototype.setInfoContentElement=function(_e7){
this.infoWindowContent=_e7;
};
MQA.TileMap.prototype.openInfoWindow=function(_e8){
this.div.appendChild(this.infowindow.popup);
var _e9=this.getDragOffset();
_e8.x-=_e9.x;
_e8.y-=_e9.y;
this.infowindow.modify(_e8,this.infoWindowTitle,this.infoWindowContent,new MQA.Point(-7,-14));
this.infowindow.setOpenerAndShow(this);
this.onInfoWindowOpen(new MQA.Event("MQA.TileMap.infoWindowOpen"));
};
MQA.TileMap.prototype.setRolloversEnabled=function(_ea){
this.rolloversEnabled=_ea;
};
MQA.TileMap.prototype.getRolloversEnabled=function(){
return this.rolloversEnabled;
};
MQA.TileMap.prototype.enableDragging=function(_eb){
this.disabled=(!_eb==true);
};
MQA.TileMap.prototype.getDragEnabled=function(){
return !this.disabled;
};
MQA.TileMap.prototype.getShapes=function(_ec){
_ec=(typeof (_ec)!="undefined"?_ec:false);
var _ed=new MQA.ShapeCollection;
for(var i=0,j=this._mapShapes.getSize();i<j;i++){
var _f0=this._mapShapes.getAt(i);
var _f1=((_ec&&(_f0 instanceof MQA.Poi))||!_ec);
if(_f1){
_ed.add(_f0,false);
}
}
return _ed;
};
MQA.TileMap.prototype._getAllShapes=function(_f2,_f3){
_f3=(typeof (_f2)!="undefined"?_f3:true);
_f2=(typeof (_f2)!="undefined"?_f2:false);
var _f4=new MQA.ShapeCollection;
var _f5=this.getShapeCollections(true,_f3);
for(var x=0;x<_f5.length;x++){
for(var i=0,j=_f5[x].getSize();i<j;i++){
var _f9=_f5[x].getAt(i);
var _fa=((_f2&&(_f9 instanceof MQA.Poi))||!_f2);
if(_fa){
_f4.add(_f9,false);
}
}
}
return _f4;
};
MQA.TileMap.prototype.getSize=function(){
return new MQA.Size(this.div1.style.width,this.div1.style.height);
};
MQA.TileMap.prototype.setSize=function(_fb){
if(typeof (_fb)=="undefined"){
var _fb={};
}
var w=(typeof (_fb.width)=="undefined")?this.parent2.clientWidth:_fb.width;
var h=(typeof (_fb.height)=="undefined")?this.parent2.clientHeight:_fb.height;
var _fe=new MQA.Size(w,h);
if(_fe.width==this.width&&_fe.height==this.height){
return;
}
if(this.mapLayer.tiles){
this.mapLayer.removeAllTiles();
this.mapLayer.tileLayerDiv=null;
}
if(this.satLayer.tiles){
this.satLayer.removeAllTiles();
this.satLayer.tileLayerDiv=null;
}
if(this.strlblbLayer.tiles){
this.strlblbLayer.removeAllTiles();
this.strlblbLayer.tileLayerDiv=null;
}
var _ff=this.getCenterLatLng();
this.width=parseInt(_fe.width);
this.height=parseInt(_fe.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
this.centerlat=_ff.lat;
this.centerlng=_ff.lng;
this.maprows=Math.ceil(this.height/this.tilesize)+2;
this.mapcols=Math.ceil(this.width/this.tilesize)+2;
this.drag=false;
this.slide=false;
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
var j=this.logos.length;
for(i=0;i<j;i++){
this.setLogoPosition(this.logos[i]);
}
if(this.showOurMaps){
this.div.ldiv.style.width=(this.mapcols*MQA.TILESIZE)+"px";
this.div.ldiv.style.height=(this.maprows*MQA.TILESIZE)+"px";
}
this.sendTransactions();
this.rebuildTiles();
var _101=this.getDeclutter().getDeclutterMode();
if(_101!=0){
this.getDeclutter().setDeclutterMode(0);
this.getDeclutter().setDeclutterMode(_101);
}
this.redrawOverlays();
for(var x=0,y=this.controls.length;x<y;x++){
if(this.controls[x]){
this.placeControl(this.controls[x],true);
}
}
};
MQA.TileMap.prototype.getRectFromMapState=function(_104){
try{
var _105=new MQMapState();
_105=null;
}
catch(e){
throw "The JSAPI must be included to use this function.";
return;
}
if(_104==null){
return;
}
var cLat=parseFloat(_104.getCenter().getLatitude());
var cLng=parseFloat(_104.getCenter().getLongitude());
var _108=_104.getHeightPixels();
var _109=_104.getWidthPixels();
var _10a=_104.getMapScale();
var _10b=(_108/2)/(MQA.PIXERSPERLATDEGREE/_10a);
var _10c=(_109/2)/(MQA.PIXERSPERLNGDEGREE/_10a);
_10b=parseInt(_10b*1000000)/1000000;
_10c=parseInt(_10c*1000000)/1000000;
var ul=new MQA.LatLng(cLat+_10b,cLng-_10c);
var lr=new MQA.LatLng(cLat-_10b,cLng+_10c);
return new MQA.RectLL(ul,lr);
};
MQA.TileMap.prototype.addRouteHighlight=function(_10f,_110,_111,_112,_113,_114,_115){
var _116=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_116;
this.onZoomStart(evt);
this.updateZoom("off");
this.routerect=_10f;
this.rteserver=_110;
if(_111==null){
this.rtesession="";
}else{
this.rtesession=_111.toString();
}
if(this.routerect.ul.lat<this.routerect.lr.lat){
var _118=this.routerect.ul.lat;
this.routerect.ul.lat=this.routerect.lr.lat;
this.routerect.lr.lat=_118;
}
if(this.routerect.ul.lng>this.routerect.lr.lng){
var _119=this.routerect.ul.lng;
this.routerect.ul.lng=this.routerect.lr.lng;
this.routerect.lr.lng=_119;
}
this.showRte=true;
if(_112==null||_112==false){
this.getNewRouteHighlight();
}else{
if(_113==null){
_113=false;
}
if(_114==null){
_114=1;
}
if(_115==null){
_115=16;
}
this.bestFitRoute(_113,_114,_115);
}
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_116;
e.zoom=this.getZoomLevel();
if(e.prevZoom!=e.zoom){
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
};
MQA.TileMap.prototype.removeRouteHighlight=function(){
this.showRte=false;
this.routerect=null;
this.rtehighlight.style.display="none";
this.rtesession="";
};
MQA.TileMap.prototype.getRouteSession=function(){
return this.rtesession;
};
MQA.TileMap.prototype.getBounds=function(){
var ulLL=this.pixToLL(new MQA.Point(0,0));
var lrLL=this.pixToLL(new MQA.Point(this.div1.style.width,this.div1.style.height));
return new MQA.RectLL(ulLL,lrLL);
};
MQA.TileMap.prototype.restoreState=function(){
this.setCenter(this.savedCenter);
this.setZoomLevel(this.savedZoomLevel);
this.setMapType(this.savedMapType);
};
MQA.TileMap.prototype.saveState=function(){
this.savedCenter=this.getCenter();
this.savedZoomLevel=this.getZoomLevel();
this.savedMapType=this.getMapType();
};
MQA.TileMap.prototype.getDeclutter=function(){
return this.mydeclutter;
};
MQA.TileMap.prototype.showDraggableMap=function(){
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.div1.style.zIndex=0;
if(this.staticMapEnabled){
}
if(this.getRouteSession()!=""){
var _11d=(this.bestFitRect!=null)?this.bestFitRect:this.routerect;
this.addRouteHighlight(_11d,this.rteserver,this.getRouteSession(),this.routebestfit);
}
};
MQA.TileMap.prototype.showDragableMap=function(){
this.showDraggableMap();
};
MQA.TileMap.prototype.showStaticMap=function(){
this.div1.style.zIndex=100;
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,-100);
this.setLogoZindex(MQA.MapLogo.SCALES,-100);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,-100);
this.turnEventsOff=true;
var _11e={type:this.getMapType(),size:this.getSize().toString(),scale:this.getScale(),center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_11e.session=this.getRouteSession();
}
if(IsDotCom){
this.getPoiDiv().style.zIndex=-100;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=-100;
}
this.getDeclutter().removeLeaderLines();
_11e.stops=_11e.pois="";
var _11f=this.getPois();
for(var i=0,j=_11f.getSize();i<j;i++){
var _122=_11f.getAt(i);
var _123=(_122.dragLeft==null)?0:((-1*_122.dragLeft)-_122.mqMapIcon.getAnchorOffset().getX());
var _124=(_122.dragTop==null)?0:((-1*_122.dragTop)-_122.mqMapIcon.getAnchorOffset().getY());
switch(_122.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_11e[_122.getKey()]=_122.getLatLng().toString()+","+_123+","+_124;
break;
default:
var _125=_122.getKey().split("-");
switch(_125[0]){
case "stops":
case "pois":
_11e[_125[0]]+=_125[1].toUpperCase()+","+_122.getLatLng().toString()+","+_123+","+_124+"|";
break;
}
break;
}
}
}
var _126=MQA.getStaticMapResources()+"?";
for(var nv in _11e){
_126+=(_11e[nv]!="")?nv+"="+_11e[nv]+"&":"";
}
_126+"rand="+(Math.round((Math.random()*10000)));
if(this.staticMapImg){
var _128=this.staticMapImg.src;
if(_128.split("&rand=")[0]==_126.split("&rand=")[0]){
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
return _128;
}
}
var _129=this.getSize().toString().split(",");
var _12a=this.getStaticMapDiv();
_12a.style.top=(0-this.getDragOffset().y)+"px";
_12a.style.left=(0-this.getDragOffset().x)+"px";
if(!this.staticMapImg){
this.staticMapImg=document.createElement("img");
this.staticMapImg.className="map-static";
this.staticMapImg.style.position="absolute";
this.staticMapImg.style.top="0";
this.staticMapImg.style.left="0";
this.staticMapImg.style.border="none";
this.staticMapImg.style.display="block";
this.staticMapImg.alt="";
_12a.appendChild(this.staticMapImg);
}
this.staticMapImg.style.width=_129[0]+"px";
this.staticMapImg.style.height=_129[1]+"px";
this.staticMapImg.src=_126;
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
};
MQA.TileMap.prototype.hideStaticMap=function(){
if(!this.staticMapEnabled){
return;
}
this.turnEventsOff=false;
if(!(this.mapLayer==null)){
this.showDraggableMap();
}
if(this.staticMapImg){
this.staticMapImg.style.display="none";
this.div1.style.zIndex=0;
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,22);
this.setLogoZindex(MQA.MapLogo.SCALES,22);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,22);
this.getDeclutter().redrawLeaderLines();
}
this.staticMapEnabled=false;
};
MQA.TileMap.prototype.setBestFitMargin=function(_12b){
this.bestFitMargin=_12b;
};
MQA.TileMap.prototype.getBestFitMargin=function(){
return this.bestFitMargin;
};
MQA.TileMap.prototype.dispose=function(){
this.sendTransactions(true);
this.brokerKey=null;
this.infowindow.dispose();
this.infowindow=null;
this.iwparent=MQA.Util._deleteDOMObject(this.iwparent);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow.dispose();
this.rolloverwindow=null;
var _12c;
while(this._mapShapes.getSize()){
_12c=this.getShapes().getAt(0);
this._mapShapes.remove(0);
_12c.dispose(true);
_12c=null;
}
this._mapShapes=null;
if(this.overlaydiv){
if(typeof (MQA.Graphics)!="undefined"){
switch(MQA.Graphics.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Graphics.vmlNamespace=MQA.Util._deleteDOMObject(MQA.Graphics.vmlNamespace);
break;
}
}
this.overlaydiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.overlaydiv);
MQA.Util._deleteDOMObject(this.overlaydiv);
this.overlaydiv=null;
}
this.traffic=null;
this.div.poidiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.poidiv);
MQA.Util._deleteDOMObject(this.div.poidiv);
this.div.poidiv=null;
if(this.surface){
this.surface=MQA.Util._deleteDOMObject(this.surface);
}
if(this.poisurface){
this.poisurface=MQA.Util._deleteDOMObject(this.poisurface);
}
if(this.dcCanvasDiv){
this.dcCanvasDiv=MQA.Util._deleteDOMObject(this.dcCanvasDiv);
}
this.mapShadowTop=MQA.Util._deleteDOMObject(this.mapShadowTop);
this.mapShadowLeft=MQA.Util._deleteDOMObject(this.mapShadowLeft);
this.rtehighlight.onload=null;
MQA._prEvent.stopObserving(document,"mousemove",this.eMouseMove);
MQA._prEvent.stopObserving(document,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(document,"mouseout",this.eMouseOut);
MQA._prEvent.stopObserving(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.parent,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.div1,"click",this.eClick);
MQA._prEvent.stopObserving(this.div1,"dblclick",this.eDoubleClick);
this.eMouseMove=null;
this.eMouseUp=null;
this.eMouseOut=null;
this.eMouseOver=null;
this.eMouseDown=null;
this.eClick=null;
this.eDoubleClick=null;
for(var ci=0;ci<this.controls.length;ci++){
if(typeof (this.controls[ci]!="undefined")&&this.controls[ci]!=null){
this.controls[ci].dispose();
this.controls[ci]=null;
}
}
for(var i=0;i<this.logos.length;i++){
this.logos[i].src="";
if(i==1){
this.logos[i].innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.logos[i]);
}
MQA.Util._deleteDOMObject(this.logos[i]);
this.logos[i]=null;
}
this.logos=null;
this.loading=MQA.Util._deleteDOMObject(this.loading);
this.maptiler=MQA.Util._deleteDOMObject(this.maptiler);
this.hybtiler=MQA.Util._deleteDOMObject(this.hybtiler);
this.sattiler=MQA.Util._deleteDOMObject(this.sattiler);
this.rtehighlight=MQA.Util._deleteDOMObject(this.rtehighlight);
this.satLayer.dispose();
this.satLayer=null;
this.strlblbLayer.dispose();
this.strlblbLayer=null;
this.mapLayer.dispose();
this.mapLayer=null;
var TL;
for(var i=0;i<this.tileLayers.getSize();i++){
TL=this.tileLayers.getAt(i);
TL.dispose();
TL=null;
}
this.tileLayers=null;
this.prnstyle=MQA.Util._deleteDOMObject(this.prnstyle);
if(this.showOurMaps){
this.div.ldiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.ldiv);
MQA.Util._deleteDOMObject(this.div.ldiv);
this.div.ldiv=null;
}
this.div.staticmapdiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.staticmapdiv);
MQA.Util._deleteDOMObject(this.div.staticmapdiv);
this.div.staticmapdiv=null;
this.div.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div);
MQA.Util._deleteDOMObject(this.div);
this.div=null;
this.div1.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div1);
MQA.Util._deleteDOMObject(this.div1);
this.div1=null;
this.parent.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.parent);
MQA.Util._nukeChildren(this.parent);
this.parent=null;
MQA.Util._nukeChildren(this.parent2);
this.parent2=null;
MQA.Util._purge(this);
};
MQA.TileMap.prototype.getZoom=function(RECT,_131,_132,_133,_134,SIZE){
var SIZE=(typeof (SIZE)!="undefined")?SIZE:this.getSize();
if(_132==null){
_132=false;
}
if(_133==null){
_133=1;
}else{
_133=parseInt(_133);
if(_133<1||_133>15){
_133=1;
}
}
if(_134==null){
_134=16;
}else{
_134=parseInt(_134);
if(_134<1||_134>16){
_134=16;
}
if(_134<_133){
_134=_133+1;
}
}
var zoom=_133;
var _137=_134;
var _138=new MQA.PointFloatXY((RECT.ul.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.ul.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _139=new MQA.PointFloatXY((RECT.lr.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.lr.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13a=new MQA.PointLL(RECT.ul.lat,RECT.ul.lng);
var _13b=new MQA.PointLL(RECT.lr.lat,RECT.lr.lng);
var _13c=Math.abs(_13b.lng-_13a.lng)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]);
var _13d=Math.abs(_13b.lat-_13a.lat)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]);
if(_132==true){
var ptXY=new MQA.PointFloatXY((_131.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(_131.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13f=Math.max(Math.abs(ptXY.x-_138.x),Math.abs(ptXY.x-_139.x));
var _140=Math.max(Math.abs(ptXY.y-_138.y),Math.abs(ptXY.y-_139.y));
_13c=_13f*2;
_13d=_140*2;
}
var _141=(this.bestFitMargin<(SIZE.width/2)&&this.bestFitMargin<(SIZE.height/2)?this.bestFitMargin:Math.round(Math.min(((SIZE.width/2)-1),((SIZE.height/2)-1))));
var _142=Math.max((MQA.SCALES[zoom]*(_13c/(SIZE.width-(_141*2)))),(MQA.SCALES[zoom]*(_13d/(SIZE.height-(_141*2)))));
if(_142>MQA.SCALES[zoom]){
return zoom;
}
while(_142<MQA.SCALES[zoom]&&zoom<=_137){
zoom++;
}
return zoom-1;
};
MQA.TileMap.prototype.rebuildTiles=function(_143){
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.m_centerX=MQA.getColTile(this.centerlng,this.scale);
this.m_centerY=MQA.getRowTile(this.centerlat,this.scale);
this.m_offsetX=MQA.getColTileOffset(this.centerlng,this.scale);
this.m_offsetY=this.tilesize-MQA.getRowTileOffset(this.centerlat,this.scale);
this.m_intoffX=Math.floor(this.m_offsetX);
this.m_intoffY=Math.floor(this.m_offsetY);
this.m_layoffX=parseInt(this.width/2)-this.m_intoffX;
this.m_layoffY=parseInt(this.height/2)-this.m_intoffY;
this.m_shiftX=0;
this.m_shiftY=0;
while(this.m_layoffX<0){
this.m_layoffX+=this.tilesize;
this.m_shiftX--;
this.m_centerX++;
}
while(this.m_layoffY<0){
this.m_layoffY+=this.tilesize;
this.m_shiftY--;
this.m_centerY--;
}
while(this.m_layoffX>2*this.tilesize){
this.m_layoffX-=this.tilesize;
this.m_shiftX++;
this.m_centerX--;
}
while(this.m_layoffY>2*this.tilesize){
this.m_layoffY-=this.tilesize;
this.m_shiftY++;
this.m_centerY++;
}
this.m_tileofX=this.m_layoffX;
this.m_tileofY=this.m_layoffY;
while(this.m_tileofX>this.tilesize){
this.m_tileofX-=this.tilesize;
}
while(this.m_tileofY>this.tilesize){
this.m_tileofY-=this.tilesize;
}
this.m_dragoffX=0;
this.m_dragoffY=0;
this.m_tileoffX=0;
this.m_tileoffY=0;
this.m_routeoffX=0;
this.m_routeoffY=0;
this.m_transoffX=0;
this.m_transoffY=0;
this.m_scrollofX=0;
this.m_scrollofY=0;
this.diffaccum=0;
this.div.lt=0;
this.div.tp=0;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
_143=(typeof (_143)=="undefined")?false:_143;
if((this.mapLayer.tiles==null)&&(this.satLayer.tiles==null)&&(this.strlblbLayer.tiles==null)&&(this.showOurMaps)){
if(this.tileMode==MQA.MAP_TYPE.MAP){
this.addTileLayer(this.mapLayer);
}
if(this.tileMode==MQA.MAP_TYPE.SAT){
this.addTileLayer(this.satLayer);
}
if(this.tileMode==MQA.MAP_TYPE.HYB){
this.addTileLayer(this.satLayer);
this.addTileLayer(this.strlblbLayer);
}
}else{
if(this.satLayer.tiles){
this.satLayer.isViewableTilesDrawn=false;
this.satLayer.isLayerDrawn=false;
}
if(this.strlblbLayer.tiles){
this.strlblbLayer.isViewableTilesDrawn=false;
this.strlblbLayer.isLayerDrawn=false;
}
if(this.mapLayer.tiles){
this.mapLayer.isViewableTilesDrawn=false;
this.mapLayer.isLayerDrawn=false;
}
for(var x=0;x<this.tileLayers.getSize();x++){
this.tileLayers.getAt(x).setAllLoadingTiles();
}
for(var x=0;x<this.tileLayers.getSize();x++){
if(x==0&&this.satLayer.tiles&&this.showOurMaps){
if(this.satLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x==1&&this.strlblbLayer.tiles&&this.showOurMaps){
if(this.strlblbLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x==2&&this.mapLayer.tiles&&this.showOurMaps){
if(this.mapLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x>2){
this.tileLayers.getAt(x).rebuildTiles();
}
}
}
if(this.showOurMaps){
var tp=0;
var lt=0;
if(this.mapLayer.tiles){
tp=this.mapLayer.tiles[0][0].x;
lt=this.mapLayer.tiles[0][0].y;
}else{
if(this.satLayer.tiles){
tp=this.satLayer.tiles[0][0].x;
lt=this.satLayer.tiles[0][0].y;
}else{
if(this.strlblbLayer.tiles){
tp=this.strlblbLayer.tiles[0][0].x;
lt=this.strlblbLayer.tiles[0][0].y;
}
}
}
this.div.ldiv.tp=tp;
this.div.ldiv.lt=lt;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
this.logos[MQA.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(this.logos[MQA.LOGO_MQ_SCALES].height))+"px";
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[MQA.MAPVENDORS[this.zoom]];
if(this.mapLayer.visible){
this.mapaccum1+=1;
this.mapaccum2+=1;
}
if(this.satLayer.visible){
this.sataccum1+=1;
this.sataccum2+=1;
}
if(this.strlblbLayer.visible){
this.hybaccum1+=1;
this.hybaccum2+=1;
}
if(this.showRte){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
if(!_143&&this._getAllShapes(true).getSize()!=0){
this.updatePois();
}
};
MQA.TileMap.prototype.setLogoPosition=function(LOGO){
var LEFT;
var TOP;
if(LOGO.corner==MQA.CORNER_TOPLEFT){
LEFT=0;
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_TOPRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMLEFT){
LEFT=0;
TOP=this.height-parseInt(LOGO.height);
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=this.height-parseInt(LOGO.height);
}
}
}
}
LEFT+=LOGO.offset.x;
TOP+=LOGO.offset.y;
LOGO.style.left=LEFT+"px";
LOGO.style.top=TOP+"px";
};
MQA.TileMap.prototype.sendTransactions=function(_14a){
if(this.showOurMaps){
if(this.mapLayer.visible&&this.mapaccum1>0){
this.maptiler.src="http://"+LOGSERVER+"/tilelog/transaction?transaction=log&t=m&c="+(parseInt(this.mapaccum1*1000000)/1000000)+"&c2="+(parseInt(this.mapaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.mapaccum1=0;
this.mapaccum2=0;
}
if(this.satLayer.visible&&this.sataccum1>0){
this.sattiler.src="http://"+LOGSERVER+"/tilelog/transaction?transaction=log&t=a&c="+(parseInt(this.sataccum1*1000000)/1000000)+"&c2="+(parseInt(this.sataccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.sataccum1=0;
this.sataccum2=0;
}
if(this.strlblbLayer.visible&&this.hybaccum1>0){
this.hybtiler.src="http://"+LOGSERVER+"/tilelog/transaction?transaction=log&t=h&c="+(parseInt(this.hybaccum1*1000000)/1000000)+"&c2="+(parseInt(this.hybaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.hybaccum1=0;
this.hybaccum2=0;
}
}
this.m_transoffX=0;
this.m_transoffY=0;
if(_14a!=null&&_14a==true){
MQA.Util.pause(250);
}
};
MQA.TileMap.prototype.getNewRouteHighlight=function(){
var _14b=MQA.getRowTile(this.routerect.ul.lat,this.scale);
var _14c=MQA.getColTile(this.routerect.ul.lng,this.scale);
var _14d=MQA.getRowTile(this.routerect.lr.lat,this.scale);
var _14e=MQA.getColTile(this.routerect.lr.lng,this.scale);
this.rteoffset=-1;
this.rtethresh=2;
if(this.mapLayer==null){
this.rebuildTiles();
}
var _14f=0;
var _150=0;
var _151=this.getCurrentTileLayer();
_14f=_151.tiles[0][0];
_150=_151.tiles[this.mapcols-1][this.maprows-1];
if(_14c>_14f.gridColumn&&_14b<_14f.gridRow&&_14e<_150.gridColumn&&_14d>_150.gridRow){
this.rteoffset=0;
this.rtethresh=-1;
_14f=_151.tiles[_14c-_14f.gridColumn][_14f.gridRow-_14b];
_150=_151.tiles[this.mapcols-1-(_150.gridColumn-_14e)][this.maprows-1-(_14d-_150.gridRow)];
}
var _152=MQA.getLatTileRowOffset(_14f.gridRow+this.rteoffset*-1,255,this.scale);
var _153=MQA.getLngTileColOffset(_14f.gridColumn-1+this.rteoffset*1,255,this.scale);
var _154=MQA.getLatTileRowOffset(_150.gridRow-1+this.rteoffset*1,255,this.scale);
var _155=MQA.getLngTileColOffset(_150.gridColumn+this.rteoffset*-1,255,this.scale);
var WDTH=(1+(_150.gridColumn+this.rteoffset*-1)-(_14f.gridColumn+this.rteoffset*1))*this.tilesize;
var HGHT=(1+(_14f.gridRow+this.rteoffset*-1)-(_150.gridRow+this.rteoffset*1))*this.tilesize;
this.m_routeoffX=0;
this.m_routeoffY=0;
if(this.zoom<3&&_153>0&&this.centerlng<0){
_153-=360;
}
var _158=!((_153>this.routerect.lr.lng)||(_155<this.routerect.ul.lng)||(_154>this.routerect.ul.lat)||(_152<this.routerect.lr.lat));
if(this.rteoffset==0||_158){
this.rtehighlight.lt=(_14f.x+this.rteoffset*this.tilesize+1);
this.rtehighlight.tp=(_14f.y+this.rteoffset*this.tilesize+1);
this.rtehighlight.style.left=this.rtehighlight.lt+"px";
this.rtehighlight.style.top=this.rtehighlight.tp+"px";
this.rtehighlight.style.width=WDTH+"px";
this.rtehighlight.style.height=HGHT+"px";
if(this.rtesession.length>0){
var CLAT=(_152+_154)/2;
var CLNG=(_153+_155)/2;
this.rtehighlight.src=this.rteserver+"/?e=0&GetMapFromUpdatedSession.1=1280:"+this.rtesession+",1270:2,1190:,rtehl,"+CLAT+","+CLNG+","+(WDTH/72)+","+(HGHT/72)+","+this.scale+",1050:6,nodata,1062:1537,,,Visible+False,1062:1577,,,Visible+False,1062:1578,,,Visible+False,1062:764,,,Visible+False,1062:1279,,,polygon+brush+style+solid+color+224%2c224%2c224,1062:765,,,Visible+True+Line+Pen+Style+Solid+Size+150+Color+4%2c4%2c215+Opacity+255+CasePen+Style+Solid+Size+210+Color+255%2c255%2c255+Opacity+255,1650.1:77,72,1,1400.2:,,,"+"&rand="+Math.floor(Math.random()*99991);
}else{
this.rtehighlight.src=this.rteserver+"&latul="+_152+"&lngul="+_153+"&latlr="+_154+"&lnglr="+_155+"&width="+WDTH+"&height="+HGHT+"&scale="+this.scale+"&rand="+Math.floor(Math.random()*99991);
}
}
};
MQA.TileMap.prototype.showRouteHighlight=function(){
this.rtehighlight.style.display="block";
};
MQA.TileMap.prototype.scrollMap=function(SX,SY){
this.moving=true;
if(SX!=0||SY!=0){
this.handleMove("move");
}
if((SX!=0||SY!=0)&&this.drag){
this.handleDrag("drag");
}
this.m_dragoffX+=SX;
this.m_dragoffY+=SY;
this.m_tileoffX+=SX;
this.m_tileoffY+=SY;
this.m_scrollofX+=SX;
this.m_scrollofY+=SY;
this.div.lt=this.div.lt+SX;
this.div.tp=this.div.tp+SY;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
var y=this.tileLayers.getSize();
for(var x=0;x<y;x++){
if(this.tileLayers.getAt(x).visible){
this.tileLayers.getAt(x).scrollLayer();
}
}
var _15f=0;
while(this.m_tileoffX+this.m_tileofX>MQA.TILESIZE){
this.m_tileoffX-=this.tilesize;
this.m_routeoffX--;
this.m_transoffX--;
_15f+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt-=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffX+this.m_tileofX<0){
this.m_tileoffX+=this.tilesize;
this.m_routeoffX++;
this.m_transoffX++;
_15f+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt+=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffY+this.m_tileofY>MQA.TILESIZE){
this.m_tileoffY-=this.tilesize;
this.m_routeoffY--;
this.m_transoffY--;
_15f+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp-=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
while(this.m_tileoffY+this.m_tileofY<0){
this.m_tileoffY+=this.tilesize;
this.m_routeoffY++;
this.m_transoffY++;
_15f+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp+=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
if(this.m_dragoffX>1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX-=MQA.MODS[this.zoom]*this.tilesize;
}
if(this.m_dragoffX<-1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX+=MQA.MODS[this.zoom]*this.tilesize;
}
if(_15f>0){
_15f=_15f/((this.mapcols-2)*(this.maprows-2)*9);
if(this.mapLayer.visible){
this.mapaccum1+=_15f;
}
if(this.satLayer.visible){
this.sataccum1+=_15f;
}
if(this.strlblbLayer.visible){
this.hybaccum1+=_15f;
}
}
if(Math.abs(this.m_transoffY)>4||Math.abs(this.m_transoffX)>4){
this.sendTransactions();
}
var _160=Math.abs(this.m_dragoffX)%MQA.SURFACE_OFFSET;
var _161=Math.abs(this.m_dragoffY)%MQA.SURFACE_OFFSET;
var _162=Math.ceil(MQA.SURFACE_OFFSET/1.5);
if((_160>_162)&&this.updateOverlaysX){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysX=false;
}
if((_161>_162)&&this.updateOverlaysY){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysY=false;
}
if(_160<_162&&!this.updateOverlaysX){
this.updateOverlaysX=true;
}
if(_161<_162&&!this.updateOverlaysY){
this.updateOverlaysY=true;
}
if(this.showRte&&(this.rtethresh>0)&&(this.m_routeoffY>=this.rtethresh||this.m_routeoffY<=this.rtethresh*-1||this.m_routeoffX>=this.rtethresh||this.m_routeoffX<=this.rtethresh*-1)){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
};
MQA.TileMap.prototype.slideMapTimer=function(_163,_164,_165,_166,_167,_168,_169,_16a){
var pc=_168/_169;
var dx=parseInt(pc*_166)-_164;
var dy=parseInt(pc*_167)-_165;
this.scrollMap(dx,dy);
_164+=dx;
_165+=dy;
_168++;
if(_168<=_169){
setTimeout("MQA.MASTER_BROKER.DoSlide( "+_163+", "+_164+", "+_165+", "+_166+", "+_167+", "+_168+", "+_169+", "+_16a+" );",_16a);
}else{
this.slide=false;
this.moving=false;
this.handleMove("moveend");
}
};
MQA.TileMap.prototype.isPoi=function(_16e){
if(this._mapShapes.getSize()==0){
return false;
}
return (_16e instanceof MQA.Poi);
};
MQA.TileMap.prototype.onMouseMove=function(_16f){
if(this.startingToMove){
this.startingToMove=false;
this.handleMove("movestart");
}
if(this.startingToDrag){
this.startingToDrag=false;
this.handleDrag("dragstart");
}
this.click=false;
if(this.draggedObject){
this.draggedObject.shape.style.left=this.draggedObject.shapeStartX+(_16f.clientX-this.draggedObject.mouseStartX)+"px";
this.draggedObject.shape.style.top=this.draggedObject.shapeStartY+(_16f.clientY-this.draggedObject.mouseStartY)+"px";
if(this.draggedObject.mqrw&&!this.draggedObject.mqrw.isHidden()&&(Math.abs(this.draggedObject.mouseStartX-_16f.clientX)>3||Math.abs(this.draggedObject.mouseStartY-_16f.clientY)>3)&&!this.getDeclutter().keepRolloversOnDrag){
this.draggedObject.mqrw.hide();
}
}
if(!this.drag||this.disabled){
return;
}
var _170=MQA.Util.getParentOffset(this.parent);
var cx=_16f.clientX-_170.x;
var cy=_16f.clientY-_170.y;
var gx=parseInt(this.width/2)-cx;
var gy=parseInt(this.height/2)-cy;
this.lastlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.lastlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
var difX=cx-this.lastX;
var difY=cy-this.lastY;
this.lastX=cx;
this.lastY=cy;
this.scrollMap(difX,difY);
};
MQA.TileMap.prototype.onMouseUp=function(_177){
var _178=(this.getDeclutter()?this.getDeclutter().getDeclutterablePois():new MQA.ShapeCollection());
var _179=(this.getDeclutter()?this._getAllShapes(true):new MQA.ShapeCollection());
if(this.draggedObject&&_179.contains(this.draggedObject)&&this.draggedObject.isDragging){
this.draggedObject.mqrw.hide();
this.draggedObject.finishDrag();
}
if(!this.drag||this.disabled){
return;
}
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
if(!this.click){
var xdif=Math.abs(this.m_scrollofX-this.startX);
var ydif=Math.abs(this.m_scrollofY-this.startY);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _17c=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_17c){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_17c){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_17c){
this.hybaccum2+=1;
this.diffaccum=0;
}
}
var _17d=MQA.Util.getParentOffset(this.parent);
_177.cx=_177.clientX-_17d.x;
_177.cy=_177.clientY-_17d.y;
this.startingToMove=false;
if(this.moving){
this.moving=false;
this.handleMove("moveend");
}
this.startingToDrag=false;
if(this.drag&&!this.click){
this.handleDrag("dragend",_177);
}
this.handleMouse("mouseup",_177);
MQA._prEvent.stop(_177);
this.drag=false;
};
MQA.TileMap.prototype.onMouseOver=function(_17e){
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onMouseDown=function(_17f){
this.click=true;
if(this.slide||this.disabled){
return;
}
if(this.isPoi(MQA._prEvent.element(_17f))){
return;
}
var _180=MQA.Util.getParentOffset(this.parent);
this.current_mousecursor=this.grabbing_mousecursor;
this.div.style.cursor=this.current_mousecursor;
var cx=_17f.clientX-_180.x;
var cy=_17f.clientY-_180.y;
this.startX=this.m_scrollofX;
this.startY=this.m_scrollofY;
this.lastX=cx;
this.lastY=cy;
this.drag=true;
this.startingToMove=true;
this.startingToDrag=true;
_17f.cx=cx;
_17f.cy=cy;
this.handleMouse("mousedown",_17f);
MQA._prEvent.stop(_17f);
};
MQA.TileMap.prototype.onMouseOut=function(_183){
if(!_183.relatedTarget&&!_183.toElement){
this.onMouseUp(_183);
}
};
MQA.TileMap.prototype.onDblClick=function(_184){
this.handleClickEvent(_184,false);
};
MQA.TileMap.prototype.handleClickEvent=function(_185,_186){
if(this.drag||this.slide||(!this.click&&_186)){
return;
}
this.click=false;
this.div.style.cursor="default";
var _187=MQA.Util.getParentOffset(this.parent);
var cx=(_185.pageX||(_185.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-_187.x;
var cy=(_185.pageY||(_185.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-_187.y;
if(this.clickOper==MQA.OPER_RECENTER||this.zoom==16){
this.slideMapToPoint(new MQA.PointXY(cx,cy));
}else{
var ptLL=this.getXYToLL(new MQA.PointXY(cx,cy));
this.setCenterLatLngZoomLevel(ptLL,this.zoom+1);
}
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onWheelMouse=function(_18b){
if(this.drag){
return;
}
if(_18b.wheelDelta>0&&this.zoom<16){
this.zoomIn();
}
if(_18b.wheelDelta<0&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.onKeyDown=function(_18c){
if(this.drag){
return;
}
key=_18c.which?_18c.which:_18c.keyCode;
if(key==107&&this.zoom<16){
this.zoomIn();
}
if(key==109&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.slideMapByOffset=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
this.slide=true;
var _18e=PTXY.x,_18f=PTXY.y,_190=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_190,0,0,_18e,_18f,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(PTXY.x);
var ydif=Math.abs(PTXY.y);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _193=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_193){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_193){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_193){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.slideMapToPoint=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
var gx=parseInt(this.width/2)-PTXY.x;
var gy=parseInt(this.height/2)-PTXY.y;
this.slide=true;
var _197=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_197,0,0,gx,gy,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(gx);
var ydif=Math.abs(gy);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _19a=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_19a){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_19a){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_19a){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.panNorth=function(_19b){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)-parseInt(this.height*(_19b/100))));
};
MQA.TileMap.prototype.panSouth=function(_19c){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)+parseInt(this.height*(_19c/100))));
};
MQA.TileMap.prototype.panEast=function(_19d){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_19d/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panWest=function(_19e){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_19e/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panNorthWest=function(_19f){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_19f/100)),parseInt(this.height/2)-parseInt(this.height*(_19f/100))));
};
MQA.TileMap.prototype.panSouthWest=function(_1a0){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a0/100)),parseInt(this.height/2)+parseInt(this.height*(_1a0/100))));
};
MQA.TileMap.prototype.panNorthEast=function(_1a1){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a1/100)),parseInt(this.height/2)-parseInt(this.height*(_1a1/100))));
};
MQA.TileMap.prototype.panSouthEast=function(_1a2){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a2/100)),parseInt(this.height/2)+parseInt(this.height*(_1a2/100))));
};
MQA.TileMap.prototype.setCenterLatLng=function(LL){
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterLatLngZoomLevel=function(LL,ZOOM){
ZOOM=parseInt(ZOOM);
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
if(ZOOM<1){
ZOOM=1;
}
if(ZOOM>16){
ZOOM=16;
}
this.zoom=ZOOM;
this.scale=MQA.SCALES[ZOOM];
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterXY=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
this.centerlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.centerlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX+this.m_dragoffX-gx,this.scale);
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.getCenterLatLng=function(){
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX,this.scale);
return ll;
};
MQA.TileMap.prototype.getLLToXY=function(LL){
var xy=new MQA.PointXY(0,0);
var _1ac=MQA.getColTile(LL.lng,this.scale);
var _1ad=MQA.getRowTile(LL.lat,this.scale);
var _1ae=MQA.getColTileOffset(LL.lng,this.scale);
var _1af=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_1ac)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_1ae);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_1ad)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_1af);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
};
MQA.TileMap.prototype.getXYToLL=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
return ll;
};
MQA.TileMap.prototype.updatePois=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _1b4=this.getZoomLevel();
var _1b5=this.getShapeCollections(true,true);
for(var x=0;x<_1b5.length;x++){
var _1b7=_1b5[x];
if(_1b7.getAt(0)&&!(_1b7.getAt(0).map)){
continue;
}
var j=_1b7.getSize();
for(var i=0;i<j;i++){
var _1ba=_1b7.getAt(i);
if(_1ba instanceof MQA.Poi){
var _1bb=(_1b4>=_1ba.minZoomLevel&&_1b4<=_1ba.maxZoomLevel);
var _1bc=_1ba.getValue("visible");
_1ba.setValue("visible",_1bb);
_1ba.visible=_1bc;
var _1bd=_1ba._getCurrentInfo();
var xy=this.llToPix(_1ba.getValue("latLng"));
_1ba.shape.style.left=(xy.x+_1bd.offset.x)+"px";
_1ba.shape.style.top=(xy.y+_1bd.offset.y)+"px";
}
}
}
};
MQA.TileMap.prototype.updateShapeCollections=function(){
var _1bf=this.getShapeCollections(false,true);
var _1c0=this.getZoomLevel();
for(var i=0;i<_1bf.length;i++){
if(_1bf[i].getMinZoomLevel()>_1c0||_1bf[i].getMaxZoomLevel()<_1c0){
if(!this.getInfoWindow().isHidden()){
this.infowindow.hide();
}
var _1c2=this.getDeclutter().getDeclutterMode();
if(_1c2!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1bf[i].getSize();k++){
if(!(_1bf[i].getAt(k).isOnMap())){
continue;
}
this.removeShape(_1bf[i].getAt(k),false);
}
if(_1c2!=0){
this.getDeclutter().setDeclutterMode(_1c2);
}
}else{
var _1c2=this.getDeclutter().getDeclutterMode();
if(_1c2!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1bf[i].getSize();k++){
this.addShape(_1bf[i].getAt(k),false);
}
if(_1c2!=0){
this.getDeclutter().setDeclutterMode(_1c2);
}
}
}
};
MQA.TileMap.prototype.getLoadingDiv=function(){
return this.div.ldiv;
};
MQA.TileMap.prototype.getStaticMapDiv=function(){
return this.div.staticmapdiv;
};
MQA.TileMap.prototype.getOverlayDiv=function(){
return this.div.overlaydiv;
};
MQA.TileMap.prototype.getPoiDiv=function(){
return this.div.poidiv;
};
MQA.TileMap.prototype.bestFitRoute=function(_1c4,_1c5,_1c6){
if(this.routerect){
if(_1c4==null){
_1c4=false;
}
if(_1c5==null){
_1c5=1;
}
if(_1c6==null){
_1c6=16;
}
this._bestFit(this.routerect,_1c4,_1c5,_1c6);
}
};
MQA.TileMap.prototype.addShapeCollection=function(_1c7){
_1c7.map=this;
this._shapeCollections.push(_1c7);
var _1c8=this.getZoomLevel();
if(_1c8>_1c7.getMaxZoomLevel()||_1c8<_1c7.getMinZoomLevel()){
return;
}
var _1c9=0;
if(this.getDeclutter()&&_1c7.getSize()>0){
_1c9=this.getDeclutter().getDeclutterMode();
if(_1c9!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1c7.getSize();i++){
this.addShape(_1c7.getAt(i),false);
}
if(_1c9!=0){
this.getDeclutter().setDeclutterMode(_1c9);
}
};
MQA.TileMap.prototype.removeShapeCollection=function(_1cb){
var _1cc=this.getShapeCollection(_1cb);
if(_1cc){
var _1cd=0;
if(this.getDeclutter()&&_1cc.getSize()>0){
_1cd=this.getDeclutter().getDeclutterMode();
if(_1cd!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1cc.getSize();i++){
var _1cf=false;
for(var x=0;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(_1cc.getAt(i))&&this._shapeCollections[x].guid!=_1cc.guid){
_1cf=true;
break;
}
}
if(!_1cf){
this.removeShape(_1cc.getAt(i),false);
}
}
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].guid==_1cc.guid){
this._shapeCollections.splice(i,1);
break;
}
}
_1cc.map=null;
if(_1cd!=0){
this.getDeclutter().setDeclutterMode(_1cd);
}
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.replaceShapeCollection=function(_1d1,_1d2){
var _1d3=this.getShapeCollection(_1d2);
if(_1d3){
this.removeShapeCollection(_1d2);
this.addShapeCollection(_1d1);
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.getShapeCollection=function(_1d4){
var _1d5=null;
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName()==_1d4){
_1d5=this._shapeCollections[i];
break;
}
}
return _1d5;
};
MQA.TileMap.prototype.getShapeCollections=function(_1d7,_1d8){
var _1d7=(typeof (_1d7)=="undefined"?false:_1d7);
var _1d8=(typeof (_1d8)=="undefined"?false:_1d8);
var _1d9=(_1d7?0:1);
var _1da=[];
for(var i=_1d9;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1d8){
_1da.push(this._shapeCollections[i]);
}
}
return _1da;
};
MQA.TileMap.prototype.getShapeCollectionNames=function(_1dc,_1dd){
var _1dc=(typeof (_1dc)=="undefined"?false:_1dc);
var _1dd=(typeof (_1dd)=="undefined"?false:_1dd);
var _1de=(_1dc?0:1);
var _1df=[];
for(var i=_1de;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1dd){
_1df.push(this._shapeCollections[i].getName());
}
}
return _1df;
};
MQA.TileMap.prototype.getShapeCollectionCount=function(_1e1,_1e2){
var _1e3;
var _1e1=(typeof (_1e1)=="undefined"?false:_1e1);
var _1e2=(typeof (_1e2)=="undefined"?false:_1e2);
_1e3=this.getShapeCollectionNames(_1e1,_1e2).length;
return _1e3;
};
MQA.TileMap.prototype.getShapeByKey=function(key){
var _1e5=false;
for(var x=0;x<this._shapeCollections.length;x++){
for(var i=0;i<this._shapeCollections[x].getSize();i++){
if(key==this._shapeCollections[x].getAt(i).getValue("key")){
_1e5=this._shapeCollections[x].getAt(i);
break;
}
}
if(_1e5){
break;
}
}
if(_1e5){
return _1e5;
}else{
return false;
}
};
MQA.TileMap.prototype.setMapShadowState=function(b){
if(b){
this.mapShadowLeft.style.display="block";
this.mapShadowTop.style.display="block";
}else{
this.mapShadowLeft.style.display="none";
this.mapShadowTop.style.display="none";
}
};
MQA.TileMap.prototype.getMapShadowState=function(){
return (this.mapShadowLeft.style.display=="block");
};
MQA.TileMap.prototype.getByKey=function(key,_1ea){
var _1eb=null;
var _1ea=(typeof (_1ea)=="undefined"?false:_1ea);
var _1ec=this.getShapeCollections(true,_1ea);
for(var i=0;i<_1ec.length;i++){
for(var k=0;k<_1ec[i].getSize();k++){
if(_1ec[i].getAt(k).getValue("key")==key){
_1eb=_1ec[i].getAt(k);
break;
}
}
if(_1eb){
break;
}
}
return _1eb;
};
MQA.TileMap.prototype.addPoi=function(poi){
this.addShape(poi);
};
MQA.TileMap.prototype.removePoi=function(poi){
this.removeShape(poi);
};
MQA.TileMap.prototype.addOverlay=function(_1f1){
this.addShape(_1f1);
};
MQA.TileMap.prototype.removeOverlay=function(_1f2){
this.removeShape(_1f2);
};
MQA.TileMap.prototype.getCurrentTileLayer=function(){
if(this.tileMode==MQA.MAP_TYPE.MAP){
return this.mapLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.SAT){
return this.satLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.HYB){
return this.strlblbLayer;
}
}
}
};

MQA.BaseTile=function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
this.parent=_1;
this.size=_8;
this.gridColumn=_4;
this.gridRow=_5;
this.x=_2;
this.y=_3;
this.opacity=_9;
this.scale=_6;
this.zoom=_7;
this.isDrawing=false;
this.isDrawn=false;
this.isLoading=false;
this.eTileDrawn=MQA._prEvent.EventCallback(this,"onTileDrawn");
this.getUrl=function(){
};
this.draw=function(){
},this.show=function(){
},this.hide=function(){
},this.updateTile=function(_a,_b,_c,_d,_e,_f){
},this.isPng=function(){
return false;
},this.loadingTile=function(){
},this.dispose=function(){
};
this.onTileDrawn=function(){
};
};
MQA.ImageTile=function(_10,_11,top,_13,_14,_15,_16,_17,_18,_19){
MQA.BaseTile.call(this,_10,_11,top,_13,_14,_15,_16,_17,_18,_19);
this.tileImageImg=null;
this.visible=true;
this.isVisible=function(){
return this.visible;
};
this.setVisible=function(_1a){
this.visible=_1a;
};
this._setShowing=function(){
if(this.visible){
this.show();
}else{
this.hide();
}
};
this._createImageObject=function(url){
this.tileImageImg.image=MQA.Util.createImage(url,this.x,this.y,this.size,this.size,0);
this.tileImageImg.image.onload=MQA._prEvent.hitch(this,"_setShowing");
this.tileImageImg.image.id="tileImg";
MQA._prEvent.observe(this.tileImageImg.image,"load",this.eTileDrawn);
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src="http://img.mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='scale') ";
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
this.parent.tileLayerDiv.appendChild(this.tileImageImg.image);
this.hide();
};
this.loadingTile=function(){
this.isLoading=true;
var _1c="http://img.mqcdn.com/a/a";
if(!this.tileImageImg){
this._createImageObject(_1c);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_1c;
}
};
this.draw=function(){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
if(this.tileImageImg==null){
this.tileImageImg=new MQA.Image();
}
var _1d=this.getUrl();
var _1e=((this.parent.tileId==MQA.TILE_LAYER_ID.SAT)||(this.parent.tileId==MQA.TILE_LAYER_ID.HYB)||(this.parent.tileId==MQA.TILE_LAYER_ID.MAP))?true:false;
if(this.tileImageImg.image==null){
this._createImageObject(_1d);
}else{
this.tileImageImg.image.src=_1d;
if(this.tileImageImg.image.style.opacity!=this.opacity){
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src="http://img.mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_1d+"', sizingMethod='scale') ";
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
}
}
if(MQA.browser.name=="msie"){
this._setShowing();
}
};
this.dispose=function(){
MQA._prEvent.stopObserving(this.tileImageImg.image,"load",this.eTileDrawn);
this.tileImageImg.image.onload=null;
this.tileImageImg.image=MQA.Util._deleteDOMObject(this.tileImageImg.image);
this.tileImageImg.innerHTML=null;
this.tileImageImg=null;
this.parent=null;
};
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
this.visible=true;
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
this.visible=false;
};
this.updateTile=function(_1f,top,_21,_22,_23,_24){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
var _25=parseInt(_21/1000);
var _26=parseInt(_22/1000);
this.x=_1f;
this.y=top;
this.gridColumn=_21;
this.gridRow=_22;
this.scale=_23;
this.zoom=_24;
while(_21<0){
_21+=MQA.MODS[_24];
}
while(_21>=MQA.MODS[_24]){
_21-=MQA.MODS[_24];
}
_25=parseInt(_21/1000);
_26=parseInt(_22/1000);
var _27=this.getUrl();
this.tileImageImg.image.src=_27;
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src="http://img.mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_27+"', sizingMethod='scale') ";
}
}
this.tileImageImg.image.lt=this.x;
this.tileImageImg.image.tp=this.y;
this.tileImageImg.image.style.left=MQA.Util.asPix(this.x);
this.tileImageImg.image.style.top=MQA.Util.asPix(this.y);
};
this.onTileDrawn=function(e){
if(this.isLoading){
return;
}
this.isDrawing=false;
this.isDrawn=true;
this.parent.onTileDrawn(this);
MQA._prEvent.stop(e);
};
};
MQA.MapImageTile=function(_29,_2a,top,_2c,_2d,_2e,_2f,_30,_31,_32){
MQA.ImageTile.call(this,_29,_2a,top,_2c,_2d,_2e,_2f,_30,_31,_32);
this.url="http://%1/map/Scale%2/%3/%4/%5/%6.gif";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _35=parseInt(this.gridColumn/1000);
var _36=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_35=parseInt(X/1000);
_36=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_36).replace(/%4/,(Y-_36*1000)).replace(/%5/,_35).replace(/%6/,(X-_35*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _37=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_37);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_37;
}
};
};
MQA.StrlblImageTile=function(_38,_39,top,_3b,_3c,_3d,_3e,_3f,_40,_41){
MQA.ImageTile.call(this,_38,_39,top,_3b,_3c,_3d,_3e,_3f,_40,_41);
this.url="http://%1/hyb/Scale%2/%3/%4/%5/%6.gif";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _44=parseInt(this.gridColumn/1000);
var _45=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_44=parseInt(X/1000);
_45=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_45).replace(/%4/,(Y-_45*1000)).replace(/%5/,_44).replace(/%6/,(X-_44*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _46=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_46);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_46;
}
};
};
MQA.SatImageTile=function(_47,_48,top,_4a,_4b,_4c,_4d,_4e,_4f,_50){
MQA.ImageTile.call(this,_47,_48,top,_4a,_4b,_4c,_4d,_4e,_4f,_50);
this.url="http://%1/sat/Scale%2/%3/%4/%5/%6.jpg";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _53=parseInt(this.gridColumn/1000);
var _54=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_53=parseInt(X/1000);
_54=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_54).replace(/%4/,(Y-_54*1000)).replace(/%5/,_53).replace(/%6/,(X-_53*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _55=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_55);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_55;
}
};
};
MQA.BaseTileLayer=function(map,_57,_58,_59,_5a,_5b,_5c,_5d,_5e,_5f){
MQA.Base.call(this);
this.map=map;
this.tiles=null;
this.tileLayerDiv=null;
this.customLayer=false;
this.tileLayerId=(typeof (_57)=="undefined")?"bogusID":_57;
this.bounds=(_5a!=null)?MQA.Util._cloneValue(_5a):new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.minZoom=(_5b==null)?1:_5b;
this.maxZoom=(_5c==null)?16:_5c;
this.opacity=(_5d==null)?"1.0":_5d;
this.zindex=(_5e==null)?"0":_5e;
this.tileClass=_58;
this.copyrights=null;
if(_5f!=null){
var _60=new MQA.CopyrightCollection;
_60.add(_5f);
this.copyrights=_60;
}
this.copyrightLayerDivs=null;
this.options=_59;
this.visible=false;
this.userHidden=false;
this.urlTemplate="";
this.isLayerDrawn=false;
this.viewableTiles=0;
this.viewableTilesCount=0;
this.isViewableTilesDrawn=false;
this.isAdded=false;
this._facio=function(key,_62){
switch(key){
case "copyright":
this._setCopyright(_62);
break;
case "bounds":
this._setBounds();
break;
case "minZoom":
this._setMinZoom();
break;
case "maxZoom":
this._setMaxZoom();
break;
case "opacity":
this._setOpacity(_62);
break;
case "zindex":
this._setZindex();
break;
case "tileClass":
this._setTileClass();
break;
case "visible":
this._setVisible(_62);
break;
case "urlTemplate":
this._setUrlTemplate(_62);
break;
}
};
this._duco=function(key){
switch(key){
case "urlTemplate":
return this._getUrlTemplate(key);
break;
}
};
this._setCopyright=function(_64){
var _65=new MQA.CopyrightCollection;
_65.add(_64);
this.copyrights=_65;
};
this._getUrlTemplate=function(_66){
if(this.urlTemplate!=""){
return this.urlTemplate;
}else{
if(this.tiles){
return this.tiles[0][0].url;
}else{
return "";
}
}
};
this._setUrlTemplate=function(_67){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].url=_67;
this.tiles[a][b].draw();
}
}
}
};
this._setVisible=function(_6a){
if(_6a){
if((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom)){
this.show();
}
this.userHidden=false;
}else{
this.hide();
this.userHidden=true;
}
};
this._setZindex=function(){
if(this.tileLayerDiv){
this.tileLayerDiv.style.zIndex=this.zindex;
}
};
this._setTileClass=function(){
this.remove();
this.draw();
};
this._setOpacity=function(_6b){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].opacity=_6b;
this.tiles[a][b].draw();
}
}
this.draw();
}
};
this._setBounds=function(){
this.draw();
};
this._setMinZoom=function(){
this.draw();
};
this._setMaxZoom=function(){
this.draw();
};
this._createTiles=function(){
if(this.tileLayerDiv==null){
this.tileLayerDiv=MQA.Util.createParentDiv(this.tileLayerId,0,0,"absolute",0,0,this.zindex,null,null);
}
this.map.div.appendChild(this.tileLayerDiv);
if(this.copyrights){
var y=this.copyrights.getSize();
this.copyrightLayerDivs=new Array();
for(var x=0;x<y;x++){
var _70=this.copyrights.getAt(x);
this.copyrightLayerDivs[x]=_70.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[x]);
}
}
this.tiles=new Array(this.map.mapcols);
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a]=new Array(this.map.maprows);
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b]=new this.tileClass(this,(a-2)*this.map.tilesize+this.map.m_layoffX-this.map.m_dragoffX+this.map.m_tileoffX,(b-2)*this.map.tilesize+this.map.m_layoffY-this.map.m_dragoffY+this.map.m_tileoffY,this.map.m_centerX-2+a,this.map.m_centerY+2-b,this.map.scale,this.map.zoom,this.map.tilesize,this.opacity,this.options);
this.tiles[a][b].draw();
}
}
};
this.getId=function(){
return this.tileLayerId;
};
this.remove=function(){
this.urlTemplate="";
this.removeAllTiles();
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).remove();
}
}
if(this.tileLayerDiv){
MQA.Util._purge(this.tileLayerDiv);
MQA.Util._nukeChildren(this.tileLayerDiv);
this.tileLayerDiv.parentNode.removeChild(this.tileLayerDiv);
this.isLayerDrawn=false;
this.isViewableTilesDrawn=false;
}
};
this.dispose=function(){
this.removeAllTiles();
this.map=null;
this.bounds=null;
this.tileClass=null;
if(this.tileLayerDiv){
this.tileLayerDiv.innerHTML=null;
this.tileLayerDiv.outerHTML="";
MQA.Util._deleteDOMObject(this.tileLayerDiv);
this.tileLayerDiv=null;
}
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).dispose();
this.copyrights.remove(x);
this.copyrightLayerDivs[x].innerHTML=null;
this.copyrightLayerDivs[x].outerHTML="";
this.copyrightLayerDivs[x]=null;
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyright=function(_77){
if(this.copyrights){
_77.dispose();
}
};
this.removeAllCopyrights=function(){
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(this.copyrights.getAt(x));
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyrights=function(_7a){
if(_7a){
var y=_7a.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(_7a.getAt(x));
}
}
};
this.replaceCopyrights=function(_7d){
this.removeCopyrights(_7d);
this.addCopyrights(_7d);
};
this.addCopyright=function(_7e){
var _7f=0;
if(!this.copyrightLayerDivs){
this.copyrightLayerDivs=new Array();
}else{
_7f=this.copyrightLayerDivs.length+1;
}
if(!this.copyrights){
this.copyrights=new MQA.CopyrightCollection;
}
this.copyrights.add(_7e);
this.copyrightLayerDivs[_7f]=_7e.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[_7f]);
};
this.addCopyrights=function(_80){
var y=_80.getSize();
for(var x=0;x<y;x++){
this.addCopyright(_80.getAt(x));
}
};
this.removeAllTiles=function(){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].dispose();
this.tiles[a][b]=null;
}
}
this.tiles=null;
}
};
this.draw=function(){
};
this.rebuildTiles=function(){
this.isViewableTilesDrawn=false;
this.isLayerDrawn=false;
var _85,_86,top;
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
var _86=(a-2)*this.map.tilesize+this.map.m_layoffX;
var top=(b-2)*this.map.tilesize+this.map.m_layoffY;
var _8a=this.map.m_centerX-2+a;
var _8b=this.map.m_centerY+2-b;
this.rebuildTile(this.tiles[a][b],_86,top,_8a,_8b);
}
}
}else{
this.hide();
}
};
this.rebuildTile=function(_8c,_8d,top,_8f,_90){
_8f=(typeof (_8f)=="undefined")?_8c.gridColumn:_8f;
_90=(typeof (_90)=="undefined")?_8c.gridRow:_90;
_8c.updateTile(_8d,top,_8f,_90,this.map.scale,this.map.zoom);
this.tileDisplay(_8c);
};
this.itterateTileDisplay=function(){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
};
this.tileDisplay=function(_93){
var _94=new MQA.PointXY((_93.x+this.map.m_dragoffX),(_93.y+this.map.m_dragoffY));
var _95=new MQA.PointXY((_93.x+this.map.m_dragoffX)+256,(_93.y+this.map.m_dragoffY)+256);
var _96=new MQA.RectXY(_94,_95);
var _97=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
if(MQA.Util.isIntersectedXY(_96,_97)){
this.viewableTiles++;
}
var _98=this.map.getLLToXY(this.bounds.ul);
var _99=this.map.getLLToXY(this.bounds.lr);
var _9a=new MQA.RectXY(_98,_99);
if(MQA.Util.isIntersectedXY(_96,_9a)){
if(!this.isLayerDrawn){
_93.setVisible(true);
}else{
_93.show();
}
}else{
if(!this.isLayerDrawn){
_93.setVisible(false);
}else{
_93.hide();
}
}
};
this.loadingTile=function(_9b){
_9b.loadingTile();
};
this.setAllLoadingTiles=function(){
if(this.visible){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[a][b]);
}
}
}
};
this.show=function(){
this.tileLayerDiv.style.visibility="visible";
this.tileLayerDiv.style.display="block";
this.visible=true;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).show();
}
}
};
this.hide=function(){
this.tileLayerDiv.style.visibility="hidden";
this.tileLayerDiv.style.display="none";
this.visible=false;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).hide();
}
}
};
this.getTileCenterLatLng=function(_a2,top,_a4){
var _a5=this.map.getDragOffset();
_a2+=_a5.x+(_a4/2);
top+=_a5.y+(_a4/2);
var _a6=this.map.getXYToLL(new MQA.PointXY(_a2,top));
return (_a6);
};
this.scrollLayer=function(){
var _a7=this.map.m_tileoffX;
var _a8=this.map.m_tileofX;
var _a9=this.map.m_tileoffY;
var _aa=this.map.m_tileofY;
while(_a7+_a8>MQA.TILESIZE){
this.tiles.unshift(this.tiles.pop());
for(var b=0;b<this.map.maprows;b++){
this.tiles[0][b].loadingTile();
}
for(var b=0;b<this.map.maprows;b++){
var _ac=this.tiles[0][b];
var _ad=this.tiles[1][b];
_ac.updateTile(_ad.x-this.map.tilesize,_ac.y,_ad.gridColumn-1,_ac.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a7-=this.map.tilesize;
}
while(_a7+_a8<0){
this.tiles.push(this.tiles.shift());
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[this.map.mapcols-1][b]);
}
for(var b=0;b<this.map.maprows;b++){
var _ac=this.tiles[this.map.mapcols-1][b];
var _ad=this.tiles[this.map.mapcols-2][b];
_ac.updateTile(_ad.x+this.map.tilesize,_ac.y,_ad.gridColumn+1,_ac.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a7+=this.map.tilesize;
}
while(_a9+_aa>MQA.TILESIZE){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].unshift(this.tiles[a].pop());
this.loadingTile(this.tiles[a][0]);
}
for(var a=0;a<this.map.mapcols;a++){
var _ac=this.tiles[a][0];
var _ad=this.tiles[a][1];
_ac.updateTile(_ac.x,_ad.y-this.map.tilesize,_ac.gridColumn,_ad.gridRow+1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a9-=this.map.tilesize;
}
while(_a9+_aa<0){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].push(this.tiles[a].shift());
this.loadingTile(this.tiles[a][this.map.maprows-1]);
}
for(var a=0;a<this.map.mapcols;a++){
var _ac=this.tiles[a][this.map.maprows-1];
var _ad=this.tiles[a][this.map.maprows-2];
_ac.updateTile(_ac.x,_ad.y+this.map.tilesize,_ac.gridColumn,_ad.gridRow-1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a9+=this.map.tilesize;
}
};
this.onTileDrawn=function(_af){
var mqe=new MQA.Event("MQA.TileLayer.tileDrawn");
mqe.srcObject=_af;
MQA.EventManager.trigger(this,"tiledrawn",mqe);
this.onViewableTilesDrawn(_af);
this.onLayerDrawn(mqe);
};
this.onViewableTilesDrawn=function(_b1){
if(this.isViewableTilesDrawn){
return;
}
var _b2,_b3,_b4;
var _b5=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
_b2=new MQA.PointXY((_b1.x+this.map.m_dragoffX),(_b1.y+this.map.m_dragoffY));
_b3=new MQA.PointXY((_b1.x+this.map.m_dragoffX)+256,(_b1.y+this.map.m_dragoffY)+256);
_b4=new MQA.RectXY(_b2,_b3);
if(MQA.Util.isIntersectedXY(_b4,_b5)){
this.viewableTilesCount++;
}
if(this.viewableTilesCount>=this.viewableTiles){
this.isViewableTilesDrawn=true;
this.viewableTilesCount=0;
var e=new MQA.Event("MQA.TileLayer.viewableTilesDrawn");
e.srcObject=_b1;
MQA.EventManager.trigger(this,"viewabletilesdrawn",e);
}
};
this.onLayerDrawn=function(mqe){
if(this.isLayerDrawn){
return;
}
var _b8=true;
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
if(!this.tiles[a]||!this.tiles[a][b]||this.tiles[a][b].isDrawn==false){
_b8=false;
break;
}
}
}
if(_b8){
this.isLayerDrawn=true;
var e=new MQA.Event("MQA.TileLayer.layerDrawn");
e.srcObject=this;
MQA.EventManager.trigger(this,"layerdrawn",e);
this.map.onLayerDrawn(e);
}
};
};
MQA.MapTileLayer=function(map,_bd,_be,_bf,_c0,_c1,_c2,_c3,_c4,_c5){
MQA.BaseTileLayer.call(this,map,_bd,_be,_bf,_c0,_c1,_c2,_c3,_c4,_c5);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.SatTileLayer=function(map,_c7,_c8,_c9,_ca,_cb,_cc,_cd,_ce,_cf){
MQA.BaseTileLayer.call(this,map,_c7,_c8,_c9,_ca,_cb,_cc,_cd,_ce,_cf);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.StrlblTileLayer=function(map,_d1,_d2,_d3,_d4,_d5,_d6,_d7,_d8,_d9){
MQA.BaseTileLayer.call(this,map,_d1,_d2,_d3,_d4,_d5,_d6,_d7,_d8,_d9);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.TileLayer=function(map,_db,_dc,_dd,_de,_df,_e0,_e1,_e2,_e3){
MQA.BaseTileLayer.call(this,map,_db,_dc,_dd,_de,_df,_e0,_e1,_e2,_e3);
this.customLayer=true;
this.draw=function(){
if(this.isAdded){
if(this.tiles==null){
this._createTiles();
}
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
}else{
this.hide();
}
}
};
};
MQA.TileLayerCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.TileLayerCollection.prototype=new MQA.TKObjectCollection();
MQA.TileLayerCollection.prototype.constructor=MQA.TileLayerCollection;

MQA.SlideBroker=function(){
this.mapList=new Array();
};
MQA.SlideBroker.prototype={addListener:function(_1){
var _2=this.mapList.length;
this.mapList[_2]=_1;
return _2;
},DoSlide:function(_3,_4,_5,_6,_7,_8,_9,_a){
this.mapList[_3].slideMapTimer(_3,_4,_5,_6,_7,_8,_9,_a);
}};

MQA.Graphics=new function(){
this.vmlNamespace=null;
this.vmlStyleRule=false;
this.setDrawMethod=function(){
var _1=MQA.browser.name;
var _2=MQA.browser.version;
if(_1=="msie"){
this.drawMethod="vml";
this.eventsActive=true;
}else{
if(_1=="safari"){
this.drawMethod="canvas";
this.eventsActive=false;
}else{
this.drawMethod="svg";
this.eventsActive=true;
}
}
};
this.toHex=function(n){
var _4=n.toString(16).toUpperCase();
return (_4.length==1?"0"+_4:_4);
};
this.normalizeColor=function(c){
var p=new Object();
if(typeof (c)=="object"){
p.rgb=c;
p.hex="#"+this.toHex(c[0])+this.toHex(c[1])+this.toHex(c[2]);
}else{
if(c.substring(0,1)=="#"){
p.rgb=new Array();
p.rgb[0]=parseInt("0x"+c.substring(1,3));
p.rgb[1]=parseInt("0x"+c.substring(3,5));
p.rgb[2]=parseInt("0x"+c.substring(5,7));
p.hex=c;
}else{
throw new Error("Invalid color value. Use hex or 3-value RGB array");
}
}
return p;
};
this.createSurface=function(_7,_8,_9){
var _a;
switch(this.drawMethod){
case "svg":
_a=document.createElementNS("http://www.w3.org/2000/svg","svg");
_a.setAttribute("height",_9);
_a.setAttribute("width",_8);
_a.setAttribute("xmlns","http://www.w3.org/2000/svg");
_a.setAttribute("version","1.1");
_a.setAttribute("viewBox","0 0 "+_8+" "+_9);
var _b=document.createElement("defs");
_a.appendChild(_b);
break;
case "vml":
this.vmlNamespace=document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var _c=document.styleSheets[0];
if(!this.vmlStyleRule){
_c.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;");
this.vmlStyleRule=true;
}
_a=document.createElement("v:group");
_a.setAttribute("coordsize",_8+" "+_9);
_a.setAttribute("coordorigin","0 0");
_a.style.position="absolute";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
case "canvas":
_a=document.createElement("div");
_a.style.left="0px";
_a.style.top="0px";
_a.style.position="relative";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
}
this.surfaceWidth=_8;
this.surfaceHeight=_9;
_7.appendChild(_a);
return _a;
};
this.remove=function(_d,_e){
switch(this.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Util._nukeChildren(_e);
break;
}
_e.parentNode.removeChild(_e);
return null;
};
this.drawPolygon=function(_f,_10,_11,_12,_13,_14,_15){
var _16;
var bc=this.normalizeColor(_10);
var fc=this.normalizeColor(_13);
var s="M "+_f[0].x+" "+_f[0].y;
if(this.drawMethod=="svg"){
for(var i=1;i<_f.length;i++){
s+=" L "+_f[i].x+" "+_f[i].y;
}
s+=" z";
}else{
s+=" l ";
for(var i=1;i<_f.length;i++){
s+=_f[i].x+","+_f[i].y+" ";
}
s+=" x e";
}
switch(this.drawMethod){
case "svg":
var _16=document.createElementNS("http://www.w3.org/2000/svg","path");
_16.setAttribute("d",s);
_16.setAttribute("stroke",bc.hex);
_16.setAttribute("stroke-width",_12);
_16.setAttribute("stroke-opacity",_11);
_16.setAttribute("fill",fc.hex);
_16.setAttribute("fill-opacity",_14);
break;
case "vml":
var _16=document.createElement("v:shape");
_16.style.width=this.surfaceWidth+"px";
_16.style.height=this.surfaceHeight+"px";
_16.style.position="absolute";
_16.setAttribute("stroked","true");
_16.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_16.setAttribute("coordorigin","0 0");
var _1b=document.createElement("v:fill");
_1b.setAttribute("opacity",_14);
_1b.setAttribute("color",fc.hex);
_16.appendChild(_1b);
var _1c=document.createElement("v:stroke");
_1c.setAttribute("miterlimit","8.0");
_1c.setAttribute("joinstyle","miter");
_1c.setAttribute("endcap","flat");
_1c.setAttribute("opacity",_11);
_1c.setAttribute("color",bc.hex);
_1c.setAttribute("weight",_12);
_16.appendChild(_1c);
var _1d=document.createElement("v:path");
_1d.setAttribute("v",s);
_16.appendChild(_1d);
break;
case "canvas":
var _16=document.createElement("canvas");
_16.setAttribute("width",this.surfaceWidth);
_16.setAttribute("height",this.surfaceHeight);
_16.style.position="absolute";
_16.style.left="0px";
_16.style.top="0px";
var ctx=_16.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_14+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_11+")";
ctx.lineWidth=_12;
ctx.beginPath();
ctx.moveTo(_f[0].x,_f[0].y);
for(var i=1;i<_f.length;i++){
ctx.lineTo(_f[i].x,_f[i].y);
}
ctx.closePath();
ctx.fill();
ctx.stroke();
break;
}
_16.style.display=(_15?"inline":"none");
return _16;
};
this.drawRectangle=function(_1f,_20,_21,_22,_23,_24,_25){
var _26;
var bc=this.normalizeColor(_20);
var fc=this.normalizeColor(_23);
switch(this.drawMethod){
case "svg":
_26=document.createElementNS("http://www.w3.org/2000/svg","rect");
_26.setAttribute("x",_1f[0].x);
_26.setAttribute("y",_1f[0].y);
_26.setAttribute("width",_1f[1].x-_1f[0].x);
_26.setAttribute("height",_1f[1].y-_1f[0].y);
_26.setAttribute("stroke",bc.hex);
_26.setAttribute("stroke-width",_22);
_26.setAttribute("stroke-opacity",_21);
_26.setAttribute("fill",fc.hex);
_26.setAttribute("fill-opacity",_24);
break;
case "vml":
_26=document.createElement("v:rect");
_26.style.left=_1f[0].x+"px";
_26.style.top=_1f[0].y+"px";
_26.style.width=_1f[1].x-_1f[0].x+"px";
_26.style.height=_1f[1].y-_1f[0].y+"px";
_26.style.position="absolute";
_26.setAttribute("stroked","true");
var _29=document.createElement("v:fill");
_29.setAttribute("opacity",_24);
_29.setAttribute("color",fc.hex);
_26.appendChild(_29);
var _2a=document.createElement("v:stroke");
_2a.setAttribute("miterlimit","8.0");
_2a.setAttribute("joinstyle","miter");
_2a.setAttribute("endcap","flat");
_2a.setAttribute("opacity",_21);
_2a.setAttribute("color",bc.hex);
_2a.setAttribute("weight",_22);
_26.appendChild(_2a);
break;
case "canvas":
var _26=document.createElement("canvas");
_26.setAttribute("width",this.surfaceWidth);
_26.setAttribute("height",this.surfaceHeight);
_26.style.position="absolute";
_26.style.left="0px";
_26.style.top="0px";
var ctx=_26.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_24+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_21+")";
ctx.lineWidth=_22;
ctx.fillRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
ctx.strokeRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
break;
}
_26.style.display=(_25?"inline":"none");
return _26;
};
this.drawEllipse=function(_2c,_2d,_2e,_2f,_30,_31,_32){
var _33;
var bc=this.normalizeColor(_2d);
var fc=this.normalizeColor(_30);
var _36=_2c[1].x-_2c[0].x;
var _37=_2c[1].y-_2c[0].y;
var _38=parseInt(_36/2);
var _39=parseInt(_37/2);
var _3a=_2c[1].x-_38;
var _3b=_2c[1].y-_39;
switch(this.drawMethod){
case "svg":
_33=document.createElementNS("http://www.w3.org/2000/svg","ellipse");
_33.setAttribute("cx",_3a);
_33.setAttribute("cy",_3b);
_33.setAttribute("rx",_38);
_33.setAttribute("ry",_39);
_33.setAttribute("stroke",bc.hex);
_33.setAttribute("stroke-width",_2f);
_33.setAttribute("stroke-opacity",_2e);
_33.setAttribute("fill",fc.hex);
_33.setAttribute("fill-opacity",_31);
break;
case "vml":
_33=document.createElement("v:oval");
_33.style.left=_2c[0].x+"px";
_33.style.top=_2c[0].y+"px";
_33.style.width=_36+"px";
_33.style.height=_37+"px";
_33.style.position="absolute";
_33.setAttribute("stroked","true");
var _3c=document.createElement("v:fill");
_3c.setAttribute("opacity",_31);
_3c.setAttribute("color",fc.hex);
_33.appendChild(_3c);
var _3d=document.createElement("v:stroke");
_3d.setAttribute("miterlimit","8.0");
_3d.setAttribute("joinstyle","miter");
_3d.setAttribute("endcap","flat");
_3d.setAttribute("opacity",_2e);
_3d.setAttribute("color",bc.hex);
_3d.setAttribute("weight",_2f);
_33.appendChild(_3d);
break;
case "canvas":
var _33=document.createElement("canvas");
_33.setAttribute("width",this.surfaceWidth);
_33.setAttribute("height",this.surfaceHeight);
_33.style.position="absolute";
_33.style.left="0px";
_33.style.top="0px";
var ctx=_33.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_31+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_2e+")";
ctx.lineWidth=_2f;
if((_2c[1].x-_2c[0].x)!=(_2c[1].y-_2c[0].y)){
var _3f=Math.round((_2c[1].y-_2c[0].y)/4);
var _40=Math.round((_2c[1].x-_2c[0].x)/4);
ctx.moveTo(_2c[0].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[0].x,_2c[0].y+_3f,_2c[0].x+_40,_2c[0].y,_2c[0].x+(2*_40),_2c[0].y);
ctx.bezierCurveTo(_2c[0].x+(3*_40),_2c[0].y,_2c[1].x,_2c[0].y+_3f,_2c[1].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[1].x,_2c[1].y-_3f,_2c[1].x-_40,_2c[1].y,_2c[0].x+(2*_40),_2c[1].y);
ctx.bezierCurveTo(_2c[0].x+_40,_2c[1].y,_2c[0].x,_2c[1].y-_3f,_2c[0].x,_2c[0].y+(2*_3f));
}else{
var _41=_2c[0].x+Math.round((_2c[1].x-_2c[0].x)/2);
var _42=_2c[0].y+Math.round((_2c[1].y-_2c[0].y)/2);
ctx.arc(_41,_42,Math.round((_2c[1].x-_2c[0].x)/2),0,360,false);
}
ctx.fill();
ctx.stroke();
break;
}
_33.style.display=(_32?"inline":"none");
return _33;
};
this.drawLine=function(_43,_44,_45,_46,_47){
var _48;
var bc=this.normalizeColor(_44);
var s="";
for(var i=0;i<_43.length;i++){
s+=_43[i].x+","+_43[i].y+" ";
}
switch(this.drawMethod){
case "svg":
_48=document.createElementNS("http://www.w3.org/2000/svg","polyline");
_48.setAttribute("points",s);
_48.setAttribute("stroke",bc.hex);
_48.setAttribute("stroke-width",_46);
_48.setAttribute("stroke-opacity",_45);
_48.setAttribute("fill","none");
break;
case "vml":
_48=document.createElement("v:polyline");
_48.style.width=this.surfaceWidth+"px";
_48.style.height=this.surfaceHeight+"px";
_48.style.position="absolute";
_48.setAttribute("stroked","true");
_48.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_48.setAttribute("points",s);
_48.setAttribute("fill","false");
var _4c=document.createElement("v:fill");
_4c.setAttribute("opacity",0);
_48.appendChild(_4c);
var _4d=document.createElement("v:stroke");
_4d.setAttribute("miterlimit","8.0");
_4d.setAttribute("joinstyle","miter");
_4d.setAttribute("endcap","flat");
_4d.setAttribute("opacity",_45);
_4d.setAttribute("color",bc.hex);
_4d.setAttribute("weight",_46);
_48.appendChild(_4d);
break;
case "canvas":
var _48=document.createElement("canvas");
_48.setAttribute("width",this.surfaceWidth);
_48.setAttribute("height",this.surfaceHeight);
_48.style.position="absolute";
_48.style.left="0px";
_48.style.top="0px";
var ctx=_48.getContext("2d");
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_45+")";
ctx.lineWidth=_46;
ctx.beginPath();
ctx.moveTo(_43[0].x,_43[0].y);
for(var i=1;i<_43.length;i++){
ctx.lineTo(_43[i].x,_43[i].y);
}
ctx.stroke();
break;
}
_48.style.display=(_47?"inline":"none");
return _48;
};
};
MQA.Graphics.setDrawMethod();

MQA.Base=function(){
this.guid=MQA.Util._getRandomGUID(10);
this.className="MQA.base";
this.reservedProperties="guid,className,parentCollections";
this.parentCollections=[];
this.setValue=function(_1,_2){
if(typeof (this[_1])!="undefined"){
if(this.reservedProperties.search(_1)!=-1){
return false;
}
this[_1]=MQA.Util._cloneValue(_2);
if(typeof (this[_1+"_override"])=="undefined"){
this._facio(_1,this[_1]);
}
this.facio(_1,this[_1]);
return true;
}else{
return false;
}
};
this.getValue=function(_3){
var _4;
if(typeof (this[_3])!="undefined"){
_4=this.duco(_3);
if(typeof (_4)=="undefined"){
_4=this._duco(_3);
if(typeof (_4)=="undefined"){
_4=this[_3];
}
}
return _4;
}
};
this.setValues=function(_5){
var _6=0;
for(key in _5){
if(typeof (this[key])!="undefined"){
if(this.setValue(key,_5[key])){
_6++;
}
}
}
return _6;
};
this.override=function(_7){
if(!(_7 instanceof Array)){
_7=[_7];
}
for(var i=0;i<_7.length;i++){
this[_7[i]+"_override"]=1;
}
};
this._facio=function(_9,_a){
};
this.facio=function(_b,_c){
};
this._duco=function(_d){
};
this.duco=function(_e){
};
this.draw=function(){
};
this.dispose=function(){
};
};

MQA.CONTROL_PANZOOM3=5;
MQA.LargeZoomControl3=function(_1){
MQA.Base.call(this);
var _2=45;
var _3=254;
var _4=new MQA.Icon(MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/slidezoom_sprite"),128,259);
var _5={x:93,y:42,width:15,height:15};
var _6={x:93,y:63,width:15,height:15};
var _7=44;
var _8={x:93,y:83,width:15,height:15};
var _9={x:93,y:104,width:15,height:15};
var _a=229;
var _b={x:91,y:8,width:20,height:9};
var _c={x:91,y:22,width:20,height:9};
var _d={x:48,y:5,width:33,height:33};
var _e=[];
_e[0]={x:48,y:41,width:33,height:33};
_e[1]={x:48,y:77,width:33,height:33};
_e[2]={x:48,y:113,width:33,height:33};
_e[3]={x:48,y:149,width:33,height:33};
_e[4]={x:48,y:185,width:33,height:33};
var _f=7;
var _10=[];
_10[0]={x:10,y:0,width:13,height:8,tip:"Pan North"};
_10[1]={x:25,y:10,width:8,height:13,tip:"Pan East"};
_10[2]={x:10,y:25,width:13,height:8,tip:"Pan South"};
_10[3]={x:0,y:10,width:8,height:13,tip:"Pan West"};
_10[4]={x:9,y:9,width:15,height:15,tip:"Fit to Screen"};
var _11={x:91,y:8,width:20,height:9};
var _12={x:91,y:22,width:20,height:9};
var _13=[];
var _14=63;
var _15={x:16,y:63,width:12,height:164};
var _16=null;
var _17=null;
var _18=null;
var _19=null;
var _1a=null;
var _1b=null;
var _1c=null;
var _1d=null;
var _1e=[];
var _1f=null;
var _20=null;
var _21=null;
var _22=null;
var _23=null;
var _24=null;
var _25=null;
var _26=null;
var _27=false;
var _28=null;
var _29=null;
this.controlVersion="2.0";
this.type=MQA.CONTROL_PANZOOM3;
this.className="MQA.LargeZoomControl3";
this.map=null;
this.width=_2;
this.height=_3;
this.position=(typeof (_1)=="undefined"?new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,0)):_1);
this._facio=function(key,_2b){
switch(key){
case "width":
this.width=_2;
break;
case "height":
this.height=_3;
break;
case "position":
if(_16){
var _2c=this._getPositionXY(_2b);
_16.style.left=_2c.x+"px";
_16.style.top=_2c.y+"px";
}
break;
}
};
this._duco=function(key){
switch(key){
}
};
this.draw=function(){
if(_16){
this.dispose(false);
}
var xy=this._getPositionXY(this.position);
_16=document.createElement("div");
_16.id="LargeZoomControl3_cControlBox";
_16.style.position="absolute";
_16.style.overflow="hidden";
_16.style.display="block";
_16.style.background="url(\""+_4.imageURL+"\") no-repeat";
_16.style.left=xy.x+"px";
_16.style.top=xy.y+"px";
_16.style.width=this.getValue("width")+"px";
_16.style.height=this.getValue("height")+"px";
_17=document.createElement("div");
_17.id="LargeZoomControl3_cPanBox";
_17.style.position="absolute";
_17.style.overflow="hidden";
_17.style.display="block";
_17.style.width=_d.width+"px";
_17.style.height=_d.height+"px";
_17.style.left=(this.getValue("width")-_d.width)/2+"px";
_17.style.top=_f+"px";
_18=document.createElement("img");
_18.id="LargeZoomControl3_cPanImage";
_18.width=_4.width;
_18.height=_4.height;
_18.src=_4.imageURL;
_18.style.marginLeft=-_d.x+"px";
_18.style.marginTop=-_d.y+"px";
_17.appendChild(_18);
for(var i=0;i<5;i++){
_1e[i]=document.createElement("div");
_1e[i].id="LargeZoomControl_panButton_"+i;
_1e[i].style.position="absolute";
_1e[i].style.overflow="hidden";
_1e[i].style.background="url(\"http://img.mqcdn.com/a/a\") repeat";
_1e[i].style.zindex=100;
_1e[i].style.width=_10[i].width+"px";
_1e[i].style.height=_10[i].height+"px";
_1e[i].style.left=_10[i].x+"px";
_1e[i].style.top=_10[i].y+"px";
_1e[i].title=_10[i].tip;
_1e[i].style.cursor="pointer";
_17.appendChild(_1e[i]);
}
_16.appendChild(_17);
_19=document.createElement("div");
_19.id="LargeZoomControl3_cZoomInBox";
_19.style.position="absolute";
_19.style.overflow="hidden";
_19.style.display="block";
_19.style.width=_5.width+"px";
_19.style.height=_5.height+"px";
_19.style.left=(this.getValue("width")-_5.width)/2+"px";
_19.style.top=_7+"px";
_19.title="Zoom In";
_19.style.cursor="pointer";
_1a=document.createElement("img");
_1a.width=_4.width;
_1a.height=_4.height;
_1a.src=_4.imageURL;
_1a.style.marginLeft=-_5.x+"px";
_1a.style.marginTop=-_5.y+"px";
_19.appendChild(_1a);
_16.appendChild(_19);
_1b=document.createElement("div");
_1b.id="LargeZoomControl3_cZoomOutBox";
_1b.style.position="absolute";
_1b.style.overflow="hidden";
_1b.style.display="block";
_1b.style.width=_8.width+"px";
_1b.style.height=_8.height+"px";
_1b.style.left=(this.getValue("width")-_8.width)/2+"px";
_1b.style.top=_a+"px";
_1b.title="Zoom Out";
_1b.style.cursor="pointer";
_1c=document.createElement("img");
_1c.width=_4.width;
_1c.height=_4.height;
_1c.src=_4.imageURL;
_1c.style.marginLeft=-_8.x+"px";
_1c.style.marginTop=-_8.y+"px";
_1b.appendChild(_1c);
_16.appendChild(_1b);
_1f=document.createElement("div");
_1f.style.position="absolute";
_1f.style.display="block";
_1f.style.background="url(\"http://img.mqcdn.com/a/a\") repeat";
_1f.style.zindex=100;
_1f.style.width=_15.width+"px";
_1f.style.height=_15.height+"px";
_1f.style.left=_15.x+"px";
_1f.style.top=_15.y+"px";
_16.appendChild(_1f);
_20=document.createElement("div");
_20.style.position="absolute";
_20.style.overflow="hidden";
_20.style.display="block";
_20.style.zindex=100;
_20.style.width=_11.width+"px";
_20.style.height=_11.height+"px";
_20.style.left=Math.ceil((this.getValue("width")-_11.width)/2)+"px";
_20.style.top=this._getNewSliderYPosition(this.map.getZoomLevel())+"px";
_20.style.cursor="pointer";
_20.title="Zoom Level "+this.map.getZoomLevel();
_21=document.createElement("img");
_21.width=_4.width;
_21.height=_4.height;
_21.src=_4.imageURL;
_21.style.marginLeft=-_11.x+"px";
_21.style.marginTop=-_11.y+"px";
_20.appendChild(_21);
_16.appendChild(_20);
this.map.parent2.appendChild(_16);
_22=MQA._prEvent.EventCallback(this,"zoomInHandler");
MQA._prEvent.observe(_19,"mouseover",_22);
MQA._prEvent.observe(_19,"mouseout",_22);
MQA._prEvent.observe(_19,"click",_22);
_23=MQA._prEvent.EventCallback(this,"zoomOutHandler");
MQA._prEvent.observe(_1b,"mouseover",_23);
MQA._prEvent.observe(_1b,"mouseout",_23);
MQA._prEvent.observe(_1b,"click",_23);
_24=MQA._prEvent.EventCallback(this,"panHandler");
for(var i=0;i<5;i++){
MQA._prEvent.observe(_1e[i],"mouseover",_24);
MQA._prEvent.observe(_1e[i],"mouseout",_24);
MQA._prEvent.observe(_1e[i],"click",_24);
}
_25=MQA._prEvent.EventCallback(this,"sliderBarHandler");
MQA._prEvent.observe(_1f,"click",_25);
_26=MQA._prEvent.EventCallback(this,"sliderHandleHandler");
MQA._prEvent.observe(_20,"mouseover",_26);
MQA._prEvent.observe(_20,"mouseout",_26);
MQA._prEvent.observe(_20,"mousedown",_26);
MQA._prEvent.observe(_20,"mouseup",_26);
eMouseActionCallback=MQA._prEvent.EventCallback(this,"mouseActionHandler");
MQA._prEvent.observe(_16,"mousemove",eMouseActionCallback);
MQA._prEvent.observe(_16,"mouseout",eMouseActionCallback);
MQA._prEvent.observe(_16,"mouseup",eMouseActionCallback);
MQA.EventManager.addListener(this.map,"zoomend",this.onZoomEnd,this);
};
this.dispose=function(_30){
var _30=(typeof (_30)!="undefined"?_30:false);
MQA._prEvent.stopObserving(_19,"mouseover",_22);
MQA._prEvent.stopObserving(_19,"mouseout",_22);
MQA._prEvent.stopObserving(_19,"click",_22);
MQA._prEvent.stopObserving(_1b,"mouseover",_23);
MQA._prEvent.stopObserving(_1b,"mouseout",_23);
MQA._prEvent.stopObserving(_1b,"click",_23);
for(var i=0;i<5;i++){
MQA._prEvent.stopObserving(_1e[i],"mouseover",_24);
MQA._prEvent.stopObserving(_1e[i],"mouseout",_24);
MQA._prEvent.stopObserving(_1e[i],"click",_24);
}
MQA._prEvent.stopObserving(_1f,"click",_25);
MQA._prEvent.stopObserving(_20,"mouseover",_26);
MQA._prEvent.stopObserving(_20,"mouseout",_26);
MQA._prEvent.stopObserving(_20,"mousedown",_26);
MQA._prEvent.stopObserving(_20,"mouseup",_26);
MQA._prEvent.stopObserving(_16,"mousemove",eMouseActionCallback);
MQA._prEvent.stopObserving(_16,"mouseup",eMouseActionCallback);
MQA.EventManager.removeListener(this.map,"zoomend",this.onZoomEnd,this);
_22=null;
_23=null;
_24=null;
_25=null;
_26=null;
_16.innerHTML="";
MQA.Util._setOuterHTMLToEmptyString(_16);
MQA.Util._deleteDOMObject(_16);
_16=null;
_17=null;
_18=null;
_19=null;
_1a=null;
_1b=null;
_1c=null;
_1d=null;
for(var i=0;i<5;i++){
_1e[i]=null;
}
_1e=[];
_1f=null;
_20=null;
_21=null;
this.map=null;
};
this.zoomInHandler=function(e){
switch(e.type){
case "mouseover":
_1a.style.marginLeft=-_6.x+"px";
_1a.style.marginTop=-_6.y+"px";
break;
case "mouseout":
_1a.style.marginLeft=-_5.x+"px";
_1a.style.marginTop=-_5.y+"px";
break;
case "click":
this._changeZoomLevel(this.map.getZoomLevel()+1);
this._triggerEvent(e,"MQA.LargeZoomControl3.zoomIn","zoomin");
break;
}
};
this.zoomOutHandler=function(e){
switch(e.type){
case "mouseover":
_1c.style.marginLeft=-_9.x+"px";
_1c.style.marginTop=-_9.y+"px";
break;
case "mouseout":
_1c.style.marginLeft=-_8.x+"px";
_1c.style.marginTop=-_8.y+"px";
break;
case "click":
this._changeZoomLevel(this.map.getZoomLevel()-1);
this._triggerEvent(e,"MQA.LargeZoomControl3.zoomOut","zoomout");
break;
}
};
this.panHandler=function(e){
var _35=(MQA.browser.name=="msie"?e.srcElement.id:e.target.id);
var _36=parseInt(_35.substr(_35.length-1,1));
switch(e.type){
case "mouseover":
_18.style.marginLeft=-_e[_36].x+"px";
_18.style.marginTop=-_e[_36].y+"px";
break;
case "mouseout":
_18.style.marginLeft=-_d.x+"px";
_18.style.marginTop=-_d.y+"px";
break;
case "click":
switch(_36){
case 0:
this.map.panNorth(50);
this._triggerEvent(e,"MQA.LargeZoomControl3.panNorth","pannorth");
break;
case 1:
this.map.panEast(50);
this._triggerEvent(e,"MQA.LargeZoomControl3.panEast","paneast");
break;
case 2:
this.map.panSouth(50);
this._triggerEvent(e,"MQA.LargeZoomControl3.panSouth","pansouth");
break;
case 3:
this.map.panWest(50);
this._triggerEvent(e,"MQA.LargeZoomControl3.panWest","panwest");
break;
case 4:
this._doBestFit();
this._triggerEvent(e,"MQA.LargeZoomControl3.bestFit","bestfit");
break;
}
break;
}
};
this.sliderBarHandler=function(e){
var y=(MQA.browser.name=="msie"?e.offsetY:e.layerY);
var _39=17-Math.round(y/10);
this.map.setZoomLevel(_39);
this._setZoomSlider(_39);
this._triggerEvent(e,"MQA.LargeZoomControl3.setZoom","setzoom");
};
this.sliderHandleHandler=function(e){
switch(e.type){
case "mouseover":
_21.style.marginLeft=-_12.x+"px";
_21.style.marginTop=-_12.y+"px";
break;
case "mouseout":
_21.style.marginLeft=-_11.x+"px";
_21.style.marginTop=-_11.y+"px";
MQA._prEvent.stop(e);
break;
case "mousedown":
_27=true;
_28=e.clientY;
_29=parseInt(_20.style.top);
_20.style.cursor=this.map.grabbing_mousecursor;
MQA._prEvent.stop(e);
break;
case "mouseup":
_27=false;
_20.style.cursor="pointer";
this._setZoomLevelFromSliderPosition(e);
break;
}
};
this.mouseActionHandler=function(e){
if(!_27){
return;
}
switch(e.type){
case "mousemove":
var _3c=e.clientY-_28;
var _3d=_29+_3c;
if(_3d<_14){
_3d=_14;
}
if(_3d>(_14+150)){
_3d=_14+150;
}
_20.style.top=_3d+"px";
MQA._prEvent.stop(e);
break;
case "mouseout":
if(MQA.Util.isMouseLeaveOrEnter(e,_16)){
this._finishDragging(e);
}
break;
case "mouseup":
this._finishDragging(e);
break;
}
};
this._finishDragging=function(e){
_27=false;
_20.style.cursor="pointer";
this._setZoomLevelFromSliderPosition(e);
};
this._getPositionXY=function(mcp){
var w=this.getValue("width");
var h=this.getValue("height");
var _42,_43;
var _44=mcp.offsetSize.width;
var _45=mcp.offsetSize.height;
switch(mcp.getMapCorner()){
case MQA.MapCorner.TOP_LEFT:
_42=0;
_43=0;
if(_44>(this.map.width-w)){
_44=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.TOP_RIGHT:
_42=this.map.width-w;
_43=0;
break;
case MQA.MapCorner.BOTTOM_LEFT:
_42=0;
_43=this.map.height-h;
if(_44>(this.map.width-w)){
_44=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.BOTTOM_RIGHT:
_42=this.map.width-w;
_43=this.map.height-h;
break;
}
_42+=_44;
_43+=_45;
return new MQA.PointXY(_42,_43);
};
this._changeZoomLevel=function(z){
z=(z>16?16:z);
z=(z<1?1:z);
this.map.setZoomLevel(z);
this._setZoomSlider(z);
};
this._doBestFit=function(){
var _47=this.map.routerect;
var _48=this.map._getAllShapes(true,false);
var _49=_48.getSize();
if(_47&&(_49>0)){
var _4a=new MQA.RectLL(new MQA.PointLL(_48.getAt(0).getValue("latLng").getLatitude(),_48.getAt(0).getValue("latLng").getLongitude()),new MQA.PointLL(_48.getAt(0).getValue("latLng").getLatitude(),_48.getAt(0).getValue("latLng").getLongitude()));
for(var i=1;i<_49;i++){
var _4c=_48.getAt(i).getValue("latLng");
_4a.ul.lat=Math.max(_4c.lat,Math.max(_4a.ul.lat,_47.ul.lat));
_4a.ul.lng=Math.min(_4c.lng,Math.min(_4a.ul.lng,_47.ul.lng));
_4a.lr.lat=Math.min(_4c.lat,Math.min(_4a.lr.lat,_47.lr.lat));
_4a.lr.lng=Math.max(_4c.lng,Math.max(_4a.lr.lng,_47.lr.lng));
}
this.map._bestFit(_4a,false,1,16);
this._setZoomSlider(this.map.getZoomLevel());
}else{
if(_47&&(_49==0)){
this.map.bestFitRoute();
this._setZoomSlider(this.map.getZoomLevel());
}else{
if(!_47&&(_49>1)){
this.map.bestFit();
this._setZoomSlider(this.map.getZoomLevel());
}else{
if(!_47&&(_49==1)){
this.map.setCenter(this.map.savedCenter);
}
}
}
}
};
this._setZoomSlider=function(_4d){
_20.style.top=this._getNewSliderYPosition(_4d)+"px";
_20.title="Zoom Level "+_4d;
};
this._getNewSliderYPosition=function(_4e){
var _4f=(16-_4e)*10;
return _4f+_14;
};
this._setZoomLevelFromSliderPosition=function(e){
var y=(parseInt(_20.style.top)-_14)+(_11.height/1.75);
var _52=17-Math.round(y/10);
this._setZoomSlider(_52);
this.map.setZoomLevel(_52);
this._triggerEvent(e,"MQA.LargeZoomControl3.setZoom","setzoom");
};
this._triggerEvent=function(e,_54,_55){
e.eventName=_54;
MQA.EventManager.trigger(this,_55,e);
};
this.onZoomEnd=function(e){
var _57=this.map.getZoomLevel();
this._setZoomSlider(_57);
};
this.initialize=function(map){
this.map=map;
this.draw();
};
this.getWidth=function(){
return this.getValue("width");
};
this.getHeight=function(){
return this.getValue("height");
};
this.destructor=function(){
this.dispose(false);
};
this.getPosition=function(){
return this.getValue("position");
};
};

BEST_FIT=4;
if(typeof (MQA.Control1)=="undefined"){
MQA.Control1=new Object();
}
MQA.LargeZoomControl2=function(){
this._dth=MQA._prEvent.addDtor(this,"dispose");
var _1,_2,_3,_4,_5;
browser=MQA.browser;
this.pan=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(5,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.pan_click=new Array();
this.pan_mouseover=new Array();
this.pan_mouseout=new Array();
this.zoomin_click=null;
this.zoomin_mouseover=null;
this.zoomin_mouseout=null;
this.zoomout_click=null;
this.zoomout_mouseover=null;
this.zoomout_mouseout=null;
this.revert_click=null;
this.revert_mouseover=null;
this.revert_mouseout=null;
this.zoomarea_click=new Array();
this.zoomarea_mouseover=new Array();
_1=document.createElement("div");
_1.className="map-controls-bg screen";
this.elem.appendChild(_1);
_2=document.createElement("div");
_2.style.position="relative";
_2.style.width="48px";
_2.style.height="45px";
_2.style.margin="0";
_2.style.padding="0 1px";
_2.style.backgroundColor="transparent";
_2.style.backgroundImage="url("+MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/map-controls-top-bg")+")";
_2.style.backgroundPosition="0 0";
_2.style.backgroundRepeat="no-repeat";
_1.appendChild(_2);
_2=document.createElement("div");
_2.style.position="relative";
_2.style.width="48px";
_2.style.margin="0";
_2.style.padding="5px 0 0";
_2.style.backgroundColor="transparent";
_2.style.backgroundImage="url("+MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/map-controls-middle-bg")+")";
_2.style.backgroundPosition="0 0";
_2.style.backgroundRepeat="repeat-y";
_2.style.height=(browser.name=="msie"?"250px":"240px");
_1.appendChild(_2);
_2=document.createElement("div");
_2.style.position="relative";
_2.style.width="48px";
_2.style.height="38px";
_2.style.margin="0";
_2.style.padding="0";
_2.style.backgroundColor="transparent";
_2.style.backgroundImage="url("+MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/map-controls-btm-bg")+")";
_2.style.backgroundPosition="0 0";
_2.style.backgroundRepeat="no-repeat";
_1.appendChild(_2);
_1=document.createElement("ul");
_1.className="map-controls screen";
this.elem.appendChild(_1);
_2=document.createElement("li");
_2.className="map-compass-wrapper";
_1.appendChild(_2);
_3=document.createElement("div");
_3.className="map-compass";
_2.appendChild(_3);
_4=document.createElement("img");
_4.border=0;
_4.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/map-compassrose");
_4.alt="compass rose";
_4.className="";
_3.appendChild(_4);
this.compassrose=_4;
_4=document.createElement("img");
_4.border=0;
_4.src="http://img.mqcdn.com/a/a";
_4.className="map-compass-links";
_4.useMap="#mq-zoomcontrol-linkmap";
_3.appendChild(_4);
this.compassroseimg=_4;
_4=document.createElement("map");
_4.name="mq-zoomcontrol-linkmap";
_4.id="mq-zoomcontrol-linkmap";
_3.appendChild(_4);
this.compassrosemap=_4;
_5=document.createElement("area");
_5.shape="poly";
_5.coords="14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21";
_5.href="Javascript:;";
_5.title="Fit to Screen";
_5.alt="Fit to Screen";
_4.appendChild(_5);
this.pan[BEST_FIT]=_5;
_5=document.createElement("area");
_5.shape="rect";
_5.coords="11,1,29,12";
_5.href="Javascript:;";
_5.title="Pan North";
_5.alt="Pan North";
_4.appendChild(_5);
this.pan[MQA.PAN_NORTH]=_5;
_5=document.createElement("area");
_5.shape="rect";
_5.coords="27,13,40,28";
_5.href="Javascript:;";
_5.title="Pan East";
_5.alt="Pan East";
_4.appendChild(_5);
this.pan[MQA.PAN_EAST]=_5;
_5=document.createElement("area");
_5.shape="rect";
_5.coords="1,13,14,28";
_5.href="Javascript:;";
_5.title="Pan West";
_5.alt="Pan West";
_4.appendChild(_5);
this.pan[MQA.PAN_WEST]=_5;
_5=document.createElement("area");
_5.shape="rect";
_5.coords="11,29,29,40";
_5.href="Javascript:;";
_5.title="Pan South";
_5.alt="Pan South";
_4.appendChild(_5);
this.pan[MQA.PAN_SOUTH]=_5;
_2=document.createElement("li");
_2.className="map-zoom";
_1.appendChild(_2);
_3=document.createElement("div");
_3.className="io map-zoom-in";
_2.appendChild(_3);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
this.zoomin.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-in");
_3.appendChild(this.zoomin);
var _6=document.createElement("div");
_6.className="map-zoombox";
var _7=document.createElement("img");
_7.border=0;
_7.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/zoombar");
_6.appendChild(_7);
strHtm="<img src='http://img.mqcdn.com/a/a' border='0' class='map-zoom-links' />";
strHtm+="<img src='"+MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/z-on")+"' border='0' class='map-zoom-on' />";
strHtm+="<map>";
var _8=1;
var _9=10;
for(var i=0;i<16;i++){
strHtm+="<area alt='Zoom to level "+Math.abs(16-i)+"' title='Zoom to level "+Math.abs(16-i)+"' shape='rect' coords='1, "+(_8+i*12)+", 22, "+(_9+i*12)+"' />";
}
strHtm+="</map>";
_6.innerHTML+=strHtm;
this.zoombox=_6;
this.zoomarea=_6.childNodes[3].childNodes;
_2.appendChild(_6);
_3=document.createElement("div");
_3.className="io map-zoom-out";
_2.appendChild(_3);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
this.zoomout.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/z-out");
_3.appendChild(this.zoomout);
_2=document.createElement("li");
_2.className="map-revert";
_2.style.height="38";
_1.appendChild(_2);
_3=document.createElement("div");
_3.className="map-revert";
_3.style.top=(browser.name=="msie"?7:10);
_2.appendChild(_3);
this.revert=document.createElement("img");
this.revert.alt="Revert";
this.revert.title="Revert";
this.revert.border=0;
this.revert.src=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/revert");
_3.appendChild(this.revert);
};
MQA.LargeZoomControl2.prototype=new MQA.Control();
MQA.LargeZoomControl2.prototype.constructor=MQA.LargeZoomControl2;
MQA.LargeZoomControl2.prototype.initialize=function(_b){
this.map=_b;
this.type=MQA.CONTROL_PANZOOM;
this.setZoom(this.map.getZoomLevel());
this.compassroseimg.useMap="#mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.name="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.id="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.zoombox.childNodes[1].useMap="#zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].name="zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].id="zoompositions"+this.map.uniqueMapID;
for(var i=0;i<5;i++){
this.pan_click[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.pan_mouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.pan_mouseout[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.pan[i],"click",this.pan_click[i]);
MQA._prEvent.observe(this.pan[i],"mouseover",this.pan_mouseover[i]);
MQA._prEvent.observe(this.pan[i],"mouseout",this.pan_mouseout[i]);
}
this.zoomin_click=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_click=MQA._prEvent.EventCallback(this,"eventmonitor");
this.revert_click=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomin_mouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_mouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.revert_mouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomin_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
this.revert_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.zoomin_click);
MQA._prEvent.observe(this.zoomout,"click",this.zoomout_click);
MQA._prEvent.observe(this.revert,"click",this.revert_click);
MQA._prEvent.observe(this.zoomin,"mouseover",this.zoomin_mouseover);
MQA._prEvent.observe(this.zoomout,"mouseover",this.zoomout_mouseover);
MQA._prEvent.observe(this.revert,"mouseover",this.revert_mouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.zoomin_mouseout);
MQA._prEvent.observe(this.zoomout,"mouseout",this.zoomout_mouseout);
MQA._prEvent.observe(this.revert,"mouseout",this.revert_mouseout);
for(var i=0;i<16;i++){
this.zoomarea_click[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomarea_mouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomarea[i],"click",this.zoomarea_click[i]);
MQA._prEvent.observe(this.zoomarea[i],"mouseover",this.zoomarea_mouseover[i]);
}
this.zoombox_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoombox,"mouseout",this.zoombox_mouseout);
};
MQA.LargeZoomControl2.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.delDtor(this._dth);
for(var i=0;i<5;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.pan_click[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.pan_mouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.pan_mouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.zoomin_click);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.zoomin_mouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.zoomin_mouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.zoomout_click);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.zoomout_mouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.zoomout_mouseout);
MQA._prEvent.stopObserving(this.revert,"click",this.revert_click);
MQA._prEvent.stopObserving(this.revert,"mouseover",this.revert_mouseover);
MQA._prEvent.stopObserving(this.revert,"mouseout",this.revert_mouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.zoomarea_click[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.zoomarea_mouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.zoombox_mouseout);
MQA.Util._deleteDOMObject(this.pan[BEST_FIT]);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_NORTH]);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_EAST]);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_WEST]);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_SOUTH]);
this.pan[BEST_FIT]=null;
this.pan[MQA.PAN_NORTH]=null;
this.pan[MQA.PAN_EAST]=null;
this.pan[MQA.PAN_WEST]=null;
this.pan[MQA.PAN_SOUTH]=null;
this.pan=MQA.Util._deleteDOMObject(this.pan);
this.zoomarea=MQA.Util._deleteDOMObject(this.zoomarea);
this.zoomin=MQA.Util._deleteDOMObject(this.zoomin);
this.zoomout=MQA.Util._deleteDOMObject(this.zoomout);
this.zoombox.outerHTML=null;
this.zoombox=MQA.Util._deleteDOMObject(this.zoombox);
this.compassrosemap.outerHTML=null;
this.compassroseimg=MQA.Util._deleteDOMObject(this.compassroseimg);
this.compassrose=MQA.Util._deleteDOMObject(this.compassrose);
this.compassrosemap=MQA.Util._deleteDOMObject(this.compassrosemap);
this.revert=MQA.Util._deleteDOMObject(this.revert);
var y=this.elem.childNodes.length;
for(var i=0;i<y;i++){
this.elem.childNodes[i].outerHTML=null;
}
this.elem.outerHTML=null;
this.elem=MQA.Util._deleteDOMObject(this.elem);
};
MQA.LargeZoomControl2.prototype.eventmonitor=function(_f){
if(MQA._prEvent.element(_f)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_f)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_f)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_f)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_f)==this.pan[MQA.BEST_FIT]){
eventId="bestfit";
}
if(MQA._prEvent.element(_f)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_f)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_f)==this.revert){
eventId="revert";
}
if(MQA._prEvent.element(_f)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_f)==this.zoomarea[i]){
eventId=16-i;
}
}
switch(_f.type){
case "click":
switch(eventId){
case "revert":
this.map.restoreState();
break;
case "in":
if(this.map.getZoomLevel()<16){
this.setZoom(this.map.getZoomLevel());
this.map.zoomIn();
}
break;
case "out":
this.setZoom(this.map.getZoomLevel());
this.map.zoomOut();
break;
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
case "bestfit":
var _11=this.map.routerect;
var _12=this.map.mypois.getSize();
var _13=this.map.getPois();
if(_11&&(_12>0)){
var _14=new MQA.RectLL(new MQA.PointLL(_13.getAt(0).getLatLng().getLatitude(),_13.getAt(0).getLatLng().getLongitude()),new MQA.PointLL(_13.getAt(0).getLatLng().getLatitude(),_13.getAt(0).getLatLng().getLongitude()));
for(var i=1;i<_12;i++){
var _15=_13.getAt(i).getLatLng();
_14.ul.lat=Math.max(_15.lat,Math.max(_14.ul.lat,_11.ul.lat));
_14.ul.lng=Math.min(_15.lng,Math.min(_14.ul.lng,_11.ul.lng));
_14.lr.lat=Math.min(_15.lat,Math.min(_14.lr.lat,_11.lr.lat));
_14.lr.lng=Math.max(_15.lng,Math.max(_14.lr.lng,_11.lr.lng));
}
this.map._bestFit(_14,false,1,16);
this.setZoom(this.map.getZoomLevel());
}else{
if(_11&&(_12==0)){
this.map.bestFitRoute();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_11&&(_12>1)){
this.map.bestFitPois();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_11&&(_12==1)){
this.map.setCenter(this.map.savedCenter);
}
}
}
}
break;
default:
this.setZoom(eventId);
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
case "revert":
MQA._prEvent.element(_f).className="o";
break;
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
case "bestfit":
this.compassrose.className="c";
break;
default:
this.selectZoom(eventId);
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
case "revert":
case "bestfit":
if(MQA._prEvent.element(_f).className!="o"){
return;
}
MQA._prEvent.element(_f).className="";
break;
case "n":
case "s":
case "e":
case "w":
case "bestfit":
this.compassrose.className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
this.unselectZoom(eventId);
}
break;
}
break;
}
};
MQA.LargeZoomControl2.prototype.setZoom=function(_16){
var z=this.zoombox.childNodes[2];
z.style.top=((16-_16)*12+1)+"px";
z.alt="Zoom to level "+_16;
z.title="Zoom to level "+_16;
};
MQA.LargeZoomControl2.prototype.selectZoom=function(_18){
this.zoombox.childNodes[0].style.left=0-((17-_18)*25)+"px";
};
MQA.LargeZoomControl2.prototype.unselectZoom=function(_19){
this.zoombox.childNodes[0].style.left="0";
};
MQA.LargeZoomControl2.prototype.getHeight=function(){
return 322;
};
MQA.LargeZoomControl2.prototype.getWidth=function(){
return 45;
};
MQLargeZoomControl2=MQA.LargeZoomControl2;
MQA.ViewControl2=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(150,0));
this.imgUrl=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/mapviewcontrol-dotcom");
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.elem.className="dotcom-view-ctrl";
this.eStreetClick=null;
this.eStreetMouseOver=null;
this.eStreetMouseOut=null;
this.eArialClick=null;
this.eArialMouseOver=null;
this.eArialMouseOut=null;
this.eHybridChkBxClick=null;
this.ul=document.createElement("ul");
this.ul.className="map-view screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-view-street";
this.ul.appendChild(this.li1);
this.streetview=document.createElement("img");
this.streetview.className="";
this.streetview.border=0;
this.streetview.src=this.imgUrl;
this.streetview.alt="View Street Map";
this.streetview.title="View Street Map";
this.li1.appendChild(this.streetview);
this.li2=document.createElement("li");
this.li2.className="map-view-aerial";
this.ul.appendChild(this.li2);
this.aerialview=document.createElement("img");
this.aerialview.className="";
this.aerialview.border=0;
this.aerialview.src=this.imgUrl;
this.aerialview.alt="View Aerial Image";
this.aerialview.title="View Aerial Image";
this.li2.appendChild(this.aerialview);
this.li3=document.createElement("li");
this.li3.className="map-view-hybrid";
this.ul.appendChild(this.li3);
this.hybridview=document.createElement("img");
this.hybridview.className="";
this.hybridview.border=0;
this.hybridcontent=document.createElement("div");
this.hybridcontent.className="hybrid-content";
this.hybridcontent.innerHTML="<form action='javascript:void(0);'><input type='checkbox' checked='true' /><label>Show labels</label></form>";
if(browser.name=="msie"&&browser.version<7){
this.hybridcontent.childNodes[0].style.marginTop="10px";
}
this.hybridview.src=this.imgUrl;
if(browser.name=="msie"&&browser.version>6.9){
this.hybridcontent.childNodes[0].style.marginTop="10px";
}
this.hybridview.alt="View Hybrid Map";
this.hybridview.title="View Hybrid Map";
this.li3.appendChild(this.hybridview);
this.li3.appendChild(this.hybridcontent);
};
MQA.ViewControl2.prototype=new MQA.Control();
MQA.ViewControl2.prototype.constructor=MQA.ViewControl2;
MQA.ViewControl2.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.eStreetClick);
MQA._prEvent.observe(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.observe(this.streetview,"mouseout",this.eStreetMouseOut);
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
this.eHybridChkBxClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.hybridcontent.childNodes[0].childNodes[0],"click",this.eHybridChkBxClick);
switch(this.map.getMapType()){
case MQA.MAP_TYPE.MAP:
this.updateControl(MQA.MAP_TYPE.MAP);
break;
case MQA.MAP_TYPE.SAT:
this.updateControl(MQA.MAP_TYPE.SAT);
break;
case MQA.MAP_TYPE.HYB:
this.updateControl(MQA.MAP_TYPE.HYB);
break;
}
};
MQA.ViewControl2.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridcontent.childNodes[0].childNodes[0],"click",this.eHybridChkBxClick);
this.streetview.src="";
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
this.aerialview.src="";
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridcontent.innerHTML=null;
this.hybridcontent.outerHTML="";
this.hybridcontent=null;
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.li2.innerHTML=null;
this.li2.outerHTML="";
MQA.Util._deleteDOMObject(this.li2);
this.li2=null;
this.li3.innerHTML=null;
this.li3.outerHTML="";
MQA.Util._deleteDOMObject(this.li3);
this.li3=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl2.prototype.eventmonitor=function(evt){
var _1c=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_1c==this.streetview){
this.selectMode("street");
}else{
if(_1c==this.aerialview&&this.map.getMapType()!=MQA.MAP_TYPE.HYB){
this.selectMode("hybrid");
}else{
if(_1c.checked==true){
this.selectMode("hybrid");
}else{
if(_1c.checked==false){
this.selectMode("aerial");
}
}
}
}
break;
case "mouseover":
if(_1c.className!="a"){
_1c.className="o";
}
break;
case "mouseout":
if(_1c.className=="o"){
_1c.className="";
}
break;
}
};
MQA.ViewControl2.prototype.updateControl=function(_1d){
var _1e=this.hybridcontent.childNodes[0].childNodes[0];
switch(_1d){
case MQA.MAP_TYPE.MAP:
this.streetview.className="a";
this.aerialview.className="";
_1e.checked=false;
this.hybridview.parentNode.style.display="none";
break;
case MQA.MAP_TYPE.SAT:
this.streetview.className="";
this.aerialview.className="a";
_1e.checked=false;
this.hybridview.parentNode.style.display="block";
break;
case MQA.MAP_TYPE.HYB:
this.streetview.className="";
this.aerialview.className="a";
_1e.checked=true;
this.hybridview.parentNode.style.display="block";
break;
}
};
MQA.ViewControl2.prototype.selectMode=function(_1f){
var _20=this.map.getMapType();
var _21="noChange";
if(_1f=="street"&&_20!=MQA.MAP_TYPE.MAP){
_21=MQA.MAP_TYPE.MAP;
}
if(_1f=="aerial"&&_20!=MQA.MAP_TYPE.SAT){
_21=MQA.MAP_TYPE.SAT;
}
if(_1f=="hybrid"&&_20!=MQA.MAP_TYPE.HYB){
_21=MQA.MAP_TYPE.HYB;
}
if(_21!="noChange"){
this.map.setMapType(_21);
this.map.placeControl(this,true);
}
};
MQA.ViewControl2.prototype.getHeight=function(){
var _22=(this.hybridview.parentNode.style.display=="block")?(this.hybridview.parentNode.offsetHeight-15):0;
return (this.streetview.parentNode.offsetHeight+_22);
};
MQA.ViewControl2.prototype.getWidth=function(){
return (this.elem.childNodes[0].offsetWidth);
};
MQViewControl2=MQA.ViewControl2;
MQA.ViewControl3=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(5,0));
this.imgUrl=MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqtoolkit/mapviewcontrol-dotcom2");
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.elem.className="dotcom-view-ctrl2";
this.eStreetClick=null;
this.eStreetMouseOver=null;
this.eStreetMouseOut=null;
this.eArialClick=null;
this.eArialMouseOver=null;
this.eArialMouseOut=null;
this.eHybridChkBxClick=null;
this.ul=document.createElement("ul");
this.ul.className="map-view screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-view-street";
this.ul.appendChild(this.li1);
this.streetview=document.createElement("img");
this.streetview.className="";
this.streetview.border=0;
this.streetview.src=this.imgUrl;
this.streetview.alt="View Street Map";
this.streetview.title="View Street Map";
this.li1.appendChild(this.streetview);
this.li2=document.createElement("li");
this.li2.className="map-view-aerial";
this.ul.appendChild(this.li2);
this.aerialview=document.createElement("img");
this.aerialview.className="";
this.aerialview.border=0;
this.aerialview.src=this.imgUrl;
this.aerialview.alt="View Aerial Image";
this.aerialview.title="View Aerial Image";
this.li2.appendChild(this.aerialview);
this.li3=document.createElement("li");
this.li3.className="map-view-hybrid";
this.ul.appendChild(this.li3);
this.hybridview=document.createElement("img");
this.hybridview.className="";
this.hybridview.border=0;
this.hybridcontent=document.createElement("div");
this.hybridcontent.className="hybrid-content";
this.hybridcontent.innerHTML="<form action='javascript:void(0);'><input type='checkbox' checked='true' /><label>Show labels</label></form>";
this.hybridview.src=this.imgUrl;
if(browser.name=="msie"&&browser.version>6.9){
}
this.hybridview.alt="View Hybrid Map";
this.hybridview.title="View Hybrid Map";
this.li3.appendChild(this.hybridview);
this.li3.appendChild(this.hybridcontent);
};
MQA.ViewControl3.prototype=new MQA.Control();
MQA.ViewControl3.prototype.constructor=MQA.ViewControl3;
MQA.ViewControl3.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.eStreetClick);
MQA._prEvent.observe(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.observe(this.streetview,"mouseout",this.eStreetMouseOut);
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
this.eHybridChkBxClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.hybridcontent.childNodes[0].childNodes[0],"click",this.eHybridChkBxClick);
switch(this.map.getMapType()){
case MQA.MAP_TYPE.MAP:
this.updateControl(MQA.MAP_TYPE.MAP);
break;
case MQA.MAP_TYPE.SAT:
this.updateControl(MQA.MAP_TYPE.SAT);
break;
case MQA.MAP_TYPE.HYB:
this.updateControl(MQA.MAP_TYPE.HYB);
break;
}
};
MQA.ViewControl3.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridcontent.childNodes[0].childNodes[0],"click",this.eHybridChkBxClick);
this.streetview.src="";
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
this.aerialview.src="";
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridcontent.innerHTML=null;
this.hybridcontent.outerHTML="";
this.hybridcontent=null;
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.li2.innerHTML=null;
this.li2.outerHTML="";
MQA.Util._deleteDOMObject(this.li2);
this.li2=null;
this.li3.innerHTML=null;
this.li3.outerHTML="";
MQA.Util._deleteDOMObject(this.li3);
this.li3=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl3.prototype.eventmonitor=function(evt){
var _25=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_25==this.streetview){
this.selectMode("street");
}else{
if(_25==this.aerialview&&this.map.getMapType()!=MQA.MAP_TYPE.HYB){
this.selectMode("hybrid");
}else{
if(_25.checked==true){
this.selectMode("hybrid");
}else{
if(_25.checked==false){
this.selectMode("aerial");
}
}
}
}
break;
case "mouseover":
if(_25.className!="a"){
_25.className="o";
}
break;
case "mouseout":
if(_25.className=="o"){
_25.className="";
}
break;
}
};
MQA.ViewControl3.prototype.updateControl=function(_26){
var _27=this.hybridcontent.childNodes[0].childNodes[0];
switch(_26){
case MQA.MAP_TYPE.MAP:
this.streetview.className="a";
this.aerialview.className="";
_27.checked=false;
this.hybridview.parentNode.style.display="none";
break;
case MQA.MAP_TYPE.SAT:
this.streetview.className="";
this.aerialview.className="a";
_27.checked=false;
this.hybridview.parentNode.style.display="block";
break;
case MQA.MAP_TYPE.HYB:
this.streetview.className="";
this.aerialview.className="a";
_27.checked=true;
this.hybridview.parentNode.style.display="block";
break;
}
};
MQA.ViewControl3.prototype.selectMode=function(_28){
var _29=this.map.getMapType();
var _2a="noChange";
if(_28=="street"&&_29!=MQA.MAP_TYPE.MAP){
_2a=MQA.MAP_TYPE.MAP;
}
if(_28=="aerial"&&_29!=MQA.MAP_TYPE.SAT){
_2a=MQA.MAP_TYPE.SAT;
}
if(_28=="hybrid"&&_29!=MQA.MAP_TYPE.HYB){
_2a=MQA.MAP_TYPE.HYB;
}
if(_2a!="noChange"){
this.map.setMapType(_2a);
this.map.placeControl(this,true);
}
};
MQA.ViewControl3.prototype.getHeight=function(){
var _2b=(this.hybridview.parentNode.style.display=="block")?(this.hybridview.parentNode.offsetHeight-15):0;
return (this.streetview.parentNode.offsetHeight+_2b);
};
MQA.ViewControl3.prototype.getWidth=function(){
return (this.elem.childNodes[0].offsetWidth);
};
MQViewControl3=MQA.ViewControl3;

MQA.GlobalTrafficProcessor=new function(){
this.trafficContainer=[];
this.trafficMarketData=null;
this.trafficIncidentData=null;
this.onTrafficMarketDataReturn=function(_1){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_1){
return this.trafficContainer[i].processMarketData(this.trafficMarketData);
}
}
};
this.onTrafficIncidentDataReturn=function(_3){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_3){
return this.trafficContainer[i].processIncidentData(this.trafficIncidentData);
}
}
};
this.addInstance=function(t){
this.trafficContainer.push(t);
};
};
MQA.Traffic=function(_6){
MQA.Base.call(this);
this.trafficServer="http://"+TRAFFSERVER;
this.timeoutDuration=10000;
this.guid=MQA.Util._getRandomGUID(10);
if(typeof (_6)!="undefined"){
this.map=_6;
_6.traffic=this;
}else{
this.map=null;
}
var _7=this.map;
this.available=true;
MQA.GlobalTrafficProcessor.addInstance(this);
this.flowImage=null;
this.flowOpacity=0.55;
this.flowActive=false;
this.marketsActive=false;
this.incidentsActive=false;
this.autoDisplay=false;
this.lastUpdateTime=null;
this.flowCollectionName="mqa.traffic_flow";
this.marketCollectionName="mqa.traffic_markets";
this.incidentCollectionName="mqa.traffic_incidents";
this.minIncidentZoomLevel=7;
this.maxIncidentZoomLevel=16;
this.maxMarketZoomLevel=6;
this.minMarketZoomLevel=2;
this.minFlowZoomLevel=7;
this.maxFlowZoomLevel=16;
this.flowCollection=new MQA.ShapeCollection();
this.flowCollection.setName(this.flowCollectionName);
this.flowCollection.setMaxZoomLevel(this.maxFlowZoomLevel);
this.flowCollection.setMinZoomLevel(this.minFlowZoomLevel);
this.marketCollection=null;
this.incidentCollection=null;
this.severityColors=[];
this.severityColors[0]="#FBEF69";
this.severityColors[1]="#FBEF69";
this.severityColors[2]="#FF9900";
this.severityColors[3]="#FF9900";
this.severityColors[4]="#E40404";
this.severityText=[];
this.severityText[0]="Minimal";
this.severityText[1]="Minimal";
this.severityText[2]="Moderate";
this.severityText[3]="Moderate";
this.severityText[4]="Severe";
this.infoWindowTitleTextColor=[];
this.infoWindowTitleTextColor[0]="#000000";
this.infoWindowTitleTextColor[1]="#000000";
this.infoWindowTitleTextColor[2]="#000000";
this.infoWindowTitleTextColor[3]="#000000";
this.infoWindowTitleTextColor[4]="#FFFFFF";
this.incidentIcons=[];
this.incidentIcons[0]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/incid_min.png",29,29);
this.incidentIcons[1]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/incid_min.png",29,29);
this.incidentIcons[2]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/incid_mod.png",29,29);
this.incidentIcons[3]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/incid_mod.png",29,29);
this.incidentIcons[4]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/incid_sev.png",29,29);
this.eventIcons=[];
this.eventIcons[0]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/event_min.png",29,29);
this.eventIcons[1]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/event_min.png",29,29);
this.eventIcons[2]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/event_mod.png",29,29);
this.eventIcons[3]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/event_mod.png",29,29);
this.eventIcons[4]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/event_sev.png",29,29);
this.constructionIcons=[];
this.constructionIcons[0]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/const_min.png",29,29);
this.constructionIcons[1]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/const_min.png",29,29);
this.constructionIcons[2]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/const_mod.png",29,29);
this.constructionIcons[3]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/const_mod.png",29,29);
this.constructionIcons[4]=new MQA.Icon("http://img.mqcdn.com/mqtraffic/const_sev.png",29,29);
this.marketIcon=new MQA.Icon("http://img.mqcdn.com/mqtraffic/stoplight.png",16,30);
this.maxInfoWindowWidth=285;
this.incidentTitleCallback=null;
this.incidentContentCallback=null;
this.marketTitleCallback=null;
this.marketContentCallback=null;
this.infoWindowTitleCallback=null;
this.incidentTypeFilter=[MQA.TRAFFIC_CONSTRUCTION,MQA.TRAFFIC_EVENTS,MQA.TRAFFIC_INCIDENTS];
this._facio=function(_8,_9){
switch(_8){
case "flowOpacity":
if(this.flowImage){
this.flowImage.setValue("imageOpacity",this.flowOpacity);
}
break;
case "incidentTypeFilter":
if(this.incidentsActive){
this.addIncidents();
}
break;
case "maxInfoWindowWidth":
if(this.marketsActive){
for(var i=0;i<this.marketCollection.getSize();i++){
this.marketCollection.getAt(i).setValue("maxInfoWindowWidth",_9);
}
}
if(this.incidentsActive){
for(var i=0;i<this.incidentCollection.getSize();i++){
this.incidentCollection.getAt(i).setValue("maxInfoWindowWidth",_9);
}
}
break;
}
};
this._duco=function(_b,_c){
};
this.addFlow=function(){
if(!this.map){
return;
}
if(this.flowActive){
this.flowCollection.removeAll();
this.flowImage=null;
}
this.flowActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _d=new Object;
_d.centerPoint=this.map.getCenter();
_d.width=this.map.width+1024;
_d.height=this.map.height+1024;
_d.scale=this.map.getScale();
_d.left=-512;
_d.top=-512;
_d.bottom=_d.top+_d.height;
_d.right=_d.left+_d.width;
_d.src=this.trafficServer+"/traffic/flow?"+"lat="+_d.centerPoint.getLatitude()+"&lng="+_d.centerPoint.getLongitude()+"&width="+_d.width+"&height="+_d.height+"&scale="+_d.scale+"&key="+Key+"&rand="+(Math.random()*10);
this.flowImage=new MQA.ImageOverlay();
this.flowImage.setValue("imageURL",_d.src);
this.flowImage.setValue("imageOpacity",this.flowOpacity);
var _e=new MQA.LatLngCollection();
_e.add(this.map.pixToLL(new MQA.Point(_d.left,_d.top)));
_e.add(this.map.pixToLL(new MQA.Point(_d.right,_d.bottom)));
this.flowImage.setValue("shapePoints",_e);
this.flowCollection.removeAll();
this.flowCollection.add(this.flowImage);
if(!this.flowCollection.isOnMap()){
this.map.addShapeCollection(this.flowCollection);
}
if(this.flowImage.shape){
this.flowImage.shape.style.zIndex=-1;
}
var e=new MQA.Event("MQA.Traffic.flowAdded");
e.srcObject=this;
this.onFlowAdded(e);
};
this.removeFlow=function(){
if(!this.map){
return;
}
this.flowActive=false;
if(this.flowImage){
this.flowCollection.removeAll();
this.flowImage=null;
}
var e=new MQA.Event("MQA.Traffic.flowRemoved");
e.srcObject=this;
this.onFlowRemoved(e);
};
this.onFlowAdded=function(e){
MQA.EventManager.trigger(this,"flowadded",e);
};
this.onFlowRemoved=function(e){
MQA.EventManager.trigger(this,"flowremoved",e);
};
this.addMarkets=function(){
if(this.marketsActive){
this.removeMarkets();
}
this.marketsActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _13=this.trafficServer+"/traffic/markets?format=json&var=MQA.GlobalTrafficProcessor.trafficMarketData&fn=null";
_13+="&rand="+Math.random();
var _14=[this.guid];
var _15=function(){
return MQA.GlobalTrafficProcessor["onTrafficMarketDataReturn"].apply(MQA.GlobalTrafficProcessor,_14);
};
this.marketCollection=new MQA.RemoteCollection(_13,new MQA.JSONDeserializer(_15));
this.marketCollection.setName(this.marketCollectionName);
this.marketCollection.setDeclutter(false);
this.marketCollection.setMaxZoomLevel(this.maxMarketZoomLevel);
this.marketCollection.setMinZoomLevel(this.minMarketZoomLevel);
MQA.EventManager.addListener(this.marketCollection,"dataloaded",this.processMarketCollection);
MQA.EventManager.addListener(this.marketCollection,"datatimeout",this.processMarketTimeout,this);
var e=new MQA.Event("MQA.Traffic.marketsAdded");
e.srcObject=this;
this.onMarketsAdded(e);
};
this.removeMarkets=function(){
this.marketsActive=false;
if(!this.map.getInfoWindow().isHidden()){
this.map.getInfoWindow().hide();
}
this.map.removeShapeCollection(this.marketCollectionName);
this.marketCollection.removeAll();
this.marketCollection=null;
var e=new MQA.Event("MQA.Traffic.marketsRemoved");
e.srcObject=this;
this.onMarketsRemoved(e);
};
this.processMarketData=function(_18){
var _19=[];
var _1a,_1b;
for(var x in _18){
_1a=new MQA.Poi(new MQA.LatLng(_18[x].latitude,_18[x].longitude),this.marketIcon);
if(this.marketTitleCallback){
_1a.setValue("infoTitleHTML",this.marketTitleCallback(_18[x]));
}else{
_1a.setValue("infoTitleHTML",_18[x].city+", "+_18[x].state);
}
if(this.marketContentCallback){
_1a.setValue("infoContentHTML",this.marketContentCallback(_18[x]));
}else{
_1a.setValue("infoContentHTML","Please zoom in to view traffic conditions.");
}
MQA.EventManager.addListener(_1a,"mouseover",dojo.hitch(this,"showMarketRollover",_1a));
MQA.EventManager.addListener(_1a,"mouseout",dojo.hitch(this,"closeMarketRollover",_1a));
MQA.EventManager.addListener(_1a,"click",dojo.hitch(this,"clickMarketPoi",_1a));
_1a.setValue("maxInfoWindowWidth");
_19.push(_1a);
}
return _19;
};
this.showMarketRollover=function(poi){
var _1e=mq.getPopupContentWidthHeight(poi.getValue("infoContentHTML"));
var _1f=document.createElement("div");
_1f.style.width=_1e.width+"px";
_1f.style.height=_1e.height+"px";
_1f.style.backgroundColor="#FFFFFF";
_1f.innerHTML=poi.getValue("infoContentHTML");
poi.showInfoRollover(_1f,poi.getValue("infoTitleHTML"));
};
this.closeMarketRollover=function(poi){
poi.closeInfoRollover();
};
this.clickMarketPoi=function(poi){
if(poi.ir){
poi.closeInfoRollover();
}
poi.showInfoWindow();
};
this.processMarketCollection=function(e){
_7.addShapeCollection(e.srcObject);
};
this.processMarketTimeout=function(e){
var e=new MQA.Event("MQA.Traffic.marketTimeout");
e.srcObject=this;
this.onMarketTimeout(e);
};
this.onMarketsAdded=function(e){
MQA.EventManager.trigger(this,"marketsadded",e);
};
this.onMarketsRemoved=function(e){
MQA.EventManager.trigger(this,"marketsremoved",e);
};
this.onMarketTimeout=function(e){
MQA.EventManager.trigger(this,"markettimeout",e);
};
this.addIncidents=function(){
if(this.incidentsActive){
this.removeIncidents();
}
this.incidentsActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _27=this._getMapRectInfo();
var _28=new MQA.RectLL(new MQA.LatLng(_27.ullat,_27.ullng),new MQA.LatLng(_27.lrlat,_27.lrlng));
var _29="&ullat="+_28.ul.lat+"&ullng="+_28.ul.lng+"&lrlat="+_28.lr.lat+"&lrlng="+_28.lr.lng;
var _2a=this.trafficServer+"/traffic/incidents?format=json&key="+Key+"&var=MQA.GlobalTrafficProcessor.trafficIncidentData"+_29+"&fn=null";
_2a+="&rand="+Math.random();
var _2b=[this.guid];
var _2c=function(){
return MQA.GlobalTrafficProcessor["onTrafficIncidentDataReturn"].apply(MQA.GlobalTrafficProcessor,_2b);
};
this.incidentCollection=new MQA.RemoteCollection(_2a,new MQA.JSONDeserializer(_2c));
this.incidentCollection.setName(this.incidentCollectionName);
this.incidentCollection.setDeclutter(false);
this.incidentCollection.setMaxZoomLevel(this.maxIncidentZoomLevel);
this.incidentCollection.setMinZoomLevel(this.minIncidentZoomLevel);
MQA.EventManager.addListener(this.incidentCollection,"dataloaded",this.processIncidentCollection);
MQA.EventManager.addListener(this.incidentCollection,"datatimeout",this.processIncidentTimeout,this);
var e=new MQA.Event("MQA.Traffic.incidentsAdded");
e.srcObject=this;
this.onIncidentsAdded(e);
};
this.removeIncidents=function(){
this.incidentsActive=false;
if(!this.map.getInfoWindow().isHidden()){
this.map.getInfoWindow().hide();
}
this.map.removeShapeCollection(this.incidentCollectionName);
this.incidentCollection.removeAll();
this.incidentCollection=null;
var e=new MQA.Event("MQA.Traffic.incidentsRemoved");
e.srcObject=this;
this.onIncidentsRemoved(e);
};
this.processIncidentData=function(_2f){
if(this.incidentTypeFilter.length==0){
return [];
}
var _30=[];
var _31,_32,_33,_34;
_2f=_2f.incidents;
for(var x in _2f){
_2f[x].severity=(_2f[x].severity<0||_2f[x].severity>4?0:_2f[x].severity);
if(!MQA.Util.inArray(_2f[x].incidentType,this.incidentTypeFilter)){
continue;
}
_31=new MQA.Poi(new MQA.LatLng(_2f[x].latitude,_2f[x].longitude));
_34="color:"+this.infoWindowTitleTextColor[_2f[x].severity]+";font-weight:bold;font-size:12px";
switch(_2f[x].incidentType){
case 1:
_31.setValue("titleBackgroundColor",this.severityColors[_2f[x].severity]);
_33="<span style=\""+_34+"\">"+this.severityText[_2f[x].severity]+" Impact Construction</span>";
_31.setValue("icon",this.constructionIcons[_2f[x].severity]);
break;
case 2:
_31.setValue("titleBackgroundColor",this.severityColors[_2f[x].severity]);
_33="<span style=\""+_34+"\">"+this.severityText[_2f[x].severity]+" Impact Event</span>";
_31.setValue("icon",this.eventIcons[_2f[x].severity]);
break;
case 4:
_31.setValue("titleBackgroundColor",this.severityColors[_2f[x].severity]);
_33="<span style=\""+_34+"\">"+this.severityText[_2f[x].severity]+" Impact Incident</span>";
_31.setValue("icon",this.incidentIcons[_2f[x].severity]);
break;
}
_31.setValue("maxInfoWindowWidth",this.maxInfoWindowWidth);
if(this.infoWindowTitleCallback){
_33=this.infoWindowTitleCallback(_2f[x]);
}
_31.setValue("infoWindowTitleText",_33);
if(this.incidentTitleCallback){
_31.setValue("infoTitleHTML",this.incidentTitleCallback(_2f[x]));
}else{
_31.setValue("infoTitleHTML",_2f[x].title);
}
if(this.incidentContentCallback){
_31.setValue("infoContentHTML",this.incidentContentCallback(_2f[x]));
}else{
var s=_2f[x].description+"<br/><br/>";
s+="<b>Start Time:</b> "+_2f[x].startTime+"<br/>";
s+="<b>End Time:</b> "+_2f[x].endTime+"<br/>";
s+="(All times estimated)";
_31.setValue("infoContentHTML",s);
}
_30.push(_31);
}
return _30;
};
this.processIncidentCollection=function(e){
_7.addShapeCollection(e.srcObject);
};
this.processIncidentTimeout=function(e){
this.available=false;
var e=new MQA.Event("MQA.Traffic.incidentTimeout");
e.srcObject=this;
this.onIncidentTimeout(e);
};
this.onIncidentsAdded=function(e){
MQA.EventManager.trigger(this,"incidentsadded",e);
};
this.onIncidentsRemoved=function(e){
MQA.EventManager.trigger(this,"incidentsremoved",e);
};
this.onIncidentTimeout=function(e){
MQA.EventManager.trigger(this,"incidenttimeout",e);
};
this.isAvailable=function(){
this.getValue("available");
};
this.refresh=function(){
if(this.flowActive&&this.flowCollection.inZoomWindow()){
this.addFlow();
}
if(this.incidentsActive&&this.incidentCollection.inZoomWindow()){
this.addIncidents();
}
};
this._getMapRectInfo=function(){
if(!this.map){
return null;
}
var _3c=512;
var _3d=this.map.getDragOffset();
topTileX=-512;
topTileY=-512;
var _3e=new MQA.Point(topTileX,topTileY);
var _3f=new MQA.Point(this.map.width+_3c,this.map.height+_3c);
var _40=this.map.pixToLL(_3e);
var _41=this.map.pixToLL(_3f);
var _42=new MQA.RectLL(_40,_41);
var _43=_3f.x-_3e.x;
var _44=_3f.y-_3e.y;
var _45=new Object;
_45.ullat=_40.getLatitude();
_45.ullng=_40.getLongitude();
_45.lrlat=_41.getLatitude();
_45.lrlng=_41.getLongitude();
_45.scale=this.map.getScale();
_45.width=_43;
_45.height=_44;
_45.left=topTileX-_3d.x;
_45.top=topTileY-_3d.y;
return _45;
};
};
MQA.TileMap.prototype.handleTraffic=function(_46){
_46=(typeof (_46)!="undefined"?_46:false);
if(this.traffic){
this.traffic.refresh();
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
if(this.controls[MQA.CONTROL_TRAFFIC].controlOn){
this.controls[MQA.CONTROL_TRAFFIC].updateLegendTime();
if(_46){
this.controls[MQA.CONTROL_TRAFFIC].updateTrafficLegend();
}
}
}
}
};
MQA.TRAFFIC_CONSTRUCTION=1;
MQA.TRAFFIC_EVENTS=2;
MQA.TRAFFIC_INCIDENTS=4;

MQA.TrafficControl=function(_1,_2){
MQA.Base.call(this);
this.controlVersion="2.0";
this.type=MQA.CONTROL_TRAFFIC;
this.map=null;
var _3=true;
this.position=(typeof (_1)!="undefined"?_1:new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(90,0)));
this.legendPosition=(typeof (_2)!="undefined"?_2:new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,new MQA.Size(-10,-40)));
this.width=83;
this.height=25;
this.legendWidth=232;
this.legendHeight=187;
this.controlOn=false;
this.legendMode=2;
this.imageServerPath="http://img.mqcdn.com/mqtraffic/";
this.trafficButtonURL=this.imageServerPath+"trafficbuttons2.png";
this.legendFrameImage=this.imageServerPath+"legend_frame.png";
var _4="Traffic Data &copy; 2008 INRIX";
var _5=100;
var _6="http://img.mqcdn.com/a/a";
var _7=10;
var _8=6;
var _9=16;
var _a=13;
var _b=14;
var _c=1;
var _d=15;
var _e=13;
var _f=17;
this.legendIconImages=[];
this.legendIconImages[0]=new MQA.Icon(this.imageServerPath+"legend_red_triangle.png",22,20);
this.legendIconImages[1]=new MQA.Icon(this.imageServerPath+"legend_orange_triangle.png",22,20);
this.legendIconImages[2]=new MQA.Icon(this.imageServerPath+"legend_yellow_triangle.png",22,20);
this.legendIconText=["Severe","Moderate","Minor"];
this.legendIconsVisible=true;
this.legendHelpLinkVisible=false;
this.legendFlowColors=["#EE3939","#FEDC55","#65B565","#2F0000"];
this.legendFlowText=["Stop and Go","Slowing","Normal","Road Closed"];
this.legendFlowVisible=true;
this.legendCheckboxes=[true,true,false];
this.showIncidents=this.legendCheckboxes[0];
this.showConstruction=this.legendCheckboxes[1];
this.showEvents=this.legendCheckboxes[2];
this.legendSliderVisible=false;
this.slider=null;
this.traffic=null;
this.legendDiv=null;
this.titleBarDiv=null;
this.titleBarButtonDiv=null;
this.titleBarButtonInsideDiv=null;
this.refreshLinkDiv=null;
this.checkBoxContainerDiv=null;
this.incidentCheckDiv=null;
this.constructionCheckDiv=null;
this.eventCheckDiv=null;
this.helpLinkDiv=null;
this.eTitleBarHandler=null;
this.eTitleBarButtonClick=null;
this.eRefreshLinkClick=null;
this.eCheckBoxClick=null;
this.eHelpLinkClick=null;
this.isDragging=false;
this.mouseStartX=0;
this.mouseStartY=0;
this.shapeStartX=0;
this.shapeStartY=0;
this._facio=function(key,_11){
switch(key){
case "legendMode":
if(this.controlOn){
this._drawLegend(_11);
}
break;
case "legendCheckboxes":
this.showIncidents=_11[0];
this.showConstruction=_11[1];
this.showEvents=_11[2];
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconImages":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconText":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconsVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendFlowVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendSliderVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "position":
if(this.trafficButtonDiv){
var _12=this._getPositionXY(this.position);
this.trafficButtonDiv.style.left=_12.x+"px";
this.trafficButtonDiv.style.top=_12.y+"px";
if(this.legendDiv){
_12=this._getPositionXY(this.legendPosition,"legend");
this.legendDiv.style.left=_12.x+"px";
this.legendDiv.style.top=_12.y+"px";
}
}
break;
case "legendHelpLinkVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
}
};
this._duco=function(key){
};
this.draw=function(){
if(this.trafficButtonDiv){
this.dispose(false);
}else{
this.traffic=new MQA.Traffic(this.map);
}
var _14=(this.showIncidents?[MQA.TRAFFIC_INCIDENTS]:[]);
if(this.showConstruction){
_14.push(MQA.TRAFFIC_CONSTRUCTION);
}
if(this.showEvents){
_14.push(MQA.TRAFFIC_EVENTS);
}
this.traffic.setValue("incidentTypeFilter",_14);
this.trafficButtonDiv=document.createElement("div");
var _15=this._getPositionXY(this.position);
this.trafficButtonDiv.style.left=_15.x+"px";
this.trafficButtonDiv.style.top=_15.y+"px";
this.trafficButtonDiv.style.width=this.width+"px";
this.trafficButtonDiv.style.height=this.height+"px";
this.trafficButtonDiv.style.position="absolute";
this.trafficButtonDiv.style.overflow="hidden";
this.trafficButtonDiv.id="trafficButtonDiv";
this.trafficButtonImage=document.createElement("img");
this.trafficButtonImage.style.position="absolute";
this.trafficButtonImage.style.border=0;
this.trafficButtonImage.style.left="0px";
this.trafficButtonImage.style.top="0px";
this.trafficButtonImage.alt="View Traffic";
this.trafficButtonImage.title="View Traffic";
this.trafficButtonImage.id="trafficButtonImage";
if(MQA.browser.name=="msie"&&MQA.browser.version<7){
this.trafficButtonImage.src=_6;
this.trafficButtonImage.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+this.trafficButtonURL+"\", sizingMethod=\"image\")";
}else{
this.trafficButtonImage.src=this.trafficButtonURL;
}
this.trafficButtonDiv.appendChild(this.trafficButtonImage);
this.map.parent2.appendChild(this.trafficButtonDiv);
this.eTrafficButtonClick=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
this.eTrafficButtonMouseOver=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
this.eTrafficButtonMouseOut=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
MQA._prEvent.observe(this.trafficButtonImage,"click",this.eTrafficButtonClick);
MQA._prEvent.observe(this.trafficButtonImage,"mouseover",this.eTrafficButtonMouseOver);
MQA._prEvent.observe(this.trafficButtonImage,"mouseout",this.eTrafficButtonMouseOut);
};
this.dispose=function(_16){
var _16=(typeof (_16)!="undefined"?_16:true);
if(this.traffic.flowActive){
this.traffic.removeFlow();
}
if(this.traffic.incidentsActive){
this.traffic.removeIncidents();
}
if(this.traffic.marketsActive){
this.traffic.removeMarkets();
}
if(this.controlOn){
this._removeLegend(true);
}
this.controlOn=false;
MQA._prEvent.stopObserving(this.trafficButtonImage,"click",this.eTrafficButtonClick);
MQA._prEvent.stopObserving(this.trafficButtonImage,"mouseover",this.eTrafficButtonMouseOver);
MQA._prEvent.stopObserving(this.trafficButtonImage,"mouseout",this.eTrafficButtonMouseOut);
this.trafficButtonDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.trafficButtonDiv);
MQA.Util._deleteDOMObject(this.trafficButtonDiv);
this.trafficButtonDiv=null;
this.trafficButtonImage=null;
if(_16){
this.traffic=null;
this.map=null;
}
};
this._drawLegend=function(_17){
if(this.legendDiv){
this._removeLegend();
}
var _18=this._calculateLegendSize(_17);
this.legendWidth=_18.x;
this.legendHeight=_18.y;
var _19=19;
var _1a=11;
var _1b=274;
var _1c=342;
var _1d=278;
var _1e=363;
var _1f=23;
var _20=_9;
var _21=10;
this.legendDiv=document.createElement("div");
var _22=this._getPositionXY(this.legendPosition,"legend");
this.legendDiv.style.left=_22.x+"px";
this.legendDiv.style.top=_22.y+"px";
this.legendDiv.style.width=this.legendWidth+"px";
this.legendDiv.style.height=this.legendHeight+"px";
this.legendDiv.unselectable="on";
this.legendDiv.style.border="none";
this.legendDiv.style.position="absolute";
this.legendDiv.id="legendDiv";
var _23=[];
for(var i=0;i<9;i++){
_23[i]=document.createElement("div");
_23[i].unselectable="on";
_23[i].style.position="absolute";
_23[i].style.overflow="hidden";
_23[i].id="legendBorders"+i;
var _25=document.createElement("div");
_25.unselectable="on";
_25.id="insideDiv";
_25.style.width=_1d+"px";
_25.style.height=_1e+"px";
if(MQA.browser.name=="msie"&&(MQA.browser.version<7)){
_25.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.legendFrameImage+"', sizingMethod='scale')";
}else{
_25.style.background="url(\""+this.legendFrameImage+"\") no-repeat";
}
_23[i].appendChild(_25);
}
_23[0].style.left="0px";
_23[0].style.top="0px";
_23[0].style.width=_19+"px";
_23[0].style.height=_1a+"px";
_23[0].firstChild.style.marginLeft="0px";
_23[0].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_23[0]);
_23[1].style.left=_19+"px";
_23[1].style.top="0px";
_23[1].style.width=(this.legendWidth-(2*_19))+"px";
_23[1].style.height=_1a+"px";
_23[1].firstChild.style.marginLeft=-_19+"px";
_23[1].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_23[1]);
_23[2].style.left=(this.legendWidth-_19)+"px";
_23[2].style.top="0px";
_23[2].style.width=_19+"px";
_23[2].style.height=_1a+"px";
_23[2].firstChild.style.marginLeft=-(_1b-_19)+"px";
_23[2].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_23[2]);
_23[3].style.left="0px";
_23[3].style.top=_1a+"px";
_23[3].style.width=_19+"px";
_23[3].style.height=(this.legendHeight-(2*_1a))+"px";
_23[3].firstChild.style.marginLeft="0px";
_23[3].firstChild.style.marginTop=-_1a+"px";
this.legendDiv.appendChild(_23[3]);
_23[4].style.left=_19+"px";
_23[4].style.top=_1a+"px";
_23[4].style.width=(this.legendWidth-(2*_19))+"px";
_23[4].style.height=(this.legendHeight-(2*_1a))+"px";
_23[4].firstChild.style.marginLeft=-_19+"px";
_23[4].firstChild.style.marginTop=-_1a+"px";
this.legendDiv.appendChild(_23[4]);
_23[5].style.left=(this.legendWidth-_19)+"px";
_23[5].style.top=_1a+"px";
_23[5].style.width=_19+"px";
_23[5].style.height=(this.legendHeight-(2*_1a))+"px";
_23[5].firstChild.style.marginLeft=-(_1b-_19)+"px";
_23[5].firstChild.style.marginTop=-_1a+"px";
this.legendDiv.appendChild(_23[5]);
_23[6].style.left="0px";
_23[6].style.top=(this.legendHeight-_1a)+"px";
_23[6].style.width=_19+"px";
_23[6].style.height=_1a+"px";
_23[6].firstChild.style.marginLeft="0px";
_23[6].firstChild.style.marginTop=-(_1c-_1a)+"px";
this.legendDiv.appendChild(_23[6]);
_23[7].style.left=_19+"px";
_23[7].style.top=(this.legendHeight-_1a)+"px";
_23[7].style.width=(this.legendWidth-(2*_19))+"px";
_23[7].style.height=_1a+"px";
_23[7].firstChild.style.marginLeft=-_19+"px";
_23[7].firstChild.style.marginTop=-(_1c-_1a)+"px";
this.legendDiv.appendChild(_23[7]);
_23[8].style.left=(this.legendWidth-_19)+"px";
_23[8].style.top=(this.legendHeight-_1a)+"px";
_23[8].style.width=_19+"px";
_23[8].style.height=_1a+"px";
_23[8].firstChild.style.marginLeft=-(_1b-_19)+"px";
_23[8].firstChild.style.marginTop=-(_1c-_1a)+"px";
this.legendDiv.appendChild(_23[8]);
this.titleBarDiv=document.createElement("div");
this.titleBarDiv.unselectable="on";
this.titleBarDiv.style.MozUserSelect="none";
this.titleBarDiv.style.position="absolute";
this.titleBarDiv.style.overflow="hidden";
this.titleBarDiv.id="titleBarDiv";
this.titleBarDiv.style.left="10px";
this.titleBarDiv.style.top=_21+"px";
this.titleBarDiv.style.width=((this.legendWidth-30)-_1f)+"px";
this.titleBarDiv.style.height="12px";
if(document.compatMode!="CSS1Compat"&&MQA.browser.name=="msie"){
this.titleBarDiv.style.height="18px";
}
this.titleBarDiv.style.padding="3px";
this.titleBarDiv.style.backgroundColor="#DADADA";
this.titleBarDiv.style.color="#000000";
this.titleBarDiv.style.fontSize="12px";
this.titleBarDiv.style.fontFamily="Arial";
this.titleBarDiv.style.fontWeight="normal";
this.titleBarDiv.style.lineHeight="90%";
this.titleBarDiv.style.cursor=this.map.grab_mousecursor;
this.updateLegendTime();
this.legendDiv.appendChild(this.titleBarDiv);
this.titleBarButtonDiv=document.createElement("div");
this.titleBarButtonDiv.unselectable="on";
this.titleBarButtonDiv.style.position="absolute";
this.titleBarButtonDiv.style.overflow="hidden";
this.titleBarButtonDiv.id="titleBarButtonDiv";
this.titleBarButtonDiv.style.left=((this.legendWidth-_1f)-10)+"px";
this.titleBarButtonDiv.style.top=(_21+1)+"px";
this.titleBarButtonDiv.style.width=_1f+"px";
this.titleBarButtonDiv.style.height=_20+"px";
this.titleBarButtonInsideDiv=document.createElement("div");
this.titleBarButtonInsideDiv.unselectable="on";
this.titleBarButtonInsideDiv.id="titleBarButtonInsideDiv";
this.titleBarButtonInsideDiv.style.width=_1d+"px";
this.titleBarButtonInsideDiv.style.height=_1e+"px";
this.titleBarButtonInsideDiv.style.background="url(\""+this.legendFrameImage+"\") no-repeat";
if(this._getCollapseDirection()=="up"){
var _26=-245;
var _27=-214;
}else{
var _26=-214;
var _27=-245;
}
if(this.legendMode!=0){
this.titleBarButtonInsideDiv.title="Hide Legend";
}else{
this.titleBarButtonInsideDiv.title="Show Legend";
}
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?_26:_27)+"px";
this.titleBarButtonInsideDiv.style.marginTop=-344+"px";
this.titleBarButtonDiv.appendChild(this.titleBarButtonInsideDiv);
this.legendDiv.appendChild(this.titleBarButtonDiv);
_21+=_8+_20;
this.refreshLinkDiv=document.createElement("div");
this.refreshLinkDiv.unselectable="on";
this.refreshLinkDiv.style.position="absolute";
this.refreshLinkDiv.id="refreshLinkDiv";
this.refreshLinkDiv.style.left="10px";
this.refreshLinkDiv.style.top=_21+"px";
this.refreshLinkDiv.style.width="75px";
this.refreshLinkDiv.style.height=_a+"px";
this.refreshLinkDiv.style.cursor="pointer";
this.refreshLinkDiv.style.color="#0000FF";
this.refreshLinkDiv.style.fontSize="10px";
this.refreshLinkDiv.style.fontFamily="Arial";
this.refreshLinkDiv.style.textDecoration="underline";
this.refreshLinkDiv.innerHTML="Refresh Traffic";
this.refreshLinkDiv.style.display="none";
this.legendDiv.appendChild(this.refreshLinkDiv);
switch(_17){
case 0:
this.refreshLinkDiv.style.display="block";
var _28=document.createElement("div");
_28.unselectable="on";
_28.style.position="absolute";
_28.id="inrixMinFooterDiv";
_28.style.left=((this.legendWidth-130)-10)+"px";
_28.style.top=_21+"px";
_28.style.width="130px";
_28.style.height="13px";
_28.style.cursor="pointer";
_28.style.color="#777777";
_28.style.fontSize="10px";
_28.style.fontFamily="Arial";
_28.innerHTML=_4;
this.legendDiv.appendChild(_28);
break;
case 1:
var _29=document.createElement("div");
_29.style.position="absolute";
_29.id="marketDiv";
_29.unselectable="on";
_29.style.MozUserSelect="none";
_29.style.width="170px";
_29.style.height="70px";
_29.style.left=(this.legendWidth-parseInt(_29.style.width))/2+"px";
_29.style.top="50px";
_29.style.fontSize="12px";
_29.style.fontFamily="Arial";
var s="<img src=\""+this.imageServerPath+"legend_stoplight.png\" width=\"21\" height=\"45\" align=\"left\" style=\"margin-right:4px; margin-bottom:15px;\"/>";
s+="Please <b>zoom in</b> to see<br/>";
s+="traffic conditions for<br/>";
s+="cities marked with a<br/>";
s+="traffic light.";
_29.innerHTML=s;
this.legendDiv.appendChild(_29);
break;
case 2:
this.refreshLinkDiv.style.display="block";
_21+=_a+_8;
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
var _2b=37;
this.checkBoxContainerDiv=document.createElement("div");
this.checkBoxContainerDiv.unselectable="on";
this.checkBoxContainerDiv.style.position="absolute";
this.checkBoxContainerDiv.id="checkBoxContainerDiv";
this.checkBoxContainerDiv.style.left="10px";
this.checkBoxContainerDiv.style.top=_21+"px";
this.checkBoxContainerDiv.style.width=(this.legendWidth-20)+"px";
this.checkBoxContainerDiv.style.height=_b+"px";
this.checkBoxContainerDiv.style.color="#000000";
this.checkBoxContainerDiv.style.fontSize="11px";
this.checkBoxContainerDiv.style.fontFamily="Arial";
this.checkBoxContainerDiv.style.fontWeight="normal";
this.checkBoxContainerDiv.innerHTML="<b>Show: </b>";
if(this.legendCheckboxes[0]){
var _2c=67;
this.incidentCheckDiv=document.createElement("div");
this.incidentCheckDiv.unselectable="on";
this.incidentCheckDiv.style.position="absolute";
this.incidentCheckDiv.id="incidentCheckDiv";
this.incidentCheckDiv.style.left=_2b+"px";
if(MQA.browser.name=="msie"){
this.incidentCheckDiv.style.top="-5px";
}else{
this.incidentCheckDiv.style.top="0px";
}
this.incidentCheckDiv.style.width=_2c+"px";
this.incidentCheckDiv.style.height="15px";
this.incidentCheckDiv.style.cursor="default";
if(this.showIncidents){
this.incidentCheckDiv.innerHTML+="<input id=\"incident\" type=\"checkbox\" checked/>";
}else{
this.incidentCheckDiv.innerHTML+="<input id=\"incident\" type=\"checkbox\"/>";
}
this.incidentCheckDiv.innerHTML+="<label for=\"incident\"  style=\"font-weight:normal\"> Incidents</label>";
this.checkBoxContainerDiv.appendChild(this.incidentCheckDiv);
_2b+=_2c;
}
if(this.legendCheckboxes[1]){
var _2c=84;
this.constructionCheckDiv=document.createElement("div");
this.constructionCheckDiv.unselectable="on";
this.constructionCheckDiv.style.position="absolute";
this.constructionCheckDiv.id="constructionCheckDiv";
this.constructionCheckDiv.style.left=_2b+"px";
if(MQA.browser.name=="msie"){
this.constructionCheckDiv.style.top="-5px";
}else{
this.constructionCheckDiv.style.top="0px";
}
this.constructionCheckDiv.style.width=_2c+"px";
this.constructionCheckDiv.style.height="15px";
this.constructionCheckDiv.style.cursor="default";
if(this.showConstruction){
this.constructionCheckDiv.innerHTML+="<input id=\"construction\" type=\"checkbox\" checked/>";
}else{
this.constructionCheckDiv.innerHTML+="<input id=\"construction\" type=\"checkbox\"/>";
}
this.constructionCheckDiv.innerHTML+="<label for=\"construction\"  style=\"font-weight:normal\"> Construction</label>";
this.checkBoxContainerDiv.appendChild(this.constructionCheckDiv);
_2b+=_2c;
}
if(this.legendCheckboxes[2]){
var _2c=60;
this.eventCheckDiv=document.createElement("div");
this.eventCheckDiv.unselectable="on";
this.eventCheckDiv.style.position="absolute";
this.eventCheckDiv.id="eventCheckDiv";
this.eventCheckDiv.style.left=_2b+"px";
this.eventCheckDiv.style.top="-3px";
this.eventCheckDiv.style.width=_2c+"px";
this.eventCheckDiv.style.height="15px";
this.eventCheckDiv.style.cursor="default";
if(this.showEvents){
this.eventCheckDiv.innerHTML+="<input id=\"event\" type=\"checkbox\" style=\"vertical-align:bottom\"  checked/>";
}else{
this.eventCheckDiv.innerHTML+="<input id=\"event\" type=\"checkbox\" style=\"vertical-align:bottom\"/>";
}
this.eventCheckDiv.innerHTML+="<label for=\"event\" style=\"font-weight:normal\"> Events</label>";
this.checkBoxContainerDiv.appendChild(this.eventCheckDiv);
_2b+=_2c;
}
this.legendDiv.appendChild(this.checkBoxContainerDiv);
_21+=_b+_8;
}
if(this.legendSliderVisible){
this.slider=new MQA.SliderControl(this.legendDiv,this.legendWidth-23,_d,10,_21,0,100,10,50,this.setFlowOpacityFromSlider);
this.slider.setValue("backgroundColor","#dadada");
this.slider.setValue("borderColor","transparent");
this.slider.setValue("backgroundOpacity",60);
this.slider.setValue("tooltip","Change Speed Opacity");
this.slider.parent=this;
this.slider.draw();
_21+=_8+_d;
}else{
var _2d=document.createElement("div");
_2d.id="horizontalDividerDiv";
_2d.unselectable="on";
_2d.style.position="absolute";
_2d.style.left="10px";
_2d.style.top=_21+"px";
_2d.style.width=(this.legendWidth-20)+"px";
_2d.style.height=_c+"px";
_2d.style.backgroundColor="#777777";
_2d.innerHTML="<img src=\""+_6+"\"/>";
this.legendDiv.appendChild(_2d);
_21+=_8+1;
}
if(this.legendIconsVisible){
var _2e=_e;
var _2f=document.createElement("div");
_2f.unselectable="on";
_2f.style.position="absolute";
_2f.id="legendIconDiv";
_2f.style.left="20px";
_2f.style.top=_21+"px";
_2f.style.cursor="default";
_2f.style.color="#000000";
_2f.style.fontSize="11px";
_2f.style.fontWeight="normal";
_2f.style.fontFamily="Arial";
var s="Incidents:<br/>";
for(var i=0;i<this.legendIconImages.length;i++){
var _30=" style=\"vertical-align:middle; margin-top:"+(i==0?3:2)+"px; ";
if(MQA.browser.name=="msie"&&MQA.browser.version<7){
_30+="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.legendIconImages[i].imageURL+"', sizingMethod='image');"+"\"";
iURL=_6;
}else{
_30+="\" ";
iURL=this.legendIconImages[i].imageURL;
}
s+="<img src=\""+iURL+"\" width=\""+this.legendIconImages[i].width+"\" height=\""+this.legendIconImages[i].height+"\"";
s+=_30+" /> - ";
s+=this.legendIconText[i]+"<br/>";
_2e+=this.legendIconImages[i].height+3;
}
_2f.innerHTML=s;
_2f.style.height=_2e+"px";
this.legendDiv.appendChild(_2f);
}
if(this.legendFlowVisible){
var _31=_e;
var _32=document.createElement("div");
_32.unselectable="on";
_32.style.position="absolute";
_32.id="legendFlowColorDiv";
_32.style.left=parseInt(this.legendWidth/2)+"px";
_32.style.top=_21+"px";
_32.style.cursor="default";
_32.style.color="#000000";
_32.style.fontSize="11px";
_32.style.fontWeight="normal";
_32.style.fontFamily="Arial";
var s="Speed:<br clear=\"all\"/>";
for(var i=0;i<this.legendFlowColors.length;i++){
s+="<div id=\"flowColorDiv\" style=\"position:absolute; left:0px; top:"+((i*_f)+15)+"px; width:15px; height:"+_f+"px;background-color:"+this.legendFlowColors[i]+";\">&nbsp;</div>";
s+="<div id=\"flowTextDiv\" style=\"position:absolute; left:16px; top:"+((i*_f)+15)+"px; width:125px; height:"+_f+"px; font-weight:normal; font-size:11px\">&nbsp;- "+this.legendFlowText[i]+"</div>";
_31+=_f;
}
_32.innerHTML=s;
_32.style.height=_31+"px";
this.legendDiv.appendChild(_32);
}
break;
case 3:
var _33=document.createElement("div");
_33.style.position="absolute";
_33.id="serviceDownDiv";
_33.unselectable="on";
_33.style.MozUserSelect="none";
_33.style.width="170px";
_33.style.height="70px";
_33.style.left=(this.legendWidth-parseInt(_33.style.width))/2+"px";
_33.style.top="50px";
_33.style.fontSize="12px";
_33.style.fontFamily="Arial";
_33.style.color="#B50E0E";
_33.style.fontWeight="bold";
var s="<img src=\""+this.imageServerPath+"legend_exclam_mark.png\" width=\"30\" height=\"30\" align=\"left\" style=\"margin-right:4px; margin-bottom:25px;\"/>";
s+="Our Traffic service is<br/>";
s+="currently not available<br/>";
s+="We apologize for any<br/>";
s+="inconvenience";
_33.innerHTML=s;
this.legendDiv.appendChild(_33);
break;
default:
this._drawLegend(2);
break;
}
if(_17!=0){
if(_17!=3){
var _34=document.createElement("div");
_34.unselectable="on";
_34.style.position="absolute";
_34.id="inrixFooterDiv";
_34.style.left="20px";
_34.style.top=(this.legendHeight-22)+"px";
_34.style.width="130px";
_34.style.height="15px";
_34.style.cursor="pointer";
_34.style.color="#000000";
_34.style.fontSize="10px";
_34.style.fontFamily="Arial";
_34.innerHTML=_4;
this.legendDiv.appendChild(_34);
}
if(this.legendHelpLinkVisible){
this.helpLinkDiv=document.createElement("div");
this.helpLinkDiv.unselectable="on";
this.helpLinkDiv.style.position="absolute";
this.helpLinkDiv.id="helpLinkDiv";
this.helpLinkDiv.style.left=((this.legendWidth-10)-60)+"px";
this.helpLinkDiv.style.top=(this.legendHeight-22)+"px";
this.helpLinkDiv.style.width="60px";
this.helpLinkDiv.style.height="15px";
this.helpLinkDiv.style.cursor="pointer";
this.helpLinkDiv.style.color="#0000FF";
this.helpLinkDiv.style.fontSize="11px";
this.helpLinkDiv.style.fontFamily="Arial";
this.helpLinkDiv.style.textDecoration="underline";
this.helpLinkDiv.innerHTML="Traffic Help";
this.legendDiv.appendChild(this.helpLinkDiv);
}
}
this.map.parent2.appendChild(this.legendDiv);
this.eTitleBarHandler=MQA._prEvent.EventCallback(this,"titleBarEventMonitor");
MQA._prEvent.observe(this.titleBarDiv,"mousedown",this.eTitleBarHandler);
MQA._prEvent.observe(this.titleBarDiv,"mouseup",this.eTitleBarHandler);
MQA._prEvent.observe(this.titleBarDiv,"mousemove",this.eTitleBarHandler);
this.eTitleBarButtonClick=MQA._prEvent.EventCallback(this,"titleBarButtonEventMonitor");
MQA._prEvent.observe(this.titleBarButtonDiv,"click",this.eTitleBarButtonClick);
MQA._prEvent.observe(this.titleBarButtonDiv,"mouseover",this.eTitleBarButtonClick);
if(this.refreshLinkDiv){
this.eRefreshLinkClick=MQA._prEvent.EventCallback(this,"refreshLinkEventMonitor");
MQA._prEvent.observe(this.refreshLinkDiv,"click",this.eRefreshLinkClick);
}
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
this.eCheckBoxClick=MQA._prEvent.EventCallback(this,"checkBoxEventMonitor");
if(this.incidentCheckDiv){
MQA._prEvent.observe(this.incidentCheckDiv,"click",this.eCheckBoxClick);
}
if(this.constructionCheckDiv){
MQA._prEvent.observe(this.constructionCheckDiv,"click",this.eCheckBoxClick);
}
if(this.eventCheckDiv){
MQA._prEvent.observe(this.eventCheckDiv,"click",this.eCheckBoxClick);
}
}
if(this.helpLinkDiv){
this.eHelpLinkClick=MQA._prEvent.EventCallback(this,"helpLinkEventMonitor");
MQA._prEvent.observe(this.helpLinkDiv,"click",this.eHelpLinkClick);
}
};
this.updateLegendTime=function(){
this.titleBarDiv.innerHTML="<b unselectable=\"on\">Traffic</b> - as of "+this.getLastUpdateTime();
};
this._removeLegend=function(){
MQA._prEvent.stopObserving(this.titleBarDiv,"mousedown",this.eTitleBarHandler);
MQA._prEvent.stopObserving(this.titleBarDiv,"mouseup",this.eTitleBarHandler);
MQA._prEvent.stopObserving(this.titleBarDiv,"mousemove",this.eTitleBarHandler);
this.eTitleBarHandler=null;
MQA._prEvent.stopObserving(this.titleBarButtonDiv,"click",this.eTitleBarButtonClick);
MQA._prEvent.stopObserving(this.titleBarButtonDiv,"mouseover",this.eTitleBarButtonClick);
this.eTitleBarButtonClick=null;
if(this.refreshLinkDiv){
MQA._prEvent.stopObserving(this.refreshLinkDiv,"click",this.eRefreshLinkClick);
this.eRefreshLinkClick=null;
}
if(this.incidentCheckDiv){
MQA._prEvent.stopObserving(this.incidentCheckDiv,"click",this.eCheckBoxClick);
}
if(this.constructionCheckDiv){
MQA._prEvent.stopObserving(this.constructionCheckDiv,"click",this.eCheckBoxClick);
}
if(this.eventCheckDiv){
MQA._prEvent.stopObserving(this.eventCheckDiv,"click",this.eCheckBoxClick);
}
this.eCheckBoxClick=null;
if(this.helpLinkDiv){
MQA._prEvent.stopObserving(this.helpLinkDiv,"click",this.eHelpLinkClick);
}
this.eHelpLinkClick=null;
if(this.slider){
this.slider.dispose(true);
this.slider=null;
}
this.titleBarDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarDiv);
MQA.Util._deleteDOMObject(this.titleBarDiv);
this.titleBarDiv=null;
this.titleBarButtonDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarButtonDiv);
MQA.Util._deleteDOMObject(this.titleBarButtonDiv);
this.titleBarButtonDiv=null;
this.titleBarButtonInsideDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarButtonInsideDiv);
MQA.Util._deleteDOMObject(this.titleBarButtonInsideDiv);
this.titleBarButtonInsideDiv=null;
this.refreshLinkDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.refreshLinkDiv);
MQA.Util._deleteDOMObject(this.refreshLinkDiv);
this.refreshLinkDiv=null;
if(this.incidentCheckDiv){
this.incidentCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.incidentCheckDiv);
MQA.Util._deleteDOMObject(this.incidentCheckDiv);
this.incidentCheckDiv=null;
}
if(this.constructionCheckDiv){
this.constructionCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.constructionCheckDiv);
MQA.Util._deleteDOMObject(this.constructionCheckDiv);
this.constructionCheckDiv=null;
}
if(this.eventCheckDiv){
this.eventCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.eventCheckDiv);
MQA.Util._deleteDOMObject(this.eventCheckDiv);
this.eventCheckDiv=null;
}
if(this.checkBoxContainerDiv){
MQA.Util._deleteDOMObject(this.checkBoxContainerDiv);
this.checkBoxContainerDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.checkBoxContainerDiv);
this.checkBoxContainerDiv=null;
}
if(this.helpLinkDiv){
this.helpLinkDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.helpLinkDiv);
MQA.Util._deleteDOMObject(this.helpLinkDiv);
this.helpLinkDiv=null;
}
this.legendDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.legendDiv);
MQA.Util._deleteDOMObject(this.legendDiv);
this.legendDiv=null;
};
this.updateTrafficLegend=function(){
var _35=this.legendMode;
var _36=this._calculateCurrentLegendMode();
if(this.legendMode!=0&&_35!=_36){
this.setValue("legendMode",_36);
}
};
this.buttonEventMonitor=function(e){
switch(e.type){
case "mouseover":
if(!this.controlOn){
this.trafficButtonImage.style.left="-81px";
}
break;
case "mouseout":
if(!this.controlOn){
this.trafficButtonImage.style.left="0px";
}
break;
case "click":
if(this.controlOn){
this._removeLegend(true);
if(this.traffic.flowActive){
this.traffic.removeFlow();
}
if(this.traffic.incidentsActive){
this.traffic.removeIncidents();
}
if(this.traffic.marketsActive){
this.traffic.removeMarkets();
}
this.trafficButtonImage.style.left="0px";
e.eventName="MQA.TrafficControl.deactivate";
MQA.EventManager.trigger(this,"deactivate",e);
}else{
if(_3){
this.traffic.addFlow();
this.traffic.addMarkets();
this.traffic.addIncidents();
}
var _38=this._calculateCurrentLegendMode();
this.setValue("legendMode",_38);
if(!this.controlOn){
this._drawLegend(_38);
}
this.trafficButtonImage.style.left="-164px";
e.eventName="MQA.TrafficControl.activate";
MQA.EventManager.trigger(this,"activate",e);
}
this.controlOn=!this.controlOn;
break;
}
};
this.titleBarEventMonitor=function(e){
switch(e.type){
case "mousedown":
this.titleBarDiv.style.cursor=this.map.grabbing_mousecursor;
this.shapeStartX=parseInt(this.legendDiv.style.left);
this.shapeStartY=parseInt(this.legendDiv.style.top);
this.mouseStartX=e.clientX;
this.mouseStartY=e.clientY;
this.shape=this.legendDiv;
this.map.draggedObject=this;
this.isDragging=true;
break;
case "mouseup":
this.finishDrag();
break;
case "mousemove":
if(this.isDragging){
if(parseInt(this.legendDiv.style.left)<0){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.top)<0){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.left)>(this.map.width-(this.legendWidth+3))){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.top)>(this.map.height-(this.legendHeight+3))){
this.finishDrag();
}
}
break;
}
};
this.finishDrag=function(){
this.titleBarDiv.style.cursor=this.map.grab_mousecursor;
this.map.draggedObject=null;
this.shape=null;
this.isDragging=false;
if(parseInt(this.legendDiv.style.left)<=0){
this.legendDiv.style.left="0px";
}
if(parseInt(this.legendDiv.style.top)<=0){
this.legendDiv.style.top="0px";
}
if(parseInt(this.legendDiv.style.left)>=(this.map.width-(this.legendWidth+3))){
this.legendDiv.style.left=this.map.width-(this.legendWidth+3)+"px";
}
if(parseInt(this.legendDiv.style.top)>=(this.map.height-(this.legendHeight+3))){
this.legendDiv.style.top=this.map.height-(this.legendHeight+3)+"px";
}
if(this._getCollapseDirection()=="up"){
this.legendPosition=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(parseInt(this.legendDiv.style.left),parseInt(this.legendDiv.style.top)));
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?-245:-214)+"px";
}else{
var _3a=new MQA.Size(-(this.map.width-(parseInt(this.legendDiv.style.left)+this.legendWidth)),-(this.map.height-(parseInt(this.legendDiv.style.top)+this.legendHeight)));
this.legendPosition=new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,_3a);
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?-214:-245)+"px";
}
};
this.titleBarButtonEventMonitor=function(e){
if(e.type=="mouseover"){
if(this.legendMode!=0){
this.titleBarButtonDiv.title="Hide Legend";
}else{
this.titleBarButtonDiv.title="Show Legend";
}
return;
}
if(this.legendMode!=0){
this.setValue("legendMode",0);
e.eventName="MQA.TrafficControl.legendClose";
MQA.EventManager.trigger(this,"legendclose",e);
}else{
this.setValue("legendMode",this._calculateCurrentLegendMode());
e.eventName="MQA.TrafficControl.legendOpen";
MQA.EventManager.trigger(this,"legendopen",e);
}
};
this.refreshLinkEventMonitor=function(e){
this.traffic.refresh();
this.updateLegendTime();
this.updateTrafficLegend();
e.eventName="MQA.TrafficControl.refreshClick";
MQA.EventManager.trigger(this,"refreshclick",e);
};
this.checkBoxEventMonitor=function(e){
var _3e=MQA._prEvent.element(e);
switch(_3e.id){
case "incident":
this.showIncidents=_3e.checked;
e.eventName="MQA.TrafficControl.incidentClick";
MQA.EventManager.trigger(this,"incidentclick",e);
break;
case "construction":
this.showConstruction=_3e.checked;
e.eventName="MQA.TrafficControl.constructionClick";
MQA.EventManager.trigger(this,"constructionclick",e);
break;
case "event":
this.showEvents=_3e.checked;
e.eventName="MQA.TrafficControl.eventClick";
MQA.EventManager.trigger(this,"eventclick",e);
break;
}
var _3f=(this.showIncidents?[MQA.TRAFFIC_INCIDENTS]:[]);
if(this.showConstruction){
_3f.push(MQA.TRAFFIC_CONSTRUCTION);
}
if(this.showEvents){
_3f.push(MQA.TRAFFIC_EVENTS);
}
this.traffic.setValue("incidentTypeFilter",_3f);
};
this.helpLinkEventMonitor=function(e){
e.eventName="MQA.TrafficControl.helpClick";
MQA.EventManager.trigger(this,"helpclick",e);
};
this.setFlowOpacityFromSlider=function(_41){
this.parent.traffic.setValue("flowOpacity",_41/100);
};
this._calculateLegendSize=function(_42){
var _43;
var _44=35;
if(this.legendCheckboxes[0]&&this.legendCheckboxes[1]&&this.legendCheckboxes[2]){
_43=265;
}else{
_43=232;
}
switch(_42){
case 0:
_44=60;
break;
case 1:
_44=187;
break;
case 2:
_44+=_9+_8;
_44+=_a+_8;
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
_44+=14+_8;
}
if(this.legendSliderVisible){
_44+=_d+_8+2;
}else{
_44+=_c+_8+1;
}
var _45=(this.legendFlowVisible?(this.legendFlowColors.length*_f)+_e:0);
var _46=(this.legendIconsVisible?(this.legendIconImages.length*(this.legendIconImages[0].height+2))+_e:0);
_44+=(_45>_46?_45:_46);
break;
case 3:
_44=187;
break;
}
return new MQA.PointXY(_43,_44);
};
this._getCollapseDirection=function(){
if(parseInt(this.legendDiv.style.top)<(this.map.height-(parseInt(this.legendDiv.style.top)+this.legendHeight))){
return "up";
}else{
return "down";
}
};
this._calculateCurrentLegendMode=function(){
if(this.map.getZoomLevel()<=this.traffic.maxMarketZoomLevel&&this.traffic.available){
return 1;
}else{
if(this.map.getZoomLevel()>this.traffic.maxMarketZoomLevel&&this.traffic.available){
return 2;
}else{
return 3;
}
}
};
this._getPositionXY=function(mcp,_48){
_48=(typeof (_48)=="undefined"?"button":_48);
var w=(_48=="button"?this.getValue("width"):this.getValue("legendWidth"));
var h=(_48=="button"?this.getValue("height"):this.getValue("legendHeight"));
var _4b,_4c;
var _4d=mcp.offsetSize.width;
var _4e=mcp.offsetSize.height;
switch(mcp.getMapCorner()){
case MQA.MapCorner.TOP_LEFT:
_4b=0;
_4c=0;
if(_4d>(this.map.width-w)){
_4d=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.TOP_RIGHT:
_4b=this.map.width-w;
_4c=0;
break;
case MQA.MapCorner.BOTTOM_LEFT:
_4b=0;
_4c=this.map.height-h;
if(_4d>(this.map.width-w)){
_4d=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.BOTTOM_RIGHT:
_4b=this.map.width-w;
_4c=this.map.height-h;
break;
}
_4b+=_4d;
_4c+=_4e;
return new MQA.PointXY(_4b,_4c);
};
this.getLastUpdateTime=function(f){
if(typeof (f)=="undefined"){
f="h:ip z";
}
if(this.traffic.lastUpdateTime){
f=f.replace("h",(this.traffic.lastUpdateTime.hours>12?this.traffic.lastUpdateTime.hours-12:(this.traffic.lastUpdateTime.hours==0?"12":this.traffic.lastUpdateTime.hours)));
f=f.replace("H",this.traffic.lastUpdateTime.hours);
f=f.replace("i",(this.traffic.lastUpdateTime.minutes<10?"0"+this.traffic.lastUpdateTime.minutes:this.traffic.lastUpdateTime.minutes));
f=f.replace("s",(this.traffic.lastUpdateTime.seconds<10?"0"+this.traffic.lastUpdateTime.seconds:this.traffic.lastUpdateTime.seconds));
f=f.replace("y",this.traffic.lastUpdateTime.year.toString().substr(2,2));
f=f.replace("Y",this.traffic.lastUpdateTime.year);
f=f.replace("m",this.traffic.lastUpdateTime.month);
f=f.replace("d",this.traffic.lastUpdateTime.day);
f=f.replace("p",(this.traffic.lastUpdateTime.hours>=12?"pm":"am"));
f=f.replace("z",this.traffic.lastUpdateTime.timeZone);
return f;
}else{
return "notime";
}
};
this.initialize=function(map){
this.map=map;
this.draw();
};
this.getWidth=function(){
return this.getValue("width");
};
this.getHeight=function(){
return this.getValue("height");
};
this.destructor=function(){
this.dispose(false);
};
this.getPosition=function(){
return this.getValue("position");
};
};

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
MQA.TileMap.prototype.generatePFUrl=function(sz){
var _2=(typeof (sz)!="undefined")?sz.toString():this.getSize().toString();
var _3;
if(this.bestFitRect!=null){
var _4=this.getZoom(this.bestFitRect,this.keepCenter,null,null,sz);
_3=this.getScaleFromZoom(_4);
}else{
_3=this.getScale();
}
var _5={type:this.getMapType(),size:_2,scale:_3,center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_5.session=this.getRouteSession();
}
if(IsDotCom){
var _6="";
if(this.traffic){
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
_6+="&traffic=";
var _7=this.traffic.incidentTypeFilter;
iIncidents=false;
iConstruction=false;
for(var _8=0;_8<_7.length;_8++){
var _9=_7[_8];
switch(_9){
case MQA.TRAFFIC_INCIDENTS:
iIncidents=true;
break;
case MQA.TRAFFIC_CONSTRUCTION:
iConstruction=true;
break;
}
}
MQA.TRAFFIC_ALL=100;
MQA.TRAFFIC_NONE=0;
if(iIncidents&&iConstruction){
iType=MQA.TRAFFIC_ALL;
}else{
if(iIncidents&&!iConstruction){
iType=MQA.TRAFFIC_INCIDENTS;
}else{
if(!iIncidents&&iConstruction){
iType=MQA.TRAFFIC_CONSTRUCTION;
}else{
if(!iIncidents&&!iConstruction){
iType=MQA.TRAFFIC_NONE;
}else{
iType=MQA.TRAFFIC_NONE;
}
}
}
}
if(this.controls[MQA.CONTROL_TRAFFIC].controlOn==true){
switch(iType){
case MQA.TRAFFIC_NONE:
_6+=4;
break;
case MQA.TRAFFIC_CONSTRUCTION:
_6+=3;
break;
case MQA.TRAFFIC_INCIDENTS:
_6+=2;
break;
case MQA.TRAFFIC_ALL:
_6+=1;
break;
}
}
}
}
_5.stops=_5.pois="";
var _a=this.getShapeCollection("");
if(_a){
for(var i=0,j=_a.getSize();i<j;i++){
var _d=_a.getAt(i);
var _e=(_d.dragLeft==null)?0:((-1*_d.dragLeft)-_d.getValue("iconOffset").getX());
var _f=(_d.dragTop==null)?0:((-1*_d.dragTop)-_d.getValue("iconOffset").getY());
switch(_d.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_5[_d.getKey()]=_d.getLatLng().toString()+","+_e+","+_f;
break;
default:
var _10=_d.getKey().split("-");
switch(_10[0]){
case "stops":
case "pois":
_5[_10[0]]+=_10[1].toUpperCase()+","+_d.getLatLng().toString()+","+_e+","+_f+"|";
break;
}
break;
}
}
}
}
var _11=MQA.getStaticMapResources()+"?";
for(var nv in _5){
_11+=(_5[nv]!="")?nv+"="+_5[nv]+"&":"";
}
_11+="rand="+(Math.round((Math.random()*10000)))+_6;
return _11;
};

MQA.InfoDisplayBox=function(_1,_2){
MQA.Base.call(this);
var _3="http://img.mqcdn.com/mqtoolkit/infopopup.";
_3+=(MQA.browser.name=="msie"&&MQA.browser.version<7?"gif":"png");
var _4=new MQA.Point(0,0);
var _5=new MQA.Point(650,685);
var _6=new MQA.Point(13,13);
var _7=5;
var _8=43;
var _9=new MQA.Point(51,653);
var _a=new MQA.Point(17,24);
var _b=new MQA.Point(181,651);
var _c=new MQA.Point(16,16);
var _d=20;
var _e=null;
var _f=null;
var _10=null;
var _11=null;
var _12=null;
var _13=null;
var _14=null;
var _15=_1;
var _16=null;
var _17=null;
var _18=null;
var _19=null;
var _1a=false;
this.content=_2;
this.titleBackgroundColor="#E2EAF1";
this.titleText=null;
this.topOverlap=50;
this.rightOverlap=30;
this._facio=function(key,_1c){
switch(key){
case "content":
if(_e){
this.draw();
}
break;
case "titleBackgroundColor":
if(_e){
this.draw();
}
break;
case "titleText":
if(_e){
this.draw();
}
break;
}
};
this._duco=function(key){
};
this.draw=function(_1e){
_1e=(typeof (_1e)=="undefined"?false:_1e);
if(_e){
this.dispose(false);
}
var _1f=(typeof (this.content.width)=="undefined"?"div":"iframe");
var _20=parseInt((_1f=="div"?parseInt(this.content.style.width)+20:this.content.width));
_11=_20+_6.getX()-(_7-1);
var _21=parseInt((_1f=="div"?parseInt(this.content.style.height):this.content.height));
_12=_21+(_6.getY()*2)+(_a.getY()/2)+_d;
if(!_1e){
this._setNewMapCenter(_11,_12);
return;
}
_e=document.createElement("div");
if(_1a){
_e.style.border="1px solid red";
}
_e.style.zIndex=100;
_e.id="idbInfoDisplayBox";
_e.style.position="absolute";
_e.style.overflow="hidden";
_e.unselectable="on";
_e.style.width=_11+"px";
_e.style.height=_12+"px";
_10=this._calculateXY(_11,_12);
_e.style.left=_10.getX()+"px";
_e.style.top=_10.getY()+"px";
var _22=[];
for(var i=0;i<11;i++){
_22[i]=document.createElement("div");
if(_1a){
_22[i].style.border="1px solid blue";
}
_22[i].unselectable="on";
_22[i].style.position="absolute";
_22[i].style.overflow="hidden";
_22[i].id="idbFrameBorders"+i;
var _24=document.createElement("div");
_24.unselectable="on";
_24.id="insideDiv";
_24.style.width=_5.getX()+"px";
_24.style.height=_5.getY()+"px";
_24.style.background="url(\""+_3+"\") no-repeat";
_22[i].appendChild(_24);
}
_22[0].style.left="0px";
_22[0].style.top="0px";
_22[0].style.width=_6.getX()+"px";
_22[0].style.height=_6.getY()+"px";
_22[0].firstChild.style.marginLeft=_4.getX()+"px";
_22[0].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_22[0]);
_22[1].style.left=_6.getX()+"px";
_22[1].style.top="0px";
_22[1].style.width=_11-(_6.getX()*2)+"px";
_22[1].style.height=_6.getY()+"px";
_22[1].firstChild.style.marginLeft=-_6.getX()+"px";
_22[1].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_22[1]);
_22[2].style.left=_11-_6.getX()+"px";
_22[2].style.top="0px";
_22[2].style.width=_6.getX()+"px";
_22[2].style.height=_6.getY()+"px";
_22[2].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_22[2].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_22[2]);
_22[3].style.left="0px";
_22[3].style.top=_6.getY()+"px";
_22[3].style.width=_6.getX()+"px";
_22[3].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_22[3].firstChild.style.marginLeft=_4.getX()+"px";
_22[3].firstChild.style.marginTop=(_4.getY()-_6.getX())+"px";
_e.appendChild(_22[3]);
_22[4].style.left=_6.getX()+"px";
_22[4].style.top=_6.getY()+"px";
_22[4].style.width=_11-(_6.getX()*2)+"px";
_22[4].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_22[4].firstChild.style.marginLeft=-_6.getX()+"px";
_22[4].firstChild.style.marginTop=-_6.getY()+"px";
_e.appendChild(_22[4]);
_22[5].style.left=_11-_6.getX()+"px";
_22[5].style.top=_6.getY()+"px";
_22[5].style.width=_6.getX()+"px";
_22[5].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_22[5].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_22[5].firstChild.style.marginTop=-_6.getY()+"px";
_e.appendChild(_22[5]);
_22[6].style.left="0px";
_22[6].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_22[6].style.width=_6.getX()+"px";
_22[6].style.height=_6.getY()+"px";
_22[6].firstChild.style.marginLeft=-_4.getY()+"px";
_22[6].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_22[6]);
_22[7].style.left=_6.getX()+"px";
_22[7].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_22[7].style.width=_11-(_6.getX()*2)+"px";
_22[7].style.height=_6.getY()+"px";
_22[7].firstChild.style.marginLeft=-_6.getX()+"px";
_22[7].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_22[7]);
_22[8].style.left=_11-_6.getX()+"px";
_22[8].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_22[8].style.width=_6.getX()+"px";
_22[8].style.height=_6.getY()+"px";
_22[8].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_22[8].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_22[8]);
var _25=(_15.getValue("isDecluttered")?"declutterIconOffset":"iconOffset");
var _26=(_15.getValue("isDecluttered")?(_15.getValue("icon").width-_15.getValue("declutterIcon").width)/2:0);
var _27=_15.map.llToPix(_15.getValue("latLng"));
var _28=_15.getValue("dragLeft");
var _29=(_28==null||_28==0?-_15.getValue(_25).x:_15.getValue("dragLeft"));
var _2a=_27.getX()-_29-_26;
var _2b=((_2a-_10.getX())+(_15.getValue("icon").width/2))-(_a.getX()/2);
_22[9].style.left=_2b+"px";
_22[9].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_22[9].style.width=_a.getX()+"px";
_22[9].style.height=_a.getY()+"px";
_22[9].firstChild.style.marginLeft=-_9.getX()+"px";
_22[9].firstChild.style.marginTop=-_9.getY()+"px";
_e.appendChild(_22[9]);
var _2c=document.createElement("div");
if(_1a){
_2c.style.border="1px solid orange";
}
_2c.id="idbTitleBar";
_2c.unselectable="on";
_2c.style.position="absolute";
_2c.style.left=10+"px";
_2c.style.top=10+"px";
_2c.style.width=_11-((_6.getX()*2)+_c.getX())+"px";
_2c.style.height=16+"px";
_2c.style.background=this.titleBackgroundColor;
_2c.style.fontFamily="Arial";
_2c.style.fontSize="9pt";
var _2d=document.createElement("div");
if(_1a){
_2c.style.border="1px solid orange";
}
_2d.id="idbTitleText";
_2d.style.position="absolute";
_2d.style.left="5px";
_2d.style.top="0px";
_2d.style.fontWeight="bold";
if(this.titleText){
_2d.innerHTML=this.titleText;
}else{
_2d.innerHTML=_15.getValue("infoDisplayBoxTitleText");
}
_2c.appendChild(_2d);
_14=document.createElement("div");
if(_1a){
_2c.style.border="1px solid orange";
}
_14.id="idbCloseLink";
_14.style.position="absolute";
_14.style.left=(parseInt(_2c.style.width)-150)+"px";
_14.style.top="0px";
_14.style.width="145px";
_14.style.color="#037eab";
_14.style.cursor="pointer";
_14.style.textDecoration="underline";
_14.style.textAlign="right";
_14.innerHTML="&laquo; Less Info";
_2c.appendChild(_14);
_e.appendChild(_2c);
_22[10].style.left=_11-_6.getX()-_c.getX()+"px";
_22[10].style.top=10+"px";
_22[10].style.width=_c.getX()+"px";
_22[10].style.height=_c.getY()+"px";
_22[10].firstChild.style.marginLeft=-_b.getX()+"px";
_22[10].firstChild.style.marginTop=-_b.getY()+"px";
_22[10].style.cursor="pointer";
_13=_22[10];
_e.appendChild(_13);
_f=document.createElement("div");
if(_1a){
_f.style.border="1px solid green";
}
_f.id="idbContentBox";
_f.unselectable="on";
_f.style.position="absolute";
_f.style.left="1px";
_f.style.top=_d+_6.getY()+1+"px";
_f.style.width=_20+"px";
_f.style.height=_21+"px";
if(_1f=="div"){
_f.style.paddingLeft="10px";
}
_e.appendChild(_f);
_15.map.parent2.appendChild(_e);
_f.appendChild(this.content);
fallthruHandler=MQA._prEvent.EventCallback(this,"fallthruHandler");
MQA._prEvent.observe(_e,"mousedown",fallthruHandler);
_16=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
_17=MQA._prEvent.EventCallback(this,"linkEventMonitor");
MQA._prEvent.observe(_13,"click",_16);
MQA._prEvent.observe(_14,"click",_17);
_18=MQA._prEvent.EventCallback(this,"mapMouseDownHandler");
MQA._prEvent.observe(_15.map.div1,"mousedown",_18);
MQA._prEvent.observe(_15.map.parent2,"mousedown",_18);
var e=new MQA.Event("MQA.Poi.InfoDisplayBoxOpen");
_15.onInfoDisplayBoxOpen(e);
};
this.dispose=function(_2f){
var _2f=(typeof (_2f)!="undefined"?_2f:false);
try{
MQA._prEvent.stopObserving(_e,"mousedown",fallthruHandler);
MQA._prEvent.stopObserving(_13,"click",_16);
MQA._prEvent.stopObserving(_14,"click",_17);
MQA._prEvent.stopObserving(_15.map.div1,"mousedown",_18);
MQA._prEvent.stopObserving(_15.map.parent2,"mousedown",_18);
}
catch(err){
}
fallthruHandler=null;
_16=null;
_17=null;
_18=null;
_13=null;
_14=null;
try{
_f.removeChild(this.content);
}
catch(err){
}
_f=null;
try{
_e.innerHTML="";
MQA.Util._setOuterHTMLToEmptyString(_e);
MQA.Util._deleteDOMObject(_e);
}
catch(err){
}
_e=null;
_15.IDB=null;
var e=new MQA.Event("MQA.Poi.InfoDisplayBoxClose");
_15.onInfoDisplayBoxClose(e);
if(_2f){
this.content.src="";
this.content=null;
_15=null;
}
};
this._setPosition=function(){
this._setNewMapCenter(_11,_12);
};
this.buttonEventMonitor=function(e){
this.dispose();
var mqe=new MQA.Event("MQA.Poi.InfoDisplayBoxClickClosed");
_15.onInfoDisplayBoxClickClosed(mqe);
};
this.linkEventMonitor=function(e){
this.dispose();
var mqe=new MQA.Event("MQA.Poi.InfoDisplayBoxLinkClick");
_15.onInfoDisplayBoxLinkClick(mqe);
_15.showInfoWindow();
};
this.mapMouseDownHandler=function(e){
this.dispose();
};
this.fallthruHandler=function(e){
MQA._prEvent.stop(e);
};
this.moveEndHandler=function(e){
MQA.EventManager.removeListener(_15.map,"moveend",_19);
this.draw(true);
};
this._setNewMapCenter=function(_38,_39){
var _3a=_15.map.llToPix(_15.getValue("latLng"));
var tx=_3a.getX()-_15.getValue("dragLeft");
var ty=_3a.getY()-_15.getValue("dragTop");
var _3d=new MQA.Point(tx,ty);
var _3e=_3d.getX();
var _3f=_3d.getY();
var _40=_15.map.getSize();
var _41=_15.map.llToPix(_15.map.getCenter()).getX();
var _42=_15.map.llToPix(_15.map.getCenter()).getY();
if(_3e<100){
_41=(_40.getWidth()/2)-(100-_3e);
}
if(_3e>(_40.getWidth()-this.rightOverlap)){
_41=(_40.getWidth()/2)+(this.rightOverlap-(_40.getWidth()-_3e));
}
var _43=_39-_3f;
if(_43>this.topOverlap){
_42=(_40.getHeight()/2)-_43;
}
if(_3f>(_40.getHeight()-15)){
console.log("below map");
_42=(_40.getHeight()/2)+((_3f-_40.getHeight())+15);
}
var _44=_15.map.llToPix(_15.map.getCenter());
if(Math.abs(_44.getX()-_41)>2||Math.abs(_44.getY()-_42)>2){
var _45=_15.map.pixToLL(new MQA.Point(_41,_42));
_19=MQA._prEvent.EventCallback(this,"moveEndHandler");
MQA.EventManager.addListener(_15.map,"moveend",_19);
_15.map.slideMapToPoint(new MQA.Point(_41,_42));
}else{
this.draw(true);
}
};
this._calculateXY=function(_46,_47){
var _48=_15.map.getSize();
var _49=(_15.getValue("isDecluttered")?"declutterIconOffset":"iconOffset");
var _4a=_15.map.llToPix(_15.getValue("latLng"));
var _4b=_15.getValue("dragLeft");
var _4c=_15.getValue("dragTop");
var _4d=(_4b==null||_4b==0?-_15.getValue(_49).x:_15.getValue("dragLeft"));
var _4e=(_4c==null||_4c==0?-_15.getValue(_49).y:_15.getValue("dragTop"));
var tx=_4a.getX()-_4d-_15.getValue(_49).x;
var ty=_4a.getY()-_4e-_15.getValue(_49).y;
var _51=new MQA.Point(tx,ty);
var _52=(_48.getWidth()+50)-_46;
while(_51.getX()<(_52+25)){
_52-=10;
}
_52+=_15.getValue("iconOffset").x;
if(_52<5){
_52=25;
}
var _53=_51.getY()-(_47-4)+_15.getValue("iconOffset").y;
try{
if(IsDotCom&&_15.getValue("isDecluttered")){
_53+=16;
}
}
catch(e){
}
return new MQA.Point(_52,_53);
};
this._hide=function(){
_e.style.display="none";
};
this._show=function(){
if(_e){
_e.style.display="block";
}
};
};
MQA.Poi.prototype.showInfoDisplayBox=function(_54,_55){
if(this.map&&this.map.slide){
return;
}
if(!this.mqiw.isHidden()){
this.mqiw.hide();
}
this.IDB=new MQA.InfoDisplayBox(this,_54);
if(typeof (_55)!="undefined"){
this.IDB.setValue("titleText",_55);
}
this.IDB.draw();
};
MQA.Poi.prototype.closeInfoDisplayBox=function(){
this.IDB.dispose();
};
MQA.Poi.prototype.createInfoWindowTitleText=function(_56,_57){
this.infoDisplayBoxTitleText=_56;
var s="<div style=\"float:left\">"+_56+"</div>";
s+="<div style=\"float:right;font-weight:normal;color:#037eab;text-decoration:underline;cursor:pointer;\" onclick=\""+_57+"\">More Info &raquo;</div>";
this.setValue("infoWindowTitleText",s);
};
MQA.Poi.prototype.onInfoDisplayBoxOpen=function(e){
MQA.EventManager.trigger(this,"infodisplayboxopen",e);
};
MQA.Poi.prototype.onInfoDisplayBoxClose=function(e){
MQA.EventManager.trigger(this,"infodisplayboxclose",e);
};
MQA.Poi.prototype.onInfoDisplayBoxLinkClick=function(e){
MQA.EventManager.trigger(this,"infodisplayboxlinkclick",e);
};
MQA.Poi.prototype.onInfoDisplayBoxClickClosed=function(e){
MQA.EventManager.trigger(this,"infodisplayboxclickclosed",e);
};
MQA.TileMap.prototype.closeInfoDisplayBox=function(){
var _5d=this._getAllShapes();
if(_5d){
for(var i=0;i<_5d.getSize();i++){
if(_5d.getAt(i).IDB){
_5d.getAt(i).closeInfoDisplayBox();
break;
}
}
}
};

MQA.InfoRollover=function(_1,_2){
MQA.Base.call(this);
var _3="http://img.mqcdn.com/mqtoolkit/infopopup.";
_3+=(MQA.browser.name=="msie"&&MQA.browser.version<7?"gif":"png");
var _4=new MQA.Point(0,0);
var _5=new MQA.Point(650,685);
var _6=new MQA.Point(13,13);
var _7=5;
var _8=43;
var _9=new MQA.Point(51,653);
var _a=new MQA.Point(17,24);
var _b=new MQA.Point(181,651);
var _c=new MQA.Point(16,16);
var _d=20;
var _e=null;
var _f=null;
var _10=null;
var _11=null;
var _12=null;
var _13=null;
var _14=null;
var _15=_1;
var _16=null;
this.content=_2;
this.titleBackgroundColor="#E2EAF1";
this.titleText=null;
this.rightOverlap=30;
this._facio=function(key,_18){
switch(key){
case "content":
if(_e){
this.draw();
}
break;
case "titleBackgroundColor":
if(_e){
this.draw();
}
break;
case "titleText":
if(_e){
this.draw();
}
break;
}
};
this._duco=function(key){
};
this.draw=function(){
if(_e){
this.dispose(false);
}
var _1a=(typeof (this.content.width)=="undefined"?"div":"iframe");
var _1b=parseInt((_1a=="div"?parseInt(this.content.style.width)+20:this.content.width));
_11=_1b+_6.getX()-(_7-1);
var _1c=parseInt((_1a=="div"?parseInt(this.content.style.height):this.content.height));
_12=_1c+(_6.getY()*2)+(_a.getY()/2)+_d;
_e=document.createElement("div");
_e.style.zIndex=100;
_e.id="irInfoRollover";
_e.style.position="absolute";
_e.style.overflow="hidden";
_e.unselectable="on";
_e.style.width=_11+"px";
_e.style.height=_12+"px";
_e.style.zIndex=110;
_10=this._calculateXY(_11,_12);
_e.style.left=_10.getX()+"px";
_e.style.top=_10.getY()+"px";
var _1d=[];
for(var i=0;i<11;i++){
_1d[i]=document.createElement("div");
_1d[i].unselectable="on";
_1d[i].style.position="absolute";
_1d[i].style.overflow="hidden";
_1d[i].id="irFrameBorders"+i;
var _1f=document.createElement("div");
_1f.unselectable="on";
_1f.id="insideDiv";
_1f.style.width=_5.getX()+"px";
_1f.style.height=_5.getY()+"px";
_1f.style.background="url(\""+_3+"\") no-repeat";
_1d[i].appendChild(_1f);
}
_1d[0].style.left="0px";
_1d[0].style.top="0px";
_1d[0].style.width=_6.getX()+"px";
_1d[0].style.height=_6.getY()+"px";
_1d[0].firstChild.style.marginLeft=_4.getX()+"px";
_1d[0].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_1d[0]);
_1d[1].style.left=_6.getX()+"px";
_1d[1].style.top="0px";
_1d[1].style.width=_11-(_6.getX()*2)+"px";
_1d[1].style.height=_6.getY()+"px";
_1d[1].firstChild.style.marginLeft=-_6.getX()+"px";
_1d[1].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_1d[1]);
_1d[2].style.left=_11-_6.getX()+"px";
_1d[2].style.top="0px";
_1d[2].style.width=_6.getX()+"px";
_1d[2].style.height=_6.getY()+"px";
_1d[2].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_1d[2].firstChild.style.marginTop=_4.getY()+"px";
_e.appendChild(_1d[2]);
_1d[3].style.left="0px";
_1d[3].style.top=_6.getY()+"px";
_1d[3].style.width=_6.getX()+"px";
_1d[3].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_1d[3].firstChild.style.marginLeft=_4.getX()+"px";
_1d[3].firstChild.style.marginTop=(_4.getY()-_6.getX())+"px";
_e.appendChild(_1d[3]);
_1d[4].style.left=_6.getX()+"px";
_1d[4].style.top=_6.getY()+"px";
_1d[4].style.width=_11-(_6.getX()*2)+"px";
_1d[4].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_1d[4].firstChild.style.marginLeft=-_6.getX()+"px";
_1d[4].firstChild.style.marginTop=-_6.getY()+"px";
_e.appendChild(_1d[4]);
_1d[5].style.left=_11-_6.getX()+"px";
_1d[5].style.top=_6.getY()+"px";
_1d[5].style.width=_6.getX()+"px";
_1d[5].style.height=_12-((_6.getY()*2)+(_a.getY()/3))+"px";
_1d[5].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_1d[5].firstChild.style.marginTop=-_6.getY()+"px";
_e.appendChild(_1d[5]);
_1d[6].style.left="0px";
_1d[6].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_1d[6].style.width=_6.getX()+"px";
_1d[6].style.height=_6.getY()+"px";
_1d[6].firstChild.style.marginLeft=-_4.getY()+"px";
_1d[6].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_1d[6]);
_1d[7].style.left=_6.getX()+"px";
_1d[7].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_1d[7].style.width=_11-(_6.getX()*2)+"px";
_1d[7].style.height=_6.getY()+"px";
_1d[7].firstChild.style.marginLeft=-_6.getX()+"px";
_1d[7].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_1d[7]);
_1d[8].style.left=_11-_6.getX()+"px";
_1d[8].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_1d[8].style.width=_6.getX()+"px";
_1d[8].style.height=_6.getY()+"px";
_1d[8].firstChild.style.marginLeft=-(_5.getX()-(_6.getX()+_7))+"px";
_1d[8].firstChild.style.marginTop=-(_5.getY()-(_6.getY()+_8))+"px";
_e.appendChild(_1d[8]);
var _20=_13+(_a.getX()/2);
_1d[9].style.left=_20+"px";
_1d[9].style.top=_12-(_6.getY()+(_a.getY()/3))+"px";
_1d[9].style.width=_a.getX()+"px";
_1d[9].style.height=_a.getY()+"px";
_1d[9].firstChild.style.marginLeft=-_9.getX()+"px";
_1d[9].firstChild.style.marginTop=-_9.getY()+"px";
_e.appendChild(_1d[9]);
var _21=document.createElement("div");
_21.id="irTitleBar";
_21.unselectable="on";
_21.style.position="absolute";
_21.style.left=10+"px";
_21.style.top=10+"px";
_21.style.width=_11-((_6.getX()*2))+"px";
_21.style.height=16+"px";
_21.style.background=this.titleBackgroundColor;
_21.style.fontFamily="Arial";
_21.style.fontSize="9pt";
var _22=document.createElement("div");
_22.id="irTitleText";
_22.style.position="absolute";
_22.style.left="5px";
_22.style.top="0px";
_22.style.fontWeight="bold";
_22.style.width="100%";
if(_15.getValue("infoRolloverTitleText")){
_22.innerHTML=_15.getValue("infoRolloverTitleText");
}else{
_22.innerHTML=this.titleText;
}
_21.appendChild(_22);
_e.appendChild(_21);
_f=document.createElement("div");
_f.id="irContentBox";
_f.unselectable="on";
_f.style.position="absolute";
_f.style.left="1px";
_f.style.top=_d+_6.getY()+1+"px";
_f.style.width=_1b+"px";
_f.style.height=_1c+"px";
_f.style.paddingLeft="10px";
_e.appendChild(_f);
_15.shape.appendChild(_e);
_f.appendChild(this.content);
_14=MQA._prEvent.EventCallback(this,"fallthruHandler");
MQA._prEvent.observe(_e,"mousedown",_14);
MQA._prEvent.observe(_e,"click",_14);
var e=new MQA.Event("MQA.Poi.InfoRolloverOpen");
_15.onInfoRolloverOpen(e);
};
this.dispose=function(_24){
var _24=(typeof (_24)!="undefined"?_24:false);
MQA._prEvent.stopObserving(_e,"mousedown",_14);
_14=null;
MQA.Util._deleteDOMObject(_f);
_f=null;
_e.innerHTML="";
MQA.Util._setOuterHTMLToEmptyString(_e);
MQA.Util._deleteDOMObject(_e);
_e=null;
_15.ir=null;
var e=new MQA.Event("MQA.Poi.InfoRolloverClose");
_15.onInfoRolloverClose(e);
if(_24){
this.content.src="";
this.content=null;
_15=null;
}
};
this.fallthruHandler=function(e){
MQA._prEvent.stop(e);
};
this._calculateXY=function(_27,_28){
var _29=parseInt(_e.style.width)/2;
var _2a=_15.map.getSize().getWidth()/2;
var _2b=-(parseInt(_e.style.width)-((_15.getValue("icon").width/2)+_29));
var _2c=_15.map.llToPix(_15.getValue("latLng")).getX();
_16=_2c/_2a;
_2b=_2b*_16;
if(_2b>-25){
_2b=-25;
}else{
if(_2b<-parseInt(_e.style.width)+50){
_2b=-parseInt(_e.style.width)+50;
}
}
_13=Math.abs(_2b)-4;
var _2d=-parseInt(_e.style.height)+4;
return new MQA.Point(_2b,_2d);
};
this._hide=function(){
_e.style.display="none";
};
this._show=function(){
if(_e){
_e.style.display="block";
}
};
};
MQA.Poi.prototype.showInfoRollover=function(_2e,_2f){
this.mqrw.hide();
var _30=(this.mqiw.opener==this&&!this.mqiw.isHidden())||this.IDB;
if(!_30){
this.ir=new MQA.InfoRollover(this,_2e);
if(typeof (_2f)!="undefined"){
this.ir.setValue("titleText",_2f);
}
this.shape.style.zIndex=120;
this.ir.draw();
}
};
MQA.Poi.prototype.closeInfoRollover=function(){
if(this.ir){
this.shape.style.zIndex=90;
this.ir.dispose();
}
};
MQA.Poi.prototype.createInfoRolloverTitleText=function(_31,_32){
this.infoRolloverTitleText=_31;
var s="<div style=\"float:left\">"+_31+"</div>";
s+="<div style=\"float:right;font-weight:normal;color:#037eab;padding-right:10px;text-decoration:underline;cursor:pointer;\" onclick=\""+_32+"\">More Info &raquo;</div>";
this.setValue("infoRolloverTitleText",s);
};
MQA.Poi.prototype.onInfoRolloverOpen=function(e){
MQA.EventManager.trigger(this,"inforolloveropen",e);
};
MQA.Poi.prototype.onInfoRolloverClose=function(e){
MQA.EventManager.trigger(this,"inforolloverclose",e);
};
if(MQA.browser.name=="msie"&&MQA.browser.version<7){
var icache=document.createElement("img");
icache.src="http://img.mqcdn.com/mqtoolkit/infopopup.gif";
}

MQA.LargeZoomControl2.prototype.eventmonitor=function(_1){
if(MQA._prEvent.element(_1)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_1)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_1)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_1)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_1)==this.pan[BEST_FIT]){
eventId="bestfit";
}
if(MQA._prEvent.element(_1)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_1)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_1)==this.revert){
eventId="revert";
}
if(MQA._prEvent.element(_1)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_1)==this.zoomarea[i]){
eventId=16-i;
}
}
try{
switch(_1.type){
case "click":
switch(eventId){
case "revert":
ua.a(":MQ08Reset");
this.map.restoreState();
break;
case "in":
if(this.map.getZoomLevel()<16){
ua.a(":MQ08Zoom"+eventId.toUpperCase());
this.setZoom(this.map.getZoomLevel());
this.map.zoomIn();
}
break;
case "out":
ua.a(":MQ08Zoom"+eventId.toUpperCase());
this.setZoom(this.map.getZoomLevel());
this.map.zoomOut();
break;
case "n":
ua.a(":MQ08Compass"+eventId.toUpperCase());
this.map.panNorth(50);
break;
case "s":
ua.a(":MQ08Compass"+eventId.toUpperCase());
this.map.panSouth(50);
break;
case "e":
ua.a(":MQ08Compass"+eventId.toUpperCase());
this.map.panEast(50);
break;
case "w":
ua.a(":MQ08Compass"+eventId.toUpperCase());
this.map.panWest(50);
break;
case "bestfit":
var _3=this.map.controls[MQA.CONTROL_TRAFFIC];
if(_3&&_3.mode&&_3.mode=="on"&&dojo&&dojo.isIE=="6"){
_3.traffic.removeTrafficPois();
_3.traffic.hideFlow();
}
var _4=this.map.routerect;
var _5=this.map._getAllShapes(true).getSize();
var _6=this.map._getAllShapes(true);
ua.a(":MQ08CompassC");
if(_4&&(_5>0)){
var _7=new MQA.RectLL(new MQA.PointLL(_6.getAt(0).getLatLng().getLatitude(),_6.getAt(0).getLatLng().getLongitude()),new MQA.PointLL(_6.getAt(0).getLatLng().getLatitude(),_6.getAt(0).getLatLng().getLongitude()));
for(var i=1;i<_5;i++){
var _8=_6.getAt(i).getLatLng();
_7.ul.lat=Math.max(_8.lat,Math.max(_7.ul.lat,_4.ul.lat));
_7.ul.lng=Math.min(_8.lng,Math.min(_7.ul.lng,_4.ul.lng));
_7.lr.lat=Math.min(_8.lat,Math.min(_7.lr.lat,_4.lr.lat));
_7.lr.lng=Math.max(_8.lng,Math.max(_7.lr.lng,_4.lr.lng));
}
this.map.bestFit(false,1,16);
this.setZoom(this.map.getZoomLevel());
}else{
if(_4&&(_5==0)){
this.map.bestFitRoute();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_4&&(_5>1)){
this.map.bestFit();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_4&&(_5==1)){
this.map.setCenter(this.map.savedCenter);
}
}
}
}
if(_3&&_3.mode&&_3.mode=="on"&&dojo&&dojo.isIE=="6"){
window.setTimeout("(view.getCurrentMode()=='MAPS')?view.mapView._tileMap.controls[MQA.CONTROL_TRAFFIC].traffic.refresh():view.searchView._tileMap.controls[MQA.CONTROL_TRAFFIC].traffic.refresh()",100);
}
break;
default:
ua.a(":MQ08Zoom"+eventId);
this.setZoom(eventId);
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
case "revert":
MQA._prEvent.element(_1).className="o";
break;
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
case "bestfit":
this.compassrose.className="c";
break;
default:
this.selectZoom(eventId);
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
case "revert":
case "bestfit":
if(MQA._prEvent.element(_1).className!="o"){
return;
}
MQA._prEvent.element(_1).className="a";
break;
case "n":
case "s":
case "e":
case "w":
case "bestfit":
this.compassrose.className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
this.unselectZoom(eventId);
}
break;
}
break;
}
}
catch(e){
}
};
MQA.ZoomControl.prototype.eventmonitor=function(_9){
if(MQA._prEvent.element(_9)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_9)==this.zoomout){
eventId="out";
}
try{
switch(_9.type){
case "click":
switch(eventId){
case "in":
(mqPageContext=="rblprofile")?ua.a(":MQ08CSOVERMapZoomIn"):ua.a(":MQ08ManMapZoomIn");
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
(mqPageContext=="rblprofile")?ua.a(":MQ08CSOVERMapZoomOut"):ua.a(":MQ08ManMapZoomOut");
this.map.zoomOut();
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_9).className="o";
break;
default:
MQA._prEvent.element(_9).src="http://img.mqcdn.com/mqmaptiled/z-on.png";
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_9).className="a";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
MQA._prEvent.element(_9).src="http://img.mqcdn.com/mqmaptiled/z-"+eventId+".png";
}
}
break;
}
}
catch(e){
}
};
MQA.Declutter.prototype.drawLeaderLine=function(_a){
if(_a.shape.style.display=="none"){
return;
}
var xy=new Object;
var _c=(MQA.browser.name=="safari");
var _d=(MQA.browser.name=="msie"&&MQA.browser.version==6);
if(!_c){
if(!this.map.poisurface){
this.map.createPoiDrawingSurface();
}
}else{
if(!this.map.dcCanvasDiv){
this.map.createCanvas();
}
}
if(!_c){
if(!_a.map.poisurface){
throw ("Leader line drawing surface does not exist.");
}
}else{
if(!this.map.dcCanvasDiv){
throw ("Leaderline drawing canvas does not exist.");
}
}
if(!this.adjustLeaderLineSurface()){
var _e=this.map.getDragOffset();
var _f=new Array();
_f[0]=new Object;
_f[0]=this.map.llToPix(_a.getValue("latLng"));
_f[0].x+=(MQA.SURFACE_OFFSET);
_f[0].y+=(MQA.SURFACE_OFFSET);
_f[1]=new Object;
var _10=parseInt(this.map.div1.style.left)+_e.x;
var _11=parseInt(this.map.div1.style.top)+_e.y;
if(_a.getValue("altStateFlag")){
var _12=_a.getValue("altIconOffset").x;
var _13=_a.getValue("altIconOffset").y;
}else{
var _12=_a.getValue("declutterIconOffset").x;
var _13=_a.getValue("declutterIconOffset").y;
}
_f[1].x=(parseInt(_a.shape.style.left)+MQA.SURFACE_OFFSET)-_12+_10;
_f[1].y=(parseInt(_a.shape.style.top)+MQA.SURFACE_OFFSET)-_13+_11;
cpnts=new Array();
if(MQA.Util.isOverLimit(xy)){
if(!_c){
var _14=parseInt(this.map.poilinediv.style.height.substr(0,(this.map.poilinediv.style.height.length)-2));
var _15=parseInt(this.map.poilinediv.style.width.substr(0,(this.map.poilinediv.style.width.length)-2));
}else{
var _14=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));
var _15=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));
}
cpnts=MQA.Clip(0,_14,0,_15,_f,false);
}else{
cpnts=_f;
}
var _16=_a.getValue("leaderLineColor");
if(!_c){
if(MQA.browser.name=="msie"){
_a.leaderLine=MQA.Graphics.drawPolygon(cpnts,_16,1,2,_16,1,true);
}else{
_a.leaderLine=MQA.Graphics.drawLine(cpnts,_16,1,2,true,{x:MQA.Graphics.surfaceWidth,y:MQA.Graphics.surfaceHeight});
}
this.map.poisurface.appendChild(_a.leaderLine);
_a.leaderLine.setAttribute("zIndex",80);
}else{
this.map.dcCanvasContext.strokeStyle=_16;
this.map.dcCanvasContext.lineWidth=2;
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.moveTo(cpnts[1].x,cpnts[1].y);
this.map.dcCanvasContext.lineTo(cpnts[0].x,cpnts[0].y);
this.map.dcCanvasContext.stroke();
}
var _17=parseInt(this.getLeaderLineDotMode());
switch(_17){
case 0:
break;
case 1:
if(!_c){
var c=new Array({x:cpnts[0].x-3,y:cpnts[0].y-3},{x:cpnts[0].x+3,y:cpnts[0].y+3});
var _19=this.map.llToPix(_a.getValue("latLng")).x;
var _1a=this.map.llToPix(_a.getValue("latLng")).y;
var _1b=-MQA.SURFACE_OFFSET;
var _1c=-MQA.SURFACE_OFFSET;
if(!((_19<_1b)||(_19>_1b+MQA.Graphics.surfaceWidth)||(_1a<_1c)||(_1a>_1c+MQA.Graphics.surfaceHeight))){
_a.leaderLineDot=MQA.Graphics.drawEllipse(c,_16,1,1,_16,1,true);
this.map.poisurface.appendChild(_a.leaderLineDot);
_a.leaderLineDot.setAttribute("zIndex",80);
}
}else{
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,3,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,2,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,1,0,Math.PI*2,true);
this.map.dcCanvasContext.stroke();
}
break;
case 2:
var _1d=_a.getValue("leaderLineDotImage");
if(_1d){
_a._leaderLineDotIconDiv=document.createElement("div");
_a._leaderLineDotIconDiv.style.position="absolute";
_a._leaderLineDotIconDiv.style.display="block";
_a._leaderLineDotIconDiv.style.height=_1d.height;
_a._leaderLineDotIconDiv.style.width=_1d.width;
_a._leaderLineDotIconDiv.style.MozUserSelect="none";
_a._leaderLineDotIconDiv.unselectable="on";
var _1e=document.createElement("img");
_1e.src=_1d.imageURL;
_1e.unselectable="on";
_1e.style.height=_1d.height;
_1e.style.width=_1d.width;
_a._leaderLineDotIconDiv.appendChild(_1e);
_a.map._addPoi(_a.getValue("latLng"),new MQA.PointXY(-_1d.width/2,-_1d.height/2),_a._leaderLineDotIconDiv);
_a._leaderLineDotIconDiv.style.zIndex=85;
}
break;
default:
break;
}
}else{
this.redrawLeaderLines();
}
};

dojo.registerModulePath("mq","../mq");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.Menu");
dojo.require("mq.widget.Ambiguous");
dojo.require("mq.widget.SearchNearby");
dojo.require("mq.widget.SearchNearbyToUrl");
dojo.require("mq.widget.LocationListItem");
dojo.require("dijit.form.Button");
dojo.require("mq.widget.SavedRecent");
dojo.require("mq.widget.SendEmail");
dojo.require("mq.widget.CopyURL");
dojo.require("mq.widget.SendToCell");
dojo.require("mq.widget.SendToGPS");
dojo.require("mq.widget.Offers");
dojo.require("mq._base");
dojo.require("mq.uicontroller");
dojo.require("mq.uiview");
dojo.require("mq.ad");
dojo.require("mq.ua");
dojo.require("mq.form");
dojo.require("mq.fiveboxform");
dojo.require("mq.twoboxform");
dojo.require("mq.addnextlocationform");
dojo.require("mq.editlocationform");
dojo.require("mq.searcheditform");
dojo.require("mq.settingsform");
dojo.require("mq.mapresultsform");
dojo.require("mq.lttp");
dojo.require("mq.diagnostics");
dojo.require("mq.rbl");
dojo.require("mq.weather");
dojo.require("mq.searchurl");
dojo.require("dojo.parser");
dojo.require("dojo.cookie");
if(enableSTO){
}
mq.diagnostics.hookLoad();

if(isMainUi){
var controller,view,ua,pfView,addressPopup;
window.debug=function(){
if(djConfig.isDebug){
console.debug.apply(console.debug,arguments);
}
};
window.mainuiInitialize=function(){
try{
ua=new mq.UA();
window.promo=function(_1){
ua.promo(_1);
};
}
catch(e){
logDebug("mainuiinit.mainuiInitialize: initializing ua",e);
}
var _2=new Date().getTime()-startTime;
debug("Widget render time: "+_2);
hash=document.location.hash;
if(hash.length>2&&hash.indexOf("/l:")>0&&(hash.indexOf("/e")==hash.length-2)){
if(hash.substring(1,2)=="a"){
model=mq.util.hashToModel(hash.substring(3));
}
}else{
if(hash.length>2&&hash.indexOf("/l:")<0&&(hash.indexOf("/e")==hash.length-2)){
model=mq.util.hashToModel(hash.substring(3),model);
}
}
var _3=false;
controller=new mq.UIController(model);
view=new mq.UIView(controller,{});
debug("After view initialized: "+controller._model.showRoute);
if(model&&model.mode=="MY"){
debug("open Settings Page");
view.updateView(controller._model);
_3=true;
}else{
if(!controller._model.showRoute||controller._model.routeResults){
if(model.fromTinyURL||(hash.length>=2&&typeof (model.mode)!="undefined"&&model.mode=="MAPS")){
debug("open maps/direction results Page using JS rendering");
view.updateView(controller._model);
_3=true;
}else{
if(model.mode!="SEARCH"&&model.mode!="SETTINGS"){
debug("open maps/direction results Page using server rendering");
view.initMapView(true);
_3=true;
}
}
}
}
if(serverResults&&(hash.length<=2||(typeof (model.mode)!="undefined"&&model.mode=="SEARCH"))){
debug("Found server results");
debug("open search results Page (from home page or bookmarked with search results)");
if(serverResults.length==1){
var _4=[];
_4[0]=(displayMode&&displayMode=="5BOX")?"":"maps0-addressInput";
mapsForm.idList=_4;
mapsForm.handleGeocodeAjax(_4,serverResults);
_3=true;
}else{
if(serverResults.length==2){
var _4=[];
_4[0]=(displayMode&&displayMode=="5BOX")?"":"dir0-addressInput";
_4[1]=(displayMode&&displayMode=="5BOX")?"":"dir1-addressInput";
dirForm.idList=_4;
controller._model.showRoute=true;
dirForm.handleGeocodeAjax(_4,serverResults);
_3=true;
}
}
if(hash.length<=2){
controller.autoHashed=true;
}
}else{
if(hash.length>=2&&(typeof (model.mode)!="undefined"&&model.mode=="SEARCH")&&!_3){
view.updateView(controller._model);
_3=true;
}else{
if(model&&!model.locations){
if(model.trafficEnabled&&view.mapView){
ua.a(":MQ08TrafficOn");
}
if(ua.isActionInCache(":MQ08TrafficOn")){
ua.commit();
}else{
ua.a(":pvForced");
}
}
}
}
$d("send").onclick=function(){
if($w("stgButton")){
if(controller._model&&controller._model.locations&&controller._model.locations.length>0){
$w("stgButton").setDisabled(false);
}else{
$w("stgButton").setDisabled(true);
}
}
ua.a(":MQ08Send");
};
if($d("send2")){
$d("send2").onclick=function(){
ua.a(":MQ08Send2");
};
}
if(model.trafficEnabled&&view.mapView){
setTimeout("mq.traffic.enable(view.mapView._tileMap, true)",500);
}
mq.lttp.listenForPanZoom();
if(model.showEmail){
view.handleEmailClick();
}else{
if(model.showPrint||(model.printerFriendly&&!model.showRoute)){
showPrint();
}else{
if(model.showSettings){
mq.settings();
}else{
if(model.showSearchNearby){
mq.showSearchNearby($d("dirStartAddrSummary"),0);
}
}
}
}
if(window._adRenderQueue){
setTimeout(function(){
for(var i=0;i<window._adRenderQueue.length;i++){
window._adRenderQueue[i].call(null);
}
},1);
}
if(enableSTO){
}
};
window.updateDirRGFormWithSearch=function(_6){
if(_6&&_6.length==2){
$d("dir0-addressInput").value=mq.formatLocationSingleLine(_6[0].locationResult);
$d("dir1-addressInput").value=mq.formatLocationSingleLine(_6[1].locationResult);
if(_6[0].locationResult.query){
$d("dir0-query").value=_6[0].locationResult.query;
}
if(_6[1].locationResult.query){
$d("dir1-query").value=_6[1].locationResult.query;
}
}
};
window.resizeMap=function(){
view.resizeMap();
};
window.positionLoading=function(){
var vp=dijit.getViewport();
var y=vp.h/2;
var x=vp.w/2;
var _a=document.getElementById("loading");
_a.style.display="block";
};
window.selectAirport=function(id,_c,_d,_e,_f,zip,lat,lng,_13){
mq.selectAirport(id,_c,_d,_e,_f,zip,lat,lng,_13);
};
window.backToMap=function(){
mq.hide(dojo.byId("printDisplay"));
window.scrollTo(0,0);
mq.show(dojo.byId("viewDisplay"));
controller.togglePrint(false);
if(view){
view.resizeLayout();
}
};
window.showPrint=function(){
if(window.yellowArrowFaderTimer){
clearTimeout(window.yellowArrowFaderTimer);
view.searchView.clearYellowArrowColors();
}
controller.saveHistory();
var _14=new MQA.Size(650,541);
if(window.view.getCurrentMode()=="SEARCH"){
if(!window.view.searchView){
return;
}
var h=window.view.searchView._tileMap.getSize().getHeight();
if(h>541){
_14.height=h;
}
}else{
var h=window.view.mapView._tileMap.getSize().getHeight();
if(h>541){
_14.height=h;
}
}
mq.hide(dojo.byId("viewDisplay"));
mq.show(dojo.byId("printDisplay"));
function init(){
if(!pfView.printSize){
pfView.printSize=_14;
}
pfView.updateMap();
ua.a(":pvForced");
};
if(window.pfView){
init();
}else{
mq.dynamicRequire("mq.printview",function(){
dijit.byId("printDisplay").onLoad=function(e){
window.pfView=new mq.PrintView(controller);
init();
};
dijit.byId("printDisplay").setHref("/controller/print");
});
}
controller.togglePrint(true);
};
window.pfGoLocal=function(){
var ind,omn;
if(controller._model.mode=="MAPS"){
ind=controller.numLocs()-1;
omn=(controller.numLocs()==1)?"MQ08MapPrintLocal":"MQ08DirPrintLocal";
}else{
if(controller._model.mode=="SEARCH"){
ind=-1;
omn="MQ08SearchPrintLocal";
}
}
mq.goLocal(ind,omn);
};
window.mapLocation=function(_19){
$d("maps0-addressInput").value=_19;
$d("map-button").click();
};
window.getDirections=function(_1a,end){
$d("dir0-addressInput").value=_1a;
$d("dir1-addressInput").value=end;
$d("dir-button").click();
};
window.getMPRoute=function(){
controller.showRoute(true);
var loc={};
var _1d={};
var _1e={};
loc.addressInput="Denver, CO";
_1d.addressInput="Aurora, CO";
_1e.addressInput="Boulder, CO";
$w("rgform").geocode([loc,_1d,_1e],["dirFrom.addressInput","dirTo.addressInput"]);
};
window.findPlace=function(_1f,_20){
$d("search-addressInput").value=_20;
$d("search-query").value=_1f;
$d("search-button").click();
};
window.bizLocatorSearch=function(id,_22){
controller._model.blId=id;
controller._model.blColor=_22;
var id=(controller._model.locations)?controller._model.locations.length:0;
view.chooseBLLocation(id);
};
startTime=new Date();
debug("Start Time: "+startTime);
if(dojo.isIE){
window.attachEvent("onload",function(){
dojo.addOnLoad(window.mainuiInitialize);
});
}else{
dojo.addOnLoad(window.mainuiInitialize);
}
window.closeTrafficPopup=function(){
var _23;
if($d("trafficHelpControl")&&mq.getCookie("mqTrafficPromoPopup")==null){
if($d("trafficHelpControl").checked){
_23=3650;
}else{
_23="";
}
mq.setCookie("mqTrafficPromoPopup","never",_23,"/");
if($w("mapTrafficHelp")){
$w("mapTrafficHelp").handleCancel();
}
}
};
window.initTrafficPopup=function(id){
var str=window.trafficPopupContent;
var _26=view.getCurrentMode();
if(_26=="MAPS"&&!mq.getCookie("mqTrafficPromoPopup")&&!$w(id)){
var _27=new mq.widget.MQPopup({id:id,position:"center",positionRelativeTo:"mapWindow",alignTop:true,stayWithElement:true,popupContent:str,bgRequired:false,closeOnBackGroundClick:false,popupImage:"sprt-pop-wht.png",initFocusId:"NOFOCUS"});
}
};
}

mq.traffic=new (function(){
this.makeTrafficControl=function(_1){
if(window.IsTrafficEnabled!="true"){
return false;
}
var _2=new MQA.TrafficControl();
_2.setValue("legendHelpLinkVisible",true);
_1.addControl(_2);
_2.traffic.setValue("incidentTitleCallback",this.newIncidentTitleHTML);
_2.traffic.setValue("incidentContentCallback",this.newIncidentContentHTML);
_2.traffic.setValue("marketTitleCallback",this.newMarketTitleHTML);
_2.traffic.setValue("marketContentCallback",this.newMarketContentHTML);
_2.traffic.setValue("infoWindowCallback",this.eventHandler);
MQA.EventManager.addListener(_2,"activate",this.eventHandler);
MQA.EventManager.addListener(_2,"deactivate",this.eventHandler);
MQA.EventManager.addListener(_2,"incidentclick",this.eventHandler);
MQA.EventManager.addListener(_2,"constructionclick",this.eventHandler);
MQA.EventManager.addListener(_2,"legendopen",this.eventHandler);
MQA.EventManager.addListener(_2,"legendclose",this.eventHandler);
MQA.EventManager.addListener(_2,"helpclick",this.eventHandler);
MQA.EventManager.addListener(_2,"refreshclick",this.eventHandler);
var _3=_2.traffic;
MQA.EventManager.addListener(_3,"marketdataload",this.eventHandler);
MQA.EventManager.addListener(_3,"incidentdataload",this.eventHandler);
MQA.EventManager.addListener(_3,"trafficdatarefresh",this.eventHandler);
MQA.EventManager.addListener(_3,"flowimageshow",this.eventHandler);
MQA.EventManager.addListener(_3,"flowimagehide",this.eventHandler);
MQA.EventManager.addListener(_3,"marketsshow",this.eventHandler);
MQA.EventManager.addListener(_3,"incidentsshow",this.eventHandler);
MQA.EventManager.addListener(_3,"trafficpoisremove",this.eventHandler);
MQA.EventManager.addListener(_3,"datatimeout",this.eventHandler);
MQA.EventManager.addListener(_3,"incidentsadded",this.eventHandler);
MQA.EventManager.addListener(_3,"marketsadded",this.eventHandler);
return _2;
};
this.newIncidentTitleHTML=function(_4){
return _4.title;
};
this.newIncidentContentHTML=function(_5){
var _6=view.getCurrentMode()=="MAPS"?"view.mapView":"view.searchView";
var s=_5.description+"<br/><br/>";
s+="<b>Start Time:</b> "+_5.startTime+"<br/>";
s+="<b>End Time:</b> "+_5.endTime+"<br/>";
s+="(All times estimated)<br/>";
s+="<a onclick=\"ua.a(':MQ08ZoomStreetLevel');"+_6+"._tileMap.setCenter(new MQA.LatLng("+_5.latitude+","+_5.longitude+"),14);return false;\">Zoom to Street</a>";
s+="<div class=\"allStatePrmo\" style=\"height:25px\"></div>";
return s;
};
this.newMarketTitleHTML=function(_8){
return _8.city+", "+_8.state;
};
this.newMarketContentHTML=function(_9){
var _a=view.getCurrentMode()=="MAPS"?"view.mapView":"view.searchView";
return "Please <a href onclick=\"ua.a(':MQ08TRFZoomIn');"+_a+"._tileMap.setCenter(new MQA.LatLng("+_9.latitude+","+_9.longitude+"),7);return false;\">click here</a> to view traffic conditions.";
};
this.eventHandler=function(e){
debug("mqtraffic event name --> "+e.eventName);
var _c;
if(view.getCurrentMode()=="MAPS"){
_c=view.mapView._tileMap;
}else{
if(view.getCurrentMode()=="SEARCH"){
_c=view.searchView._tileMap;
}
}
var _d=_c.controls[MQA.CONTROL_TRAFFIC];
if(_d==null){
debug("Control is null!");
}
switch(e.eventName){
case "MQA.TrafficControl.helpClick":
mq.traffic.doHelpClickActions();
break;
case "MQA.TrafficControl.activate":
var _e=5;
if(TrafficRefreshTimer&&TrafficRefreshTimer!=""){
_e=TrafficRefreshTimer;
}
if(_e){
_d.refreshTimer=window.setInterval(function(){
_d.traffic.refresh();
_d.updateLegendTime();
},parseInt(_e)*60*1000);
debug("Setting traffic timer to "+_e+" min : "+_d.refreshTimer);
}
model["trafficEnabled"]=true;
if(!mq.traffic.autoSelect){
controller.saveState();
ua.a(":MQ08TrafficOn");
ua.commit();
}
break;
case "MQA.TrafficControl.deactivate":
window.incidentBubblePromo=null;
if(_d.refreshTimer){
window.clearInterval(_d.refreshTimer);
debug("Clearing timer :"+_d.refreshTimer);
}
model["trafficEnabled"]=false;
controller.saveState();
break;
case "MQA.Traffic.incidentsAdded":
_d.traffic.getValue("incidentCollection").addEventListeners("infoWindowOpen",dojo.hitch(mq.traffic,"eventHandler"));
break;
case "MQA.Traffic.marketsAdded":
_d.traffic.getValue("marketCollection").addEventListeners("infoWindowOpen",dojo.hitch(mq.traffic,"eventHandler"));
break;
case "MQA.TrafficControl.incidentClick":
var _f=_d.incidentCheckDiv.childNodes[0];
debug(_f);
debug(_f.checked);
if(_f.checked){
ua.a(":MQ08TRFIncidentsOn");
}else{
ua.a(":MQ08TRFIncidentsOff");
}
break;
case "MQA.TrafficControl.constructionClick":
var _10=_d.constructionCheckDiv.childNodes[0];
if(_10.checked){
ua.a(":MQ08TRFConstructionOn");
}else{
ua.a(":MQ08TRFConstructionOff");
}
break;
case "MQA.Poi.infoWindowOpen":
var _11=dojo.query(".allStatePrmo",$d("popup-content"));
if(_11&&_11.length>0){
_11[0].innerHTML="";
_11[0].innerHTML=incidentPromo;
}
if(_c){
if(_c.getZoomLevel()<7){
debug(":MQ08TRFLight");
ua.a(":MQ08TRFLight");
}else{
debug(":MQ08TRFAlertDetails");
ua.a(":MQ08TRFAlertDetails");
}
}
break;
}
var _12=mq.traffic.uaMapping[e.eventName];
if(_12){
ua.a(_12);
}
};
this.doHelpClickActions=function(){
window.location="http://help.mapquest.com/jive/kbcategory.jspa?categoryID=36";
return false;
};
this.autoSelect=false;
this.enable=function(_13,_14){
var tc=_13.controls[MQA.CONTROL_TRAFFIC];
if(!tc){
return;
}
if((_14&&tc.mode!="on")||(!_14&&tc.mode=="on")){
mq.traffic.autoSelect=true;
debug("Traffic Auto Select "+mq.traffic.autoSelect);
tc.buttonEventMonitor({target:tc.trafficButton,type:"click"});
mq.traffic.autoSelect=false;
}
};
this.uaMapping={"MQA.TrafficControl.deactivate":":MQ08TrafficOff","MQA.TrafficControl.refreshClick":":MQ08TrafficRefresh","MQA.TrafficControl.legendOpen":":MQ08TRFMaxLegend","MQA.TrafficControl.legendClose":":MQ08TRFMinLegend"};
});

mq.zoomcontrol=new (function(){
this.makeZoomControl=function(_1){
var _2=new MQA.LargeZoomControl3();
_1.addControl(_2,new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,0)));
MQA.EventManager.addListener(_2,"zoomin",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"zoomout",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"setzoom",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"pannorth",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"paneast",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"pansouth",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"panwest",this.eventHandler,_1);
MQA.EventManager.addListener(_2,"bestfit",this.eventHandler,_1);
return _2;
};
this.eventHandler=function(e){
debug("mqzoomcontrol event name --> "+e.eventName);
switch(e.eventName){
case "MQA.LargeZoomControl3.zoomIn":
ua.a(":MQ08ZoomIN");
break;
case "MQA.LargeZoomControl3.zoomOut":
ua.a(":MQ08ZoomOUT");
break;
case "MQA.LargeZoomControl3.setZoom":
ua.a(":MQ08Zoom"+this.getZoomLevel());
break;
case "MQA.LargeZoomControl3.panNorth":
ua.a(":MQ08CompassN");
break;
case "MQA.LargeZoomControl3.panEast":
ua.a(":MQ08CompassE");
break;
case "MQA.LargeZoomControl3.panSouth":
ua.a(":MQ08CompassS");
break;
case "MQA.LargeZoomControl3.panWest":
ua.a(":MQ08CompassW");
break;
case "MQA.LargeZoomControl3.bestFit":
ua.a(":MQ08CompassC");
break;
}
};
});

MQA.RemoteCollectionResponseHandler=new function(){
this.collectionContainer=Array();
this.getCallback=function(rc){
return this.onDataReturn;
};
this.onDataReturn=function(_2){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_2){
this.collectionContainer[i].onDataReturn();
break;
}
}
};
this.onDataRequestTimeout=function(_4){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_4){
this.collectionContainer[i].onDataRequestTimeout();
break;
}
}
};
this.addInstance=function(rc){
this.collectionContainer.push(rc);
};
};
MQA.RemoteCollection=function(_7,_8,_9){
MQA.ShapeCollection.call(this);
this._returnData=null;
this._xmlHTTP=null;
this.deserializer=_8;
this.url=_7;
this.timeoutDuration=(typeof (_9)!="undefined"?_9:10000);
this.dataRequestTimer=null;
this.jsonScript=null;
this.scriptReturned=false;
this.eventHandlers=[];
EventHolder=function(){
this.eventName;
this.handler;
};
this.requestData=function(_a){
clearTimeout(this.dataRequestTimer);
this.scriptReturned=false;
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(window.XMLHttpRequest){
this._xmlHTTP=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
this._xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
}
}
var _b=Array();
_b.push(this.guid);
this._xmlHTTP.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
if(_a.indexOf("?")==-1){
_a+="?mqarand="+Math.random();
}else{
_a+="&mqarand="+Math.random();
}
this._xmlHTTP.open("GET",_a,true);
this._xmlHTTP.send(null);
}else{
this.jsonScript=document.createElement("script");
this.jsonScript.id="jsonScript";
this.jsonScript.src=_a;
this.jsonScript.type="text/javascript";
var _b=Array();
_b.push(this.guid);
if(this.deserializer.isIE){
this.jsonScript.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}else{
this.jsonScript.onload=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}
document.body.appendChild(this.jsonScript);
}
this.dataRequestTimer=setTimeout("MQA.RemoteCollectionResponseHandler.onDataRequestTimeout(\""+this.guid+"\")",this.timeoutDuration);
};
this.onDataReturn=function(){
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(this._xmlHTTP.readyState==4){
if(this._xmlHTTP.status==200){
if(document.implementation&&document.implementation.createDocument){
var _c=new DOMParser();
this._returnData=_c.parseFromString(this._xmlHTTP.responseText,"text/xml");
}else{
this._returnData=new ActiveXObject("Microsoft.XMLDOM");
this._returnData.async="false";
this._returnData.loadXML(this._xmlHTTP.responseText);
}
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
}else{
if((this.deserializer.isIE&&(this.jsonScript.readyState=="complete"||this.jsonScript.readyState=="loaded"))||!this.deserializer.isIE){
this.scriptReturned=true;
try{
document.body.removeChild(this.jsonScript);
}
catch(e){
}
this.jsonScript=null;
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
};
this.onDataRequestTimeout=function(){
clearTimeout(this.dataRequestTimer);
if(this.deserializer instanceof MQA.JSONDeserializer){
try{
document.body.removeChild(this.jsonScript);
this.jsonScript=null;
}
catch(e){
}
}
this.dataRequestTimer=null;
var _d=new MQA.Event("MQA.RemoteCollection.dataTimeout");
_d.srcObject=this;
this.onDataTimeout(_d);
};
this._processData=function(){
var _e=this.deserializer.deserializeData(this._returnData);
for(var k=0;k<_e.length;k++){
this.add(_e[k]);
}
this.activateEventListeners();
var mqe=new MQA.Event("MQA.RemoteCollection.dataLoaded");
mqe.srcObject=this;
this.onDataLoaded(mqe);
};
this.update=function(){
this.deactivateEventListeners();
this.removeAll();
this.requestData(this.url);
};
this.getData=function(){
return this._returnData;
};
this.setTimeoutDuration=function(x){
this.timeoutDuration=x;
};
this.getTimeoutDuration=function(){
return this.timeoutDuration;
};
this.addEventListeners=function(_12,_13){
_12=_12.toLowerCase();
this.eventHandlers.push({eventName:_12,handler:_13,active:false});
this.activateEventListeners();
};
this.removeEventListeners=function(_14){
_14=_14.toLowerCase();
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].eventName==_14){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
this.eventHandlers.splice(x,1);
}
}
};
this.activateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(!this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.addListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=true;
}
}
}
};
this.deactivateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=false;
}
}
}
};
this.onDataLoaded=function(mqe){
MQA.EventManager.trigger(this,"dataloaded",mqe);
};
this.onDataTimeout=function(mqe){
MQA.EventManager.trigger(this,"datatimeout",mqe);
};
MQA.RemoteCollectionResponseHandler.addInstance(this);
this.requestData(_7);
};

MQA.BaseDeserializer=function(){
var _1=null;
var _2=null;
this.isIE=(MQA.Util.getBrowserInfo().name=="msie");
this.deserializeData=function(_3){
return null;
};
this.getTextValue=function(_4){
if(MQA.Util.getBrowserInfo().name=="msie"){
return _4.text;
}else{
return _4.textContent;
}
};
};

MQA.JSONDeserializer=function(_1){
MQA.BaseDeserializer.call(this);
this._data=null;
if(typeof (_1)=="undefined"){
this._dataProcessor=function(_2){
return null;
};
}else{
this._dataProcessor=_1;
}
this.deserializeData=function(_3){
var _4,_5,_6;
var _7=Array();
this._data=_3;
_7=this._dataProcessor(this._data);
return _7;
};
this.setDataProcessor=function(fn){
this._dataProcessor=fn;
};
};

mq._loader._layerLoaded('results');