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</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.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;'";
}
},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.LinkToPage"]){
dojo._hasResource["mq.widget.LinkToPage"]=true;
dojo.provide("mq.widget.LinkToPage");
dojo.declare("mq.widget.LinkToPage",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"linktothis\" widgetId=\"${id}\">\n\t&nbsp;&nbsp;Link to this Page:\n\t<input title=\"Click in this field to get URL to directly link to this page\" type=\"text\" value=\"${defaultMessage}\" class=\"lttpInput\"\n\tdojoAttachEvent=\"onfocus: update, onblur: blur, click: cancelEvent\" dojoAttachPoint=\"node\"/>\n</div>\n",defaultMessage:location.protocol+"//"+location.host+"/mq/...",imagePath:mqPrefix+"/cdn/images",postCreate:function(){
var my=this;
window.setTimeout(function(){
my.listenForPanZoom();
my.resize();
},1000);
},lttpState:false,initialState:true,update:function(){
if(this.lttpState!=controller._model){
var mv=view.mapView;
var my=this;
mv.saveTinyURL(function(_6e,_6f){
my.lttpState=controller._model;
my.lttpLastValue=my.node.value=mv.getTinyUrl(_6e);
my.resize();
my.select();
});
}else{
this.node.value=this.lttpLastValue;
}
this.resize();
this.select();
ua.a(":MQ08LTTP");
},blur:function(){
this.node.value=this.defaultMessage;
this.resize();
},resize:function(){
if(dojo.isSafari){
this.node.style.width="";
this.node.style.width=this.node.scrollWidth+"px";
return;
}
this.node.size=this.node.value.length;
if(this.node.value.match(/\.$/)){
this.node.size-=3;
}
},select:function(){
this.node.select();
},cancelEvent:function(evt){
return evt.returnValue=false;
},listenForPanZoom:function(){
if(this.listening){
return;
}
this.listening=true;
var my=this;
dojo.connect(controller,"panZoomChange",function(){
my.lttpLastValue=my.lttpState=my.initialState=false;
my.node.blur();
});
}});
}
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();
loc.formattedLocation=mq.util.formatLocationSummary(loc);
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 _74=controller._model.locations;
this.detailsDisplay="";
if(_74&&_74.length>1){
this.inputDisplay="";
}
var d=this.gps.gpsController.getDevices();
var _76="<div class='gpsSelector'>";
if(d.length==1){
_76+="<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++){
_76+="<div class='gpsSelectorItem'><input type='checkbox' class='gpsDevice' name='device_"+i+"' id='device_"+i+"'/>"+d[i].getDisplayName()+"</div>";
}
}
_76+="</div>";
this.devices=_76;
if(this.location&&this.location.postalCode){
var _78=new dojox.string.Builder();
_78.append("<div class='b'>Location to send:</div>");
_78.append("<div class='gpsSelector"+this.type+"' gpsSelector>");
_78.append(this.formatLocation(this.location));
_78.append("</div>");
this.details=_78;
this.addrSummaryHeight=mq.getPopupContentWidthHeight(this.details).height;
}else{
if(_74!=undefined&&_74.length>0){
var sb=new dojox.string.Builder();
if(_74.length==1){
this.type="Map";
sb.append("<div class='b'>Location to send:</div>");
}else{
this.type="Route";
this.locDetails="<span class='b'>Sending "+_74.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<_74.length;i++){
if(i+1<_74.length){
sb.append("<div class='divide'>"+this.formatLocation(_74[i].location)+"</div>");
}else{
sb.append(this.formatLocation(_74[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(_7a){
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(_7b,_7c){
if(_7b){
if(_7c){
_7b.disabled=false;
_7b.style.opacity=1;
_7b.style.cursor="pointer";
}else{
_7b.disabled=true;
_7b.style.opacity=0.3;
_7b.style.cursor="default";
}
}
},createWarning:function(_7d){
var _7e="<div class='gpsWarning'><div class='fltl'><img src='"+this.imagePath+"/icon-warn-sm.png' height='18' width='18'></div>"+_7d+"";
$w("mqSTGPopup")._increaseHeight(50);
$d("userInputErrorMessage").innerHTML=_7e;
},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(_81){
var _82=this.gps.supportsRoutes(_81);
if(!_82){
this.gps.waypointsOnly=true;
}else{
if(document.STGDevice.ro[0].checked){
this.gps.waypointsOnly=false;
}else{
this.gps.waypointsOnly=true;
}
}
if(this.location||!_82){
if(this.location){
this.writeData([this.location],_81);
}else{
var _83=[];
for(var i=0;i<controller._model.locations.length;i++){
_83[i]=controller._model.locations[i].location;
}
this.writeData(_83,_81);
}
}else{
var _83=[];
for(var i=0;i<controller._model.locations.length;i++){
_83[i]=controller._model.locations[i].location;
}
this.writeData(_83,_81,controller._model.routeOptions);
}
},writeData:function(_85,_86,_87){
this.gps.writePOIs(_85,_86,_87);
},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 _89,_8a,_8b,_8c;
var _8d=evt.currentTarget;
var id=_8d.id;
var _8f=dojo.coords(_8d,true);
var _90=new dojox.string.Builder();
_90.append("<div class=\"alert-warning\" style=\"display: block;width: 250px;\">");
_90.append("<span style=\"font-weight:bold\">Sending locations as a route vs waypoints</span>");
_90.append("<div class=\"avoid\" style=\"text-align:left; margin-top:7px\">");
_90.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.");
_90.append("</div>");
_90.append("</div>");
_90=_90.toString();
var _91=mq.getPopupContentWidthHeight(_90);
var _92=(dojo.isSafari)?_8f.x:_8f.x;
var _93=(dojo.isSafari)?_8f.y:_8f.y;
_8a=0;
_8b=_92-145;
_8c=_93+30;
var _94=new mq.widget.MQPopup({id:"gpsHelpBubble",xoffset:_8b,yoffset:_8c,bgOpacity:0,fadingBg:false,closeButtonRequired:true,closeOnBackGroundClick:false,popupArrowPlacement:_8a,arrowOffsetX:140,popupImage:"sprt-pop-ylw",bgRequired:false,popupMinWidth:_91.width+10,popupContent:_90,popupMinHeight:95});
$d("gpsHelpBubble").focus();
}});
}
if(!dojo._hasResource["mq.uicontroller"]){
dojo._hasResource["mq.uicontroller"]=true;
dojo.provide("mq.uicontroller");
dojo.declare("mq.UIController",null,{constructor:function(_95){
try{
debug("Initialize: "+_95);
if(_95==null){
this._model={showRoute:false,mode:"MAPS"};
}else{
debug("2. "+_95.showRoute);
this._model=_95;
if(_95.locations){
var _96=[];
for(var i=0;i<_95.locations.length;i++){
_96.push(_95.locations[i].location);
}
mq.savedandrecent.addRecentLocations(_96);
}
if(!_95.routeResults){
this.calculateRoute();
}
}
var c=this;
window.historyTimer=setInterval(function(){
if(!c.delaySaveState){
var _99=window.location.hash.substring(1);
c.handleNavigation(_99);
}
},this.stateUpdateInterval);
var _9a=(dojo.isSafari)?16:4;
window.setTimeout(function(){
c.origModelStr=mq.util.modelToString(window.model);
},this.stateUpdateInterval*_9a);
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,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,_9d){
debug("UIController.addLocation: "+_9d);
this._model.mode="MAPS";
this.resetMap();
if(this._model.locations==null){
this._model.locations=[];
}
if(_9d==null){
_9d=this._model.locations.length;
}
if(this._model.locations.length==1){
this._model.showRoute=true;
}
var _9e={};
_9e.location=loc;
_9e.mapOrder=_9d;
this._model.locations[_9d]=_9e;
this.calculateRoute();
this.saveState();
this.updateCookie(loc);
},addLocations:function(_9f){
debug("UIController.addLocations: "+_9f.length);
this._model.mode="MAPS";
this.resetMap();
this._model.locations=null;
this._model.locations=[];
for(var i=0;i<_9f.length;i++){
var loc=_9f[i];
var _a2={};
_a2.location=loc;
_a2.mapOrder=i;
this._model.locations.push(_a2);
this.updateCookie(loc);
}
this.showRoute(_9f.length>1);
this.calculateRoute();
this.saveState();
},removeLocation:function(_a3){
this._model.locations.splice(_a3,1);
if(this._model.locations.length==0){
this._model.locations=null;
}
this.resetMap();
this.calculateRoute();
this.saveState();
},moveUp:function(_a4){
this.resetMap();
var l1=this._model.locations[_a4];
l1.mapOrder--;
var l2=this._model.locations[_a4-1];
l2.mapOrder++;
this._model.locations.splice(_a4-1,2,l1,l2);
this.calculateRoute();
this.saveState();
},moveDown:function(_a7){
this.resetMap();
var l1=this._model.locations[_a7];
l1.mapOrder++;
var l2=this._model.locations[parseInt(_a7)+1];
l2.mapOrder--;
this._model.locations.splice(_a7,2,l2,l1);
this.calculateRoute();
this.saveState();
},reorder:function(_aa){
this.resetMap();
for(i=0;i<_aa.length;i++){
var _ab={};
_ab.location=_aa[i];
_ab.mapOrder=i;
this._model.locations[i]=_ab;
}
this.calculateRoute();
this.saveState();
},showRoute:function(_ac){
this._model.showRoute=_ac;
},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(_ad){
this._model.printerFriendly=_ad;
this.saveState();
},calculateRoute:function(){
debug("UIController.calculateRoute: "+this._model.showRoute);
var _ae=dojo.clone(this._model);
if(this._model.showRoute==false){
this.handleRoute(_ae,null);
return;
}
if(this._model.locations==null||this._model.locations.length<2){
this._model.routeResults=null;
this.handleRoute(_ae,null);
return;
}
var _af=dojo.hitch(this,"handleRoute",_ae);
var _b0=[];
for(var i=0;i<this._model.locations.length;i++){
_b0[i]=this._model.locations[i].location;
}
if(this._model.routeOptions==null){
this._model.routeOptions={};
this._model.routeOptions.routeType="FASTEST";
}
var _b2="";
if(this._model.routeResults!=null&&this._model.routeResults.sessionId!=null){
_b2=this._model.routeResults.sessionId;
}
try{
UIService.route(_b0,this._model.routeOptions,_b2,_af);
}
catch(e){
console.error("Error contacting route server.");
}
},handleRoute:function(_b3,_b4){
debug("UIController.handleRoute");
if(_b4&&_b4.resultCode!=0){
debug("Route Failed: "+_b3);
this._model=_b3;
if(!this._model.routeResults){
this._model.routeResults={};
}
this._model.routeResults.resultMessages=_b4.resultMessages;
this._model.routeResults.resultCode=_b4.resultCode;
if(_b3.routeOptions){
var _b5=_b3.routeOptions.lastRequestedAvoidGEFS;
if(_b5){
if(!this._model.routeResults.unavoidableGEFIDs){
this._model.routeResults.unavoidableGEFIDs=[];
}
for(var i=0;i<_b5.length;i++){
this._model.routeResults.unavoidableGEFIDs.push(_b5[i]);
this._model.routeOptions.avoidGEFIDList=mq.util.removeFromArray(this._model.routeOptions.avoidGEFIDList,_b5[i]);
}
if(this._model.routeOptions.lastRequestedAvoidTrekAndMan){
var _b7=this._model.routeResults.treks[this._model.routeOptions.lastRequestedAvoidTrekAndMan[0]];
var man=_b7.maneuvers[this._model.routeOptions.lastRequestedAvoidTrekAndMan[1]];
man.message="MSG_UNABLE_TO_AVOID";
this._model.routeResults.wasAvoidError=true;
}
}
}
this.saveState();
}else{
this._model.routeResults=_b4;
}
this.onModelUpdate(this._model);
},showAvoidsRestoreLink:function(){
var _b9=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){
_b9=true;
}
}else{
if(this._model.routeOptions.avoidGEFIDList&&this._model.routeOptions.avoidGEFIDList.length>0){
_b9=true;
}
}
}
return _b9;
},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(_ba,_bb){
debug("UIController.avoidRouteSegment:"+_ba+"-"+_bb);
var man=this._model.routeResults.treks[_ba].maneuvers[_bb];
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=[_ba,_bb];
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(_be){
debug("UIController.modeChange: "+_be);
this._model.mode=_be;
this.saveState();
},viewTypeChange:function(_bf){
debug("UIController.viewTypeChange");
this._model.viewType=_bf;
this.saveState();
},panZoomChange:function(_c0,_c1){
debug("UIController.panZoomChange: "+_c0);
this._model.zoomLevel=_c0;
this._model.centerLatitude=_c1.getLatitude();
this._model.centerLongitude=_c1.getLongitude();
},resetMap:function(){
debug("UIController.resetMap");
this._model.centerLatitude=null;
this._model.centerLongitude=null;
this._model.zoomLevel=null;
},updateSearch:function(loc,_c3,_c4){
debug("UIController.updateSearch");
this.resetMap();
this._model.mode="SEARCH";
this._model.searchLocation=loc;
this._model.searchResults=_c3;
this._model.searchOptions=_c4;
this.saveState();
this.onModelUpdate(this._model);
},onModelUpdate:function(_c5){
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(_c6,_c7){
},delaySaveState:false,saveState:function(){
if(!this.delaySaveState){
var c=this;
c.delaySaveState=setTimeout(function(){
c.delaySaveState=false;
c.saveHistory();
},this.stateUpdateInterval);
}
},createState:function(){
var _c9=this._model!=null?mq.util.modelToString(this._model):"a/maps/io:0/e";
return _c9;
},saveMapGutterState:function(_ca){
},setMapGutterState:function(_cb){
this._model.mapGutterState=_cb;
},saveSearchGutterState:function(_cc){
},setSearchGutterState:function(_cd){
this._model.searchGutterState=_cd;
},syncGutterState:function(_ce){
this.setMapGutterState(_ce);
this.setSearchGutterState(_ce);
this.saveState();
},updateCookie:function(loc){
mq.savedandrecent.addRecentLocation(loc);
},maxUrlLength:2045,saveHistory:function(){
var _d0=dojo.isIE||dojo.isSafari==2;
var _d1=this.createState();
debug("Model State: "+_d1);
if(_d1.indexOf("a//")==0){
return;
}
if((this.winLoc+_d1).length<this.maxUrlLength){
window.location.hash=_d1;
}else{
this.origModelStr=_d1;
_d0=true;
}
this.modelStrCache=_d1;
if(_d0){
$d("iframe_history").contentWindow.location.search="state="+_d1;
}
},handleNavigation:function(_d2){
if(!_d2){
if(serverResults){
if(!dojo.isSafari){
window.history.go(-1);
}
return;
}
_d2=this.origModelStr;
}
if(_d2!=this.modelStrCache&&this.modelStrCache){
if((dojo.isIE||dojo.isSafari==2)&&(this.winLoc+_d2).length<this.maxUrlLength){
window.location.hash=_d2;
}
this.importModel(this.modelStrCache=_d2);
}
},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,_d7=[],_d8=[],_d9=[];
var vp=dijit.getViewport();
var us={locations:_d7,searches:_d8,treks:_d9,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 _dc=loc.sicCodesCommaNames;
var cat="";
try{
if(_dc){
cat=_dc.split(/,/)[1].split(/#/)[0].replace("(All) ","");
}
}
catch(e){
console.warn("Error parsing category: "+_dc);
}
_d7.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++){
_d9.push(m.routeResults.treks[i].distance);
}
}
_d7.push({role:"mapcenter",lattitude:m.centerLatitude||NaN,longitude:m.centerLongitude||NaN});
if(m.searchLocation){
loc=m.searchLocation;
_d8.push({searchText:loc.query,searchCategory:m.searchCategory,searchRelativeTo:{role:"search",city:loc.city,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);
}
}});
}
if(!dojo._hasResource["mq.uiview"]){
dojo._hasResource["mq.uiview"]=true;
dojo.provide("mq.uiview");
dojo.declare("mq.UIView",null,{constructor:function(_e0,_e1){
try{
debug("UIView.constructor");
this._controller=_e0;
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(_e4){
try{
debug("UIView.updateView: ");
if(!_e4.searchGutterState||_e4.searchGutterState==""){
_e4.searchGutterState="NORMAL";
}
if(_e4.mode){
dojo.removeClass($d("content"),"MAPS");
dojo.removeClass($d("content"),"SEARCH");
dojo.removeClass($d("content"),"MY");
dojo.addClass($d("content"),_e4.mode+"");
}
if(_e4.mode=="SEARCH"){
if(_e4.searchLocation&&_e4.searchResults==null){
var _e5=_e4.searchOptions;
var _e6=(parseInt(_e5.pageSkip))?parseInt(_e5.pageSkip):0;
if(_e4.blId&&parseInt(_e4.blId)){
_e4.searchLocation.query="sourcevendor:"+_e4.blId;
}
_e4.searchLocation.formName="reload";
mq.search(_e4.searchLocation,0,_e5);
return;
}
this.contentModeHandler("SEARCH");
this.processModeChange(_e4);
}else{
if(_e4.mode=="MY"){
this.contentModeHandler("MY");
this.processModeChange(_e4);
}else{
if(!_e4.mode){
_e4.mode="MAPS";
}
(this.mapView==null)?this.initMapView(false):this.mapView.updateView(_e4);
this.contentModeHandler("MAPS");
this.processModeChange(_e4);
if(controller.showAvoidsRestoreLink()){
if($d("avoidRestore")){
$d("avoidRestore").style.display="block";
}
}else{
if($d("avoidRestore")){
$d("avoidRestore").style.display="none";
}
}
mq.traffic.enable(view.mapView._tileMap,_e4.trafficEnabled);
if(window.IsTrafficEnabled=="true"){
debug("init traffic");
if(window["trafficPopupContent"]&&!$w("mqErrorPopup")){
window.initTrafficPopup("mapTrafficHelp");
}
}
}
}
}
catch(e){
logDebug("uiview.updateview",e);
}
},contentModeHandler:function(_e7,_e8){
try{
debug("UIView.contentModeHandler: "+_e7+","+_e8);
if(mq.isShowing($d(_e7))){
return;
}
var _e9=$d(_e7);
var _ea=_e9.parentNode;
var lis=_ea.childNodes;
var dv;
debug(_e9);
for(var x=0;x<lis.length;x++){
dv=lis[x];
(_e9!==dv)?dojo.removeClass($d("content"),dv.id):dojo.addClass($d("content"),dv.id);
if(_e9!==dv&&dojo.hasClass(dv,"contentPane")){
mq.hide(dv);
}
}
mq.show(_e9);
this._controller.modeChange(_e7);
}
catch(e){
logDebug("uiview.contentModeChange",e);
}
},processModeChange:function(_ee){
try{
var _ef=this.getCurrentMode();
debug("UIView.processModeChange: "+_ef);
dojo.removeClass($d("content"),"MAPS");
dojo.removeClass($d("content"),"SEARCH");
dojo.removeClass($d("content"),"MY");
dojo.addClass($d("content"),_ef+"");
if(_ef=="MAPS"){
var _f0=controller._model.locations;
if(_f0){
if(_f0.length>0){
mq.show($d("itin"));
if(_f0.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(_ef=="MY"){
mq.hide($d("itin"));
this.showHideAdditionalForm("none");
if(this.myView==null){
$w(_ef).onLoad=function(e){
view.initMyView();
$d("mqLangSettings").focus();
};
$w(_ef).setHref("/controller/mainui/my");
}else{
this.myView.updateSettingsPage();
}
mq.hide($d("contentBizLocArea"));
mq.hide($d("menuBarPane"));
mq.hide($d("linktothis"));
this.resizeLayout();
}else{
if(_ef=="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(_ee);
}else{
debug("searchView already initialized");
this.processSearch(_ee);
}
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(_f2){
debug("UIView:processSearch ");
if(_f2&&_f2.searchResults){
this.searchView.processSearchResults(_f2);
}
mq.traffic.enable(view.searchView._tileMap,_f2.trafficEnabled);
debug("UIView: processSearch: end");
},initMapView:function(_f3){
try{
debug("UIView.initMapView: "+_f3);
if(!controller._model.mode){
controller._model.mode="MAPS";
}
var me=this;
mq.dynamicRequire("mq.maptabview",function(){
me.mapView=new mq.MapTabView(controller,_f3,{"mapDiv":"mapWindow","locationList":"locationWindowNarr"});
me.resizeLayout();
});
}
catch(e){
logDebug("uiview.initMapView",e);
}
},initSearchView:function(_f5){
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(_f5);
mq.traffic.enable(view.searchView._tileMap,_f5.trafficEnabled);
if(_f5.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,_f8,_f9){
var _fa={sortType:_f8,filterState:_f9};
var w=$w("searchResults");
if(w){
w.showRefineSearchLnk=false;
w.showEditSearch=false;
}
mq.search(loc,null,_fa);
},chooseBLLocation:function(ind){
try{
debug("UIView.chooseBLLocation: "+ind);
var tab=controller._model.mode;
var loc,_ff,_100;
var _101=$d("searchSumResultsFor");
if(_101){
debug("UIView.  Got header element");
_101.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"){
_100=loc.state;
_ff="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){
_ff="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()){
_ff="relevance";
loc={};
}else{
loc={latitude:view.searchView._tileMap.getCenter().lat,longitude:view.searchView._tileMap.getCenter().lng,geocodeQuality:"CITY"};
}
}
}
var id=controller._model.blId;
var _103={};
for(prop in loc){
_103[prop]=loc[prop];
}
try{
if(controller._model.mode=="SEARCH"){
_103.formName=(controller.numLocs()>0||(dirForm&&dirForm.results&&dirForm.results.length>1))?"SearchDirectionsResultsBizLoc":"SearchMapResultsBizLoc";
}else{
_103.formName=(controller.numLocs()>1)?"DirectionsResultsBizLoc":"MapResultsBizLoc";
}
}
catch(e){
}
debug("Biz Locator form name: "+_103.formName);
_103.query=(parseInt(id))?"sourcevendor:"+id:id;
this.executeBizLocator(_103,_ff,_100);
}
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 _104=dijit.getViewport();
var _105=(_104.h>848)?Number((_104.h)-848+600):600;
var _106=this.getCurrentMode();
var _107=$d("contentMainWrap");
var _108=$d("contentContainer");
var _109=256;
var _10a=779;
if(mq.isSafari3()){
_104.w=_104.w-15;
}
if(dojo.isFF>0){
_108.style.width=(_104.w)+"px";
}
var _10b=null;
if(_104.w<_10a){
document.body.style.width=(_10a)+"px";
_10b=_10a;
_108.style.width=_10b+"px";
_107.style.width=(_10b-10)+"px";
}else{
document.body.style.width="auto";
_10b=_104.w;
_108.style.width=_10b+"px";
_107.style.width=(_10b-10)+"px";
}
var _10c=$d("rightrailad");
_10c.style.width="187px";
if(dojo.isSafari){
_10c.style.cssFloat="right";
}
if(_106=="MAPS"){
var _10d=$d("mapWindow");
$d("content").style.height="auto";
_10d.style.height=(_105-60)+"px";
var _10e=(_104.w>_10a)?(_104.w-_10c.clientWidth-31):(_10a-_10c.clientWidth-31);
_10d.style.width=(_10e-1)+"px";
$d("MAPS").style.width=(_10e)+"px";
if(this.mapView&&(typeof (this.mapView._tileMap)!="undefined"&&this.mapView._tileMap)){
this.mapView.resizeMap();
}
if(this.mapView&&(typeof (this.mapView._tileMap)!="undefined"&&this.mapView._tileMap)&&!controller._model.showRoute&&this.mapView._tileMap.rtehighlight){
this.mapView._tileMap.removeRouteHighlight();
}
}else{
if(_106=="SEARCH"){
var _10f=$d("SEARCH");
var _110=$d("mapWindowS");
var _111=$d("leftS");
var _112=$d("searchWindow");
if(_10f&&_110&&_111&&_112){
$d("content").style.height=_105+"px";
var _113=(_105-62);
_10f.style.height=_110.style.height=_111.style.height=_113+"px";
_112.style.height=(_113-145-1)+"px";
var _114=(_104.w>_10a)?(_104.w-_10c.clientWidth-30):(_10a-_10c.clientWidth-30);
_110.style.width=(_114-265-3)+"px";
_10f.style.width=(_114)+"px";
if(this.searchView){
this.searchView.resizeMap();
}
}
}else{
if(_106=="MY"){
if($d("recentSearchesContainer")){
if(_105>200){
$d("MY").style.height=(_105-15)+"px";
$d("recentSearchesContainer").style.height=(_105-($d("homeAndWork").offsetHeight)-65)+"px";
}
}
}
}
}
debug("end resizeLayout");
}
catch(e){
logDebug("uiview.resizeLayout",e);
}
},searchNearbyHandler:function(node,_116,_117,pos){
var _119=controller._model;
controller.clearBusinessLocator();
var loc;
if(_117){
loc=results[_116];
}else{
loc=this._controller._model.locations[_116].location;
}
mq.showSearchNearby(node,loc,pos);
},popularSearch:function(_11b,_11c,pos,_11e,_11f){
debug("View.popularSearch");
(_11f)?ua.a(":MQ08BUBPopSearch"+_11e):ua.a(":MQ08PopSearch"+_11e);
(controller._model.mode=="MAPS")?this.mapView.popularSearch(_11b,_11c):this.searchView.popularSearch(_11b,_11c,pos);
},searchNearby:function(_120,pos){
debug("View.searchNearby");
var _122=$d("srchNrby"+_120).value;
(controller._model.mode=="MAPS")?this.mapView.popularSearch(_122,_120,pos):this.searchView.popularSearch(_122,_120,pos);
},zoomToStreetHandler:function(_123,_124){
var loc;
if(_124){
loc=results[_123];
this.searchView.zoomToStreet(loc);
}else{
if(this._controller._model.mode=="SEARCH"){
loc=this._controller._model.searchLocation;
this.searchView.zoomToStreet(loc);
}else{
loc=this._controller._model.locations[_123].location;
this.mapView.zoomToStreet(loc);
}
}
},onZoomToStreet:function(loc){
this.mapView.zoomToStreet(loc);
},showSTC:function(_127,_128){
ua.a(":MQ08LOCS2C");
var loc;
if(_128){
loc=model.searchResults.searchResults[_127];
}else{
if(this._controller._model.mode=="SEARCH"){
loc=this._controller._model.searchLocation;
}else{
loc=this._controller._model.locations[_127].location;
}
}
mq.showSTC(loc);
},adCallBack:function(){
},directionsTo:function(_12a,mode){
var loc;
if(controller.numLocs()==0){
var _12d=controller._model.searchResults.searchResults;
if(_12d&&_12d.length>_12a){
loc=_12d[_12a];
}
}else{
var _12d=controller._model.locations;
if(_12d&&_12d.length>_12a){
loc=_12d[_12a].location;
}
}
if(loc){
mq.directionsTo(loc.name,loc.addressLine1,loc.city,loc.state,loc.postalCode,loc.country,loc.latitude,loc.longitude,mode);
}
},directionsFrom:function(_12e,mode){
var loc;
if(controller.numLocs()==0){
var _131=controller._model.searchResults.searchResults;
if(_131&&_131.length>_12e){
loc=_131[_12e];
}
}else{
var _131=controller._model.locations;
if(_131&&_131.length>_12e){
loc=_131[_12e].location;
}
}
if(loc){
mq.directionsFrom(loc.name,loc.addressLine1,loc.city,loc.state,loc.postalCode,loc.country,loc.latitude,loc.longitude,mode);
}
},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 _133=$d("additionalAddForm");
_133.removeAttribute("style");
dojo.addClass(_133,"clearb");
}
if($d("loc11Form")){
mq.show($d("loc11Form"));
}
}
},updateFindNBLocList:function(){
var _134=$d("findLoc");
_134.style.display="inline";
var _135=controller.numLocs();
_134.options.length=1;
for(var i=0;i<_135;i++){
_134.options[i]=new Option(mq.formatLocationSingleLine(controller._model.locations[i].location),i);
}
}});
}
if(!dojo._hasResource["mq.ua"]){
dojo._hasResource["mq.ua"]=true;
dojo.provide("mq.ua");
dojo.declare("mq.UA",null,{_userAction: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},":MQ08PFPrint":{omn:{an:"MQ08PFPrint"},cs:false},":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},":MQ08PFTextBox":{omn:{an:"MQ08PFTextBox"},cs:false},":MQ08SettingsEdit":{omn:{pv:true,an:"MQ08SettingsEdit"},cs:true,ad:true,forced:true},":MQ08SettingsEditAO":{omn:{pv:true,an:"MQ08SettingsEdit"},cs:false,ad:false,forced:true},":MQ08SavedRecent":{omn:{an:"MQ08SavedRecent"},cs:false},":MQ08SRHome":{omn:{an:"MQ08SRHome"},cs:false},":MQ08SRWork":{omn:{an:"MQ08SRWork"},cs:false},":MQ08ClearAll":{omn:{an:"MQ08ClearAll"},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},":MQ08TrafficOn":{omn:{pv:true,an:"MQ08TrafficOn"},cs:true,ad:true,forced:false},":MQ08TrafficOff":{omn:{pv:true,an:"MQ08TrafficOff"},cs:true,ad:true,forced:true},":MQ08TRFIncidentsOn":{omn:{an:"MQ08TRFIncidentsOn"},cs:false},":MQ08TRFIncidentsOff":{omn:{an:"MQ08TRFIncidentsOff"},cs:false},":MQ08TRFConstructionOn":{omn:{an:"MQ08TRFConstructionOn"},cs:false},":MQ08TRFConstructionOff":{omn:{an:"MQ08TRFConstructionOff"},cs:false},":MQ08TrafficRefresh":{omn:{pv:true,an:"MQ08TrafficRefresh"},cs:true,ad:true,forced:true},":MQ08TRFMinLegend":{omn:{an:"MQ08TRFMinLegend"},cs:false},":MQ08TRFMaxLegend":{omn:{an:"MQ08TRFMaxLegend"},cs:false},":MQ08TRFAlertDetails":{omn:{an:"MQ08TRFAlertDetails"},cs:false},":MQ08TRFLight":{omn:{an:"MQ08TRFLight"},cs:false},":MQ08TRFZoomIn":{omn:{pv:true,an:"MQ08TRFZoomIn"},cs:true,ad:true,forced:true},":MQ08Revise":{omn:{an:"MQ08Revise"},cs:false},":MQ08MapGutter":{omn:{pv:true,an:"MQ08MapGutter"},cs:true,ad:true,forced:true},":MQ08SplitGutter":{omn:{pv:true,an:"MQ08SplitGutter"},cs:true,ad:true,forced:true},":MQ08ExpGutter":{omn:{pv:true,an:"MQ08ExpGutter"},cs:true,ad:true,forced:true},":MQ08MapLink":{omn:{pv:true,an:"MQ08MapLink"},cs:true,ad:true,forced:true},":MQ08SplitLink":{omn:{pv:true,an:"MQ08SplitLink"},cs:true,ad:true,forced:true},":MQ08ExpLink":{omn:{pv:true,an:"MQ08ExpLink"},cs:true,ad:true,forced:true},":MQ08Edit":{omn:{an:"MQ08Edit"},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},":MQ08Find":{omn:{an:"MQ08Find"},cs:false},":MQ08MaxStops":{omn:{an:"MQ08MaxStops"},cs:false},":MQ08MinRouteMan":{omn:{an:"MQ08MinRouteMan"},cs:false},":MQ08MaxRouteMan":{omn:{an:"MQ08MaxRouteMan"},cs:false},":MQ08AvoidMan":{omn:{pv:true,an:"MQ08AvoidMan"},cs:true,ad:true},":MQ08ManMap":{omn:{an:"MQ08ManMap"},cs:false},":MQ08Hide":{omn:{an:"MQ08Hide"},cs:false},":MQ08RouteOptions":{omn:{an:"MQ08RouteOptions"},cs:false},":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},":MQ08SearchNearby":{omn:{an:"MQ08SearchNearby"},cs:false},":MQ08SearchNearbyClose":{omn:{an:"MQ08SearchNearbyClose"},cs:false},":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},":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},":MQ08SearchNearbyGo":{omn:{pv:true,an:"MQ08SearchNearbyGo"},cs:true,ad:true},":MQ08Website":{omn:{an:"MQ08Website"},cs:false},":MQ08RouteOn":{omn:{pv:true,an:"MQ08RouteOn"},cs:true,ad:true},":MQ08RouteOff":{omn:{pv:true,an:"MQ08RouteOff"},cs:true,ad:true},":MQ08Delete":{omn:{an:"MQ08Delete"},cs:false},":MQ08RemoveAll":{omn:{an:"MQ08RemoveAll"},cs:false},":MQ08AddNextLink":{omn:{an:"MQ08AddNextLink"},cs:false},":MQ08AddNextGo":{omn:{pv:true,an:"MQ08AddNextGo"},cs:true,ad:true},":MQ08DirToFromLink":{omn:{an:"MQ08DirToFromLink"},cs:false},":MQ08DirFromGo":{omn:{pv:true,an:"MQ08DirFromGo"},cs:true,ad:true},":MQ08DirToGo":{omn:{pv:true,an:"MQ08DirToGo"},cs:true,ad:true},":MQ08DirFromGo2":{omn:{pv:true,an:"MQ08DirFromGo2"},cs:true,ad:true},":MQ08DirToGo2":{omn:{pv:true,an:"MQ08DirToGo2"},cs:true,ad:true},":MQ08RouteOptions":{omn:{an:"MQ08RouteOptions"},cs:false},":MQ08RouteOptionsGo":{omn:{pv:true,an:"MQ08RouteOptionsGo"},cs:true,ad:true},":MQ08ManMap":{omn:{an:"MQ08ManMap"},cs:false},":MQ08ManMapDrag":{omn:{an:"MQ08ManMapDrag"},cs:false},":MQ08ManMapZoomIn":{omn:{an:"MQ08ManMapZoomIn"},cs:false},":MQ08ManMapZoomOut":{omn:{an:"MQ08ManMapZoomOut"},cs:false},":MQ08ManMapHide":{omn:{an:"MQ08ManMapHide"},cs:false},":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},":MQ08RefineSearch":{omn:{an:"MQ08RefineSearch"},cs:false},":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},":MQ08Previous":{omn:{pv:true,an:"MQ08Previous"},cs:true,ad:true},":MQ08AddSearch":{omn:{pv:true,an:"MQ08AddSearch"},cs:true,ad:true},":MQ08BUBAddSearch":{omn:{pv:true,an:"MQ08BUBAddSearch"},cs:true,ad:true},":MQ08LocDetails":{omn:{an:"MQ08LocDetails"},cs:false},":MQ08BUBLocDetails":{omn:{an:"MQ08BUBLocDetails"},cs:false},":MQ08CancelSearchAO":{omn:{an:"MQ08CancelSearch",pause:250},cs:false},":MQ08CancelSearch":{omn:{pv:true,an:"MQ08CancelSearch"},cs:true,ad:true,forced:true},":MQ08EditSearch":{omn:{an:"MQ08EditSearch"},cs:false},":MQ08EditGo":{omn:{pv:true,an:"MQ08EditGo"},cs:true,ad:true},":MQ08LOCDirTo":{omn:{an:"MQ08LOCDirTo",pause:250},cs:false},":MQ08LOCDirFrom":{omn:{an:"MQ08LOCDirFrom",pause:250},cs:false},":MQ08LOCSRCHDirTo":{omn:{an:"MQ08LOCSRCHDirTo",pause:250},cs:false},":MQ08LOCSRCHDirFrom":{omn:{an:"MQ08LOCSRCHDirFrom",pause:250},cs:false},":MQ08LOCAddNext":{omn:{an:"MQ08LOCAddNext"},cs:false},":MQ08BUBSRCHDirTo":{omn:{an:"MQ08BUBSRCHDirTo",pause:250},cs:false},":MQ08BUBSRCHDirFrom":{omn:{an:"MQ08BUBSRCHDirFrom",pause:250},cs:false},":MQ08BUBSRCHMap":{omn:{pv:true,an:"MQ08BUBSRCHMap"},cs:true,ad:true},":MQ08ResultsNear":{omn:{pv:true,an:"MQ08ResultsNear"},cs:true,ad:true},":MQ08S2OSend":{omn:{an:"MQ08S2OSend"},cs:false,ad:false},":MQ08Send":{omn:{an:"MQ08Send"},cs:false,ad:false},":MQ08LTTP":{omn:{an:"MQ08LTTP"},cs:false,ad:false},":MQ08S2C":{omn:{an:"MQ08S2C"},cs:false,ad:false},":MQ08LOCS2C":{omn:{an:"MQ08LOCS2C"},cs:false,ad:false},":MQ08LOCEmail":{omn:{an:"MQ08LOCEmail"},cs:false,ad:true},":MQ08Email":{omn:{an:"MQ08Email"},cs:false,ad:false},":MQ08EmailSend":{omn:{an:"MQ08EmailSend"},cs:false,ad:false},":MQ08EmailClose":{omn:{an:"MQ08EmailClose"},cs:false,ad:true},":MQ08S2CSend":{omn:{an:"MQ08S2CSend"},cs:false,ad:false},":MQ08S2CMobile":{omn:{an:"MQ08S2CMobile"},cs:false,ad:false},":MQ08S2CWAP":{omn:{an:"MQ08S2CWAP"},cs:false,ad:false},":MQ08S2CNav":{omn:{an:"MQ08S2CNav"},cs:false,ad:false},":MQ08S2CInvalidError":{omn:{an:"MQ08S2CInvalidError"},cs:false,ad:false},":MQ08S2CFailedError":{omn:{an:"MQ08S2CFailedError"},cs:false,ad:false},":MQ08S2CExceedError":{omn:{an:"MQ08S2CExceedError"},cs:false,ad:false},":MQ08S2CClose":{omn:{an:"MQ08S2CClose"},cs:false,ad:true},":MQ08DirTop":{omn:{an:"MQ08DirTop"},cs:false},":MQ08MapTop":{omn:{an:"MQ08MapTop"},cs:false},":MQ08PlaceTop":{omn:{an:"MQ08PlaceTop"},cs:false},":MQ08WebTop":{omn:{an:"MQ08WebTop"},cs:false},":MQ08WebTopGo":{omn:{an:"MQ08WebTopGo",pause:250},cs:false},":MQ08GasLink":{omn:{an:"MQ08GasLink"},cs:false},":MQ08BlogLink":{omn:{an:"MQ08BlogLink"},cs:false},":MQ08HelpLink":{omn:{an:"MQ08HelpLink"},cs:false},":MQ08BSLink":{omn:{an:"MQ08BSLink"},cs:false},":MQ08FindHelp":{omn:{an:"MQ08FindHelp"},cs:false},":MQ08LocationHelp":{omn:{an:"MQ08LocationHelp"},cs:false},":MQ08TopTabGo":{omn:{pv:true,an:"MQ08TopTabGo"},cs:true,ad:true},":MQ08AOLSearch":{omn:{an:"MQ08AOLSearch",pause:250},cs:false},":MQ08Danish":{omn:{an:"MQ08Danish"},cs:false},":MQ08English":{omn:{an:"MQ08English"},cs:false},":MQ08Dutch":{omn:{an:"MQ08Dutch"},cs:false},":MQ08French":{omn:{an:"MQ08French"},cs:false},":MQ08German":{omn:{an:"MQ08German"},cs:false},":MQ08Italian":{omn:{an:"MQ08Italian"},cs:false},":MQ08Norwegian":{omn:{an:"MQ08Norwegian"},cs:false},":MQ08Spanish":{omn:{an:"MQ08Spanish"},cs:false},":MQ08Swedish":{omn:{an:"MQ08Swedish"},cs:false},":MQ08Miles":{omn:{an:"MQ08Miles"},cs:false},":MQ08Kilometers":{omn:{an:"MQ08Kilometers"},cs:false},":MQ08StreetDefault":{omn:{an:"MQ08StreetDefault"},cs:false},":MQ08AerialDefault":{omn:{an:"MQ08AerialDefault"},cs:false},":MQ08Mobile":{omn:{an:"MQ08Mobile"},cs:false},":MQ08HomeDefault":{omn:{an:"MQ08HomeDefault"},cs:false},":MQ08WorkDefault":{omn:{an:"MQ08WorkDefault"},cs:false},":MQ08AddHome":{omn:{an:"MQ08AddHome"},cs:false},":MQ08AddWork":{omn:{an:"MQ08AddWork"},cs:false},":MQ08EditHome":{omn:{an:"MQ08EditHome"},cs:false},":MQ08EditWork":{omn:{an:"MQ08EditWork"},cs:false},":MQ08ClearHome":{omn:{an:"MQ08ClearHome"},cs:false},":MQ08ClearWork":{omn:{an:"MQ08ClearWork"},cs:false},":MQ08RecentDelete":{omn:{an:"MQ08RecentDelete"},cs:false},":MQ08AddRecent":{omn:{pv:true,an:"MQ08AddRecent"},cs:true,ad:true},":MQ08LOCMap":{omn:{pv:true,an:"MQ08LOCMap"},cs:true,ad:true},":MQ08SelectAll":{omn:{an:"MQ08SelectAll"},cs:false},":MQ08Classic2":{omn:{an:"MQ08Classic2"},cs:false},":MQ08Classic3":{omn:{an:"MQ08Classic3"},cs:false},":MQ08Classic4":{omn:{an:"MQ08Classic4"},cs:false},":MQ08Classic5":{omn:{an:"MQ08Classic5"},cs:false},":MQ08ItinBlog":{omn:{an:"MQ08ItinBlog "},cs:false},":MQ08ItinLoc1":{omn:{pv:true,an:"MQ08ItinLoc1"},cs:true,ad:true},":MQ08ItinLoc2":{omn:{pv:true,an:"MQ08ItinLoc2"},cs:true,ad:true},":MQ08ItinLoc3":{omn:{pv:true,an:"MQ08ItinLoc3"},cs:true,ad:true},":MQ08ItinLoc4":{omn:{pv:true,an:"MQ08ItinLoc4"},cs:true,ad:true},":MQ08ItinLoc5":{omn:{pv:true,an:"MQ08ItinLoc5"},cs:true,ad:true},":MQ08ItinLoc6":{omn:{pv:true,an:"MQ08ItinLoc6"},cs:true,ad:true},":MQ08ItinLoc7":{omn:{pv:true,an:"MQ08ItinLoc7"},cs:true,ad:true},":MQ08ItinLoc8":{omn:{pv:true,an:"MQ08ItinLoc8"},cs:true,ad:true},":MQ08ItinLoc9":{omn:{pv:true,an:"MQ08ItinLoc9"},cs:true,ad:true},":MQ08ItinLoc10":{omn:{pv:true,an:"MQ08ItinLoc10"},cs:true,ad:true},":MQ08ItinSearch1":{omn:{pv:true,an:"MQ08ItinSearch1"},cs:true,ad:true},":MQ08ItinSearch2":{omn:{pv:true,an:"MQ08ItinSearch2"},cs:true,ad:true},":MQ08ItinSearch3":{omn:{pv:true,an:"MQ08ItinSearch3"},cs:true,ad:true},":MQ08ItinSearch4":{omn:{pv:true,an:"MQ08ItinSearch4"},cs:true,ad:true},":MQ08ItinSearch5":{omn:{pv:true,an:"MQ08ItinSearch5"},cs:true,ad:true},":MQ08ItinSearch6":{omn:{pv:true,an:"MQ08ItinSearch6"},cs:true,ad:true},":MQ08ItinSearch7":{omn:{pv:true,an:"MQ08ItinSearch7"},cs:true,ad:true},":MQ08ItinSearch8":{omn:{pv:true,an:"MQ08ItinSearch8"},cs:true,ad:true},":MQ08ItinSearch9":{omn:{pv:true,an:"MQ08ItinSearch9"},cs:true,ad:true},":MQ08ItinSearch10":{omn:{pv:true,an:"MQ08ItinSearch10"},cs:true,ad:true},":MQ08PlacesAirport1":{omn:{pv:true,an:"MQ08PlacesAirport1"},cs:true,ad:true},":MQ08PlacesAirport2":{omn:{pv:true,an:"MQ08PlacesAirport2"},cs:true,ad:true},":MQ08PlacesAirport3":{omn:{pv:true,an:"MQ08PlacesAirport3"},cs:true,ad:true},":MQ08PlacesAirport4":{omn:{pv:true,an:"MQ08PlacesAirport4"},cs:true,ad:true},":MQ08PlacesAirport5":{omn:{pv:true,an:"MQ08PlacesAirport5"},cs:true,ad:true},":MQ08PlacesSearch1":{omn:{pv:true,an:"MQ08PlacesSearch1"},cs:true,ad:true},":MQ08PlacesSearch2":{omn:{pv:true,an:"MQ08PlacesSearch2"},cs:true,ad:true},":MQ08PlacesSearch3":{omn:{pv:true,an:"MQ08PlacesSearch3"},cs:true,ad:true},":MQ08PlacesSearch4":{omn:{pv:true,an:"MQ08PlacesSearch4"},cs:true,ad:true},":MQ08PlacesSearch5":{omn:{pv:true,an:"MQ08PlacesSearch5"},cs:true,ad:true},":MQ08PlacesSearch6":{omn:{pv:true,an:"MQ08PlacesSearch6"},cs:true,ad:true},":MQ08PlacesSearch7":{omn:{pv:true,an:"MQ08PlacesSearch7"},cs:true,ad:true},":MQ08PlacesSearch8":{omn:{pv:true,an:"MQ08PlacesSearch8"},cs:true,ad:true},":MQ08PlacesSearch9":{omn:{pv:true,an:"MQ08PlacesSearch9"},cs:true,ad:true},":MQ08PlacesSearch10":{omn:{pv:true,an:"MQ08PlacesSearch10"},cs:true,ad:true},":MQ08Temporary1":{omn:{pv:true,an:"MQ08Temporary1"},cs:true,ad:true},":MQ08Temporary2":{omn:{pv:true,an:"MQ08Temporary2"},cs:true,ad:true},":MQ08Temporary3":{omn:{pv:true,an:"MQ08Temporary3"},cs:true,ad:true},":MQ08Temporary4":{omn:{pv:true,an:"MQ08Temporary4"},cs:true,ad:true},":MQ08Temporary5":{omn:{pv:true,an:"MQ08Temporary5"},cs:true,ad:true},":MQ08Temporary6":{omn:{pv:true,an:"MQ08Temporary6"},cs:true,ad:true},":MQ08Temporary7":{omn:{pv:true,an:"MQ08Temporary7"},cs:true,ad:true},":MQ08Temporary8":{omn:{pv:true,an:"MQ08Temporary8"},cs:true,ad:true},":MQ08Temporary9":{omn:{pv:true,an:"MQ08Temporary9"},cs:true,ad:true},":MQ08Temporary10":{omn:{pv:true,an:"MQ08Temporary10"},cs:true,ad:true},":MQ08TemporaryA1":{omn:{an:"MQ08TemporaryA1"},cs:false},":MQ08TemporaryA2":{omn:{an:"MQ08TemporaryA2"},cs:false},":MQ08TemporaryA3":{omn:{an:"MQ08TemporaryA3"},cs:false},":MQ08TemporaryA4":{omn:{an:"MQ08TemporaryA4"},cs:false},":MQ08S2GPluginDownload":{omn:{an:"MQ08S2GPluginDownload"}},":MQ08S2GHelp":{omn:{an:"MQ08S2GHelp"}},":MQ08S2GGarmin":{omn:{an:"MQ08S2GGarmin"}},":MQ08S2GDeviceError":{omn:{an:"MQ08S2GDeviceError"}},":MQ08S2GPluginError":{omn:{an:"MQ08S2GPluginError"}},":MQ08S2GSelectError":{omn:{an:"MQ08S2GSelectError"}},":MQ08S2GSuccessRte":{omn:{an:"MQ08S2GSuccessRte"}},":MQ08S2GSuccessWP":{omn:{an:"MQ08S2GSuccessWP"}},":MQ08S2G":{omn:{an:"MQ08S2G"}},":MQ08S2GSend":{omn:{an:"MQ08S2GSend"}},":MQ08S2GHelpRteWP":{omn:{an:"MQ08S2GHelpRteWP"}},":MQ08S2GClose":{omn:{an:"MQ08S2GClose"},ad:true},":dummy":{omn:{pv:false,an:"dummy"},cs:false}},_getAction:function(_137){
return this._userActionMapping[_137]||this._userActionMapping[":"];
},_getUserActionMappingType:function(_138){
var uam=this._getAction(_138);
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){
return "action";
}
}
}
}
}else{
this.debug("Error: There was no Type mapping for User Action: '"+_138+"'");
}
},a:function(uam){
var _13b=this._getUserActionMappingType(uam);
if(_13b=="forced"){
this._userAction=uam;
debug("Forced PV for action: "+uam);
this.commit();
}else{
if(_13b=="action"&&!this._userAction){
this._userAction=uam;
this.commit();
}else{
if(_13b=="pageviewAction"&&!this._userAction){
this._userAction=uam;
}else{
if(_13b=="pageview"&&!this._userAction){
this._userAction=uam;
}
}
}
}
},promo:function(_13c){
this._invokeOmniture({an:_13c,pause:250});
},commit:function(){
if(this._userAction){
this._fire(this._userAction);
this._userAction=null;
}
},_fire:function(name){
var _13e=this._getAction(name);
if(_13e){
if(_13e["omn"]){
this._invokeOmniture(_13e["omn"]);
}
if(_13e["cs"]){
this._comScore(_13e["cs"],_13e["omn"]);
}
if(_13e["ad"]){
var jtn=name.indexOf(":")>=0?name.substring(name.indexOf(":")+1):name;
this._invokeAd(jtn,{});
}
}else{
this.debug("Error: There was no mapping for User Action: '"+name+"'");
}
if(logOmnQueryParams){
this.debug("=======================================================================");
}
},_invokeOmniture:function(_140){
try{
s_265.prop20=null;
s_265.prop21=null;
s_265.prop2="";
s_265.pageName="";
var _141=this._generatePageViewName();
s_265.prop22=String(mq.getScrollBarPosition().ptOffsetY);
var pv=_140.pv;
if(typeof (pv)=="boolean"){
pv=_141;
}
if(_140.pv){
var _143=this._generateProp2(pv);
s_265.prop2=s_265.pfxID+" : "+_143;
s_265.pageName=s_265.pfxID+" : "+pv;
var _144="";
if(_140.an){
s_265.prop20=_140.an;
_144=", an(prop20): "+_140.an;
}else{
s_265.prop20="none";
}
s_account=s_accountCL+((mq.getServerPurpose()=="production")?",aolsvc":"");
this._getLogger(s_account).t();
this.debug("[omniture] pv: "+pv+", sd(prop2): '"+_143+"'"+_144);
this.debugSelenium();
}else{
s_265.prop21=_141;
s_accountCL;
this._getLogger(s_accountCL).tl(true,"o",_140.an);
if(_140.pause){
var now=new Date();
var _146=now.getTime()+_140.pause;
var _147=true;
while(_147){
now=new Date();
if(now.getTime()>_146){
_147=false;
}
}
}
s_265.sa(s_account);
this.debug("[omniture] an: "+_140.an+", pv(prop21): '"+_141+"'");
}
if(logOmnQueryParams){
this._logOmnitureQueryParams();
}
s_265.prop20=null;
s_265.prop21=null;
s_265.prop2="";
s_265.pageName="";
if(s_265.prop16){
s_265.prop16=null;
}
}
catch(e){
logDebug("ua._invokeOmniture",e);
}
},isActionInCache:function(_148){
if(this._userAction==_148){
return true;
}
return false;
},_logOmnitureQueryParams:function(){
var _149=s_265.d.images;
var _14a=null;
if(_149&&_149.length>0&&_149[_149.length-1].name&&_149[_149.length-1].name.indexOf(s_accountCL)>=0){
_14a=_149[_149.length-1];
}else{
if(_149&&_149.length>0){
for(var i=_149.length-1;i>=0;i--){
var img=_149[i];
if(img&&img.name&&img.name.indexOf(s_accountCL)>=0){
_14a=img;
break;
}
}
}
}
if(_14a){
try{
var _14d=_14a.src;
var _14e=_14d.substring(_14d.indexOf("?")+1,_14d.length);
var host=_14d.substring(0,_14d.indexOf("?"));
var _150=_14e.split("&");
var _151="";
for(var i=0;i<_150.length;i++){
var tmp=_150[i].split("=");
if(tmp.length==2){
_151+=(tmp[0]+" = "+unescape(tmp[1])+"; ");
}
}
this.debug("[omniture] URL-QueryParams: host = "+host+"; "+_151.substring(0,_151.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(_153,_154){
if(this._initialAdSuppressionComplete){
var pv=this._generatePageViewName(),e,_157;
if(typeof _154=="object"){
_157=_154.an;
}
if(!_157){
_157=_153;
}
try{
var us=controller.adUserStateFromModel();
var _159=mq.ad.selectCurrentRegions();
mq.ad.refreshRegions(_159,{userAction:_153,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":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 _15f="";
if(omn){
if(omn.an){
_15f="&an="+omn.an;
}
}
var r="&r="+Math.round((Math.random()*10000))+"&h=2";
var _161="/mqrequest.html"+pv+_15f+r;
var req=({url:_161,handleAs:"text",timeout:10000,handle:function(_163,_164){
if(_163 instanceof Error){
ua.debug("[comScore] something went horribly, horribly wrong.");
}
}});
try{
dojo.xhrGet(req);
ua.debug("[comScore] pv: "+_161);
}
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 _166=controller._model;
var _167=$d("printDisplay").style.display;
if(addressPopup&&!addressPopup.closed){
return (addressPopup.name=="airports")?"address.airport":"address.category";
}
if(_166.mode=="MY"){
if($d("offersWrapper")){
sb.append("setting.offers");
}else{
sb.append("settings.default");
}
return sb.toString();
}else{
if(_166.mode=="MAPS"){
var _168=0;
if(_166.locations){
var _168=_166.locations.length;
}
var _169=null;
if(_168>1){
sb.append("dir.results");
}else{
if(_168==1){
sb.append("map.results");
}else{
if(_167=="block"){
return "home.form.print";
}else{
if(_166.trafficEnabled){
return "traffic.form.map";
}else{
return "home.form.map";
}
}
}
}
if(_167=="block"){
sb.append(".print");
}else{
if($d("offersWrapper")){
sb.append(".offers");
}else{
sb.append(".scroll");
}
}
}else{
if(_166.mode=="SEARCH"){
var _16a=0;
if($w("searchResults")){
if($w("searchResults").available){
_16a=$w("searchResults").available;
}
}
var _16b="search.results";
if(_16a==0){
return (_167=="block")?"home.form.print":"home.form.split";
}else{
if(mq.isShowing($d("bizLocatorSelect"))){
_16b="bl.results";
}
}
sb.append(_16b);
if(_167=="block"){
sb.append(".print");
}else{
if($d("offersWrapper")){
sb.append(".offers");
}else{
sb.append(".split");
}
}
}
}
return sb.toString();
}
}
return sb.toString();
},_generateProp2:function(_16c){
s_265.prop2="";
var sb=new dojox.string.Builder();
if(_16c.indexOf("print")>=0){
return "printer friendly";
}
var _16e=_16c.split(".");
if(_16e[_16e.length-1]=="offers"){
return "offers";
}
if(_16e.length>1){
if(_16e[0]=="dir"){
sb.append("directions ");
}else{
if(_16e[0]=="map"){
sb.append("map ");
}else{
if(_16e[0]=="search"){
sb.append("search ");
}else{
if(_16e[0]=="bl"){
return "business locator";
}else{
if(_16e[0]=="settings"){
return "settings";
}else{
if(_16e[0]=="address"){
return "address";
}else{
if(_16e[0]=="traffic"){
return "traffic";
}
}
}
}
}
}
}
if(_16e[1]=="form"){
return "home form";
}else{
if(_16e[1]=="results"){
sb.append("results");
}
}
return sb.toString();
}else{
this.debug("Error: there was a problem generating prop2 based on pagename: >>"+_16c+"<<");
return "";
}
},debug:function(_16f){
var dbgr=$d("userActionDebugger");
if(dbgr){
var _171=dbgr.value;
dbgr.value=_171+"\n"+_16f;
debug(_16f);
dbgr.value=dbgr.value;
dbgr.scrollTop=dbgr.scrollHeight;
}
},debugSelenium:function(){
var _172=$d("seleniumDebugger");
if(_172){
var _173=_172.value;
_172.value=_173+"\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){
var _175="<div id='weatherDiv' dojoType='dijit.layout.ContentPane' style='width: 250px;height: 200px;'></div>";
var _176=dojo.coords(node,true);
var _177=new mq.widget.MQPopup({id:"mqWeatherPopup",xoffset:_176.x+65,yoffset:_176.y-30,popupContent:_175,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[0].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,{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=\"13\" width=\"11\"/></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=\"13\" width=\"11\"/></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<button id=\""+this.prefix+"0-button\" tabindex=\"8\" class=\"btn\" type=\"submit\" value=\"Go\">Go</button> ");
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 _17b=document.createElement("div");
_17b.setAttribute("id",this.jsId);
_17b.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_17b,this.parentElem.nextSibling);
}});
}
if(!dojo._hasResource["mq.addnextlocationform"]){
dojo._hasResource["mq.addnextlocationform"]=true;
dojo.provide("mq.addnextlocationform");
dojo.declare("mq.addnextlocationform",mq.form,{createTemplate:function(){
var _17c,_17d,_17e;
_17c="minus";
_17d="block";
if(controller.numLocs()==1){
_17e="none";
}else{
_17e="block";
}
var d=new dojox.string.Builder();
d.append("");
if(this.locNum==1){
d.append("<div class=\"lcAddNext\">");
}else{
d.append("<div class=\"lcAddNext\" id=\"lcAddNextDir\">");
}
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\t<a class=\"optshowhide\"><img id=\""+this.prefix+"addNextLocationIcon\" width=\"14\" height=\"14\" border=\"0\" src=\""+mqPrefix+"/cdn/images/icon-"+_17c+".png\" alt=\"Open\"/></a>");
if(this.locNum==1){
d.append("\t\t<a id=\""+this.prefix+"toggleAddLink\" class=\"toggleAddLink\" style=\"display:"+_17e+";\">Directions To / From Above Location</a>");
d.append("\t\t<span id=\""+this.prefix+"toggleAddLinkExp\" class=\"toggleAddLinkExp\">");
d.append("\t\t\tDirections ");
d.append("\t\t\t<select id=\""+this.prefix+"addLocationSelect\" class=\"addLocationSelect\">");
d.append("\t\t\t\t<option value=\"To\">To</option>");
d.append("\t\t\t\t<option value=\"From\">From</option>");
d.append("\t\t\t</select>");
d.append("\t\t\t Above Location");
d.append("\t\t</span>");
d.append("\t</div>");
}else{
d.append("\t\t<a id=\""+this.prefix+"toggleAddLink\" class=\"toggleAddLink\" class=\"b\">Add Another Stop to Your Route</a>");
d.append("\t</div>");
}
if(this.locNum>1){
d.append("\t\t<div id=\"addNextDir\">");
}else{
d.append("\t\t<div id=\"addNextMap\">");
}
d.append("\t\t<div id=\""+this.prefix+"addNextLocationFields\" style=\"display:"+_17d+";\">");
d.append("\t\t\t<div class=\"fltl\" id=\"addNextLoc\">");
if(this.locNum==1){
d.append("\t<img id=\""+this.prefix+"dirToFromIcon\" class=\"dirToFromIcon\" src=\""+mqPrefix+"/cdn/images/icon-start.png\"/>");
}
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=\"13\" width=\"11\"/></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=\"13\" width=\"11\"/></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=\"Go\">Go</button> ");
d.append("\t\t\t\t<div class=\"clearb\"></div>");
d.append("\t\t\t</div>");
d.append("\t\t</div>");
if(this.locNum>1){
d.append("\t\t</div>");
}
d.append("\t\t<div class=\"clearb\"></div>");
d.append("\t</form>");
d.append("</div>");
var _180=document.createElement("div");
_180.setAttribute("id",this.jsId);
_180.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_180,this.parentElem.nextSibling);
},toggleAdd:function(){
if(mq.isShowing($d(this.prefix+"addNextLocationFields"))){
$d(this.prefix+"addNextLocationIcon").src=mqPrefix+"/cdn/images/icon-plus.png";
mq.hide($d(this.prefix+"addNextLocationFields"));
if(this.locNum==1){
$d(this.prefix+"toggleAddLinkExp").style.display="none";
$d(this.prefix+"toggleAddLink").style.display="inline";
$d(this.prefix+"dirToFromIcon").style.display="none";
}
}else{
$d(this.prefix+"addNextLocationIcon").src=mqPrefix+"/cdn/images/icon-minus.png";
mq.show($d(this.prefix+"addNextLocationFields"));
if(this.locNum==1){
$d(this.prefix+"toggleAddLinkExp").style.display="inline";
$d(this.prefix+"toggleAddLink").style.display="none";
$d(this.prefix+"dirToFromIcon").style.display="block";
}
}
if(this.locNum==1){
ua.a(":MQ08DirToFromLink");
}else{
ua.a(":MQ08AddNextLink");
}
},clickSelect:function(evt){
evt.cancelBubble=true;
},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,{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=\"13\" width=\"11\"/></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=\"13\" width=\"11\"/></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 _184=document.createElement("div");
_184.setAttribute("id",this.jsId);
_184.innerHTML=d.toString();
this.parentElem.parentNode.insertBefore(_184,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(_185,_186,_187){
this._controller=_185;
this._idList=_187;
},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,_189,_18a,_18b,_18c){
if(_189==null){
_189="map";
}
if(_18a==null){
_18a=this.zoomLevels[loc.geocodeQuality];
}
debug("4: "+this._idList["mapDiv"]);
try{
if(_18b&&(model&&model.locations&&model.locations.length>0)){
var _18d=model.locations;
var pois=this.getPois(_18d);
debug("TabView:initMap:withServerFlag "+model.locations.length);
if(_18d.length==1){
var loc=_18d[0].location;
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),this.zoomLevels[loc.geocodeQuality],new MQLatLng(loc.latitude,loc.longitude),_189);
}else{
if(_18d.length>1){
var _18f=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();
}
_18f.setBestFitRect(box);
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),null,new MQLatLng(_18d[0].location.latitude,_18d[0].location.longitude),_189,_18f);
if(model.showRoute){
this.addRouteHighlight(model,false);
}
}
}
this._tileMap.replacePois(pois);
this._tileMap.bestFitRect=null;
}else{
if(_18c){
var _193;
if(serverResults[0].resultCode=="SEARCH_RESULTS"){
_193=serverResults[0];
}else{
if(serverResults[1]&&serverResults[1].resultCode=="SEARCH_RESULTS"){
_193=serverResults[1];
}
}
var _194=(model.blColor)?model.blColor:"purple";
var pois=this.getSearchPois(_193.searchResults,_193.searchOptions.position,_194);
var _18f=new MQA.MapInit();
_18f.setBestFitRect(pois.getBoundingRect());
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),null,null,_189,_18f);
this._tileMap.replacePois(pois);
}else{
this._tileMap=new MQA.TileMap($d(this._idList["mapDiv"]),_18a,new MQLatLng(loc.latitude,loc.longitude),_189);
}
}
}
catch(e){
logDebug("tabview.initMap-start",e);
}
try{
var _195=new MQA.LargeZoomControl2(this._tileMap);
this._tileMap.addControl(_195,new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,0)));
var _196=new MQA.ViewControl2(this._tileMap);
this._tileMap.addControl(_196,new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(0,0)));
var tc=mq.traffic.makeTrafficControl();
if(tc){
this._tileMap.addControl(tc);
}
this._tileMap.setLogoPlacement(MQA.MapLogo.MAPQUEST,new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_LEFT,new MQA.Size(1,1)));
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,20)));
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 _19a=null;
if(evt.mapType=="sat"){
_19a=":MQ08Aerial";
}else{
if(evt.mapType=="hyb"){
_19a=":MQ08Hybrid";
}else{
if(evt.mapType=="map"){
_19a=":MQ08Street";
}
}
}
ua.a(_19a);
this.onMapTypeChange(evt.mapType);
},onMapTypeChange:function(_19b){
},onPanZoomChange:function(zoom,_19d){
},onRecenter:function(_19e){
},changeZoom:function(evt){
debug("TabView.changeZoom: "+evt.zoom);
this.onPanZoomChange(evt.zoom,this._tileMap.getCenter());
},panMap:function(evt){
debug("TabView.panMap: "+evt.eventName);
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(_1a2){
debug("TabView.addPoisToMap: "+_1a2.length);
try{
this._tileMap.replacePois(this.getPois(_1a2));
}
catch(e){
logDebug("tabview.addPoisToMap",e);
}
},getPois:function(_1a3){
var _1a4=new MQA.PoiCollection();
for(var i=0;i<_1a3.length;i++){
var loc=_1a3[i].location;
var _1a7=new MQA.MapIcon();
icon=this.iconPattern.replace("{VAR}",i);
_1a7.setImage(this.imagePath+"/icons/"+icon,this.iconWidth,this.iconHeight,false,false);
_1a7.setAnchorOffset(new MQA.Point(this.iconOffsetX,this.iconOffsetY));
var pt=new MQA.Poi(new MQLatLng(loc.latitude,loc.longitude));
pt.setIcon(_1a7);
pt.setInfoTitleHTML(mq.util.getMiniPopupContent(loc));
pt.setInfoContentHTML(mq.util.getInfoPopupContent(loc,i,false,true,false));
pt.setKey("stops-"+unescape("%"+(i+65).toString(16)));
MQA.EventManager.addListener(pt,"infowindowopen",dojo.hitch(this,"openInfoWindow"));
_1a4.add(pt);
}
return _1a4;
},addLocationForm:function(_1a9,_1aa,_1ab){
debug("TabView.addLocationForm");
if(!_1a9){
_1a9=0;
}
_1aa="loc"+_1a9;
window[_1aa+"Form"]=new mq.addnextlocationform({template:"addNextLocation",jsId:_1aa+"Form",prefix:_1aa,formType:"add",mode:"ajax",parentElem:(_1ab)?$d(_1ab):$d("locationWindowNarr"),searchBoxStartId:_1aa+"0-query",locationBoxStartId:_1aa+"0-addressInput",startTabIndex:(10+(((_1a9>10)?2:_1a9)*4)),locNum:(_1a9>10)?1:_1a9});
},resizeMap:function(){
var _1ac=$d(this._idList["mapDiv"]);
var _1ad=dojo.contentBox(_1ac).h;
var _1ae=dojo.contentBox(_1ac).w;
if((_1ad!=this._tileMap.getSize().height||_1ae!=this._tileMap.getSize().width)&&(!isNaN(_1ad)&&!isNaN(_1ae))){
_1ae=(_1ae<0)?(-1*_1ae):_1ae;
_1ad=(_1ad<0)?(-1*_1ad):_1ad;
debug("TabView.resizeMap: "+_1ae+","+_1ad);
this._tileMap.setSize(new MQA.Size(_1ae,_1ad));
if(controller._model["trafficEnabled"]){
debug("Refreshing Traffic because of resize");
this._tileMap.controls[MQA.CONTROL_TRAFFIC].getTraffic().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 _1b0=true;
if(this._controller._model.locations!=null){
var _1b1=this._controller._model.locations[this._controller._model.locations.length-1].location;
if(this._controller._model.locations.length>9){
var _1b2=new dojox.string.Builder();
_1b2.append("<div class=\"alert-warning\" style=\"display: block;width: 220px;\">");
_1b2.append("<img src=\""+mqPrefix+"/cdn/images/icon-warn.gif\" height=\"25\" width=\"24\">");
_1b2.append(mq.getMessage("ERROR_MAX_STOPS")+"<br/><br/>");
_1b2.append("</div>");
_1b2=_1b2.toString();
mq.handleFormErrorPopups(null,_1b2);
ua.a(":MQ08MaxStops");
_1b0=false;
}else{
if(_1b1.latitude==loc.latitude&&_1b1.longitude==loc.longitude&&_1b1.name==loc.name){
mq.showErrorPopupForSameAddr(null,mq.getMessage("ERROR_DUPLICATE_PREVIOUS_STOP"));
_1b0=false;
}
}
}else{
if(serverResults&&serverResults.length==2){
var _1b3;
if(serverResults[0].locationResult&&(!serverResults[0].availableResultCount||serverResults[0].availableResultCount==0)){
_1b3=serverResults[0].locationResult;
}else{
_1b3=serverResults[1].locationResult;
}
if(_1b3.latitude==loc.latitude&&_1b3.longitude==loc.longitude&&_1b3.name==loc.name){
mq.showErrorPopupForSameAddr(null,mq.getMessage("ERROR_DUPLICATE_START_END"));
_1b0=false;
}
}
}
return _1b0;
},zoomToStreet:function(loc){
debug("TabView.zoomToStreet");
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);
}
var _1b5=window.setTimeout("ua.commit();",800);
}});
}
if(!dojo._hasResource["mq.comscore"]){
dojo._hasResource["mq.comscore"]=true;
dojo.provide("mq.comscore");
dojo.declare("mq.ComScore",null,{constructor:function(_1b6,_1b7,_1b8){
debug("comscore:createobject");
this.tileMap=_1b7;
this.mapWindow=_1b8;
},tileMap:null,mapWindow:null,x:0,y:0,type:"",startxy:null,dragStarted:false,monitor1:function(evt){
if(this.dragStarted){
this.dragStarted=false;
var _1ba=this.tileMap.getCenterLatLng();
var _1bb=this.tileMap.llToPix(_1ba);
_1bb.x=_1bb.x-mq.getScrollBarPosition().ptOffsetX;
_1bb.y=_1bb.y-mq.getScrollBarPosition().ptOffsetY;
this.type="click";
debug("click");
var _1bc=this.tileMap.percentage(this.startxy.x,this.startxy.y,_1bb.x,_1bb.y,true);
this.dragTracker(this.startxy.x,this.startxy.y,_1bb.x,_1bb.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(_1be,_1bf,_1c0,_1c1){
this.x=(this.x)+(_1c0-_1be);
this.y=(this.y)+(_1c1-_1bf);
var _1c2=this.tileMap.percentage(0,0,this.x,this.y,false);
var diag=Math.round(Math.sqrt(_1c2.shiftX*_1c2.shiftX+_1c2.shiftY*_1c2.shiftY));
if(diag>=40){
var _1c4=this.tileMap.direction(0,0,this.x,this.y);
var _1c5;
if(this.type=="click"){
_1c5=("Action = "+this.type);
ua.a(":MQ08Recenter");
}else{
_1c5=("Action = "+this.type+": direction = "+_1c4);
ua.a(":MQ08Drag"+this.dragDirToPanDir(_1c4).toUpperCase());
}
this.x=0;
this.y=0;
this.type="";
}
},dragDirToPanDir:function(_1c6){
var _1c7;
switch(_1c6){
case "n":
_1c7="s";
break;
case "e":
_1c7="w";
break;
case "w":
_1c7="e";
break;
case "s":
_1c7="n";
break;
case "ne":
_1c7="sw";
break;
case "nw":
_1c7="se";
break;
case "se":
_1c7="nw";
break;
case "sw":
_1c7="ne";
break;
default:
_1c7="error";
}
return _1c7;
}});
}

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,TRAFFIC_NONE:0,TRAFFIC_CONSTRUCTION:1,TRAFFIC_INCIDENTS:4,TRAFFIC_ALL:5};
MQA.SURFACE_OFFSET=2*MQA.TILESIZE;
MQA.NOTHING=MQA.RESOURCES+"nothing.gif";

MQA.Control=function(){
};
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.zoombar=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";
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 _c=document.createElement("div");
_c.className="map-zoombox";
var _d=document.createElement("img");
_d.border=0;
if(browser.name=="msie"&&browser.version<7){
_d.src="http://img.mqcdn.com/a/a";
_d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/zoombar.png', sizingMethod='image')";
}else{
_d.src="http://img.mqcdn.com/mqmaptiled/zoombar.png";
}
_c.appendChild(_d);
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 _e=1;
var _f=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, "+(_e+i*12)+", 22, "+(_f+i*12)+"' />";
}
strHtm+="</map>";
_c.innerHTML+=strHtm;
this.zoombox=_c;
this.zoomarea=_c.childNodes[3].childNodes;
temp1.appendChild(_c);
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.destructor=function(){
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.MQEventCallbackObserver);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomout,"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.MQEventCallbackObserver);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.MQEventCallbackObserver);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.MQEventCallbackObserver);
};
MQA.LargeZoomControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_PANZOOM;
this.setZoom(this.map.getZoomLevel());
this.MQEventCallbackObserver=MQA._prEvent.EventCallback(this,"eventmonitor");
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++){
MQA._prEvent.observe(this.pan[i],"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.pan[i],"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.pan[i],"mouseout",this.MQEventCallbackObserver);
}
MQA._prEvent.observe(this.zoomin,"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomout,"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomin,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomout,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomin,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomout,"mouseout",this.MQEventCallbackObserver);
for(var i=0;i<16;i++){
MQA._prEvent.observe(this.zoomarea[i],"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.zoomarea[i],"mouseover",this.MQEventCallbackObserver);
}
MQA._prEvent.observe(this.zoombox,"mouseout",this.MQEventCallbackObserver);
};
MQA.LargeZoomControl.prototype.eventmonitor=function(evt){
if(MQA._prEvent.element(evt)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(evt)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(evt)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(evt)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(evt)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(evt)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(evt)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(evt)==this.zoomarea[i]){
eventId=16-i;
break;
}
}
switch(evt.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(evt).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(evt).className!="o"){
return;
}
MQA._prEvent.element(evt).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(_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.LargeZoomControl.prototype.selectZoom=function(_18){
this.zoombox.childNodes[0].style.left=0-((17-_18)*25)+"px";
};
MQA.LargeZoomControl.prototype.unselectZoom=function(_19){
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";
var _1a,_1b,_1c,_1d,_1e;
_1a=document.createElement("div");
_1a.className="map-controls-bg screen";
this.elem.appendChild(_1a);
_1b=document.createElement("div");
_1b.style.position="relative";
_1b.style.width="48px";
_1b.style.height="52px";
_1b.style.margin="0";
_1b.style.padding="0 3px";
if(browser.name=="msie"&&browser.version<7){
_1b.style.backgroundImage="none";
_1b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png', sizingMethod='image')";
}else{
_1b.style.backgroundColor="transparent";
_1b.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png)";
_1b.style.backgroundPosition="0 0";
_1b.style.backgroundRepeat="no-repeat";
}
_1a.appendChild(_1b);
_1a=document.createElement("ul");
_1a.className="map-controls screen";
this.elem.appendChild(_1a);
_1b=document.createElement("li");
_1b.className="map-box-wrapper";
_1a.appendChild(_1b);
_1c=document.createElement("div");
_1c.className="map-compass";
_1b.appendChild(_1c);
_1d=document.createElement("img");
_1d.border=0;
if(browser.name=="msie"&&browser.version<7){
_1d.src="http://img.mqcdn.com/a/a";
_1d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-compassrose.png', sizingMethod='image')";
}else{
_1d.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";
}
_1d.alt="compass rose";
_1d.className="";
_1c.appendChild(_1d);
this.compassrose=_1d;
_1d=document.createElement("img");
_1d.border=0;
_1d.src="http://img.mqcdn.com/a/a";
_1d.className="map-compass-links";
_1d.useMap="#mq-pancontrol-linkmap";
_1c.appendChild(_1d);
_1d=document.createElement("map");
_1d.id="mq-pancontrol-linkmap";
_1d.name="mq-pancontrol-linkmap";
_1c.appendChild(_1d);
_1e=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");
_1d.appendChild(_1e);
_1e=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
_1d.appendChild(_1e);
this.pans[MQA.PAN_NORTH]=_1e;
_1e=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
_1d.appendChild(_1e);
this.pans[MQA.PAN_EAST]=_1e;
_1e=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
_1d.appendChild(_1e);
this.pans[MQA.PAN_WEST]=_1e;
_1e=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
_1d.appendChild(_1e);
this.pans[MQA.PAN_SOUTH]=_1e;
_1a=null;
_1b=null;
_1c=null;
_1d=null;
_1e=null;
};
MQA.PanControl.prototype=new MQA.Control();
MQA.PanControl.prototype.constructor=MQA.PanControl;
MQA.PanControl.prototype.dispose=function(){
this.map=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.elem.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.elem);
MQA.Util._deleteDOMObject(this.elem);
this.elem="";
};
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);
};
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");
this.ePanSouthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
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_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);
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);
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);
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(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.mapcontrolbg=document.createElement("div");
this.mapcontrolbg.className="map-controls-bg screen";
this.mapcontrolbg.style.width="60px";
this.elem.appendChild(this.mapcontrolbg);
this.tilemappng=document.createElement("div");
this.tilemappng.style.position="relative";
this.tilemappng.style.width="60px";
this.tilemappng.style.height="45px";
this.tilemappng.style.margin="0";
this.tilemappng.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
this.tilemappng.style.backgroundImage="none";
this.tilemappng.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png', sizingMethod='image')";
}else{
this.tilemappng.style.backgroundColor="transparent";
this.tilemappng.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png)";
this.tilemappng.style.backgroundPosition="0 0";
this.tilemappng.style.backgroundRepeat="no-repeat";
}
this.mapcontrolbg.appendChild(this.tilemappng);
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.mapzoomin=document.createElement("div");
this.mapzoomin.style.position="absolute";
this.mapzoomin.style.left="6px";
this.mapzoomin.style.top="8px";
this.mapzoomin.style.width="22px";
this.mapzoomin.className="io map-zoom-in";
this.li1.appendChild(this.mapzoomin);
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";
}
this.mapzoomin.appendChild(this.zoomin);
this.mapzoomout=document.createElement("div");
this.mapzoomout.style.position="absolute";
this.mapzoomout.style.left="29px";
this.mapzoomout.style.top="6px";
this.mapzoomout.style.width="22px";
this.mapzoomout.className="io map-zoom-out";
this.li1.appendChild(this.mapzoomout);
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";
}
this.mapzoomout.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.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);
this.mapcontrolbg.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.mapcontrolbg);
MQA.Util._deleteDOMObject(this.mapcontrolbg);
this.mapcontrolbg=null;
this.tilemappng.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.tilemappng);
MQA.Util._deleteDOMObject(this.tilemappng);
this.tilemappng=null;
this.mapzoomout.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.mapzoomout);
MQA.Util._deleteDOMObject(this.mapzoomout);
this.mapzoomout=null;
this.mapzoomin.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.mapzoomin);
MQA.Util._deleteDOMObject(this.mapzoomin);
this.mapzoomin=null;
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.zoomout.style.filter="";
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
this.elem.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.elem);
MQA.Util._deleteDOMObject(this.elem);
this.elem="";
};
MQA.ZoomControl.prototype.destructor=function(){
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.ZoomControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_ZOOM;
this.zoomin_click=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomin_mouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomin_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_click=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_mouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.zoomout_mouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.zoomin_click);
MQA._prEvent.observe(this.zoomin,"mouseover",this.zoomin_mouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.zoomin_mouseout);
MQA._prEvent.observe(this.zoomout,"click",this.zoomout_click);
MQA._prEvent.observe(this.zoomout,"mouseover",this.zoomout_mouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.zoomout_mouseout);
};
MQA.ZoomControl.prototype.eventmonitor=function(evt){
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";
temp=document.createElement("ul");
temp.className="map-view screen";
this.elem.appendChild(temp);
temp1=document.createElement("li");
temp1.className="map-view-street";
temp.appendChild(temp1);
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";
temp1.appendChild(this.streetview);
temp1=document.createElement("li");
temp1.className="map-view-aerial";
temp.appendChild(temp1);
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";
temp1.appendChild(this.aerialview);
temp1=document.createElement("li");
temp1.className="map-view-hybrid";
temp.appendChild(temp1);
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";
temp1.appendChild(this.hybridview);
};
MQA.ViewControl.prototype=new MQA.Control();
MQA.ViewControl.prototype.constructor=MQA.ViewControl;
MQA.ViewControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.streetview,"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.aerialview,"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.hybridview,"click",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.MQEventCallbackObserver);
};
MQA.ViewControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.MQEventCallbackObserver=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.streetview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.streetview,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.aerialview,"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.aerialview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.hybridview,"click",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.hybridview,"mouseover",this.MQEventCallbackObserver);
MQA._prEvent.observe(this.hybridview,"mouseout",this.MQEventCallbackObserver);
if(this.map.getMapType()=="map"){
this.streetview.className="a";
}
if(this.map.getMapType()=="sat"){
this.aerialview.className="a";
}
if(this.map.getMapType()=="hyb"){
this.hybridview.className="a";
}
};
MQA.ViewControl.prototype.eventmonitor=function(evt){
var _25=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_25==this.streetview){
this.selectMode("street");
}
if(_25==this.aerialview){
this.selectMode("aerial");
}
if(_25==this.hybridview){
this.selectMode("hybrid");
}
break;
case "mouseover":
if(_25.className!="a"){
_25.className="o";
}
break;
case "mouseout":
if(_25.className!="a"){
_25.className="";
}
break;
}
};
MQA.ViewControl.prototype.updateControl=function(_26){
switch(_26){
case "map":
this.aerialview.className="";
this.hybridview.className="";
this.streetview.className="a";
break;
case "sat":
this.hybridview.className="";
this.streetview.className="";
this.aerialview.className="a";
break;
case "hyb":
this.aerialview.className="";
this.streetview.className="";
this.hybridview.className="a";
break;
}
};
MQA.ViewControl.prototype.selectMode=function(_27){
var _28=this.map.getMapType();
var _29="noChange";
if(_27=="street"&&_28!="map"){
_29="map";
}
if(_27=="aerial"&&_28!="sat"){
_29="sat";
}
if(_27=="hybrid"&&_28!="hyb"){
_29="hyb";
}
if(_29!="noChange"){
this.map.setMapType(_29);
}
};
MQA.ViewControl.prototype.getHeight=function(){
return 22;
};
MQA.ViewControl.prototype.getWidth=function(){
return 209;
};

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.LeaderLineDotImage(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.setVisible(true);
this.dcCollection[i][j].poi.isDecluttered=false;
this.dcCollection[i][j].setVisible(false);
this.dcCollection[i][j]=null;
}
this.dcCollection[i]=null;
}
for(var i=0,x=this.pnCollection.length;i<x;i++){
if(this.pnCollection[i]!=null){
this.pnCollection[i][0].setVisible(false);
this.pnCollection[i][1].setVisible(false);
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.map.getPois();
for(var i=0,x=_2b.getSize();i<x;i++){
_2b.getAt(i).setLatLng(_2b.getAt(i).getLatLng());
_2b.getAt(i).dragLeft=null;
_2b.getAt(i).dragTop=null;
_2b.getAt(i).setAltStateFlag(false);
_2b.getAt(i).isDecluttered=false;
}
}
}
break;
case 1:
this.declutterCleared=false;
var _2c,_2d;
var _2e,_2f;
var _30;
var _31;
var b;
var _33=this.map.getPois();
var _34=new Array;
var _35=new Array;
for(var a=0,x=_33.getSize();a<x;a++){
_34[a]=new Array(_33.getAt(a).getLatLng().getLatitude(),_33.getAt(a).getLatLng().getLongitude(),a);
}
_34.sort(this.sortPoisRL);
for(var a=0,e=_34.length;a<e;a++){
_2c=_33.getAt(_34[a][2]).getIcon().getImage().width;
_2d=_33.getAt(_34[a][2]).getIcon().getImage().height;
_2e=this.map.getLLToXY(new MQA.PointLL(_34[a][0],_34[a][1]));
_2e.x+=_33.getAt(_34[a][2]).element.offset.x;
_2e.y+=_33.getAt(_34[a][2]).element.offset.y;
_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 _38=_35[b][1].length;
var _39=parseInt((_38-1)%_22);
var _3a=parseInt(_39/this.stackWidth);
var _3b=parseInt(_39%this.stackWidth);
_25=_35[b][3].x-(_3b+1)*(this.declutterIcon.width+_29);
_26=_35[b][3].y-((_3a+1)*(this.declutterIcon.height+_29));
_2a=(_38<=_22);
if(_38<=this.stackWidth){
_35[b][0].ul.x-=(this.declutterIcon.width+_29);
}
if(_3b==0&&_3a>0&&_3a<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(_38>_22&&this.pnCollection[b]==null){
this.pnCollection[b]=new Array();
var _3c=_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)),_3c,this.map,false,-1,b);
this.pnCollection[b][1]=new MQA.PrevNextIcon(this.nextPageIcon,_35[b][3].x-(this.nextPageIcon.width+_29),_3c,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)),_3c,this.map,b);
}
}else{
if(this.declutterIcon.height>_2d){
_2e.y-=parseInt((this.declutterIcon.height-_2d)/2);
}
_2e.y+=(this.declutterIcon.height+_29);
var _3d=new Array();
_3d[0]=_30;
_3d[1]=new Array();
_3d[2]=a;
_3d[3]=_2e;
_35[_35.length]=_3d;
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 _3e=this.createDeclutterGrps();
this.doDeclutterM2(_3e);
break;
}
};
MQA.Declutter.prototype.getPoiDims=function(){
var _3f=this.map.getPois();
var _40=_3f.getSize();
this.poiCollection={length:_40};
var _41=new Array;
for(var i=0;i<_40;i++){
_41[i]=new Array(_3f.getAt(i).getLatLng().getLatitude(),_3f.getAt(i).getLatLng().getLongitude(),i);
}
_41.sort(this.sortPois);
for(var i=0,j=_41.length;i<j;i++){
tmpHW=_3f.getAt(_41[i][2]).getIcon().getImage();
tmpXY=this.map.getLLToXY(_3f.getAt(_41[i][2]).getLatLng());
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:_41[i][2]};
}
};
MQA.Declutter.prototype.createDeclutterGrps=function(){
var _44=new Array();
var _45=new Array;
var _46=0;
var _47;
for(var i=0,k=this.poiCollection.length;i<k;i++){
if(MQA.Util.indexOf(_44,i)>=0){
continue;
}
_47=false;
for(var j=i+1;j<k;j++){
if(MQA.Util.indexOf(_44,j)>=0){
continue;
}
if(this.isOverlapped(this.poiCollection[i],this.poiCollection[j])){
if(!_47){
_45[_46]=new Array();
_45[_46].push(i);
_44.push(i);
_47=true;
}
_45[_46].push(j);
_44.push(j);
}
}
if(_45[_46]&&_45[_46].length>0){
_46++;
}
}
return _45;
};
MQA.Declutter.prototype.doDeclutterM2=function(_4b){
var _4c={x:0,y:0,h:0,w:0};
var PI=3.14;
var _4e,_4f;
var nx,ny;
var n,_53;
var _54;
var _55;
var _56;
var _57;
var _58=false;
var _59;
if(_4b.length==1&&_4b[0].length==this.poiCollection.length){
_58=true;
_4e=360/_4b[0].length;
_4f=1350/_4e;
_4f=(_4f<75)?75:_4f;
}else{
_4e=10;
_4f=75;
}
var _5a;
var _5b,_5c;
var _5d=this.map.getDragOffset();
for(var i=0,p=_4b.length;i<p;i++){
n=-180;
_53=this.getDeclutCenterPt(_4b[i]);
_54=1;
_5a=_4f;
for(var k=0,q=_4b[i].length;k<q;k++){
_55=this.poiCollection[_4b[i][k]];
_5b=Math.ceil(_55.w/2);
_5c=Math.ceil(_55.h/2);
for(var _62=n;;_62+=_4e){
if(_62>=180){
++_54;
_62-=360;
if(_54>2){
_5a+=30;
}
}
if(_54>4){
break;
}
nx=Math.round(_5a*Math.cos(PI*_62/180));
ny=Math.round(_5a*Math.sin(PI*_62/180));
_4c.x=_53.x+nx-_5b;
_4c.y=_53.y+ny-_5c;
_4c.h=_55.h;
_4c.w=_55.w;
if(_53.x>0&&_53.y>0&&_53.x<this.map.width&&_53.y<this.map.height){
if(_4c.x<=_4c.w||_4c.y<=_4c.h||_4c.x+_4c.w>=this.map.width||_4c.y+_4c.h>=this.map.height){
continue;
}
}
_56=false;
for(var m=0,r=this.poiCollection.length;m<r;m++){
_59=MQA.Util.indexOf(_4b[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+_5b,this.poiCollection[m].iy+_5c,this.poiCollection[m].x+_5b,this.poiCollection[m].y+_5c,_55.ix+_5b,_55.iy+_5c,_4c.x+_5b,_4c.y+_5c)){
_56=true;
break;
}
}
if(_59<0){
if((this.isOverlapped(_4c,this.poiCollection[m]))||((_54<2)&&this.checkLPIntersection((_55.ix+_5b),(_55.iy+_5c),_4c.x+_5b,_4c.y+_5c,this.poiCollection[m]))){
_56=true;
break;
}else{
if((_54<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+_5b,this.poiCollection[m].y+_5c,_4c)){
_56=true;
break;
}
}
}
}else{
if((_59>=0)&&(_59<k)&&(this.isOverlapped(_4c,this.poiCollection[m]))){
_56=true;
break;
}
}
}
if(_56){
continue;
}
n=_62+_4e;
_57=this.map.getPois().getAt(_55.indx);
_57.setAltStateFlag(true);
_57.isDecluttered=true;
_57.element.style.left=_4c.x-_5d.x+"px";
_57.element.style.top=_4c.y-_5d.y+"px";
this.drawLeaderLine(_57);
theLatLngXY=this.map.llToPix(_57.getLatLng());
_57.dragLeft=theLatLngXY.x-_4c.x;
_57.dragTop=theLatLngXY.y-_4c.y;
_55.x=_4c.x;
_55.y=_4c.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 _84=3;
if(((Math.abs(x1-xi)<=_84)&&(Math.abs(y1-yi)<=_84))||((Math.abs(u1-xi)<=_84)&&(Math.abs(v1-yi)<=_84))||((Math.abs(x2-xi)<=_84)&&(Math.abs(y2-yi)<=_84))||((Math.abs(u2-xi)<=_84)&&(Math.abs(v2-yi)<=_84))){
return (false);
}
return (true);
}
return (false);
};
MQA.Declutter.prototype.getDeclutCenterPt=function(_85){
var _86=0;
var _87=0;
var poi;
var _89=_85.length;
for(var i=0;i<_89;i++){
poi=this.poiCollection[_85[i]];
_86+=poi.ix+poi.w/2;
_87+=poi.iy+poi.h/2;
}
return (new MQA.PointXY(Math.round(_86/_89),Math.round(_87/_89)));
};
MQA.Declutter.prototype.isOverlapped=function(_8b,_8c){
var x1,x2,y1,y2,w1,w2,h1,h2;
x1=_8b.x;
y1=_8b.y;
h1=_8b.h;
w1=_8b.w;
x2=_8c.x;
y2=_8c.y;
h2=_8c.h;
w2=_8c.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(_99,_9a){
var _9b=(_99.lr.x>_9a.ul.x)&&(_99.ul.x<_9a.lr.x)&&(_99.lr.y>_9a.ul.y)&&(_99.ul.y<_9a.lr.y);
return _9b;
};
MQA.Declutter.prototype.setMap=function(map){
this.map=map;
};
MQA.Declutter.prototype.addDeclutterPoi=function(x,y,poi,_a0,_a1){
var _a2=new MQA.DeclutterPoi(this.map,poi,_a0);
this.dcCollection[_a1].push(_a2);
poi.isDecluttered=true;
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),_a2.div);
};
MQA.Declutter.prototype.turnPage=function(_a4,_a5){
var i;
var _a7=this.stackHeight*this.stackWidth;
var _a8=this.dcCollection[_a5].length;
if(this.cpCollection[_a5]==1&&_a4==-1){
return;
}
if(((this.cpCollection[_a5]*_a7)>=_a8)&&_a4==1){
return;
}
this.cpCollection[_a5]=this.cpCollection[_a5]+_a4;
for(i=0;i<_a8;i++){
this.dcCollection[_a5][i].setVisible(false);
}
var _a9=(this.cpCollection[_a5]*_a7);
if(_a9>_a8){
_a9=_a8;
}
var _aa=(this.cpCollection[_a5]*_a7)-_a7;
for(i=_aa;i<_a9;i++){
this.dcCollection[_a5][i].setVisible(true);
}
if(_aa>0){
this.pnCollection[_a5][0].setVisible(true);
}else{
this.pnCollection[_a5][0].setVisible(false);
}
if(_a9<_a8){
this.pnCollection[_a5][1].setVisible(true);
}else{
this.pnCollection[_a5][1].setVisible(false);
}
var _ab=this.cpCollection[_a5]-1;
var _ac=parseInt(Math.ceil(_a8/_a7))-1;
var _ad=this.pageBarIcon.width-6;
this.pnCollection[_a5][2].div.mar.style.left=parseInt(_ad*(_ab/_ac))+"px";
};
MQA.Declutter.prototype.adjustLeaderLineSurface=function(){
var _ae=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";
}
_ae=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";
}
_ae=true;
}
}
return _ae;
};
MQA.Declutter.prototype.drawLeaderLine=function(poi){
var xy=new Object;
var _b1=(MQA.browser.name=="safari");
if(!_b1){
if(!this.map.poisurface){
this.map.createPoiDrawingSurface();
}
}else{
if(!this.map.dcCanvasDiv){
this.map.createCanvas();
}
}
if(!_b1){
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 _b2=this.map.getDragOffset();
var _b3=new Array();
_b3[0]=new Object;
_b3[0]=this.map.llToPix(poi.getLatLng());
_b3[0].x+=(MQA.SURFACE_OFFSET);
_b3[0].y+=(MQA.SURFACE_OFFSET);
_b3[1]=new Object;
var _b4=parseInt(this.map.div1.style.left)+_b2.x;
var _b5=parseInt(this.map.div1.style.top)+_b2.y;
if(poi.getAltStateFlag()){
var _b6=poi.getAltIcon().getAnchorOffset().getX();
var _b7=poi.getAltIcon().getAnchorOffset().getY();
}else{
var _b6=poi.getIcon().getAnchorOffset().getX();
var _b7=poi.getIcon().getAnchorOffset().getY();
}
_b3[1].x=(parseInt(poi.element.style.left)+MQA.SURFACE_OFFSET)-_b6+_b4;
_b3[1].y=(parseInt(poi.element.style.top)+MQA.SURFACE_OFFSET)-_b7+_b5;
cpnts=new Array();
if(MQA.Util.isOverLimit(xy)){
if(!_b1){
var _b8=parseInt(this.map.poilinediv.style.height.substr(0,(this.map.poilinediv.style.height.length)-2));
var _b9=parseInt(this.map.poilinediv.style.width.substr(0,(this.map.poilinediv.style.width.length)-2));
}else{
var _b8=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));
var _b9=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));
}
cpnts=MQA.Clip(0,_b8,0,_b9,_b3,false);
}else{
cpnts=_b3;
}
var _ba=(poi.leaderLineColor?poi.leaderLineColor:this.leaderLineColor);
if(poi.leaderLineDotIcon){
poi.leaderLineDotIcon.div.im.style.display="none";
}
if(!_b1){
if(poi.leaderLine){
poi.leaderLine=MQA.Graphics.remove(this.map.poisurface,poi.leaderLine);
}
if(poi.leaderLineDot){
poi.leaderLineDot=MQA.Graphics.remove(this.map.poisurface,poi.leaderLineDot);
}
poi.leaderLine=MQA.Graphics.drawPolygon(cpnts,_ba,1,2,_ba,1,true);
this.map.poisurface.appendChild(poi.leaderLine);
poi.leaderLine.setAttribute("zIndex",80);
}else{
this.map.dcCanvasContext.strokeStyle=_ba;
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 _bb=parseInt(this.getLeaderLineDotMode());
switch(_bb){
case 0:
break;
case 1:
if(!_b1){
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 _bd=this.map.llToPix(poi.getLatLng()).x;
var _be=this.map.llToPix(poi.getLatLng()).y;
var _bf=-MQA.SURFACE_OFFSET;
var _c0=-MQA.SURFACE_OFFSET;
if(!((_bd<_bf)||(_bd>_bf+MQA.Graphics.surfaceWidth)||(_be<_c0)||(_be>_c0+MQA.Graphics.surfaceHeight))){
poi.leaderLineDot=MQA.Graphics.drawEllipse(c,_ba,1,1,_ba,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:
if(poi.getLeaderLineDotImage()){
poi.leaderLineDotIcon=new MQA.LeaderLineDotIcon(poi.getLeaderLineDotImage(),this.map,poi);
}else{
if(this.getLeaderLineDotImage()){
poi.leaderLineDotIcon=new MQA.LeaderLineDotIcon(this.getLeaderLineDotImage(),this.map,poi);
}
}
break;
default:
break;
}
}else{
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.redrawLeaderLines=function(){
var _c1=null;
if(arguments.length>0){
_c1=arguments[0];
}
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
for(var i=0,x=this.map.mypois.getSize();i<x;i++){
var _c4=this.map.mypois.getAt(i);
if(_c4.altStateFlag&&(_c4!=_c1)){
if(_c4.leaderLine){
_c4.leaderLine=MQA.Graphics.remove(this.map.poisurface,_c4.leaderLine);
}
if(_c4.leaderLineDot){
_c4.leaderLineDot=MQA.Graphics.remove(this.map.poisurface,_c4.leaderLineDot);
}
this.drawLeaderLine(_c4);
}
}
};
MQA.Declutter.prototype.removeLeaderLines=function(){
for(var i=0,x=this.map.mypois.getSize();i<x;i++){
var _c7=this.map.mypois.getAt(i);
if(_c7.altStateFlag){
if(_c7.leaderLine){
_c7.leaderLine=MQA.Graphics.remove(this.map.poisurface,_c7.leaderLine);
}
if(_c7.leaderLineDot){
_c7.leaderLineDot=MQA.Graphics.remove(this.map.poisurface,_c7.leaderLineDot);
}
if(_c7.leaderLineDotIcon){
this.map._removePoi(_c7.leaderLineDotIcon.div);
_c7.leaderLineDotIcon=null;
}
}
}
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 _c8;
for(var i=0,j=this.map.getPois().getSize();i<j;i++){
_c8=this.map.getPois().getAt(i);
theLatLngXY=this.map.llToPix(_c8.getLatLng());
if(_c8.dragLeft!=null){
_c8.element.style.left=theLatLngXY.x-_c8.dragLeft+"px";
_c8.element.style.top=theLatLngXY.y-_c8.dragTop+"px";
}
}
};
MQA.DeclutterPoi=function(map,poi,_cd){
this.map=map;
this.poi=poi;
this.div=document.createElement("div");
this.div.id="dc_"+poi.getLabel();
this.div.className="pois";
this.div.im=document.createElement("img");
var _ce;
if(poi.getAltIcon()!=poi.getIcon()){
_ce=new MQA.DeclutterIcon(poi.getAltIcon()._getImgSrc(poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_ce=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQA.Util._hasPngExtention(_ce.url)){
this.div.im.src="http://img.mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_ce.url+"', sizingMethod='image') ";
}else{
this.div.im.src=_ce.url;
}
this.div.im.style.height=_ce.height+"px";
this.div.im.style.width=_ce.width+"px";
this.div.im.style.position="absolute";
if(_cd){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
MQA._prEvent.observe(this.div.im,"click",MQA._prEvent.EventCallback(poi,"onClick"));
MQA._prEvent.observe(this.div.im,"dblclick",MQA._prEvent.EventCallback(poi,"onDoubleClick"));
MQA._prEvent.observe(this.div.im,"mousedown",MQA._prEvent.EventCallback(poi,"onMouseDown"));
MQA._prEvent.observe(this.div.im,"mouseup",MQA._prEvent.EventCallback(poi,"onMouseUp"));
MQA._prEvent.observe(this.div.im,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.div.im,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
poi.setVisible(false);
};
MQA.DeclutterPoi.prototype={onMouseOut:function(e){
if(this.poi.showingInfo!=true){
this.poi.setVisible(false);
this.poi.setLevel(90);
}
this.poi.onMouseOut(e);
var _d0;
if(this.poi.getAltIcon()!=this.poi.getIcon()){
_d0=new MQA.DeclutterIcon(this.poi.getAltIcon()._getImgSrc(this.poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_d0=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQA.Util._hasPngExtention(_d0.url)){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_d0.url+"', sizingMethod='image') ";
}else{
this.div.im.src=_d0.url;
}
},onMouseOver:function(e){
this.poi.setLevel(100);
this.poi.setVisible(true);
this.poi.onMouseOver(e);
var _d2;
if(this.poi.getAltIcon()!=this.poi.getIcon()){
_d2=new MQA.DeclutterIcon(this.poi.getAltIcon()._getImgSrc(this.poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_d2=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQA.Util._hasPngExtention(_d2.url)){
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.map.mydeclutter.declutterOverIcon.url+"', sizingMethod='image') ";
}
}else{
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.src=this.map.mydeclutter.declutterOverIcon.url;
}
}
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
}};
MQA.PageMarkIcon=function(bar,_d5,x,y,map,_d9){
this.map=map;
this.index=_d9;
this.div=document.createElement("div");
this.div.className="pois";
this.div.bar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(bar.url)){
this.div.bar.src="http://img.mqcdn.com/a/a";
this.div.bar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bar.url+"', sizingMethod='image');";
}else{
this.div.bar.src=bar.url;
}
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(_d5.url)){
this.div.mar.src="http://img.mqcdn.com/a/a";
this.div.mar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_d5.url+"', sizingMethod='image');";
}else{
this.div.mar.src=_d5.url;
}
this.div.mar.style.position="absolute";
this.div.mar.style.display="block";
this.div.mar.style.height=_d5.height;
this.div.mar.style.width=_d5.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={remove: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.map._removePoi(this.div);
this.div=null;
}};
MQA.PrevNextIcon=function(_db,x,y,map,_df,_e0,_e1){
this.map=map;
this.increment=_e0;
this.index=_e1;
this.div=document.createElement("div");
this.div.className="pois";
this.div.im=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_db.url)){
this.div.im.src="http://img.mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_db.url+"', sizingMethod='image');";
}else{
this.div.im.src=_db.url;
}
this.div.im.style.position="absolute";
if(_df){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.im.style.height=_db.height;
this.div.im.style.width=_db.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={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,_e7,_e8){
this.url=url;
this.width=_e7;
this.height=_e8;
};

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){
if(!this.observers){
this.observers=[];
}
if(_3f==null){
_3f=_3c;
}
this.observers.push([_3c,_3d,_3e,_3f]);
};
this.removeListener=function(_40,_41,_42,_43){
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){
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){
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.Util={isMouseLeaveOrEnter:function(e,_2){
if(e.type!="mouseout"&&e.type!="mouseover"){
return false;
}
var _3=e.relatedTarget?e.relatedTarget:e.type=="mouseout"?e.toElement:e.fromElement;
while(_3&&_3!=_2){
_3=_3.parentNode;
}
return (_3!=_2);
},getTop:function(_4){
var _5=0;
while(_4){
_5+=parseInt(_4.offsetTop);
_4=_4.offsetParent;
}
return (_5);
},centreElement:function(_6){
_6.style.left=(MQA.browser.size().width-_6.offsetWidth)/2+"px";
_6.style.top=(MQA.browser.size().height-_6.offsetHeight)/2+"px";
},deleteChildElements:function(_7){
if(_7&&_7.childNodes.length>0){
for(var i=(_7.childNodes.length-1);i>=0;i--){
_7.removeChild(_7.childNodes[i]);
}
}
},deleteElement:function(_9){
if(_9){
_9.parentNode.removeChild(_9);
}
},pngFilter:function(_a){
if(!document.getElementsByTagName){
return;
}
if(MQA.browser.info.name=="msie"&&((MQA.browser.info.version<7)&&MQA.browser.info.version>5)){
var _b=(_a)?_a:document.images;
for(var i=0,l=_b.length;i<l;i++){
var _e=_b[i];
var _f=_e.src;
if(_f){
var _10=_f.length;
if(_f.toLowerCase().substring(_10-4,_10)==".png"){
if(!_e.title){
_e.title=(_e.alt)?_e.alt:"";
}
_e.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e.src+"');";
_e.src=MQ.art.spacer;
}
}
}
}
},_modifyImageSrc:function(src){
var _12=MQA.browser;
var _13=src;
if(_12.name=="msie"&&_12.version<7){
_13=_13+".gif";
}else{
_13=_13+".png";
}
return _13;
},getSuperRect:function(_14,_15){
var _16=new MQA.RectLL(new MQA.PointLL(0,0),new MQA.PointLL(0,0));
_16.ul.lat=Math.max(_14.ul.lat,_15.ul.lat);
_16.ul.lng=Math.min(_14.ul.lng,_15.ul.lng);
_16.lr.lat=Math.min(_14.lr.lat,_15.lr.lat);
_16.lr.lng=Math.max(_14.lr.lng,_15.lr.lng);
return _16;
},_hasPngExtention:function(url){
var _18=url.toLowerCase();
var _19=_18.lastIndexOf(".png");
if((_19!=-1)&&(_19==(_18.length-4))){
return true;
}
return false;
},_createImage:function(url,_1b,top,_1d,_1e,_1f){
var img;
img=document.createElement("img");
if(_1f==null){
_1f=false;
}
if(_1f){
img.isPng=_1f;
}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=_1b+"px";
img.style.top=top+"px";
img.style.width=_1d+"px";
img.style.height=_1e+"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(_1f==null){
_1f=false;
}
if(_1f){
img.isPng=_1f;
}else{
img.isPng=this._hasPngExtention(url);
}
return img;
},createImage:function(URL,_22,TOP,_24,_25,_26){
var _27;
_27=document.createElement("IMG");
_27.galleryimg="no";
_27.lt=_22;
_27.tp=TOP;
var _28=_27.style;
_28.width=MQA.Util.asPix(_24);
_28.height=MQA.Util.asPix(_25);
_28.position="absolute";
_28.left=MQA.Util.asPix(_22);
_28.top=MQA.Util.asPix(TOP);
_28.zIndex=_26;
_28.MozUserSelect="none";
_28.display="block";
_28.border="0";
if(URL.length==0){
_28.visibility="hidden";
}else{
_28.visibility="visible";
_27.src=URL;
}
_27.unselectable="on";
_27.onselectstart=MQA._prEvent.falseFunction;
_27.oncontextmenu=MQA._prEvent.falseFunction;
return _27;
},pause:function(_29){
var now=new Date();
var _2b=now.getTime()+_29;
while(true){
now=new Date();
if(now.getTime()>_2b){
return;
}
}
},asPix:function(X){
return X+"px";
},calcPercentage:function(_2d,_2e){
return Math.round((_2d/_2e)*100);
},stripHTMLTags:function(s){
return s.replace(/<\/?[^>]+>/gi,"");
},panAngle:function(_30,_31,_32,_33){
var b=(_33-_31);
var c=(_32-_30);
if(b<0){
b=b*-1;
}
if(c<0){
c=c*-1;
}
var a=Math.round(Math.sqrt(b*b+c*c));
var _37=Math.round((Math.asin(b/a)*360)/(2*3.14));
return _37;
},isOverLimit:function(_38){
var _39=false;
var _3a=16000;
for(var i=0;i<_38.length;i++){
if(_38[i].x>_3a||_38[i].x<-_3a||_38[i].y>_3a||_38[i].y<-_3a){
_39=true;
break;
}
}
return _39;
},InitDojo:function(_3c){
window.onload=_3c;
},getWindowScrollXY:function(){
var _3d=new MQA.Point(0,0);
if(typeof (window.pageYOffset)=="number"){
_3d.setX(window.pageXOffset);
_3d.setY(window.pageYOffset);
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_3d.setX(document.body.scrollLeft);
_3d.setY(document.body.scrollTop);
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_3d.setX(document.documentElement.scrollLeft);
_3d.setY(document.documentElement.scrollTop);
}
}
}
return (_3d);
},getHTMLSubstring:function(_3e,_3f,_40){
var _41=/<\/?[^>]+>/ig;
var _42=new Array();
var _43=_3e.replace(_41,"|");
var _44=_43.split("|");
_42=_3e.match(_41);
var _45="";
var _46=false;
for(var i=charCount=0;i<_44.length;i++){
charCount+=_44[i].length;
if(charCount>=_3f&&_46==false){
charCount-=_44[i].length;
_44[i]=_44[i].substr(0,(_3f-charCount))+_40;
_46=true;
continue;
}
if(_46==true){
_44[i]="";
}
}
for(var i=0;i<_44.length;i++){
_45+=_44[i];
if(_42&&(_42.length>0)&&(i<_42.length)){
_45+=_42[i];
}
}
return (_45);
},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(_48){
var _49=0,_4a=0;
do{
_49+=_48.offsetTop||0;
_4a+=_48.offsetLeft||0;
_48=_48.offsetParent;
}while(_48);
return (new MQA.Point(_4a,_49));
},indexOf:function(_4b,_4c){
for(var i=0,_4e=_4b.length;i<_4e;i++){
if(_4b[i]==_4c){
return i;
}
}
return -1;
},getBrowserInfo:function(){
browser=new Object();
browser.name=browser.version=browser.os="unknown";
var _4f=navigator.userAgent.toLowerCase();
var _50=new Array("firefox","msie","netscape","opera","safari");
var _51=new Array("linux","mac","windows","x11");
for(var i=0,n=_50.length;i<n;i++){
var _54=_4f.indexOf(_50[i])+1;
if(_54>0){
browser.name=_50[i];
var _55=_54+browser.name.length;
var _56=((browser.name=="safari")||(_4f.charAt(_55+4)>0&&_4f.charAt(_55+4)<9))?5:3;
browser.version=_4f.substring(_55,_55+_56);
}
}
for(var i=0,n=_51.length;i<n;i++){
var _54=_4f.indexOf(_51[i])+1;
if(_54>0){
browser.os=_51[i];
}
}
return browser;
},createParentDiv:function(id,lt,tp,_5a,top,_5c,_5d,_5e,_5f){
var _60=document.createElement("div");
_60.id=id;
_60.lt=lt;
_60.tp=tp;
_60.style.position=_5a;
_60.style.top=top+"px";
_60.style.left=_5c+"px";
if(_5d!=null){
_60.style.zIndex=_5d;
}
if(_5e!=null){
_60.style.width=_5e+"px";
}
if(_5f!=null){
_60.style.height=_5f+"px";
}
return _60;
},createImgHolder:function(src,_62,_63,_64,_65){
var _66=document.createElement("img");
if(src!=null){
_66.src=src;
}
_66.unselectable=_62;
_66.style.MozUserSelect=_63;
_66.style.display=_64;
if(_65!=null){
_66.style.zIndex=_65;
}
return _66;
},createImgLogo:function(_67,_68,_69,_6a,_6b,_6c,_6d,src,_6f,_70){
var _71=document.createElement("img");
_71.style.MozUserSelect=_67;
_71.unselectable=_68;
_71.corner=_69;
_71.offset=_6a;
_71.style.position=_6b;
_71.style.display=_6c;
if(MQA.getBrowserInfo().name=="msie"){
if(_6c=="none"){
_71.style.display="block";
_71.style.visibility="hidden";
}
}
_71.style.zIndex=_6d;
if(_6f!=null){
_71.width=_6f;
}
if(_70!=null){
_71.height=_70;
}
return _71;
},createArea:function(_72,_73,_74,_75,alt){
var tmp=document.createElement("area");
if(_72!=null){
tmp.shape=_72;
}
if(_73!=null){
tmp.coords=_73;
}
if(_74!=null){
tmp.href=_74;
}
if(_75!=null){
tmp.title=_75;
}
if(alt!=null){
tmp.alt=alt;
}
return tmp;
},_getRandomGUID:function(n){
var p;
var _7a="";
var _7b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(var i=0;i<n;i++){
p=Math.floor(Math.random()*_7b.length);
_7a+=_7b.substr(p,1);
}
return _7a;
},_nukeChildren:function(obj){
var c,s;
while(obj.hasChildNodes()){
c=obj.firstChild;
if(c.hasChildNodes){
this._nukeChildren(c);
}
if(c.innerHTML){
c.innerHTML=null;
}
if(c.outerHTML){
this._setOuterHTMLToEmptyString(c);
}
this._purge(c);
obj.removeChild(c);
delete c;
}
},_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]);
}
}
},_deleteDOMObject:function(obj){
this._purge(obj);
this._nukeChildren(obj);
if(obj.innerHTML){
obj.innerHTML=null;
}
if(obj.outerHTML){
this._setOuterHTMLToEmptyString(obj);
}
if(obj.parentNode){
obj.parentNode.removeChild(obj);
}
return null;
},_setOuterHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="safari"){
obj.outerHTML="";
}
}};
MQA.browser=MQA.Util.getBrowserInfo();

MQA.Graphics={setDrawMethod:function(){
var _1=MQA.browser.name;
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;
}
}
},normalizeColor:function(c){
function toHex(n){
var _4=n.toString(16).toUpperCase();
return (_4.length==1?"0"+_4:_4);
};
var p=new Object();
if(c.constructor.toString().indexOf("Array")!=-1){
p.rgb=c;
p.hex="#"+toHex(c[0])+toHex(c[1])+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;
},createSurface:function(_6,_7,_8){
var _9;
switch(this.drawMethod){
case "svg":
_9=document.createElementNS("http://www.w3.org/2000/svg","svg");
_9.setAttribute("height",_8);
_9.setAttribute("width",_7);
_9.setAttribute("xmlns","http://www.w3.org/2000/svg");
_9.setAttribute("version","1.1");
_9.setAttribute("viewBox","0 0 "+_7+" "+_8);
var _a=document.createElement("defs");
_9.appendChild(_a);
break;
case "vml":
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var _b=document.createStyleSheet();
_b.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;");
_9=document.createElement("v:group");
_9.setAttribute("coordsize",_7+" "+_8);
_9.setAttribute("coordorigin","0 0");
_9.style.position="absolute";
_9.style.width=_7+"px";
_9.style.height=_8+"px";
_9.style.visibility="visible";
break;
case "canvas":
_9=document.createElement("div");
_9.style.left="0px";
_9.style.top="0px";
_9.style.position="relative";
_9.style.width=_7+"px";
_9.style.height=_8+"px";
_9.style.visibility="visible";
break;
}
this.surfaceWidth=_7;
this.surfaceHeight=_8;
_6.appendChild(_9);
return _9;
},remove:function(_c,_d){
_c.removeChild(_d);
return null;
},drawPolygon:function(_e,_f,_10,_11,_12,_13,_14){
var bc=this.normalizeColor(_f);
var fc=this.normalizeColor(_12);
var s="M "+_e[0].x+" "+_e[0].y;
if(this.drawMethod=="svg"){
for(var i=1;i<_e.length;i++){
s+=" L "+_e[i].x+" "+_e[i].y;
}
s+=" z";
}else{
s+=" l ";
for(var i=1;i<_e.length;i++){
s+=_e[i].x+","+_e[i].y+" ";
}
s+=" x e";
}
switch(this.drawMethod){
case "svg":
var _19=document.createElementNS("http://www.w3.org/2000/svg","path");
_19.setAttribute("d",s);
_19.setAttribute("stroke",bc.hex);
_19.setAttribute("stroke-width",_11);
_19.setAttribute("stroke-opacity",_10);
_19.setAttribute("fill",fc.hex);
_19.setAttribute("fill-opacity",_13);
break;
case "vml":
var _19=document.createElement("v:shape");
_19.style.width=this.surfaceWidth+"px";
_19.style.height=this.surfaceHeight+"px";
_19.style.position="absolute";
_19.setAttribute("stroked","true");
_19.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_19.setAttribute("coordorigin","0 0");
_19.fill=document.createElement("v:fill");
_19.fill.setAttribute("opacity",_13);
_19.fill.setAttribute("color",fc.hex);
_19.appendChild(_19.fill);
_19.stroke=document.createElement("v:stroke");
_19.stroke.setAttribute("miterlimit","8.0");
_19.stroke.setAttribute("joinstyle","miter");
_19.stroke.setAttribute("endcap","flat");
_19.stroke.setAttribute("opacity",_10);
_19.stroke.setAttribute("color",bc.hex);
_19.stroke.setAttribute("weight",_11);
_19.appendChild(_19.stroke);
_19.path=document.createElement("v:path");
_19.path.setAttribute("v",s);
_19.appendChild(_19.path);
break;
case "canvas":
var _19=document.createElement("canvas");
_19.setAttribute("width",this.surfaceWidth);
_19.setAttribute("height",this.surfaceHeight);
_19.style.position="absolute";
_19.style.left="0px";
_19.style.top="0px";
var ctx=_19.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_13+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_10+")";
ctx.lineWidth=_11;
ctx.beginPath();
ctx.moveTo(_e[0].x,_e[0].y);
for(var i=1;i<_e.length;i++){
ctx.lineTo(_e[i].x,_e[i].y);
}
ctx.closePath();
ctx.fill();
ctx.stroke();
break;
}
_19.style.display=(_14?"inline":"none");
return _19;
},drawRectangle:function(_1b,_1c,_1d,_1e,_1f,_20,_21){
var bc=this.normalizeColor(_1c);
var fc=this.normalizeColor(_1f);
switch(this.drawMethod){
case "svg":
_24=document.createElementNS("http://www.w3.org/2000/svg","rect");
_24.setAttribute("x",_1b[0].x);
_24.setAttribute("y",_1b[0].y);
_24.setAttribute("width",_1b[1].x-_1b[0].x);
_24.setAttribute("height",_1b[1].y-_1b[0].y);
_24.setAttribute("stroke",bc.hex);
_24.setAttribute("stroke-width",_1e);
_24.setAttribute("stroke-opacity",_1d);
_24.setAttribute("fill",fc.hex);
_24.setAttribute("fill-opacity",_20);
break;
case "vml":
_24=document.createElement("v:rect");
_24.style.left=_1b[0].x+"px";
_24.style.top=_1b[0].y+"px";
_24.style.width=_1b[1].x-_1b[0].x+"px";
_24.style.height=_1b[1].y-_1b[0].y+"px";
_24.style.position="absolute";
_24.setAttribute("stroked","true");
_24.fill=document.createElement("v:fill");
_24.fill.setAttribute("opacity",_20);
_24.fill.setAttribute("color",fc.hex);
_24.appendChild(_24.fill);
_24.stroke=document.createElement("v:stroke");
_24.stroke.setAttribute("miterlimit","8.0");
_24.stroke.setAttribute("joinstyle","miter");
_24.stroke.setAttribute("endcap","flat");
_24.stroke.setAttribute("opacity",_1d);
_24.stroke.setAttribute("color",bc.hex);
_24.stroke.setAttribute("weight",_1e);
_24.appendChild(_24.stroke);
break;
case "canvas":
var _24=document.createElement("canvas");
_24.setAttribute("width",this.surfaceWidth);
_24.setAttribute("height",this.surfaceHeight);
_24.style.position="absolute";
_24.style.left="0px";
_24.style.top="0px";
var ctx=_24.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_20+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_1d+")";
ctx.lineWidth=_1e;
ctx.fillRect(_1b[0].x,_1b[0].y,_1b[1].x-_1b[0].x,_1b[1].y-_1b[0].y);
ctx.strokeRect(_1b[0].x,_1b[0].y,_1b[1].x-_1b[0].x,_1b[1].y-_1b[0].y);
break;
}
_24.style.display=(_21?"inline":"none");
return _24;
},drawEllipse:function(_26,_27,_28,_29,_2a,_2b,_2c){
var bc=this.normalizeColor(_27);
var fc=this.normalizeColor(_2a);
var _2f=_26[1].x-_26[0].x;
var _30=_26[1].y-_26[0].y;
var _31=parseInt(_2f/2);
var _32=parseInt(_30/2);
var _33=_26[1].x-_31;
var _34=_26[1].y-_32;
switch(this.drawMethod){
case "svg":
_35=document.createElementNS("http://www.w3.org/2000/svg","ellipse");
_35.setAttribute("cx",_33);
_35.setAttribute("cy",_34);
_35.setAttribute("rx",_31);
_35.setAttribute("ry",_32);
_35.setAttribute("stroke",bc.hex);
_35.setAttribute("stroke-width",_29);
_35.setAttribute("stroke-opacity",_28);
_35.setAttribute("fill",fc.hex);
_35.setAttribute("fill-opacity",_2b);
break;
case "vml":
_35=document.createElement("v:oval");
_35.style.left=_26[0].x+"px";
_35.style.top=_26[0].y+"px";
_35.style.width=_2f+"px";
_35.style.height=_30+"px";
_35.style.position="absolute";
_35.setAttribute("stroked","true");
_35.fill=document.createElement("v:fill");
_35.fill.setAttribute("opacity",_2b);
_35.fill.setAttribute("color",fc.hex);
_35.appendChild(_35.fill);
_35.stroke=document.createElement("v:stroke");
_35.stroke.setAttribute("miterlimit","8.0");
_35.stroke.setAttribute("joinstyle","miter");
_35.stroke.setAttribute("endcap","flat");
_35.stroke.setAttribute("opacity",_28);
_35.stroke.setAttribute("color",bc.hex);
_35.stroke.setAttribute("weight",_29);
_35.appendChild(_35.stroke);
break;
case "canvas":
var _35=document.createElement("canvas");
_35.setAttribute("width",this.surfaceWidth);
_35.setAttribute("height",this.surfaceHeight);
_35.style.position="absolute";
_35.style.left="0px";
_35.style.top="0px";
var ctx=_35.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_2b+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_28+")";
ctx.lineWidth=_29;
if((_26[1].x-_26[0].x)!=(_26[1].y-_26[0].y)){
var _37=Math.round((_26[1].y-_26[0].y)/4);
var _38=Math.round((_26[1].x-_26[0].x)/4);
ctx.moveTo(_26[0].x,_26[0].y+(2*_37));
ctx.bezierCurveTo(_26[0].x,_26[0].y+_37,_26[0].x+_38,_26[0].y,_26[0].x+(2*_38),_26[0].y);
ctx.bezierCurveTo(_26[0].x+(3*_38),_26[0].y,_26[1].x,_26[0].y+_37,_26[1].x,_26[0].y+(2*_37));
ctx.bezierCurveTo(_26[1].x,_26[1].y-_37,_26[1].x-_38,_26[1].y,_26[0].x+(2*_38),_26[1].y);
ctx.bezierCurveTo(_26[0].x+_38,_26[1].y,_26[0].x,_26[1].y-_37,_26[0].x,_26[0].y+(2*_37));
}else{
var _39=_26[0].x+Math.round((_26[1].x-_26[0].x)/2);
var _3a=_26[0].y+Math.round((_26[1].y-_26[0].y)/2);
ctx.arc(_39,_3a,Math.round((_26[1].x-_26[0].x)/2),0,360,false);
}
ctx.fill();
ctx.stroke();
break;
}
_35.style.display=(_2c?"inline":"none");
return _35;
},drawLine:function(_3b,_3c,_3d,_3e,_3f){
var bc=this.normalizeColor(_3c);
var s="";
for(var i=0;i<_3b.length;i++){
s+=_3b[i].x+","+_3b[i].y+" ";
}
switch(this.drawMethod){
case "svg":
_43=document.createElementNS("http://www.w3.org/2000/svg","polyline");
_43.setAttribute("points",s);
_43.setAttribute("stroke",bc.hex);
_43.setAttribute("stroke-width",_3e);
_43.setAttribute("stroke-opacity",_3d);
_43.setAttribute("fill","none");
break;
case "vml":
_43=document.createElement("v:polyline");
_43.style.height=this.surfaceWidth+"px";
_43.style.width=this.surfaceHeight+"px";
_43.style.position="absolute";
_43.setAttribute("stroked","true");
_43.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_43.setAttribute("points",s);
_43.setAttribute("fill","false");
_43.fill=document.createElement("v:fill");
_43.fill.setAttribute("opacity",0);
_43.appendChild(_43.fill);
_43.stroke=document.createElement("v:stroke");
_43.stroke.setAttribute("miterlimit","8.0");
_43.stroke.setAttribute("joinstyle","miter");
_43.stroke.setAttribute("endcap","flat");
_43.stroke.setAttribute("opacity",_3d);
_43.stroke.setAttribute("color",bc.hex);
_43.stroke.setAttribute("weight",_3e);
_43.appendChild(_43.stroke);
break;
case "canvas":
var _43=document.createElement("canvas");
_43.setAttribute("width",this.surfaceWidth);
_43.setAttribute("height",this.surfaceHeight);
_43.style.position="absolute";
_43.style.left="0px";
_43.style.top="0px";
var ctx=_43.getContext("2d");
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_3d+")";
ctx.lineWidth=_3e;
ctx.beginPath();
ctx.moveTo(_3b[0].x,_3b[0].y);
for(var i=1;i<_3b.length;i++){
ctx.lineTo(_3b[i].x,_3b[i].y);
}
ctx.stroke();
break;
}
_43.style.display=(_3f?"inline":"none");
return _43;
}};
MQA.Graphics.setDrawMethod();

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.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];
this.poiClose=_3;
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(this.poiClose,"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);
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.poiClose,"click",this.eClickClose);
MQA._prEvent.stopObserving(this.popup,"click",this.eClick);
this.map=null;
this.opener=null;
this.content=null;
this.infoWindowSrc="";
this.popup.oncontextmenu=null;
this.popup.content=null;
this.popup.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.popup);
MQA.Util._deleteDOMObject(this.popup);
this.popup=null;
this.poiClose=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.srcObject=this;
_e.cancelBubble=true;
};
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(_f){
this.show();
this.opener=_f;
};
MQA.InfoWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
this.popup.style.display="block";
var _10=this.offset.y;
var _11=this.popup.offsetHeight+3;
var _12=this.offset.x;
var _13=25;
this.popup.style.top=(_10-_11)+"px";
this.popup.style.left=(_12-_13)+"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(_14,_15,_16,_17){
if(_14){
this.point=_14;
}
if(_15){
this.title=_15;
}
if(_16){
this.content=_16;
}
this.offset=new MQA.PointXY(0,0);
if(_17){
this.offset=_17;
}
this.popup.style.position="absolute";
this.resize(false);
};
MQA.InfoWindow.prototype.getMaxWidth=function(){
return this.maxwidth;
};
MQA.InfoWindow.prototype.setMaxWidth=function(_18){
_18=parseInt(_18);
if(isNaN(_18)){
return;
}
this.maxwidth=(_18>this.map.width-50)?(this.map.width-50):(_18<this.minwidth)?this.minwidth:_18;
};
MQA.InfoWindow.prototype.getMinWidth=function(){
return this.minwidth;
};
MQA.InfoWindow.prototype.setMinWidth=function(_19){
_19=parseInt(_19);
if(isNaN(_19)){
return;
}
this.minwidth=(_19<60)?60:(_19>this.maxwidth)?this.maxwidth:_19;
};
MQA.InfoWindow.prototype.getContentWidth=function(){
return this.contentwidth;
};
MQA.InfoWindow.prototype.setContentWidth=function(_1a){
this.contentwidth=_1a;
};
MQA.InfoWindow.prototype.getTitleBackgroundColor=function(){
return this.titlebackgroundcolor;
};
MQA.InfoWindow.prototype.setTitleBackgroundColor=function(_1b){
this.titlebackgroundcolor=_1b;
};
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(_1c){
var _1d=this.getCollisionInfo(_1c);
if(_1d.panX!=0||_1d.panY!=0){
this.map.slideMapByOffset(new MQA.PointXY(_1d.panX,_1d.panY));
}
};
MQA.InfoWindow.prototype.getCollisionInfo=function(_1e){
var _1f=this.map.parent;
var _20={panX:0,panY:0};
var _21=MQA.Util.getParentOffset(_1f);
var _22=MQA.Util.getParentOffset(_1e);
var _23=10;
_22.x=_22.x-_21.x-_23;
_22.y=_22.y-_21.y-_23;
var _24={width:37,height:300};
var _25={width:139,height:15};
var _26=(_22.x<_24.width&&_22.y<_24.height+_23)?_24.width:0;
var _27=(_22.x+_1e.clientWidth>_1f.clientWidth-_25.width&&_22.y<_25.height+_23)?_25.height:0;
if(_1e.clientWidth>0&&_1e.clientHeight>0){
if(_22.x<_26){
_20.panX=Math.abs(_22.x-_26);
}else{
if(_22.x+_23+_1e.clientWidth>_1f.clientWidth){
_20.panX=-1*(_1e.clientWidth+_22.x+_23-_1f.clientWidth);
}
}
if(_22.y<_27){
_20.panY=Math.abs(_22.y-_27);
}else{
if(_22.y+_1e.clientHeight>_1f.clientHeight){
_20.panY=_1f.clientHeight-_22.y-_1e.clientHeight;
}
}
}
return _20;
};
MQA.InfoWindow.prototype.getOpener=function(){
return this.opener;
};
MQA.InfoWindow.prototype.resize=function(_28){
var _29=this.popup.childNodes[0];
var _2a=this.popup.childNodes[1];
var _2b=this.popup.childNodes[2];
var _2c=this.popup.childNodes[3];
var _2d=this.popup.childNodes[4];
var _2e=this.popup.childNodes[5];
var _2f=this.popup.childNodes[6];
var _30="";
if(this.getTitleBackgroundColor()){
_30=" style=background:"+this.getTitleBackgroundColor();
}
_2f.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 _31="";
if(_28){
if(this.popup.content){
_31=this.popup.content.innerHTML;
}
}else{
_31="<div class='mqpoiheading'"+_30+" title='"+MQA.Util.stripHTMLTags(this.title.innerHTML)+"'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";
}
this.popup.content.innerHTML=_31;
var _32=this.popup.content.childNodes[0];
var _33=this.popup.content.childNodes[1];
_32.style.display="none";
_33.style.whiteSpace="nowrap";
_33.style.overflow="visible";
_33.style.width="auto";
_33.style.height="auto";
var _34=this.popup.content.offsetWidth+35+2;
var _35=(_34>this.maxwidth)?18:0;
_34=(_34>this.maxwidth)?this.maxwidth:(_34<this.minwidth)?this.minwidth:_34;
var _36=_34-35;
_33.style.width=_36+"px";
_32.style.display="";
_33.style.whiteSpace="";
var _37=this.popup.content.offsetHeight+_35+30+2;
var _38=(_37>this.maxheight)?18:0;
_36+=_38;
_34+=_38;
_32.style.width=(_36-18)+"px";
var _39=_32.childNodes[0];
if(typeof (_39.tagName)=="undefined"){
_32.innerHTML="<div>"+this.title.innerHTML+"</div>";
_39=_32.childNodes[0];
}
_39.style.display="inline";
if((_39.offsetWidth>(_36-18))&&((_36-18)>25)){
var _3a=MQA.Util.stripHTMLTags(this.title.innerHTML);
var _3b=_39.innerHTML;
for(var i=_3a.length;(_39.offsetWidth>=(_36-18)&&i>0);i--){
_39.innerHTML=MQA.Util.getHTMLSubstring(_3b,i,"&nbsp;...");
}
}
_37=this.popup.content.offsetHeight+_35+30+2;
_37=(_37>this.maxheight)?this.maxheight:_37;
var _3d=_37-30+2;
var _3e=Math.ceil(_36/600);
var _3f=_36%600;
var _40=Math.ceil(_3d/600);
var _41=_3d%600;
var _42,_43,_44,_45;
var _46,_47;
var _48,_49;
var _4a,_4b,_4c,_4d;
var _4e=600;
var _4f=600;
for(var i=1;i<=_40;i++){
for(var j=1;j<=_3e;j++){
if(i==1&&j==1){
continue;
}
_42=(j==_3e&&_3f!=0)?_3f:_4e;
_43=(i==_40&&_41!=0)?_41:_4f;
_46=(j==1)?15:0;
_47=(i==1)?15:0;
_48=(i==1)?0:15;
_49=(j==1)?0:15;
_4a=(-1*_49);
_4b=(-1*_48);
_44=(_42+_46);
_45=(_43+_47);
_4c=(((j-1)*_4e)+_49);
_4d=(((i-1)*_4f)+_48);
this.createFillerDiv(_4a,_4b,_44,_45,_4c,_4d);
if(i==1){
_4a=-15;
_4b=-630;
_44=(_42+_46);
_45=15;
_4c=(((j-1)*_4e)+_49);
_4d=(_3d+15);
this.createFillerDiv(_4a,_4b,_44,_45,_4c,_4d);
}
}
if(i>1){
_4a=-630;
_4b=-15;
_44=20;
_45=(_43+_47);
_4c=(_36+15);
_4d=(((i-1)*_4f)+_48);
this.createFillerDiv(_4a,_4b,_44,_45,_4c,_4d);
}
}
var _51=(_36>_4e)?_4e:_36;
var _52=(_3d>_4f)?_4f:_3d;
this.popup.style.width=(_34)+"px";
this.popup.style.height=(_37)+"px";
this.popup.content.style.width=_36+"px";
this.popup.content.style.height=_3d+"px";
_29.style.left=(_34-38)+"px";
_29.style.top="12px";
_32.style.width=(_36-18)+"px";
_33.style.width=_36+"px";
_33.style.height=(_3d-_32.offsetHeight-5)+"px";
_33.style.overflow="auto";
_2a.style.width=_51+15+"px";
_2a.style.height=_52+15+"px";
_2b.style.left=_36+15+"px";
_2b.style.height=_52+15+"px";
_2c.style.top=_3d+15+"px";
_2c.style.width=_51+15+"px";
_2d.style.top=_3d+15+"px";
_2d.style.left=_36+15+"px";
_2e.style.left="14px";
_2e.style.top=_3d+15+"px";
if(_28){
this.popup.style.visibility="hidden";
this.show();
}
};
MQA.InfoWindow.prototype.createFillerDiv=function(_53,_54,_55,_56,_57,_58){
var _59=this.popup.childNodes[6];
var _5a=document.createElement("div");
_5a.style.position="absolute";
_5a.style.overflow="hidden";
var str="<div style='width:650px;height:685px;'></div>";
_5a.innerHTML=str;
_59.appendChild(_5a);
if((MQA.browser.name=="msie")&&(parseFloat(MQA.browser.version)<7)){
_5a.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_5a.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
_5a.childNodes[0].style.marginLeft=_53+"px";
_5a.childNodes[0].style.marginTop=_54+"px";
_5a.style.width=_55+"px";
_5a.style.height=_56+"px";
_5a.style.left=_57+"px";
_5a.style.top=_58+"px";
};
MQA.InfoWindow.prototype.setPopupContentOverflow=function(_5c){
if(_5c&&(MQA.browser.name=="firefox")&&this.popup.content.childNodes[1]){
var _5d=this.popup.content.childNodes[1].scrollLeft;
var top=this.popup.content.childNodes[1].scrollTop;
this.popup.content.childNodes[1].style.overflow=_5c;
this.popup.content.childNodes[1].scrollLeft=_5d;
this.popup.content.childNodes[1].scrollTop=top;
}
};


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.Tile=function(_7,_8,_9,_a,X,Y,_d,_e,_f){
this._dth=MQA._prEvent.addDtor(this,"dispose");
this.parent=_7;
this.div=_8;
this.size=_f;
this.lt=_9;
this.tp=_a;
var me=this;
if(this.parent.showMap){
this.MQMAP=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQMAP.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQMAP.image.onload=MQA._prEvent.hitch(this,"showingMapTile");
}else{
this.MQMAP.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.mapdiv.appendChild(this.MQMAP.image);
}
if(this.parent.showSat){
this.MQSAT=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQSAT.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQSAT.image.onload=MQA._prEvent.hitch(this,"showingSatTile");
}else{
this.MQSAT.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.satdiv.appendChild(this.MQSAT.image);
}
if(this.parent.showHyb){
this.MQHYB=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQHYB.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQHYB.image.onload=MQA._prEvent.hitch(this,"showingHybTile");
}else{
this.MQHYB.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.hybdiv.appendChild(this.MQHYB.image);
}
this.updateTile(_9,_a,X,Y,_d,_e);
};
MQA.Tile.prototype={dispose:function(){
MQA._prEvent.delDtor(this._dth);
this.imageurl=null;
this.div=null;
this.parent=null;
if(this.MQMAP){
this.MQMAP.image.onload=MQA._prEvent.emptyFunction;
MQA.Util._setOuterHTMLToEmptyString(this.MQMAP.image);
MQA.Util._deleteDOMObject(this.MQMAP.image);
this.MQMAP.image=null;
this.MQMAP=null;
}
if(this.MQSAT){
this.MQSAT.image.onload=MQA._prEvent.emptyFunction;
MQA.Util._setOuterHTMLToEmptyString(this.MQSAT.image);
MQA.Util._deleteDOMObject(this.MQSAT.image);
this.MQSAT.image=null;
this.MQSAT=null;
}
if(this.MQHYB){
this.MQHYB.image.onload=MQA._prEvent.emptyFunction;
MQA.Util._setOuterHTMLToEmptyString(this.MQHYB.image);
MQA.Util._deleteDOMObject(this.MQHYB.image);
this.MQHYB.image=null;
this.MQHYB=null;
}
},updateTile:function(_11,TOP,X,Y,_15,_16){
var _17=parseInt(X/1000);
var _18=parseInt(Y/1000);
this.lt=_11;
this.tp=TOP;
this.x=X;
this.y=Y;
while(X<0){
X+=MQA.MODS[_16];
}
while(X>=MQA.MODS[_16]){
X-=MQA.MODS[_16];
}
_17=parseInt(X/1000);
_18=parseInt(Y/1000);
if(this.parent.showMap){
this.imageurl="http://"+MAPSERVER[X%MAPSERVER.length]+"/map/Scale"+_15+"/"+_18+"/"+(Y-_18*1000)+"/"+_17+"/"+(X-_17*1000)+".gif";
this.MQMAP.image.src=this.imageurl;
this.MQMAP.image.lt=this.lt;
this.MQMAP.image.tp=this.tp;
this.MQMAP.image.style.left=MQA.Util.asPix(this.lt);
this.MQMAP.image.style.top=MQA.Util.asPix(this.tp);
}
if(this.parent.showSat){
this.imageurl="http://"+SATSERVER[X%SATSERVER.length]+"/sat/Scale"+_15+"/"+_18+"/"+(Y-_18*1000)+"/"+_17+"/"+(X-_17*1000)+".jpg";
this.MQSAT.image.src=this.imageurl;
this.MQSAT.image.lt=this.lt;
this.MQSAT.image.tp=this.tp;
this.MQSAT.image.style.left=MQA.Util.asPix(this.lt);
this.MQSAT.image.style.top=MQA.Util.asPix(this.tp);
}
if(this.parent.showHyb){
this.imageurl="http://"+HYBSERVER[X%HYBSERVER.length]+"/hyb/Scale"+_15+"/"+_18+"/"+(Y-_18*1000)+"/"+_17+"/"+(X-_17*1000)+".gif";
this.MQHYB.image.src=this.imageurl;
this.MQHYB.image.lt=this.lt;
this.MQHYB.image.tp=this.tp;
this.MQHYB.image.style.left=MQA.Util.asPix(this.lt);
this.MQHYB.image.style.top=MQA.Util.asPix(this.tp);
}
},loadingTile:function(){
var me=this;
if(this.parent.showMap){
if(!this.MQMAP){
this.MQMAP=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQMAP.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQMAP.image.onload=MQA._prEvent.hitch(this,"showingMapTile");
}else{
this.MQMAP.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.mapdiv.appendChild(this.MQMAP.image);
}else{
if(!MQA.SAFARI_BROWSER){
this.MQMAP.image.style.visibility="hidden";
}else{
this.MQMAP.image.src=MQA.RESOURCES+"loading.gif";
}
}
}
if(this.parent.showSat){
if(!this.MQSAT){
this.MQSAT=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQSAT.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQSAT.image.onload=MQA._prEvent.hitch(this,"showingSatTile");
}else{
this.MQSAT.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.satdiv.appendChild(this.MQSAT.image);
}else{
if(!MQA.SAFARI_BROWSER){
this.MQSAT.image.style.visibility="hidden";
}else{
this.MQSAT.image.src=MQA.RESOURCES+"loading.gif";
}
}
}
if(this.parent.showHyb){
if(!this.MQHYB){
this.MQHYB=new MQA.Image();
if(!MQA.SAFARI_BROWSER){
this.MQHYB.image=MQA.Util.createImage("",this.lt,this.tp,this.size,this.size,0);
this.MQHYB.image.onload=MQA._prEvent.hitch(this,"showingHybTile");
}else{
this.MQHYB.image=MQA.Util.createImage(MQA.RESOURCES+"loading.gif",this.lt,this.tp,this.size,this.size,0);
}
this.div.hybdiv.appendChild(this.MQHYB.image);
}else{
if(!MQA.SAFARI_BROWSER){
this.MQHYB.image.style.visibility="hidden";
}else{
this.MQHYB.image.src=MQA.RESOURCES+"loading.gif";
}
}
}
},showingMapTile:function(){
if(this.parent.showMap){
this.MQMAP.image.style.visibility="visible";
}
},showingSatTile:function(){
if(this.parent.showSat){
this.MQSAT.image.style.visibility="visible";
}
},showingHybTile:function(){
if(this.parent.showHyb){
this.MQHYB.image.style.visibility="visible";
}
}};
MQA.TKObjectCollection=function(max){
var _1b=new Array();
var _1c=max||-1;
this.add=function(obj){
if(_1c!=-1&&_1b.length==max){
return;
}
_1b.push(obj);
return _1b.length;
};
this.getSize=function(){
return _1b.length;
};
this.getAt=function(_1e){
return _1b[_1e];
};
this.remove=function(_1f){
return _1b.splice(_1f,1);
};
this.removeAll=function(){
_1b=null;
_1b=new Array();
};
this.contains=function(_20){
for(var _21=0,x=this.getSize();_21<x;_21++){
if(_1b[_21]==_20){
return true;
}
}
return false;
};
this.getById=function(_23){
for(var _24=0,x=this.getSize();_24<x;_24++){
if(_1b[_24].getId()==_23){
return _1b[_24];
}
}
return null;
};
this.removeItem=function(_26){
for(i=0;i<_1b.length;i++){
if(_1b[i]==_26){
this.remove(i);
i=_1b.length;
}
}
};
};
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(_27,_28){
if(_27==null){
_27=MQA.MapCorner.TOP_LEFT;
}
if(_28==null){
_28=new MQA.Size(0,0);
}
this.mapCorner=_27;
this.offsetSize=new MQA.Size(_28.getWidth(),_28.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(_29,_2a){
if(_29==null){
_29=new MQA.LatLng(0,0);
}
if(_2a==null){
_2a=new MQA.LatLng(0,0);
}
this.ul=new MQA.PointLL(_29.lat,_29.lng);
this.lr=new MQA.PointLL(_2a.lat,_2a.lng);
};
MQA.RectLL.prototype.setLowerRight=function(_2b){
this.lr=new MQA.LatLng(_2b.getLatitude(),_2b.getLongitude());
};
MQA.RectLL.prototype.setUpperLeft=function(_2c){
this.ul=new MQA.LatLng(_2c.getLatitude(),_2c.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(_2d){
for(var i=1;i<_2d.length;i++){
var _2f=_2d[i];
this.extend(_2f);
}
};
MQA.RectLL.prototype.extend=function(_30){
if(_30.lat>this.ul.lat){
this.ul.lat=_30.lat;
}
if(_30.lng<this.ul.lng){
this.ul.lng=_30.lng;
}
if(_30.lat<this.lr.lat){
this.lr.lat=_30.lat;
}
if(_30.lng>this.lr.lng){
this.lr.lng=_30.lng;
}
};
MQA.RectXY=function(_31,_32){
if(_31==null){
_31=new MQA.Point(0,0);
}
if(_32==null){
_32=new MQA.Point(0,0);
}
this.ul=new MQA.PointXY(_31.x,_31.y);
this.lr=new MQA.PointXY(_32.x,_32.y);
};
MQA.RectXY.prototype.setUpperLeft=function(_33){
this.ul=new MQA.Point(_33.getX(),_33.getY());
};
MQA.RectXY.prototype.setLowerRight=function(_34){
this.lr=new MQA.Point(_34.getX(),_34.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(_39,_3a,_3b,_3c,vIn,_3e){
var _3f=new Array();
var D=(_3e?3:2);
if(vIn.length<D){
return _3f;
}
_3f=clipAgainstEdge(0,vIn,_3e);
var _41=clipAgainstEdge(1,_3f,_3e);
var _42=clipAgainstEdge(2,_41,_3e);
var _43=clipAgainstEdge(3,_42,_3e);
return _43;
function clipAgainstEdge(_44,_45,_46){
var v1;
var _48,_49;
var _4a;
var _4b=new Array();
for(var v2=0;v2<_45.length;v2++){
if(_3e){
v1=(v2==0?_45.length-1:v2-1);
}else{
v1=(v2==0?0:v2-1);
}
_48=inside(_44,_45[v1]);
_49=inside(_44,_45[v2]);
if(_48&&_49){
_4b.push(_45[v2]);
}else{
if(!_48&&_49){
_4a=clipIntersection(_44,_45[v2],_45[v1]);
_4b.push(_4a);
_4b.push(_45[v2]);
}else{
if(_48&&!_49){
_4a=clipIntersection(_44,_45[v1],_45[v2]);
_4b.push(_4a);
}
}
}
}
return _4b;
};
function clipIntersection(_4d,inv,_4f){
var x1=inv.x;
var y1=inv.y;
var x2=_4f.x;
var y2=_4f.y;
var AU=0;
var _55={x:0,y:0};
switch(_4d){
case 0:
var x3=_39;
var y3=_3b;
var x4=_39;
var y4=_3c;
break;
case 1:
var x3=_3a;
var y3=_3b;
var x4=_3a;
var y4=_3c;
break;
case 2:
var x3=_39;
var y3=_3c;
var x4=_3a;
var y4=_3c;
break;
case 3:
var x3=_39;
var y3=_3b;
var x4=_3a;
var y4=_3b;
break;
}
UA=(((x4-x3)*(y1-y3))-((y4-y3)*(x1-x3)))/(((y4-y3)*(x2-x1))-((x4-x3)*(y2-y1)));
_55.x=x1+(UA*(x2-x1));
_55.y=y1+(UA*(y2-y1));
return _55;
};
function inside(_5a,v){
switch(_5a){
case 0:
return (v.x>_39);
case 1:
return (v.x<_3a);
case 2:
return (v.y<_3c);
case 3:
return (v.y>_3b);
}
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(_5c){
this.bestFitRect=_5c;
},getBestFitRect:function(){
return this.bestFitRect;
},setBestFitMargin:function(_5d){
this.bestFitMargin=_5d;
},getBestFitMargin:function(){
return this.bestFitMargin;
},setKeepCenter:function(_5e){
this.keepCenter=_5e;
},isKeepCenter:function(){
return this.keepCenter;
},setMinZoom:function(_5f){
_5f=parseInt(_5f);
if(_5f<1||_5f>15){
this.minZoom=1;
}else{
this.minZoom=_5f;
}
if(this.minZoom>this.maxZoom){
this.minZoom=this.maxZoom;
}
},getMinZoom:function(){
return this.minZoom;
},setMaxZoom:function(_60){
_60=parseInt(_60);
if(_60<1||_60>16){
this.maxZoom=16;
}else{
this.maxZoom=_60;
}
if(this.maxZoom<this.minZoom){
this.maxZoom=this.minZoom;
}
},getMaxZoom:function(){
return this.maxZoom;
}};

MQA.InitOverlays=function(_1){
window.onload=_1;
};
MQA.ShapeOverlay=function(){
};
MQA.ShapeOverlay.prototype={map:null,key:"",color:"#000000",altColor:null,colorAlpha:"1",altColorAlpha:null,fillColor:"#000000",altFillColor:null,fillColorAlpha:"1",altFillColorAlpha:null,borderWidth:"3",altBorderWidth:null,altStateFlag:false,visible:true,className:"MQA.ShapeOverlay",shapePoints:null,shapePointsXY:0,shape:null,maxZoomLevel:16,minZoomLevel:1,adjustXY:function(_2){
_2.x=_2.x+(MQA.SURFACE_OFFSET);
_2.y=_2.y+(MQA.SURFACE_OFFSET);
return _2;
},setKey:function(_3){
this.key=_3;
},getKey:function(){
return this.key;
},setColor:function(_4){
this.color=_4;
if(this.shape&&!this.altStateFlag){
var _5=MQA.Graphics.normalizeColor(this.color);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_5.hex);
break;
case "vml":
this.shape.stroke.color=_5.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
},getColor:function(){
return this.color;
},setAltColor:function(_6){
this.altColor=_6;
if(this.shape&&this.altStateFlag){
var _7=MQA.Graphics.normalizeColor(this.altColor);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_7.hex);
break;
case "vml":
this.shape.stroke.color=_7.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
},getAltColor:function(){
if(this.altColor){
return this.altColor;
}else{
return this.color;
}
},setColorAlpha:function(_8){
this.colorAlpha=parseFloat(_8);
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",this.colorAlpha);
break;
case "vml":
this.shape.stroke.opacity=this.colorAlpha;
break;
case "canvas":
this.drawShape();
break;
}
}
},getColorAlpha:function(){
return this.colorAlpha;
},setAltColorAlpha:function(_9){
this.altColorAlpha=parseFloat(_9);
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",this.altColorAlpha);
break;
case "vml":
this.shape.stroke.opacity=this.altColorAlpha;
break;
case "canvas":
this.drawShape();
break;
}
}
},getAltColorAlpha:function(){
return (this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
},setFillColor:function(_a){
this.fillColor=_a;
if(this.shape&&!this.altStateFlag){
var _b=MQA.Graphics.normalizeColor(_a);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_b.hex);
break;
case "vml":
this.shape.fill.color=_b.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
},getFillColor:function(){
return [this.fillColor[0],this.fillColor[1],this.fillColor[2]];
},setAltFillColor:function(_c){
this.altFillColor=_c;
if(this.shape&&this.altStateFlag){
var _d=MQA.Graphics.normalizeColor(_c);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_d.hex);
break;
case "vml":
this.shape.fill.color=_d.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
},getAltFillColor:function(){
if(this.altFillColor!=null){
return [this.altFillColor[0],this.altFillColor[1],this.altFillColor[2]];
}else{
return [this.fillColor[0],this.fillColor[1],this.fillColor[2]];
}
},setFillColorAlpha:function(_e){
this.fillColorAlpha=parseFloat(_e);
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",this.fillColorAlpha);
break;
case "vml":
this.shape.fill.opacity=this.fillColorAlpha;
break;
case "canvas":
this.drawShape();
break;
}
}
},getFillColorAlpha:function(){
return this.fillColorAlpha;
},setAltFillColorAlpha:function(_f){
this.altFillColorAlpha=parseFloat(_f);
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",this.altFillColorAlpha);
break;
case "vml":
this.shape.fill.opacity=this.altFillColorAlpha;
break;
case "canvas":
this.drawShape();
break;
}
}
},getAltFillColorAlpha:function(){
return (this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
},setBorderWidth:function(_10){
this.borderWidth=_10;
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_10);
break;
case "vml":
this.shape.stroke.weight=_10;
break;
case "canvas":
this.drawShape();
break;
}
}
},getBorderWidth:function(){
return this.borderWidth;
},setAltBorderWidth:function(_11){
this.altBorderWidth=_11;
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_11);
break;
case "vml":
this.shape.stroke.weight=_11;
break;
case "canvas":
this.drawShape();
break;
}
}
},getAltBorderWidth:function(){
if(this.altBorderWidth!=null){
return this.altBorderWidth;
}else{
return this.borderWidth;
}
},setAltStateFlag:function(_12){
this.altStateFlag=_12;
if(this.shape){
var _13=this.getCurrentState();
_13.color=MQA.Graphics.normalizeColor(_13.color).hex;
_13.fillColor=MQA.Graphics.normalizeColor(_13.fillColor).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_13.color);
this.shape.setAttribute("stroke-opacity",_13.colorAlpha);
if(this.className!="LineOverlay"){
this.shape.setAttribute("fill",_13.fillColor);
this.shape.setAttribute("fill-opacity",_13.fillColorAlpha);
}
this.shape.setAttribute("stroke-width",_13.borderWidth);
break;
case "vml":
this.shape.stroke.color=_13.color;
this.shape.stroke.opacity=_13.colorAlpha;
if(this.className!="LineOverlay"){
this.shape.fill.color=_13.fillColor;
this.shape.fill.opacity=_13.fillColorAlpha;
}
this.shape.stroke.weight=_13.borderWidth;
break;
case "canvas":
this.drawShape();
break;
}
var _14=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_14.style.display=(_13.visible?"inline":"none");
}
},getAltStateFlag:function(){
return this.altStateFlag;
},setVisible:function(_15){
this.visible=_15;
if(this.shape){
var _16=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_16.style.display=(_15?"inline":"none");
}
},getVisible:function(){
return this.visible;
},setMaxZoomLevel:function(_17){
var _18=parseInt(_17);
if(isNaN(_18)){
return;
}
this.maxZoomLevel=(_18>16)?16:((_18<this.minZoomLevel)?this.minZoomLevel:_18);
this.redraw();
},getMaxZoomLevel:function(){
return this.maxZoomLevel;
},setMinZoomLevel:function(_19){
var _1a=parseInt(_19);
if(isNaN(_1a)){
return;
}
this.minZoomLevel=(_1a<1)?1:((_1a>this.maxZoomLevel)?this.maxZoomLevel:_1a);
this.redraw();
},getMinZoomLevel:function(){
return this.minZoomLevel;
},getClassName:function(){
return this.className;
},setShapePoints:function(_1b){
this.shapePointsXY=(arguments.length==2?arguments[1]:0);
if(this.shapePointsXY){
if(_1b.setLowerRight){
var _1c=new MQA.ObjectCollection();
_1c.add(new MQA.Point(_1b.ul.x,_1b.ul.y));
_1c.add(new MQA.Point(_1b.lr.x,_1b.lr.y));
_1b=_1c;
}
}else{
if(_1b.setLowerRight){
var _1c=new MQA.LatLngCollection();
_1c.add(new MQA.LatLng(_1b.ul.lat,_1b.ul.lng));
_1c.add(new MQA.LatLng(_1b.lr.lat,_1b.lr.lng));
_1b=_1c;
}
}
this.shapePoints=_1b;
if(this.shape){
this.drawShape();
}
},getShapePoints:function(){
return this.shapePoints;
},setAll:function(_1d){
if(typeof (_1d.shapePoints)!="undefined"){
this.setShapePoints(_1d.shapePoints);
}
if(typeof (_1d.key)!="undefined"){
this.setKey(_1d.key);
}
if(typeof (_1d.color)!="undefined"){
this.setColor(_1d.color);
}
if(typeof (_1d.altColor)!="undefined"){
this.setAltColor(_1d.altColor);
}
if(typeof (_1d.colorAlpha)!="undefined"){
this.setColorAlpha(_1d.colorAlpha);
}
if(typeof (_1d.altColorAlpha)!="undefined"){
this.setAltColorAlpha(_1d.altColorAlpha);
}
if(this.className!="MQLineOverlay"){
if(typeof (_1d.fillColor)!="undefined"){
this.setFillColor(_1d.fillColor);
}
if(typeof (_1d.altFillColor)!="undefined"){
this.setAltFillColor(_1d.altFillColor);
}
if(typeof (_1d.fillColorAlpha)!="undefined"){
this.setfillColorAlpha(_1d.fillColorAlpha);
}
if(typeof (_1d.altFillColorAlpha)!="undefined"){
this.setAltFillColorAlpha(_1d.altFillColorAlpha);
}
}
if(typeof (_1d.borderWidth)!="undefined"){
this.setBorderWidth(_1d.borderWidth);
}
if(typeof (_1d.altBorderWidth)!="undefined"){
this.setAltBorderWidth(_1d.altBorderWidth);
}
if(typeof (_1d.altStateFlag)!="undefined"){
this.setAltStateFlag(_1d.altStateFlag);
}
if(typeof (_1d.visible)!="undefined"){
this.setVisible(_1d.visible);
}
},getCurrentState:function(){
var _1e=new Object();
if(!this.altStateFlag){
_1e.color=this.color;
_1e.colorAlpha=this.colorAlpha;
_1e.fillColor=this.fillColor;
_1e.fillColorAlpha=this.fillColorAlpha;
_1e.borderWidth=this.borderWidth;
}else{
_1e.color=(this.altColor!=null?this.altColor:this.color);
_1e.colorAlpha=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
_1e.fillColor=(this.altFillColor!=null?this.altFillColor:this.fillColor);
_1e.fillColorAlpha=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
_1e.borderWidth=(this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
}
_1e.visible=this.visible;
_1e.url=this.url;
_1e.maxZoomLevel=this.maxZoomLevel;
_1e.minZoomLevel=this.minZoomLevel;
return _1e;
},clone:function(_1f){
this.key=_1f.key;
this.color=_1f.color;
this.altColor=_1f.altColor;
this.colorAlpha=_1f.colorAlpha;
this.altColorAlpha=_1f.altColorAlpha;
this.fillColor=_1f.fillColor;
this.altFillColor=_1f.altFillColor;
this.fillColorAlpha=_1f.fillColorAlpha;
this.altFillColorAlpha=_1f.altFillColorAlpha;
this.borderWidth=_1f.borderWidth;
this.altBorderWidth=_1f.altBorderWidth;
this.altStateFlag=_1f.altStateFlag;
this.visible=_1f.visible;
this.maxZoomLevel=_1f.maxZoomLevel;
this.minZoomLevel=_1f.minZoomLevel;
this.shapePoints=_1f.shapePoints;
this.shape=null;
this.map=null;
},redraw:function(){
if(!this.map){
return;
}
this.drawShape();
},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);
},onDoubleClick:function(e){
var mqe=new MQA.Event(this.className+".doubleClick");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
},onMouseDown:function(e){
var mqe=new MQA.Event(this.className+".mouseDown");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mousedown",mqe);
},onMouseUp:function(e){
var mqe=new MQA.Event(this.className+".mouseUp");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseup",mqe);
},onMouseOver:function(e){
var mqe=new MQA.Event(this.className+".mouseOver");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseover",mqe);
MQA._prEvent.stop(e);
},onMouseOut:function(e){
var mqe=new MQA.Event(this.className+".mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
MQA._prEvent.stop(e);
},onRemoved:function(e){
var mqe=new MQA.Event(this.className+".removed");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"removed",mqe);
}};
MQA.RectangleOverlay=function(_2e){
MQA.ShapeOverlay.call(this);
this.className="MQA.RectangleOverlay";
if(_2e){
if(_2e.getClassName()==this.className){
this.clone(_2e);
}
}
};
MQA.RectangleOverlay.prototype=new MQA.ShapeOverlay();
MQA.RectangleOverlay.prototype.constructor=MQA.RectangleOverlay;
MQA.RectangleOverlay.prototype.drawShape=function(){
var xy1,xy2,_31,_32,_33,_34,_35,_36,_37;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this.adjustXY(xy1);
xy2=this.adjustXY(xy2);
_34=xy1.x;
_35=xy2.x;
_36=xy1.y;
_37=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_35;
xy2.x=_34;
}
if(xy1.y>xy2.y){
xy1.y=_37;
xy2.y=_36;
}
_33=this.getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_33.minZoomLevel)||(this.map.getZoomLevel()>_33.maxZoomLevel)){
return;
}
var _38=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _39=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>_38?_38:xy2.x);
xy2.y=(xy2.y>_39?_39:xy2.y);
_31=xy2.y-xy1.y;
_32=xy2.x-xy1.x;
_31=(_31>_39?_39:_31);
_32=(_32>_38?_38:_32);
if(!(_31<1||_32<1)){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawRectangle(p,_33.color,_33.colorAlpha,_33.borderWidth,_33.fillColor,_33.fillColorAlpha,_33.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
MQA._prEvent.observe(this.shape,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.shape,"dblclick",MQA._prEvent.EventCallback(this,"onDoubleClick"));
MQA._prEvent.observe(this.shape,"mousedown",MQA._prEvent.EventCallback(this,"onMouseDown"));
MQA._prEvent.observe(this.shape,"mouseup",MQA._prEvent.EventCallback(this,"onMouseUp"));
MQA._prEvent.observe(this.shape,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.shape,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
}
};
MQA.LineOverlay=function(_3b){
MQA.ShapeOverlay.call(this);
this.className="MQA.LineOverlay";
this.fillColorAlpha="0.0";
this.altFillColorAlpha="0.0";
if(_3b){
if(_3b.getClassName()==this.className){
this.clone(_3b);
}
}
};
MQA.LineOverlay.prototype=new MQA.ShapeOverlay();
MQA.LineOverlay.prototype.constructor=MQA.LineOverlay;
MQA.LineOverlay.prototype.drawShape=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 _40=this.getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_40.minZoomLevel)||(this.map.getZoomLevel()>_40.maxZoomLevel)){
return;
}
var _41=new Array();
if(MQA.Util.isOverLimit(xy)){
var _42=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _43=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_41=MQA.Clip(0,_42,0,_43,xy,false);
}else{
_41=xy;
}
if(_41.length){
this.shape=MQA.Graphics.drawLine(_41,_40.color,_40.colorAlpha,_40.borderWidth,_40.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
MQA._prEvent.observe(this.shape,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.shape,"dblclick",MQA._prEvent.EventCallback(this,"onDoubleClick"));
MQA._prEvent.observe(this.shape,"mousedown",MQA._prEvent.EventCallback(this,"onMouseDown"));
MQA._prEvent.observe(this.shape,"mouseup",MQA._prEvent.EventCallback(this,"onMouseUp"));
MQA._prEvent.observe(this.shape,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.shape,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
}
};
MQA.LineOverlay.prototype.setFillColor=function(){
};
MQA.LineOverlay.prototype.setAltFillColor=function(){
};
MQA.LineOverlay.prototype.setFillColorAlpha=function(){
};
MQA.LineOverlay.prototype.setAltFillColorAlpha=function(){
};
MQA.PolygonOverlay=function(_44){
MQA.ShapeOverlay.call(this);
this.className="MQA.PolygonOverlay";
if(_44){
if(_44.getClassName()==this.className){
this.clone(_44);
}
}
};
MQA.PolygonOverlay.prototype=new MQA.ShapeOverlay();
MQA.PolygonOverlay.prototype.constructor=MQA.PolygonOverlay;
MQA.PolygonOverlay.prototype.drawShape=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 _49=this.getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_49.minZoomLevel)||(this.map.getZoomLevel()>_49.maxZoomLevel)){
return;
}
var _4a=new Array();
if(MQA.Util.isOverLimit(xy)){
var _4b=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _4c=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_4a=MQA.Clip(0,_4b,0,_4c,xy,true);
}else{
_4a=xy;
}
if(_4a.length){
this.shape=MQA.Graphics.drawPolygon(_4a,_49.color,_49.colorAlpha,_49.borderWidth,_49.fillColor,_49.fillColorAlpha,_49.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
MQA._prEvent.observe(this.shape,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.shape,"dblclick",MQA._prEvent.EventCallback(this,"onDoubleClick"));
MQA._prEvent.observe(this.shape,"mousedown",MQA._prEvent.EventCallback(this,"onMouseDown"));
MQA._prEvent.observe(this.shape,"mouseup",MQA._prEvent.EventCallback(this,"onMouseUp"));
MQA._prEvent.observe(this.shape,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.shape,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
}
};
MQA.EllipseOverlay=function(_4d){
MQA.ShapeOverlay.call(this);
this.className="MQA.EllipseOverlay";
if(_4d){
if(_4d.getClassName()==this.className){
this.clone(_4d);
}
}
};
MQA.EllipseOverlay.prototype=new MQA.ShapeOverlay();
MQA.EllipseOverlay.prototype.constructor=MQA.EllipseOverlay;
MQA.EllipseOverlay.prototype.drawShape=function(){
var xy1,xy2,_50,_51,_52,_53,_54,_55,_56;
var _57,_58,_59,_5a;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this.adjustXY(xy1);
xy2=this.adjustXY(xy2);
_53=xy1.x;
_54=xy2.x;
_55=xy1.y;
_56=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_54;
xy2.x=_53;
}
if(xy1.y>xy2.y){
xy1.y=_56;
xy2.y=_55;
}
_57=Math.round((xy2.x-xy1.x)/2);
_58=Math.round((xy2.y-xy1.y)/2);
_59=xy1.x+_57;
_5a=xy1.y+_58;
var _5b=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _5c=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
var _5d=0;
if((xy1.x>_5b)||(xy2.x<0)||(xy1.y>_5c)||(xy2.y<0)){
_5d=1;
}
if(!_5d){
var x,y,c;
var _61=false;
x=0;
y=0;
_61=((x-_59)*(x-_59)/(_57*_57)+(y-_5a)*(y-_5a)/(_58*_58))<1;
if(_61){
x=_5b;
y=0;
_61=_61&&(((x-_59)*(x-_59)/(_57*_57)+(y-_5a)*(y-_5a)/(_58*_58))<1);
if(_61){
x=0;
y=_5c;
_61=_61&&(((x-_59)*(x-_59)/(_57*_57)+(y-_5a)*(y-_5a)/(_58*_58))<1);
if(_61){
x=_5b;
y=_5c;
_61=_61&&(((x-_59)*(x-_59)/(_57*_57)+(y-_5a)*(y-_5a)/(_58*_58))<1);
}
}
}
if(_61){
_5d=2;
}
}
if(!_5d){
if((_57*2)>32000||(_58*2)>32000){
_5d=3;
}
}
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;
}
switch(_5d){
case 0:
if(_57>1&&_58>1){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawEllipse(p,_52.color,_52.colorAlpha,_52.borderWidth,_52.fillColor,_52.fillColorAlpha,_52.visible);
this.map.surface.appendChild(this.shape);
}
break;
case 1:
break;
case 2:
this.shape=MQA.Graphics.drawRectangle(p,_52.color,_52.colorAlpha,_52.borderWidth,_52.fillColor,_52.fillColorAlpha,_52.visible);
this.map.surface.appendChild(this.shape);
break;
case 3:
break;
}
if(this.shape){
MQA._prEvent.observe(this.shape,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.shape,"dblclick",MQA._prEvent.EventCallback(this,"onDoubleClick"));
MQA._prEvent.observe(this.shape,"mousedown",MQA._prEvent.EventCallback(this,"onMouseDown"));
MQA._prEvent.observe(this.shape,"mouseup",MQA._prEvent.EventCallback(this,"onMouseUp"));
MQA._prEvent.observe(this.shape,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.shape,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
}
};
MQA.ImageOverlay=function(_63){
MQA.ShapeOverlay.call(this);
this.className="MQA.ImageOverlay";
this.url=null;
this.levels=null;
this.opacity=1;
if(_63){
if(_63.getClassName()==this.className){
this.clone(_63);
}
}
};
MQA.ImageOverlay.prototype=new MQA.ShapeOverlay();
MQA.ImageOverlay.prototype.constructor=MQA.ImageOverlay;
MQA.ImageOverlay.prototype.drawShape=function(){
var xy1,xy2,_66,_67,_68,_69,_6a,_6b,_6c,_6d,_6e,_6f,_70,_71;
_68=this.getCurrentState();
if(this.levels){
_6e=this.map.getZoomLevel();
_6f=17;
for(var i=0,j=this.levels.length;i<j;i++){
if(this.levels[i].zoomLevel==_6e){
_6d=this.levels[i].url;
break;
}else{
_70=Math.abs(this.levels[i].zoomLevel-_6e);
if(_70<_6f){
_6d=this.levels[i].url;
_6f=_70;
}
}
}
_68.url=_6d;
}else{
_68.url=this.url;
}
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this.adjustXY(xy1);
xy2=this.adjustXY(xy2);
_69=xy1.x;
_6a=xy2.x;
_6b=xy1.y;
_6c=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_6a;
xy2.x=_69;
}
if(xy1.y>xy2.y){
xy1.y=_6c;
xy2.y=_6b;
}
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.map.overlaydiv.removeChild(this.shape);
this.shape=null;
}
if((this.map.getZoomLevel()<_68.minZoomLevel)||(this.map.getZoomLevel()>_68.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";
}
}
_66=xy2.y-xy1.y;
_67=xy2.x-xy1.x;
if(!(_66<1||_67<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 _74=document.createElement("img");
_74.width=_67;
_74.height=_66;
_74.style.height=_66+"px";
_74.style.width=_67+"px";
_74.src=_68.url;
_74.UNSELECTABLE="on";
_74.MozUserSelect="none";
this.shape.appendChild(_74);
this.shape.firstChild.style.display=(_68.visible?"inline":"none");
this.setImageOpacity(this.opacity);
}
if(this.shape){
MQA._prEvent.observe(this.shape,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.shape,"dblclick",MQA._prEvent.EventCallback(this,"onDoubleClick"));
MQA._prEvent.observe(this.shape,"mousedown",MQA._prEvent.EventCallback(this,"onMouseDown"));
MQA._prEvent.observe(this.shape,"mouseup",MQA._prEvent.EventCallback(this,"onMouseUp"));
MQA._prEvent.observe(this.shape,"mouseover",MQA._prEvent.EventCallback(this,"onMouseOver"));
MQA._prEvent.observe(this.shape,"mouseout",MQA._prEvent.EventCallback(this,"onMouseOut"));
}
};
MQA.ImageOverlay.prototype.setImageURL=function(url){
if(this.levels==null){
this.url=url;
if(this.shape!=null){
this.drawShape();
}
}
};
MQA.ImageOverlay.prototype.getImageURL=function(){
return this.url;
};
MQA.ImageOverlayLevel=function(url,_77){
this.url=url;
this.zoomLevel=_77;
};
ImageOverlayLevel=MQA.ImageOverlayLevel;
MQA.ImageOverlay.prototype.setImageOverlayLevels=function(_78){
this.levels=_78;
if(this.shape!=null){
this.drawShape();
}
};
MQA.ImageOverlay.prototype.getImageOverlayLevels=function(){
return this.levels;
};
MQA.ImageOverlay.prototype.setImageOpacity=function(op){
this.opacity=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;
}
};
MQA.ImageOverlay.prototype.getImageOpacity=function(){
return this.opacity;
};
MQA.OverlayCollection=function(){
MQA.TKObjectCollection.call(this);
this.overlayCollectionName="default";
};
MQA.OverlayCollection.prototype=new MQA.TKObjectCollection();
MQA.OverlayCollection.prototype.constructor=MQA.OverlayCollection;
MQA.OverlayCollection.prototype.append=function(_7a){
var i;
for(i=0;i<_7a.getSize();i++){
this.add(_7a.getAt(i));
}
};
MQA.OverlayCollection.prototype.getName=function(){
return this.overlayCollectionName;
};
MQA.OverlayCollection.prototype.setName=function(_7c){
this.overlayCollectionName=_7c;
};

if(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5)){
MQA.Util._createImage("http://img.mqcdn.com/a/a",0,0,1,1,false);
}
MQA.PoiCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.PoiCollection.prototype=new MQA.TKObjectCollection();
MQA.PoiCollection.prototype.constructor=MQA.PoiCollection;
MQA.PoiCollection.prototype.getBoundingRect=function(){
if(this.getSize()==0){
return null;
}
var _1=new MQA.LatLng(0,0);
var _2=new MQA.LatLng(0,0);
for(i=0;i<this.getSize();i++){
if(i==0){
_1.lat=this.getAt(i).element.ll.lat;
_1.lng=this.getAt(i).element.ll.lng;
_2.lat=this.getAt(i).element.ll.lat;
_2.lng=this.getAt(i).element.ll.lng;
}else{
if(this.getAt(i).element.ll.lat>_1.lat){
_1.lat=this.getAt(i).element.ll.lat;
}
if(this.getAt(i).element.ll.lat<_2.lat){
_2.lat=this.getAt(i).element.ll.lat;
}
if(this.getAt(i).element.ll.lng<_1.lng){
_1.lng=this.getAt(i).element.ll.lng;
}
if(this.getAt(i).element.ll.lng>_2.lng){
_2.lng=this.getAt(i).element.ll.lng;
}
}
}
return new MQA.RectLL(_1,_2);
};
MQA.PoiCollection.prototype.append=function(_3){
for(var i=0;i<_3.getSize();i++){
this.add(_3.getAt(i));
}
};
MQA.MapIcon=function(_5){
this.parentPoi=null;
this.element=document.createElement("div");
this.element.style.position="absolute";
this.element.style.display="block";
this.element.style.zIndex=0;
this.image=null;
this.shadow=null;
this.anchorOffset=null;
this.infoWindowAnchor=null;
this.infoContentExists=false;
if(_5&&(_5 instanceof MQA.MapIcon)){
if(_5.image){
this.image=this._createImage(this._getImgSrc(_5.image),parseInt(_5.image.style.left),parseInt(_5.image.style.top),parseInt(_5.image.style.width),parseInt(_5.image.style.height),_5.image.isPng);
}
if(_5.shadow){
this.shadow=this._createImage(this._getImgSrc(_5.shadow),parseInt(_5.shadow.style.left),parseInt(_5.shadow.style.top),parseInt(_5.shadow.style.width),parseInt(_5.shadow.style.height),_5.shadow.isPng);
}
this.anchorOffset=new MQA.Point(_5.getAnchorOffset().getX(),_5.getAnchorOffset().getY());
this.infoWindowAnchor=new MQA.Point(_5.getInfoWindowAnchor().getX(),_5.getInfoWindowAnchor().getY());
}else{
this.image=null;
this.shadow=null;
this.anchorOffset=null;
this.infoWindowAnchor=null;
this._calculateAnchors();
}
if(this.image){
this.element.appendChild(this.image);
}
if(this.shadow){
this.element.appendChild(this.shadow);
}
this._defImageHeight=29;
this._defImageWidth=29;
};
MQA.MapIcon.prototype.dispose=function(){
this.image=null;
this.shadow=null;
this.element=MQA.Util._deleteDOMObject(this.element);
if(this.parentPoi){
this.parentPoi=null;
}
};
MQA.MapIcon.prototype._calculateAnchors=function(){
if(this.image){
this.anchorOffset=new MQA.Point(-(parseInt(this.image.style.width)/2),-(parseInt(this.image.style.height)/2));
this.infoWindowAnchor=new MQA.Point(parseInt(this.image.style.width)/2,0);
}
};
MQA.MapIcon.prototype._fixPng=function(_6){
if((_6.isPng)&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_6.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_6.src+"', sizingMethod='image')";
_6.src="http://img.mqcdn.com/a/a";
}
};
MQA.MapIcon.prototype._getImgSrc=function(_7){
if(_7){
if((_7.isPng)&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
var _8=_7.style.filter;
var _9=_8.indexOf("src='");
if(_9==-1){
throw new Error("MQA.MapIcon._getImgSrc: missing start of src string");
}
_9+=5;
var _a=_8.indexOf("'",_9);
if(_a==-1){
throw new Error("MQA.MapIcon._getImgSrc: missing end of src string");
}
var _b=_8.substr(_9,_a-_9);
return _b;
}else{
return _7.src;
}
}
};
MQA.MapIcon.prototype.getImage=function(){
return this.image;
};
MQA.MapIcon.prototype.setImage=function(_c,_d,_e,_f,_10){
if(this.image){
this.element.removeChild(this.image);
}
this.image=this._createImage(_c,0,0,_d,_e,_10);
this.element.appendChild(this.image);
if((_f==null)||(_f==true)){
this._calculateAnchors();
}
};
MQA.MapIcon.prototype.getShadow=function(){
return this.shadow;
};
MQA.MapIcon.prototype.setShadow=function(url,_12,top,_14,_15,_16){
if(this.shadow){
this.element.removeChild(this.shadow);
}
this.shadow=this._createImage(url,_12,top,_14,_15,_16);
this.element.appendChild(this.shadow);
};
MQA.MapIcon.prototype.getElement=function(){
return this.element;
};
MQA.MapIcon.prototype.getAnchorOffset=function(){
return this.anchorOffset;
};
MQA.MapIcon.prototype.setAnchorOffset=function(_17){
this.anchorOffset=_17;
this.redraw();
};
MQA.MapIcon.prototype.getInfoWindowAnchor=function(){
return this.infoWindowAnchor;
};
MQA.MapIcon.prototype.setInfoWindowAnchor=function(_18){
this.infoWindowAnchor=_18;
};
MQA.MapIcon.prototype.redraw=function(){
if(!this.parentPoi){
return;
}
this.parentPoi.redraw();
};
MQA.MapIcon.prototype._createImage=function(url,_1a,top,_1c,_1d,_1e){
return MQA.Util._createImage(url,_1a,top,_1c,_1d,_1e);
};
MQA.MapIcon.prototype._hasPngExtention=function(url){
return MQA.Util._hasPngExtension(url);
};
MQA.MapIcon.prototype._checkInit=function(url){
if(this.image==null){
this.image=this._createImage("http://img.mqcdn.com/mqtoolkit/star.png",0,0,this._defImageHeight,this._defImageWidth,true);
this.element.appendChild(this.image);
}
if(this.shadow==null){
this.shadow=this._createImage("http://img.mqcdn.com/mqtoolkit/shadow.png",6,25,23,7,true);
this.element.appendChild(this.shadow);
}
if(this.anchorOffset==null){
this.anchorOffset=new MQA.Point(-(parseInt(this.image.style.width)/2),-(parseInt(this.image.style.height)/2));
}
if(this.infoWindowAnchor==null){
this.infoWindowAnchor=new MQA.Point(parseInt(this.image.style.width)/2,0);
}
};
MQA.Poi=function(_21,_22){
this.map=null;
this.mqrw=null;
this.mqiw=null;
this.mqMapIcon=null;
if(_22&&(_22 instanceof MQA.MapIcon)){
this.mqMapIcon=_22;
}else{
this.mqMapIcon=new MQA.MapIcon();
}
this.mqMapIcon.parentPoi=this;
this.mqAltMapIcon=null;
this.altStateFlag=false;
this.element=document.createElement("div");
this.element.ll=new MQA.LatLng(_21.getLatitude(),_21.getLongitude());
this.element.offset=this.mqMapIcon.getAnchorOffset();
this.element.style.display="block";
this.element.appendChild(this.mqMapIcon.getElement());
this.labelDiv=null;
this.labelText=null;
this.labelSpan=null;
this.key="";
this.rolloverContent=null;
this.infoWindowContent=null;
this.rolloverEnabled=true;
this.showingInfo=false;
this.isDraggable=false;
this.isDragging=false;
this.dragFlag=false;
this.snapback=false;
this.keepRolloverOnDrag=true;
this.leaderLine=false;
this.leaderLineDot=false;
this.leaderLineColor=null;
this.leaderLineDotImage=null;
this.leaderLineDotIcon=null;
this.dragTop=null;
this.dragLeft=null;
this.isDecluttered=false;
this.titleBackgroundColor=null;
this.infoWindowTitle=null;
this.trafficPOI=0;
this.maxInfoWindowWidth=null;
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.element,"click",this.eClick);
MQA._prEvent.observe(this.element,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.element,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.element,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.element,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.element,"mouseout",this.eMouseOut);
};
MQA.Poi.prototype.setTitleBackgroundColor=function(c){
this.titleBackgroundColor=c;
};
MQA.Poi.prototype.setInfoWindowTitle=function(c){
this.infoWindowTitle=c;
};
MQA.Poi.prototype.setMaxInfoWindowWidth=function(w){
this.maxInfoWindowWidth=w;
};
MQA.Poi.prototype.getMaxInfoWindowWidth=function(){
return this.maxInfoWindowWidth;
};
MQA.Poi.prototype.dispose=function(){
this.map=null;
MQA._prEvent.stopObserving(this.element,"click",this.eClick);
MQA._prEvent.stopObserving(this.element,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.element,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.element,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.element,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.element,"mouseout",this.eMouseOut);
this.mqrw=null;
if(this.mqiw){
for(var i=0;i<this.element.childNodes.length;i++){
if(this.element.childNodes[i]==this.mqiw.popup){
this.element.removeChild(this.element.childNodes[i]);
break;
}
}
}
this.mqiw=null;
this.mqMapIcon.parentPoi=null;
this.mqMapIcon.element=null;
this.mqMapIcon.image=null;
this.mqMapIcon.shadow=null;
if(this.mqAltMapIcon){
this.mqAltMapIcon.element=null;
this.mqAltMapIcon.image=null;
this.mqAltMapIcon.shadow=null;
}
this.mqMapIcon=null;
if(this.mqAltMapIcon){
MQA.Util._deleteDOMObject(this.mqAltMapIcon);
this.mqAltMapIcon=null;
}
if(this.labelText){
this.labelText=null;
}
if(this.labelSpan){
MQA.Util._deleteDOMObject(this.labelSpan);
this.labelSpan=null;
}
if(this.labelDiv){
MQA.Util._deleteDOMObject(this.labelDiv);
this.labelDiv=null;
}
if(this.rolloverContent){
this.rolloverContent.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.rolloverContent);
MQA.Util._deleteDOMObject(this.rolloverContent);
this.rolloverContent=null;
}
if(this.infoWindowContent){
this.infoWindowContent.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.infoWindowContent);
MQA.Util._deleteDOMObject(this.infoWindowContent);
this.infoWindowContent=null;
}
this.leaderLineDotImage=null;
this.leaderLineDotIcon=null;
this.element.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.element);
MQA.Util._deleteDOMObject(this.element);
this.element=null;
};
MQA.Poi.prototype.getElement=function(){
return this.element;
};
MQA.Poi.prototype.onClick=function(e){
if(MQA._prEvent.element(e).id=="poiclose"||MQA._prEvent.element(e).parentNode.id=="poiclose"){
return;
}
if(this.mqiw!=null&&this.mqiw.opener==this){
return;
}
if(!this.dragFlag||(this.dragFlag&&(Math.abs(this.startX-e.clientX)<3&&Math.abs(this.startY-e.clientY)<3))){
this.showInfoWindow();
var mqe=new MQA.Event("MQA.Poi.click");
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;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
}
this.dragFlag=false;
};
MQA.Poi.prototype.onDoubleClick=function(e){
var mqe=new MQA.Event("MQA.Poi.dblClick");
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;
MQA.EventManager.trigger(this,"dblclick",mqe);
mqe.srcObject=this;
this.map.onDoubleClick(mqe);
MQA._prEvent.stop(e);
};
MQA.Poi.prototype.onMouseDown=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseDown");
var _33=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_33.x;
var cy=e.clientY-_33.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.getDraggable()){
var _36=(this.altStateFlag&&this.mqAltMapIcon)?this.mqAltMapIcon.image:this.mqMapIcon.image;
var _37=this.map.getDragOffset();
var _38=MQA.Util.getWindowScrollXY();
var _39=cx+_38.x;
var _3a=cy+_38.y;
var _3b=parseInt(this.element.style.left)+_37.x;
var _3c=parseInt(this.element.style.top)+_37.y;
var _3d=(_3a>=_3c)&&(_3a<=(_3c+parseInt(_36.height)));
_3d=_3d&&(_39>=_3b)&&_39<=(_3b+parseInt(_36.width));
if(!_3d){
MQA.EventManager.trigger(this,"mousedown",mqe);
return;
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart=MQA._prEvent.falseFunction;
}
if(isNaN(parseInt(this.element.style.left))){
this.element.style.left=0;
}
if(isNaN(parseInt(this.element.style.top))){
this.element.style.top=0;
}
this.offsetX=parseInt(this.element.style.left);
this.offsetY=parseInt(this.element.style.top);
this.startX=e.clientX;
this.startY=e.clientY;
this.isDragging=true;
this.map.draggedObject=this;
if(this.leaderLine){
this.leaderLine=MQA.Graphics.remove(this.map.poisurface,this.leaderLine);
}
if(this.leaderLineDot){
this.leaderLineDot=MQA.Graphics.remove(this.map.poisurface,this.leaderLineDot);
}
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().redrawLeaderLines(this);
}
}
}
if(this.leaderLineDotIcon){
this.leaderLineDotIcon.div.im.style.display="none";
}
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();
}
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("hidden");
}
}
MQA.EventManager.trigger(this,"mousedown",mqe);
};
MQA.Poi.prototype.onMouseUp=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseUp");
var _40=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_40.x;
var cy=e.clientY-_40.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.element.style.zIndex=110;
}
this.finishDrag();
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart="";
}
MQA.EventManager.trigger(this,"mouseup",mqe);
};
MQA.Poi.prototype.finishDrag=function(){
var _43=(MQA.browser.name=="safari");
this.isDragging=false;
var _44=this.map.getDragOffset();
if(this.getAltStateFlag()){
var _45=this.getAltIcon().getAnchorOffset().getX();
var _46=this.getAltIcon().getAnchorOffset().getY();
}else{
var _45=this.getIcon().getAnchorOffset().getX();
var _46=this.getIcon().getAnchorOffset().getY();
}
var _47=(parseInt(this.element.style.left)-_45)+_44.x;
var _48=(parseInt(this.element.style.top)-_46)+_44.y;
this.dragFlag=true;
if((Math.abs(this.offsetX-parseInt(this.element.style.left))>3)||(Math.abs(this.offsetY-parseInt(this.element.style.top)>3))){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2&&!this.getAltStateFlag()){
this.setAltStateFlag(true);
}
}
}
var _49=(this.map.getDeclutter()?this.map.getDeclutter().getDeclutterMode():0);
if(this.snapback&&_49!=2){
this.setLatLng(this.getLatLng());
}else{
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==0){
this.setLatLng(this.map.pixToLL(new MQA.Point(_47,_48)));
}else{
if(this.map.getDeclutter().getDeclutterMode()==2){
theLatLngXY=this.map.llToPix(this.getLatLng());
this.dragLeft=theLatLngXY.x-(_44.x+parseInt(this.element.style.left));
this.dragTop=theLatLngXY.y-(_44.y+parseInt(this.element.style.top));
if((Math.abs(this.offsetX-parseInt(this.element.style.left))>3)||(Math.abs(this.offsetY-parseInt(this.element.style.top))>3)||this.getAltStateFlag()){
if(!_43){
this.map.getDeclutter().drawLeaderLine(this);
}else{
this.map.getDeclutter().redrawLeaderLines();
}
}
}else{
}
}
}else{
this.setLatLng(this.map.pixToLL(new MQA.Point(_47,_48)));
}
}
this.map.draggedObject=null;
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("auto");
}
};
MQA.Poi.prototype.onMouseOver=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.element)){
var mqe=new MQA.Event("MQA.Poi.mouseOver");
mqe.domEvent=e;
var _4c=(this.map.draggedObject&&this.map.mypois.contains(this.map.draggedObject)&&this.map.draggedObject.isDragging)?true:false;
if(!this.isDragging&&!_4c&&(this.mqrw.isHidden()||this.mqrw.opener!=this)){
this.showRolloverWindow(mqe);
}
MQA.EventManager.trigger(this,"mouseover",mqe);
}
};
MQA.Poi.prototype.onMouseOut=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.element)){
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);
}
};
MQA.Poi.prototype.onInfoWindowOpen=function(e){
this.element.style.zIndex=100;
var mqe=new MQA.Event("MQA.Poi.infoWindowOpen");
mqe.domEvent=e;
this.showRolloverWindow(mqe);
MQA.EventManager.trigger(this,"infowindowopen",mqe);
};
MQA.Poi.prototype.onInfoWindowClose=function(e){
this.showingInfo=false;
this.element.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);
};
MQA.Poi.prototype.onRolloverOpen=function(e){
this.element.style.zIndex=110;
MQA.EventManager.trigger(this,"rolloveropen",e);
};
MQA.Poi.prototype.onRolloverClose=function(e){
this.element.style.zIndex=90;
MQA.EventManager.trigger(this,"rolloverclose",e);
};
MQA.Poi.prototype.onRemoved=function(e){
var mqe=new MQA.Event("MQA.Poi.removed");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"removed",mqe);
};
MQA.Poi.prototype.getLatLng=function(){
return new MQA.LatLng(this.element.ll.lat,this.element.ll.lng);
};
MQA.Poi.prototype.setLatLng=function(_57){
this.element.ll=new MQA.LatLng(_57.getLatitude(),_57.getLongitude());
this.redraw();
};
MQA.Poi.prototype.getIcon=function(){
return this.mqMapIcon;
};
MQA.Poi.prototype.setIcon=function(_58){
this.mqMapIcon.dispose();
this.mqMapIcon=null;
this.mqMapIcon=_58;
this.element.appendChild(this.mqMapIcon.getElement());
this.mqMapIcon.parentpoi=this;
this.redraw();
};
MQA.Poi.prototype.isIconVisible=function(){
var _59=false;
_59=(this.mqMapIcon.getElement().style.display!="none");
_59=_59||(this.mqAltMapIcon.getElement().style.display!="none");
return _59;
};
MQA.Poi.prototype.setIconVisible=function(b){
if(b){
if(this.altStateFlag){
if(this.mqAltMapIcon){
this.mqAltMapIcon.getElement().style.display="block";
this.mqMapIcon.getElement().style.display="none";
}else{
this.mqMapIcon.getElement().style.display="block";
}
}else{
this.mqMapIcon.getElement().style.display="block";
if(this.mqAltMapIcon){
this.mqAltMapIcon.getElement().style.display="none";
}
}
}else{
this.mqMapIcon.getElement().style.display="none";
this.mqAltMapIcon.getElement().style.display="none";
}
};
MQA.Poi.prototype.getAltIcon=function(){
if(this.mqAltMapIcon){
return this.mqAltMapIcon;
}else{
return this.mqMapIcon;
}
};
MQA.Poi.prototype.setAltIcon=function(_5b){
if(isNaN(parseInt(this.element.style.left))){
this.element.style.left=0;
}
if(isNaN(parseInt(this.element.style.top))){
this.element.style.top=0;
}
var cx=parseInt(this.element.style.left);
var cy=parseInt(this.element.style.top);
if(this.mqAltMapIcon){
this.mqAltMapIcon.dispose();
this.mqAltMapIcon=null;
}
this.mqAltMapIcon=new MQA.MapIcon();
this.mqAltMapIcon=_5b;
this.mqAltMapIcon.parentPoi=this;
this.element.appendChild(this.mqAltMapIcon.getElement());
this.setAltStateFlag(this.altStateFlag);
this.redraw();
this.element.style.left=cx+"px";
this.element.style.top=cy+"px";
};
MQA.Poi.prototype.setAltStateFlag=function(b){
this.altStateFlag=b;
if(this.mqAltMapIcon){
if(this.map){
var _5f=this.getIcon().getAnchorOffset().getX()-this.getAltIcon().getAnchorOffset().getX();
var _60=this.getIcon().getAnchorOffset().getY()-this.getAltIcon().getAnchorOffset().getY();
}else{
_5f=0;
_60=0;
}
if(b){
this.element.style.left=(parseInt(this.element.style.left)+_5f)+"px";
this.element.style.top=(parseInt(this.element.style.top)+_60)+"px";
this.mqAltMapIcon.getElement().style.display="block";
this.mqMapIcon.getElement().style.display="none";
}else{
if(this.map&&(this.map.getDeclutter().getDeclutterMode()==0)){
this.element.style.left=(parseInt(this.element.style.left)-_5f)+"px";
this.element.style.top=(parseInt(this.element.style.top)-_60)+"px";
}
this.mqAltMapIcon.getElement().style.display="none";
this.mqMapIcon.getElement().style.display="block";
}
if(this.map){
if(this.map.getDeclutter()&&b){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().drawLeaderLine(this);
}
}
}
}
};
MQA.Poi.prototype.getAltStateFlag=function(){
return this.altStateFlag;
};
MQA.Poi.prototype.getKey=function(){
return this.key;
};
MQA.Poi.prototype.setKey=function(key){
this.key=key;
};
MQA.Poi.prototype.isVisible=function(){
return (this.element.style.display!="none"?true:false);
};
MQA.Poi.prototype.setVisible=function(b){
if(b){
this.element.style.display="block";
}else{
this.element.style.display="none";
}
};
MQA.Poi.prototype.setLevel=function(i){
this.element.style.zIndex=i;
};
MQA.Poi.prototype.getLabel=function(){
return (this.labelText==null)?"":this.labelText.data;
};
MQA.Poi.prototype.setLabel=function(_64,_65){
if(!this.labelDiv){
this.labelDiv=document.createElement("div");
this.labelDiv.className="mq-poi-label";
this.labelDiv.style.MozUserSelect="none";
this.labelDiv.onselectstart=MQA._prEvent.falseFunction;
this.labelSpan=document.createElement("span");
this.labelText=document.createTextNode("");
this.labelSpan.appendChild(this.labelText);
this.labelDiv.appendChild(this.labelSpan);
this.element.appendChild(this.labelDiv);
}
this.labelText.data=_64;
if(!_65){
this.labelDiv.className="mq-poi-label";
this.redrawLabel();
}else{
this.labelDiv.className=_65;
}
};
MQA.Poi.prototype.getLabelStyle=function(){
return this.labelDiv.style;
};
MQA.Poi.prototype.isLabelVisible=function(){
return (this.labelDiv.style.display!="none"?true:false);
};
MQA.Poi.prototype.setLabelVisible=function(b){
if(b){
this.labelDiv.style.display="block";
this.redrawLabel();
}else{
this.labelDiv.style.display="none";
}
};
MQA.Poi.prototype.redrawLabel=function(){
if(this.labelDiv){
if(this.labelDiv.className=="mq-poi-label"&&this.labelText.data.length>0){
this.labelDiv.style.width=this.labelSpan.offsetWidth+"px";
var _67=(this.mqMapIcon.getImage())?this.mqMapIcon.getImage().style.width:this.mqMapIcon._defImageWidth;
var _68=(this.mqMapIcon.getImage())?this.mqMapIcon.getImage().height:this.mqMapIcon._defImageHeight;
this.labelDiv.style.left=(parseInt(_67)/2-this.labelSpan.offsetWidth/2)+"px";
this.labelDiv.style.top=_68+"px";
}
}
};
MQA.Poi.prototype.redraw=function(){
if(!this.map){
return;
}
this.map.updatePoi(this.element.ll,this.mqMapIcon.getAnchorOffset(),this.element);
if(this.mqAltMapIcon&&this.altStateFlag){
this.map.updatePoi(this.element.ll,this.mqMapIcon.getAnchorOffset(),this.element);
}
this.redrawLabel();
};
MQA.Poi.prototype.showRolloverWindow=function(e){
if(this.mqrw==null){
this.mqrw=this.map.getRolloverWindow();
}
if(this.isRolloverShowable()){
this.element.appendChild(this.mqrw.minipopup);
this.mqrw.modify(this.map.getLLToXY(this.element.ll),this.rolloverContent,this.getIcon().getInfoWindowAnchor(),this);
this.mqrw.setOpenerAndShow(this);
this.onRolloverOpen(new MQA.Event("MQA.Poi.rolloverOpen"));
}
};
MQA.Poi.prototype.showInfoWindow=function(){
if(this.infoWindowContent!=null){
if(this.mqiw==null){
this.mqiw=this.map.getInfoWindow();
}
if(this.isRolloverShowable()){
this.mqrw.hide();
}
var _6a=this.mqiw.getMaxWidth();
var _6b=this.mqiw.getTitleBackgroundColor();
if(this.titleBackgroundColor){
this.mqiw.setTitleBackgroundColor(this.titleBackgroundColor);
}
if(this.infoWindowTitle){
var _6c=document.createElement("div");
_6c.innerHTML="<div>"+this.infoWindowTitle+"</div>";
_6d=_6c;
}else{
var _6d=this.rolloverContent;
}
if(this.maxInfoWindowWidth){
this.mqiw.setMaxWidth(this.maxInfoWindowWidth);
}
this.element.appendChild(this.mqiw.popup);
this.mqiw.modify(this.map.getLLToXY(this.element.ll),_6d,this.infoWindowContent,this.getIcon().getInfoWindowAnchor());
this.mqiw.setOpenerAndShow(this);
this.showingInfo=true;
this.onInfoWindowOpen(new MQA.Event("MQA.Poi.infoWindowOpen"));
this.mqiw.setMaxWidth(_6a);
this.mqiw.setTitleBackgroundColor(_6b);
}
};
MQA.Poi.prototype.setInfoTitleHTML=function(_6e){
var _6f=document.createElement("div");
_6f.innerHTML="<div>"+_6e+"</div>";
this.rolloverContent=_6f;
};
MQA.Poi.prototype.setInfoContentHTML=function(_70){
if(_70==undefined){
return;
}
if(_70!=""){
this.infoContentExists=true;
}
var _71=document.createElement("div");
_71.innerHTML="<div>"+_70+"</div>";
this.infoWindowContent=_71;
};
MQA.Poi.prototype.setInfoTitleElement=function(_72){
this.rolloverContent=_72;
};
MQA.Poi.prototype.setInfoContentElement=function(_73){
this.infoWindowContent=_73;
};
MQA.Poi.prototype.setRolloverEnabled=function(_74){
this.rolloverEnabled=_74;
};
MQA.Poi.prototype.isRolloverEnabled=function(){
return this.rolloverEnabled;
};
MQA.Poi.prototype.isRolloverShowable=function(){
return this.isRolloverEnabled()&&this.map.getRolloversEnabled()&&(this.rolloverContent!=null)&&!this.showingInfo;
};
MQA.Poi.prototype.getInfoWindow=function(){
return this.mqiw;
};
MQA.Poi.prototype.getDraggable=function(){
if(this.map){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
return true;
}
}
}
return this.isDraggable;
};
MQA.Poi.prototype.setDraggable=function(_75){
this.isDraggable=_75;
if(arguments.length>1){
this.keepRolloverOnDrag=arguments[1];
}
};
MQA.Poi.prototype.getSnapback=function(){
return this.snapback;
};
MQA.Poi.prototype.setSnapback=function(_76){
this.snapback=_76;
};
MQA.Poi.prototype.getLeaderLineColor=function(){
if(this.leaderLineColor){
return this.leaderLineColor;
}else{
if(this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineColor;
}else{
return "#000000";
}
}
};
MQA.Poi.prototype.setLeaderLineColor=function(c){
this.leaderLineColor=c;
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);
this.leaderLineDot.setAttribute("stroke",c);
this.leaderLineDot.setAttribute("fill",c);
break;
case "vml":
this.shape.stroke.color=c;
this.shape.stroke.opacity=c;
this.shape.fill.color=c;
break;
case "canvas":
this.map.getDeclutter().redrawLeaderLines();
break;
}
}
}
};
MQA.Poi.prototype.setRolloverDrag=function(b){
this.keepRolloverOnDrag=b;
};
MQA.Poi.prototype.getRolloverDrag=function(){
return this.keepRolloverOnDrag;
};
MQA.Poi.prototype.setLeaderLineDotImage=function(url,_7a,_7b){
this.leaderLineDotImage=new MQA.LeaderLineDotImage(url,_7a,_7b);
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().drawLeaderLine(this);
}
}
};
MQA.Poi.prototype.getLeaderLineDotImage=function(){
return this.leaderLineDotImage;
};
MQA.LeaderLineDotImage=function(url,_7d,_7e){
this.url=url;
this.width=_7d;
this.height=_7e;
};
MQA.LeaderLineDotIcon=function(_7f,map,poi){
this.map=map;
this.div=document.createElement("div");
this.div.im=document.createElement("img");
this.div.im.src=_7f.url;
this.div.im.style.height=_7f.height;
this.div.im.style.width=_7f.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.getLatLng(),new MQA.PointXY(-_7f.width/2,-_7f.height/2),this.div);
};

MQA.RolloverWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=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;
};
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.hide=function(_4){
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(_5){
this.show();
this.opener=_5;
};
MQA.RolloverWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
var _6=this.offset.y;
var _7=this.offset.x;
var _8=this.leftRolloverSrc;
this.minipopup.style.top=(_6+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_7+this.leftRolloverOffsetX)+"px";
if(this.flipStateEnabled){
var _9=this.getCollisionInfo(this.minipopup);
if(_9.panX<0){
_8=this.rightRolloverSrc;
this.minipopup.style.top=(_6+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_7+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='"+_8+"', sizingMethod='scale')";
this.minipopup.style.display="block";
}else{
this.minipopup.style.background="";
this.minipopup.style.background="url("+_8+") 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(_a,_b,_c,_d){
if(_a){
this.point=_a;
}
if(_b){
this.content=_b;
}
if(_c){
this.offset=_c;
}
this.minipopup.style.position="absolute";
this.minipopup.style.zIndex=9;
var _e=MQA.Util.stripHTMLTags(this.content.innerHTML);
if(_d.infoWindowContent&&this.textLength==31){
this.textLength-=2;
}
if(_d.infoWindowContent){
_e=(_e.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;...&nbsp;&raquo;"):MQA.Util.getHTMLSubstring(this.content.innerHTML,_e.length,"&nbsp;&raquo;");
}else{
_e=(_e.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;..."):MQA.Util.getHTMLSubstring(this.content.innerHTML,_e.length,"");
}
this.minipopup.innerHTML="<div class='mqminipopuphead'>"+_e+"</div>";
};
MQA.RolloverWindow.prototype.getMaxWidth=function(){
return this.maxWidth;
};
MQA.RolloverWindow.prototype.setMaxWidth=function(_f){
this.maxWidth=_f;
};
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(_10,_11){
if(typeof _10=="undefined"){
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
}else{
this.leftRolloverSrc=_10;
}
this.rightRolloverSrc=_11;
};
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(_12){
if(typeof _12=="undefined"||typeof _12!="boolean"){
this.flipStateEnabled=false;
}else{
this.flipStateEnabled=_12;
}
};
MQA.RolloverWindow.prototype.getFlipStateEnabled=function(){
return this.flipStateEnabled;
};
MQA.RolloverWindow.prototype.getCollisionInfo=function(_13,_14,_15){
var _16=this.map.parent;
var _17={panX:0,panY:0};
var _18=(_14)?_14:false;
var _19=(_15)?_15:false;
var _1a=MQA.Util.getParentOffset(_16);
var _1b=MQA.Util.getParentOffset(_13);
var _1c=0;
_1b.x=_1b.x-_1a.x-_1c;
_1b.y=_1b.y-_1a.y-_1c;
var _1d=(_18)?{width:37,height:300}:{width:0,height:0};
var _1e=(_19)?{width:139,height:15}:{width:0,height:0};
var _1f=(_1b.x<_1d.width&&_1b.y<_1d.height+_1c)?_1d.width:0;
var _20=(_1b.x+_13.clientWidth>_16.clientWidth-_1e.width&&_1b.y<_1e.height+_1c)?_1e.height:0;
if(_13.clientWidth>0&&_13.clientHeight>0){
if(_1b.x<_1f){
_17.panX=Math.abs(_1b.x-_1f);
}else{
if(_1b.x+_1c+_13.clientWidth>_16.clientWidth){
_17.panX=-1*(_13.clientWidth+_1b.x+_1c-_16.clientWidth);
}
}
if(_1b.y<_20){
_17.panY=Math.abs(_1b.y-_20);
}else{
if(_1b.y+_13.clientHeight>_16.clientHeight){
_17.panY=_16.clientHeight-_1b.y-_13.clientHeight;
}
}
}
return _17;
};
MQA.RolloverWindow.prototype.createRolloverWindow=function(){
if(this.minipopup){
this.minipopup.parentNode.removeChild(this.minipopup);
}
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.dispose=function(){
this.map=null;
this.opener=null;
this.artUrl="";
this.leftRolloverSrc="";
this.rightRolloverSrc="";
if(this.content){
this.content.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.content);
this.content=null;
}
this.minipopup.oncontextmenu=null;
this.minipopup.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.minipopup);
MQA.Util._deleteDOMObject(this.minipopup);
this.minipopup=null;
};
MQA.RolloverWindow.prototype.setTextLength=function(_21){
if(typeof _21=="undefined"||isNaN(parseInt(_21))){
this.textLength=31;
}else{
this.textLength=parseInt(_21);
}
};
MQA.RolloverWindow.prototype.getTextLength=function(){
return this.textLength;
};
MQA.RolloverWindow.prototype.setLeftRolloverOffsetX=function(_22){
if(typeof _22=="undefined"||isNaN(parseInt(_22))){
this.leftRolloverOffsetX=-25;
}else{
this.leftRolloverOffsetX=parseInt(_22);
}
};
MQA.RolloverWindow.prototype.getLeftRolloverOffsetX=function(){
return this.leftRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRightRolloverOffsetX=function(_23){
if(typeof _23=="undefined"||isNaN(parseInt(_23))){
this.rightRolloverOffsetX=-193;
}else{
this.rightRolloverOffsetX=parseInt(_23);
}
};
MQA.RolloverWindow.prototype.getRightRolloverOffsetX=function(){
return this.rightRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRolloverOffsetY=function(_24){
if(typeof _24=="undefined"||isNaN(parseInt(_24))){
this.rolloverOffsetY=(13-this.minipopup.offsetHeight);
}else{
this.rolloverOffsetY=parseInt(_24);
}
};
MQA.RolloverWindow.prototype.getRolloverOffsetY=function(){
return this.rolloverOffsetY;
};

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.TileMap=function(_1,_2,_3,_4,_5){
this.div1=document.createElement("div");
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.mypois=new MQA.PoiCollection();
try{
this.myoverlays=new MQA.OverlayCollection();
}
catch(err){
this.myoverlays=null;
}
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._dth=MQA._prEvent.addDtor(this,"dispose");
this.showMap=true;
this.showSat=false;
this.showHyb=false;
this.showRte=false;
this.updateOverlaysX=true;
this.updateOverlaysY=true;
this.tileMode="map";
this.tileNode="MQMAP";
this.bestFitRect=null;
this.keepCenter=null;
this.bestFitMargin=0;
if(_4=="sat"){
this.showSat=true;
this.showMap=false;
this.tileMode=_4;
this.tileNode="MQSAT";
}
if(_4=="hyb"){
this.showSat=true;
this.showHyb=true;
this.showMap=false;
this.tileMode=_4;
this.tileNode="MQHYB";
}
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 _7=_5.getBestFitRect();
var _8=new MQA.PointLL(_7.ul.lat,_7.ul.lng);
var _9=new MQA.PointLL(_7.lr.lat,_7.lr.lng);
_3=new MQA.PointLL(((_8.lat+_9.lat)/2),((_8.lng+_9.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.tiles=null;
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){
}
}
this.div.ldiv=MQA.Util.createParentDiv("mqloading",0,0,"absolute",0,0,0,(this.mapcols*MQA.TILESIZE),(this.maprows*MQA.TILESIZE));
this.div.ldiv.style.backgroundImage="url("+MQA.RESOURCES+"loading.gif)";
this.div.ldiv.style.backgroundRepeat="repeat";
this.div.appendChild(this.div.ldiv);
this.document_mousemove=MQA._prEvent.EventCallback(this,"onMouseMove");
this.document_mouseup=MQA._prEvent.EventCallback(this,"onMouseUp");
this.document_mouseout=MQA._prEvent.EventCallback(this,"onMouseOut");
this.parent_mouseover=MQA._prEvent.EventCallback(this,"onMouseOver");
this.parent_mousedown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(document,"mousemove",this.document_mousemove);
MQA._prEvent.observe(document,"mouseup",this.document_mouseup);
MQA._prEvent.observe(document,"mouseout",this.document_mouseout);
MQA._prEvent.observe(this.parent,"mouseover",this.parent_mouseover);
MQA._prEvent.observe(this.parent,"mousedown",this.parent_mousedown);
this.rtehighlight=MQA.Util.createImgHolder(null,"on","none","none",50);
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.div.appendChild(this.rtehighlight);
this.prnstyle=document.createElement("style");
this.prnstyle.type="text/css";
this.prnstyle.media="print";
var _a="img#mqrtehl { visibility:hidden; display:none }";
if(this.prnstyle.styleSheet){
this.prnstyle.styleSheet.cssText=_a;
}else{
var _b=document.createTextNode(_a);
this.prnstyle.appendChild(_b);
}
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!="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!="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.mapdiv=MQA.Util.createParentDiv("mqmapdiv",0,0,"absolute",0,0,null,null,null);
this.div.appendChild(this.div.mapdiv);
this.div.satdiv=MQA.Util.createParentDiv("mqsatdiv",0,0,"absolute",0,0,null,null,null);
this.div.appendChild(this.div.satdiv);
this.div.hybdiv=MQA.Util.createParentDiv("mqhybdiv",0,0,"absolute",0,0,null,null,null);
this.div.appendChild(this.div.hybdiv);
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.hasTraffic=false;
this.trafficControlIndex=0;
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.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.div1_click=MQA._prEvent.EventCallback(this,"onClick");
this.div1_dblclick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.div1,"click",this.div1_click);
MQA._prEvent.observe(this.div1,"dblclick",this.div1_dblclick);
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.showDragableMap();
}
};
MQA.TileMap.prototype._subDispose=function(){
for(var k in this){
try{
delete this[k];
}
catch(e){
}
}
};
MQA.TileMap.prototype.setBatchMode=function(_d){
if(_d){
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(e.srcObject&&e.srcObject.createFillerDiv){
return;
}
if((this.click)?this.click:false){
var _10=MQA.Util.getParentOffset(this.parent);
var _11=0;
var _12=0;
if(typeof (window.pageYOffset)=="number"){
_12=window.pageYOffset;
_11=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_12=document.body.scrollTop;
_11=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_12=document.documentElement.scrollTop;
_11=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+_11)-_10.x;
var cy=(mqe.domEvent.clientY+_12)-_10.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 _17=MQA.Util.getParentOffset(this.parent);
var _18=0;
var _19=0;
if(typeof (window.pageYOffset)=="number"){
_19=window.pageYOffset;
_18=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_19=document.body.scrollTop;
_18=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_19=document.documentElement.scrollTop;
_18=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+_18)-_17.x;
var cy=(mqe.domEvent.clientY+_19)-_17.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.handleOverlays();
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.onPoiAdded=function(e){
MQA.EventManager.trigger(this,"poiadded",e);
};
MQA.TileMap.prototype.onPoiRemoved=function(e){
MQA.EventManager.trigger(this,"poiremoved",e);
};
MQA.TileMap.prototype.onMapCleared=function(e){
MQA.EventManager.trigger(this,"mapcleared",e);
};
MQA.TileMap.prototype.onOverlayAdded=function(e){
MQA.EventManager.trigger(this,"overlayadded",e);
};
MQA.TileMap.prototype.onOverlayRemoved=function(e){
MQA.EventManager.trigger(this,"overlayremoved",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 _2b=arguments[0];
if(_2b=="move"){
e.eventName="MQA.TileMap.move";
this.onMove(e);
}else{
if(_2b=="movestart"){
e.eventName="MQA.TileMap.movestart";
this.onMoveStart(e);
}else{
if(_2b=="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 _30=arguments[0];
if(_30=="drag"){
e.eventName="MQA.TileMap.drag";
this.onDrag(e);
}else{
if(_30=="dragstart"){
e.eventName="MQA.TileMap.dragStart";
this.onDragStart(e);
}else{
if(_30=="dragend"){
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
}else{
if(arguments.length==2){
var e=new MQA.Event();
var _30=arguments[0];
if(_30=="dragend"){
var _31=arguments[1];
var _32=MQA.Util.getParentOffset(this.parent);
e.clientX=_31.clientX-_32.x;
e.clientY=_31.clientY-_32.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 _33=this.endDragPoint.x-this.startDragPoint.x;
var _34=this.endDragPoint.y-this.startDragPoint.y;
var _35=this.percentage(0,0,_33,_34,false);
e.dragPercentage=Math.round(Math.sqrt(_35.shiftX*_35.shiftX+_35.shiftY*_35.shiftY));
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
};
MQA.TileMap.prototype.direction=function(_36,_37,_38,_39){
var _3a="";
if(_39<_37){
_3a="n";
}else{
if(_39>_37){
_3a="s";
}
}
if(_38>_36){
_3a+="e";
}else{
if(_38<_36){
_3a+="w";
}
}
var _3b=MQA.Util.panAngle(_36,_37,_38,_39);
if(_3a=="ne"){
if(_3b<22){
_3a="e";
}else{
if(_3b>68){
_3a="n";
}
}
}else{
if(_3a=="nw"){
if(_3b<22){
_3a="w";
}else{
if(_3b>68){
_3a="n";
}
}
}else{
if(_3a=="se"){
if(_3b<22){
_3a="e";
}else{
if(_3b>68){
_3a="s";
}
}
}else{
if(_3a=="sw"){
if(_3b<22){
_3a="w";
}else{
if(_3b>68){
_3a="s";
}
}
}
}
}
}
return _3a;
};
MQA.TileMap.prototype.percentage=function(_3c,_3d,_3e,_3f,_40){
var _41={shiftX:0,shiftY:0};
if(parseInt(_3e)>parseInt(_3c)){
_41.shiftX=parseInt(_3e)-parseInt(_3c);
}else{
_41.shiftX=parseInt(_3c)-parseInt(_3e);
}
if(parseInt(_3f)>parseInt(_3d)){
_41.shiftY=parseInt(_3f)-parseInt(_3d);
}else{
_41.shiftY=parseInt(_3d)-parseInt(_3f);
}
if(!_40||typeof (_40)=="undefined"){
_41.shiftY=MQA.Util.calcPercentage(_41.shiftY,this.height);
_41.shiftX=MQA.Util.calcPercentage(_41.shiftX,this.width);
}
return _41;
};
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 _44=arguments[1];
var str="";
var e=new MQA.Event();
var _47=MQA.Util.getParentOffset(this.parent);
e.button=(MQA._prEvent.isLeftClick(_44))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
e.clientX=_44.clientX-_47.x;
e.clientY=_44.clientY-_47.y;
var _48=arguments[0];
if(_48=="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(_48=="mouseup"){
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseUp";
this.onTKMouseUp(e);
}
}
}
};
MQA.TileMap.prototype.addControl=function(_49,_4a){
_49.initialize(this);
this.controls[_49.type]=_49;
var _4b=_49.elem.style;
if(_4a!=null){
_49.position=_4a;
}
this.parent2.appendChild(_49.elem);
this.placeControl(_49);
_4b.display="block";
_4b.zIndex=0;
};
MQA.TileMap.prototype.removeControl=function(_4c){
if(_4c.destructor){
_4c.destructor();
}
this.parent2.removeChild(_4c.elem);
this.controls[_4c.type]=null;
};
MQA.TileMap.prototype.updateZoom=function(_4d){
if(this.controls[MQA.CONTROL_PANZOOM]!=null){
this.controls[MQA.CONTROL_PANZOOM].setZoom(this.getZoomLevel());
this.controls[MQA.CONTROL_PANZOOM].unselectZoom(0);
}
};
MQA.TileMap.prototype.placeControl=function(_4e){
var pos=_4e.getPosition();
var _50=pos.getMapCorner();
var _51;
var top;
if(_50==MQA.MapCorner.TOP_LEFT){
_51=0;
top=0;
}else{
if(_50==MQA.MapCorner.TOP_RIGHT){
_51=this.width-_4e.getWidth();
top=0;
var _53=arguments;
if(typeof _53[1]=="undefined"){
pos.offsetSize.width*=-1;
}
}else{
if(_50==MQA.MapCorner.BOTTOM_LEFT){
_51=0;
top=this.height-_4e.getHeight();
var _53=arguments;
if(typeof _53[1]=="undefined"){
pos.offsetSize.height*=-1;
}
}else{
if(_50==MQA.MapCorner.BOTTOM_RIGHT){
_51=this.width-_4e.getWidth();
top=this.height-_4e.getHeight();
var _53=arguments;
if(typeof _53[1]=="undefined"){
pos.offsetSize.width*=-1;
pos.offsetSize.height*=-1;
}
}
}
}
}
_51+=pos.offsetSize.width;
top+=pos.offsetSize.height;
_4e.elem.style.left=_51+"px";
_4e.elem.style.top=top+"px";
};
MQA.TileMap.prototype.setLogoZindex=function(_54,_55){
var _56=parseInt(_54);
var _57=parseInt(_55);
var _58=this.logos[_56];
if(_58.style){
_58.style.zIndex=_57;
}
};
MQA.TileMap.prototype.setLogoPlacement=function(_59,_5a){
var _5b=_5a.getMapCorner();
var _5c=Math.abs(_5a.getOffsetSize().getWidth());
var _5d=Math.abs(_5a.getOffsetSize().getHeight());
var _5e=0;
var _5f=0;
if(_5b==MQA.MapCorner.TOP_LEFT){
_5e=_5c;
_5f=_5d;
}else{
if(_5b==MQA.MapCorner.TOP_RIGHT){
_5e=(-_5c);
_5f=_5d;
}else{
if(_5b==MQA.MapCorner.BOTTOM_LEFT){
_5e=_5c;
_5f=(-_5d);
}else{
if(_5b==MQA.MapCorner.BOTTOM_RIGHT){
_5e=(-_5c);
_5f=(-_5d);
}else{
return;
}
}
}
}
_59=parseInt(_59);
_5b=parseInt(_5b);
if(_59>=MQA.LOGO_MQ_LOGO&&_59<=MQA.LOGO_SAT_COPY&&_5b>=MQA.CORNER_TOPLEFT&&_5b<=MQA.CORNER_BOTTOMRIGHT){
this.logos[_59].corner=_5b;
this.logos[_59].offset=new MQA.Point(_5e,_5f);
this.setLogoPosition(this.logos[_59]);
}
};
MQA.TileMap.prototype.addPois=function(_60){
if(_60){
var h=_60.getSize();
for(i=0;i<h;i++){
this.addPoi(_60.getAt(i));
}
}
};
MQA.TileMap.prototype.addPoi=function(_62,_63){
if(this.mypois.contains(_62)){
return;
}
_62.getIcon()._checkInit();
this._addPoi(_62.getLatLng(),_62.getIcon().getAnchorOffset(),_62.getElement());
this.mypois.add(_62);
var e=new MQA.Event("MQA.TileMap.poiAdded");
e.poi=_62;
this.onPoiAdded(e);
_62.redrawLabel();
_62.map=this;
_62.mqrw=this.getRolloverWindow();
_62.mqiw=this.getInfoWindow();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._addPoi=function(_65,_66,_67){
if(this.pois==null){
this.pois=new Array();
}
var xy=this.getLLToXY(_65);
_67.ll=_65;
_67.offset=_66;
_67.style.position="absolute";
_67.style.zIndex=90;
_67.style.left=(xy.x+_66.x-this.m_dragoffX)+"px";
_67.style.top=(xy.y+_66.y-this.m_dragoffY)+"px";
_67.oncontextmenu=MQA._prEvent.falseFunction;
this.pois.push(_67);
this.div.poidiv.appendChild(_67);
};
MQA.TileMap.prototype.removePoi=function(_69){
this._removePoi(_69.element);
this.mypois.removeItem(_69);
var e=new MQA.Event("MQA.TileMap.poiRemoved");
_69.onRemoved(e);
e.poi=_69;
this.onPoiRemoved(e);
_69.map=null;
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._removePoi=function(_6b){
var _6c=[];
if(this.pois==null){
return;
}
var j=this.pois.length;
for(var i=0;i<j;i++){
if(this.pois[i]!=_6b){
_6c.push(this.pois[i]);
}else{
if(this.div.poidiv.childNodes.length>0){
this.div.poidiv.removeChild(this.pois[i]);
}
}
}
this.pois.length=0;
this.pois=null;
var k=_6c.length;
for(var i=0;i<k;i++){
if(this.pois==null){
this.pois=new Array();
}
this.pois.push(_6c[i]);
}
_6c=null;
};
MQA.TileMap.prototype.removeAllPois=function(_70){
var _70=(typeof (_70)=="undefined"?false:_70);
if(this.getDeclutter()){
var _71=this.getDeclutter().getDeclutterMode();
}
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
var ptr=0;
while(ptr<this.mypois.getSize()){
if(!this.mypois.getAt(ptr).trafficPOI||_70){
this.removePoi(this.mypois.getAt(ptr));
}else{
ptr++;
}
}
if(this.getDeclutter()){
if(_71!=0){
this.getDeclutter().setDeclutterMode(_71);
}
}
this.onMapCleared(new MQA.Event("MQA.TileMap.mapCleared"));
};
MQA.TileMap.prototype.replacePois=function(_73){
if(this.getDeclutter()){
var dcm=this.getDeclutter().getDeclutterMode();
this.getDeclutter().setDeclutterMode(0);
}
this.removeAllPois();
for(var i=0,j=_73.getSize();i<j;i++){
this.addPoi(_73.getAt(i));
}
if(this.getDeclutter()){
if(dcm!=0){
this.getDeclutter().setDeclutterMode(dcm);
}
}
};
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 _77=parseInt(this.div1.style.width);
var _78=parseInt(this.div1.style.height);
var _79=Math.ceil(_77/this.TILESIZE)*this.TILESIZE;
var _7a=Math.ceil(_78/this.TILESIZE)*this.TILESIZE;
var _7b=_79+(2*this.SURFACE_OFFSET);
var _7c=_7a+(2*this.SURFACE_OFFSET);
var _7d=-(this.SURFACE_OFFSET);
var _7e=-(this.SURFACE_OFFSET);
this.overlaydiv.lt=_7d+"px";
this.overlaydiv.tp=_7e+"px";
this.overlaydiv.style.position="absolute";
this.overlaydiv.style.top=_7e+"px";
this.overlaydiv.style.left=_7d+"px";
this.overlaydiv.style.height=_7c+"px";
this.overlaydiv.style.width=_7b+"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,_7b,_7c);
}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 _7f=this.div1.style.width.replace("px","");
var _80=this.div1.style.height.replace("px","");
var _81=Math.ceil(_7f/this.TILESIZE)*this.TILESIZE;
var _82=Math.ceil(_80/this.TILESIZE)*this.TILESIZE;
var _83=_81+(2*this.SURFACE_OFFSET);
var _84=_82+(2*this.SURFACE_OFFSET);
var _85=-(Math.round((_81-_7f)/2)+this.SURFACE_OFFSET);
var _86=-(Math.round((_82-_80)/2)+this.SURFACE_OFFSET);
var _85=-(this.SURFACE_OFFSET);
var _86=-(this.SURFACE_OFFSET);
this.poilinediv.lt=_85+"px";
this.poilinediv.tp=_86+"px";
this.poilinediv.style.position="absolute";
this.poilinediv.style.top=_86+"px";
this.poilinediv.style.left=_85+"px";
this.poilinediv.style.height=_84+"px";
this.poilinediv.style.width=_83+"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,_83,_84);
}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 _87=this.div1.style.width.replace("px","");
var _88=this.div1.style.height.replace("px","");
var _89=Math.ceil(_87/this.TILESIZE)*this.TILESIZE;
var _8a=Math.ceil(_88/this.TILESIZE)*this.TILESIZE;
var _8b=_89+(2*this.SURFACE_OFFSET);
var _8c=_8a+(2*this.SURFACE_OFFSET);
var _8d=-(Math.round((_89-_87)/2)+this.SURFACE_OFFSET);
var _8e=-(Math.round((_8a-_88)/2)+this.SURFACE_OFFSET);
var _8d=-(this.SURFACE_OFFSET);
var _8e=-(this.SURFACE_OFFSET);
this.dcCanvasDiv.style.position="absolute";
this.dcCanvasDiv.style.top=_8e+"px";
this.dcCanvasDiv.style.left=_8d+"px";
this.dcCanvasDiv.style.height=_8c+"px";
this.dcCanvasDiv.style.width=_8b+"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){
alert("caught: \n"+err);
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
}
};
MQA.TileMap.prototype.getOverlays=function(){
if(this.myoverlays){
var _90=new MQA.OverlayCollection();
for(var i=0,j=this.myoverlays.getSize();i<j;i++){
_90.add(this.myoverlays.getAt(i));
}
_90.setName(this.myoverlays.getName());
return _90;
}else{
return null;
}
};
MQA.TileMap.prototype.addOverlays=function(_93){
if(_93){
var h=_93.getSize();
for(i=0;i<h;i++){
this.addOverlay(_93.getAt(i));
}
}
};
MQA.TileMap.prototype.addOverlay=function(_95){
if(!this.getOverlays()){
throw ("overlays.js has not been included.");
}
if(!this.surface){
this.createDrawingSurface();
}
if(!this.surface){
throw ("Overlay drawing surface does not exist.");
}
if(this.myoverlays.contains(_95)){
return;
}
_95.map=this;
if(_95.shapePointsXY){
var _96=new MQA.LatLngCollection();
for(var i=0,y=_95.shapePoints.getSize();i<y;i++){
_96.add(this.pixToLL(_95.shapePoints.get(i)));
}
_95.shapePoints=_96;
_95.shapePointsXY=0;
}
this.myoverlays.add(_95);
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();
}else{
_95.drawShape();
}
var e=new MQA.Event("MQA.TileMap.overlayAdded");
e.overlay=_95;
this.onOverlayAdded(e);
};
MQA.TileMap.prototype.removeOverlay=function(_9a){
function removeChildrenFromNode(_9b){
if(_9b!==undefined&&_9b!==null){
return;
}
while(_9b.hasChildNodes()){
_9b.removeChild(_9b.firstChild);
}
};
if(!this.getOverlays()){
throw ("overlays.js has not been included.");
}
var i;
if(_9a){
for(i=0;i<this.myoverlays.getSize();i++){
if(_9a==this.myoverlays.getAt(i)){
_9a.onRemoved(e);
if(_9a.className=="MQA.ImageOverlay"&&_9a.shape){
_9a.shape.firstChild.style.width="0px";
_9a.shape.firstChild.style.height="0px";
_9a.shape.firstChild.src="";
_9a.shape.removeChild(_9a.shape.firstChild);
this.overlaydiv.removeChild(_9a.shape);
_9a.shape=null;
}else{
if(_9a.shape){
MQA.Graphics.remove(this.surface,_9a.shape);
}
_9a.shape=null;
}
_9a.map=null;
this.myoverlays.remove(i,1);
var e=new MQA.Event("MQA.TileMap.overlayRemoved");
e.overlay=_9a;
this.onOverlayRemoved(e);
break;
}
}
}
};
MQA.TileMap.prototype.removeAllOverlays=function(){
if(!this.getOverlays()){
throw ("overlays.js has not been included.");
}
while(this.myoverlays.getSize()>0){
this.removeOverlay(this.myoverlays.getAt(0));
}
};
MQA.TileMap.prototype.replaceOverlays=function(_9e){
if(!this.getOverlays()){
throw ("overlays.js has not been included.");
}
var i;
this.removeAllOverlays();
for(i=0;i<_9e.getSize();i++){
this.addOverlay(_9e.getAt(i));
}
this.myoverlays.setName(_9e.getName());
};
MQA.TileMap.prototype.redrawOverlays=function(){
var i,j;
if(!this.getOverlays()){
throw ("mqa.overlay.js has not been included.");
}
for(i=0,j=this.getOverlays().getSize();i<j;i++){
this.getOverlays().getAt(i).redraw();
}
};
MQA.TileMap.prototype.handleOverlays=function(){
if(this.hasTraffic){
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
if(this.controls[MQA.CONTROL_TRAFFIC].mode=="on"){
this.controls[MQA.CONTROL_TRAFFIC].traffic.refresh();
this.controls[MQA.CONTROL_TRAFFIC].updateLegend();
}
}
}
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(_a2){
var ll=this.getXYToLL(_a2);
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.llToPix=function(_a4){
var xy=this.getLLToXY(_a4);
return new MQA.Point(xy.x,xy.y);
};
MQA.TileMap.prototype.setMapType=function(_a6,_a7){
var _a8=this.getMapType();
if(_a8!=_a6){
var _a9="";
switch(_a6){
case "map":
case "sat":
case "hyb":
break;
default:
return;
}
if(_a6=="map"||_a6=="sat"||_a6=="hyb"&&(this.tileMode!=_a6)){
this.sendTransactions();
this.showMap=false;
this.showSat=false;
this.showHyb=false;
this.div.mapdiv.style.display="none";
this.div.satdiv.style.display="none";
this.div.hybdiv.style.display="none";
if(_a6=="map"){
this.showMap=true;
this.div.mapdiv.style.display="block";
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
if(MQA.getBrowserInfo().name=="msie"){
this.logos[MQA.LOGO_SAT_COPY].style.visibility="hidden";
}else{
this.logos[MQA.LOGO_SAT_COPY].style.display="none";
}
this.tileNode="MQMAP";
}
if(_a6=="sat"){
this.showSat=true;
this.div.satdiv.style.display="block";
this.logos[MQA.LOGO_MAP_COPY].style.display="none";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
if(MQA.getBrowserInfo().name=="msie"){
this.logos[MQA.LOGO_SAT_COPY].style.visibility="visible";
}
this.tileNode="MQSAT";
}
if(_a6=="hyb"){
this.showSat=true;
this.showHyb=true;
this.div.satdiv.style.display="block";
this.div.hybdiv.style.display="block";
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
if(MQA.getBrowserInfo().name=="msie"){
this.logos[MQA.LOGO_SAT_COPY].style.visibility="visible";
}
this.tileNode="MQHYB";
}
this.tileMode=_a6;
_a7=(typeof (_a7)=="undefined")?false:_a7;
if(!_a7){
var _aa=this.getCenterLatLng();
this.centerlat=_aa.lat;
this.centerlng=_aa.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(_a6);
}
var evt=new MQA.Event("MQA.TileMap.mapTypeChanged");
evt.prevMapType=_a8;
evt.mapType=_a6;
this.onMapTypeChanged(evt);
}
};
MQA.TileMap.prototype.zoomIn=function(){
var _ac=this.getZoomLevel();
_ac++;
this.setZoomLevel(_ac);
};
MQA.TileMap.prototype.zoomOut=function(){
var _ad=this.getZoomLevel();
_ad--;
this.setZoomLevel(_ad);
};
MQA.TileMap.prototype.setZoomLevel=function(_ae){
var _af=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_af;
this.onZoomStart(evt);
this._setZoomLevel(_ae);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_af;
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(_b2){
_b2=parseInt(_b2);
if(_b2<1||_b2>16||this.drag||this.slide||_b2==this.zoom){
return;
}
var _b3=this.getCenterLatLng();
this.sendTransactions();
this.centerlat=_b3.lat;
this.centerlng=_b3.lng;
this.zoom=_b2;
this.scale=MQA.SCALES[this.zoom];
this.rebuildTiles();
};
MQA.TileMap.prototype.getZoomLevel=function(){
return this.zoom;
};
MQA.TileMap.prototype.zoomToRect=function(_b4,_b5,_b6,_b7){
var _b8=this.getZoomLevel();
if(_b5==null){
_b5=false;
}
if(_b6==null){
_b6=1;
}
if(_b7==null){
_b7=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_b8;
this.onZoomStart(evt);
this.updateZoom("off");
this._bestFit(_b4,_b5,_b6,_b7);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_b8;
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(_bb){
var i=(_bb)?(((_bb>=1)&&(_bb<=16))?_bb:0):0;
return MQA.SCALES[i];
};
MQA.TileMap.prototype.bestFit=function(_bd,_be,_bf){
var _c0=this.getZoomLevel();
if(this.pois==null){
return;
}
if(_bd==null){
_bd=false;
}
if(_be==null){
_be=1;
}
if(_bf==null){
_bf=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_c0;
this.onZoomStart(evt);
this.updateZoom("off");
var _c2=new MQA.RectLL(new MQA.PointLL(this.pois[0].ll.lat,this.pois[0].ll.lng),new MQA.PointLL(this.pois[0].ll.lat,this.pois[0].ll.lng));
var j=this.pois.length;
for(var i=1;i<j;i++){
var _c5=this.pois[i].ll;
if(_c5.lat>_c2.ul.lat){
_c2.ul.lat=_c5.lat;
}
if(_c5.lng<_c2.ul.lng){
_c2.ul.lng=_c5.lng;
}
if(_c5.lat<_c2.lr.lat){
_c2.lr.lat=_c5.lat;
}
if(_c5.lng>_c2.lr.lng){
_c2.lr.lng=_c5.lng;
}
}
this._bestFit(_c2,_bd,_be,_bf);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_c0;
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(_c7,_c8,_c9,_ca){
var _cb,_cc,_cd,_ce,_cf,_d0;
if(_c8==null){
_c8=false;
}
if(_c9==null){
_cf=1;
}else{
_c9=parseInt(_c9);
if(_c9<1||_c9>15){
_cf=1;
}else{
_cf=_c9+1;
}
}
if(_ca==null){
_d0=16;
}else{
_ca=parseInt(_ca);
if(_ca<1||_ca>16){
_d0=16;
}else{
_d0=_ca;
}
if(_d0<_cf){
_d0=_cf+1;
}
}
if(_c7.ul.x){
_cb=new MQA.PointXY(_c7.ul.x,_c7.ul.y);
_cc=new MQA.PointXY(_c7.lr.x,_c7.lr.y);
_cd=this.getXYToLL(new MQA.PointXY(_c7.ul.x,_c7.ul.y));
_ce=this.getXYToLL(new MQA.PointXY(_c7.lr.x,_c7.lr.y));
}else{
_cb=this.getLLToXY(new MQA.PointLL(_c7.ul.lat,_c7.ul.lng));
_cc=this.getLLToXY(new MQA.PointLL(_c7.lr.lat,_c7.lr.lng));
_cd=new MQA.PointLL(_c7.ul.lat,_c7.ul.lng);
_ce=new MQA.PointLL(_c7.lr.lat,_c7.lr.lng);
}
var _d1=Math.abs(_ce.lng-_cd.lng)*(MQA.PIXERSPERLNGDEGREE/this.scale);
var _d2=Math.abs(_ce.lat-_cd.lat)*(MQA.PIXERSPERLATDEGREE/this.scale);
if(_c8==true){
var _d3=this.getCenterLatLng();
var _d4=Math.max(Math.abs(_d3.lng-_cd.lng),Math.abs(_d3.lng-_ce.lng));
var _d5=Math.max(Math.abs(_d3.lat-_cd.lat),Math.abs(_d3.lat-_ce.lat));
_d1=(_d4*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
_d2=(_d5*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
}
var _d6=(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 _d7=Math.max((this.scale*(_d1/(this.width-(_d6*2)))),(this.scale*(_d2/(this.height-(_d6*2)))));
while(_d7<MQA.SCALES[_cf]&&_cf<=_d0){
_cf++;
}
if(_c8==true){
this._setZoomLevel((_cf-1));
}else{
this.setCenterLatLngZoomLevel(new MQA.PointLL(((_cd.lat+_ce.lat)/2),((_cd.lng+_ce.lng)/2)),(_cf-1));
}
};
MQA.TileMap.prototype.bestFitLL=function(_d8,_d9,_da,_db){
if(!_d8.length){
return;
}
if(_d9==null){
_d9=false;
}
if(_da==null){
_da=1;
}
if(_db==null){
_db=16;
}
var _dc=new MQA.RectLL(_d8[0],_d8[0]);
_dc.setBounds(_d8);
this.zoomToRect(_dc,_d9,_da,_db);
};
MQA.TileMap.prototype.getCenter=function(){
var ll=this.getCenterLatLng();
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.setCenter=function(_de,_df){
if(_df==null){
this.setCenterLatLng(_de);
}else{
var _e0=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_e0;
this.onZoomStart(evt);
this.updateZoom("off");
this.setCenterLatLngZoomLevel(_de,_df);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_e0;
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(_e3){
var pnt=this.llToPix(_e3);
if((pnt.getX()>-100&&pnt.getX()<this.width+100)||(pnt.getY()>-100&&pnt.getY()<this.height+100)){
this.slideMapToPoint(pnt);
}else{
this.setCenter(_e3);
}
};
MQA.TileMap.prototype.getRolloverWindow=function(){
return this.rolloverwindow;
};
MQA.TileMap.prototype.getInfoWindow=function(){
return this.infowindow;
};
MQA.TileMap.prototype.setInfoTitleHTML=function(_e5){
var _e6=document.createElement("div");
_e6.innerHTML="<div>"+_e5+"</div>";
this.infoWindowTitle=_e6;
};
MQA.TileMap.prototype.setInfoContentHTML=function(_e7){
var _e8=document.createElement("div");
_e8.innerHTML="<div>"+_e7+"</div>";
this.infoWindowContent=_e8;
};
MQA.TileMap.prototype.setInfoTitleElement=function(_e9){
this.infoWindowTitle=_e9;
};
MQA.TileMap.prototype.setInfoContentElement=function(_ea){
this.infoWindowContent=_ea;
};
MQA.TileMap.prototype.openInfoWindow=function(_eb){
if(this.iwparent.parentNode){
this._removePoi(this.iwparent);
}
this._addPoi(this.pixToLL(_eb),new MQA.Point(0,0),this.iwparent);
this.iwparent.appendChild(this.infowindow.popup);
this.infowindow.modify(_eb,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(_ec){
this.rolloversEnabled=_ec;
};
MQA.TileMap.prototype.getRolloversEnabled=function(){
return this.rolloversEnabled;
};
MQA.TileMap.prototype.enableDragging=function(_ed){
this.disabled=(!_ed==true);
};
MQA.TileMap.prototype.getDragEnabled=function(){
return !this.disabled;
};
MQA.TileMap.prototype.getPois=function(_ee){
_ee=(typeof (_ee)!="undefined"?_ee:false);
var _ef=new MQA.PoiCollection;
for(var i=0,j=this.mypois.getSize();i<j;i++){
if(!this.mypois.getAt(i).trafficPOI||_ee){
_ef.add(this.mypois.getAt(i));
}
}
return _ef;
};
MQA.TileMap.prototype.getSize=function(){
return new MQA.Size(this.div1.style.width,this.div1.style.height);
};
MQA.TileMap.prototype.setSize=function(_f2){
if(typeof (_f2)=="undefined"){
var _f2={};
}
var w=(typeof (_f2.width)=="undefined")?this.parent2.clientWidth:_f2.width;
var h=(typeof (_f2.height)=="undefined")?this.parent2.clientHeight:_f2.height;
var _f5=new MQA.Size(w,h);
if(_f5.width==this.width&&_f5.height==this.height){
return;
}
var _f6=this.getCenterLatLng();
this.width=parseInt(_f5.width);
this.height=parseInt(_f5.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
this.centerlat=_f6.lat;
this.centerlng=_f6.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]);
}
this.tiles=null;
while(this.div.mapdiv.hasChildNodes()){
this.div.mapdiv.removeChild(this.div.mapdiv.firstChild);
}
while(this.div.satdiv.hasChildNodes()){
this.div.satdiv.removeChild(this.div.satdiv.firstChild);
}
while(this.div.hybdiv.hasChildNodes()){
this.div.hybdiv.removeChild(this.div.hybdiv.firstChild);
}
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 _f8=this.getDeclutter().getDeclutterMode();
if(_f8!=0){
this.getDeclutter().setDeclutterMode(0);
this.getDeclutter().setDeclutterMode(_f8);
}
if(this.getOverlays()){
this.redrawOverlays();
}
for(var x=0,y=this.controls.length;x<y;x++){
if(this.controls[x]){
this.placeControl(this.controls[x],true);
if(x==MQA.CONTROL_TRAFFIC){
this.controls[x].placeLegendControl();
}
}
}
};
MQA.TileMap.prototype.getRectFromMapState=function(_fb){
try{
var _fc=new MQMapState();
_fc=null;
}
catch(e){
throw "The JSAPI must be included to use this function.";
return;
}
if(_fb==null){
return;
}
var _fd=parseFloat(_fb.getCenter().getLatitude());
var _fe=parseFloat(_fb.getCenter().getLongitude());
var _ff=_fb.getHeightPixels();
var _100=_fb.getWidthPixels();
var _101=_fb.getMapScale();
var _102=(_ff/2)/(MQA.PIXERSPERLATDEGREE/_101);
var _103=(_100/2)/(MQA.PIXERSPERLNGDEGREE/_101);
_102=parseInt(_102*1000000)/1000000;
_103=parseInt(_103*1000000)/1000000;
var ul=new MQA.LatLng(_fd+_102,_fe-_103);
var lr=new MQA.LatLng(_fd-_102,_fe+_103);
return new MQA.RectLL(ul,lr);
};
MQA.TileMap.prototype.addRouteHighlight=function(_106,_107,_108,_109,_10a,_10b,_10c){
var _10d=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_10d;
this.onZoomStart(evt);
this.updateZoom("off");
this.routerect=_106;
this.rteserver=_107;
if(_108==null){
this.rtesession="";
}else{
this.rtesession=_108.toString();
}
if(this.routerect.ul.lat<this.routerect.lr.lat){
var _10f=this.routerect.ul.lat;
this.routerect.ul.lat=this.routerect.lr.lat;
this.routerect.lr.lat=_10f;
}
if(this.routerect.ul.lng>this.routerect.lr.lng){
var _110=this.routerect.ul.lng;
this.routerect.ul.lng=this.routerect.lr.lng;
this.routerect.lr.lng=_110;
}
this.showRte=true;
if(_109==null||_109==false){
this.getNewRouteHighlight();
}else{
if(_10a==null){
_10a=false;
}
if(_10b==null){
_10b=1;
}
if(_10c==null){
_10c=16;
}
this.bestFitRoute(_10a,_10b,_10c);
}
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_10d;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
};
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.removeRouteHighlight=function(){
this.showRte=false;
this.routerect=null;
this.rtehighlight.style.display="none";
this.rtesession="";
};
MQA.TileMap.prototype.getDeclutter=function(){
return this.mydeclutter;
};
MQA.TileMap.prototype.showDragableMap=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){
this.rebuildTiles(true);
}
if(this.getRouteSession()!=""){
var _114=(this.bestFitRect!=null)?this.bestFitRect:this.routerect;
this.addRouteHighlight(_114,this.rteserver,this.getRouteSession(),this.routebestfit);
}
this.getLoadingDiv().style.zIndex=-1;
},MQA.TileMap.prototype.showStaticMap=function(){
this.getLoadingDiv().style.zIndex=110;
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 _115={type:this.getMapType(),size:this.getSize().toString(),scale:this.getScale(),center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_115.session=this.getRouteSession();
}
if(IsDotCom){
var _116="";
if(this.hasTraffic){
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
_116+="&traffic=";
var _117=this.controls[MQA.CONTROL_TRAFFIC].traffic.getIncidentType();
switch(_117){
case MQA.TRAFFIC_NONE:
_116+=4;
break;
case MQA.TRAFFIC_CONSTRUCTION:
_116+=3;
break;
case MQA.TRAFFIC_INCIDENTS:
_116+=2;
break;
case MQA.TRAFFIC_ALL:
_116+=1;
break;
}
}
}
this.getPoiDiv().style.zIndex=-100;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=-100;
}
this.getDeclutter().removeLeaderLines();
_115.stops=_115.pois="";
var _118=this.getPois();
for(var i=0,j=_118.getSize();i<j;i++){
var _11b=_118.getAt(i);
var _11c=(_11b.dragLeft==null)?0:((-1*_11b.dragLeft)-_11b.mqMapIcon.getAnchorOffset().getX());
var _11d=(_11b.dragTop==null)?0:((-1*_11b.dragTop)-_11b.mqMapIcon.getAnchorOffset().getY());
switch(_11b.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_115[_11b.getKey()]=_11b.getLatLng().toString()+","+_11c+","+_11d;
break;
default:
var _11e=_11b.getKey().split("-");
switch(_11e[0]){
case "stops":
case "pois":
_115[_11e[0]]+=_11e[1].toUpperCase()+","+_11b.getLatLng().toString()+","+_11c+","+_11d+"|";
break;
}
break;
}
}
}
var _11f=MQA.getStaticMapResources()+"?";
for(var nv in _115){
_11f+=(_115[nv]!="")?nv+"="+_115[nv]+"&":"";
}
_11f+="rand="+(Math.round((Math.random()*10000)));
_11f+=_116;
if(this.staticMapImg){
var _121=this.staticMapImg.src;
if(_121.split("&rand=")[0]==_11f.split("&rand=")[0]){
this.staticMapImg.style.display="block";
this.getLoadingDiv().style.zIndex=0;
this.staticMapEnabled=true;
return _121;
}
}
var _122=this.getSize().toString().split(",");
var _123=this.getStaticMapDiv();
_123.style.top=(0-this.getDragOffset().y)+"px";
_123.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="";
_123.appendChild(this.staticMapImg);
}
this.staticMapImg.style.width=_122[0]+"px";
this.staticMapImg.style.height=_122[1]+"px";
this.staticMapImg.src=_11f;
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
this.getLoadingDiv().style.zIndex=0;
};
MQA.TileMap.prototype.hideStaticMap=function(){
if(!this.staticMapEnabled){
return;
}
this.turnEventsOff=false;
if(!(this.tiles!=null)){
this.showDragableMap();
}
if(this.staticMapImg){
this.staticMapImg.style.display="none";
MQA.Util._nukeChildren(this.staticMapImg.parentNode);
this.staticMapImg=null;
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(_124){
this.bestFitMargin=_124;
};
MQA.TileMap.prototype.getBestFitMargin=function(){
return this.bestFitMargin;
};
MQA.TileMap.prototype.dispose=function(){
var _125=true;
var _126=true;
var dan=true;
MQA._prEvent.delDtor(this._dth);
this.brokerKey=null;
MQA._prEvent.stopObserving(this.div1,"click",this.div1_click);
MQA._prEvent.stopObserving(this.div1,"dblclick",this.div1_dblclick);
this.div1_click=null;
this.div1_dblclick=null;
MQA._prEvent.stopObserving(document,"mousemove",this.document_mousemove);
MQA._prEvent.stopObserving(document,"mouseup",this.document_mouseup);
MQA._prEvent.stopObserving(document,"mouseout",this.document_mouseout);
MQA._prEvent.stopObserving(this.parent,"mouseover",this.parent_mouseover);
MQA._prEvent.stopObserving(this.parent,"mousedown",this.parent_mousedown);
this.document_mousemove=null;
this.document_mouseup=null;
this.document_mouseout=null;
this.parent_mouseover=null;
this.parent_mousedown=null;
if(this.controls[MQA.CONTROL_TYPE]&&this.controls[MQA.CONTROL_TYPE].dispose){
this.controls[MQA.CONTROL_TYPE].dispose();
this.controls[MQA.CONTROL_TYPE]=null;
}
if(this.controls[MQA.CONTROL_PANZOOM]&&this.controls[MQA.CONTROL_PANZOOM].dispose){
this.controls[MQA.CONTROL_PANZOOM].dispose();
this.controls[MQA.CONTROL_PANZOOM]=null;
}
if(this.controls[MQA.CONTROL_ZOOM]&&this.controls[MQA.CONTROL_ZOOM].dispose){
this.controls[MQA.CONTROL_ZOOM].dispose();
this.controls[MQA.CONTROL_ZOOM]=null;
}
if(this.controls[MQA.CONTROL_PAN]&&this.controls[MQA.CONTROL_PAN].dispose){
this.controls[MQA.CONTROL_PAN].dispose();
this.controls[MQA.CONTROL_PAN]=null;
}
if(this.controls[MQA.CONTROL_TRAFFIC]&&this.controls[MQA.CONTROL_TRAFFIC].dispose){
this.controls[MQA.CONTROL_TRAFFIC].dispose();
this.controls[MQA.CONTROL_TRAFFIC]=null;
}
this.controls=null;
if(this.pois){
for(var t=0,j=this.pois.length;t<j;t++){
if(_125){
this.pois[t].innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.pois[t]);
}
this.pois[t]=null;
}
}
this.pois=null;
if(this.mypois){
for(var i=0,j=this.mypois.getSize();i<j;i++){
this.mypois.getAt(i).dispose();
}
this.mypois.removeAll();
}
this.mypois=null;
if(this.flowImage){
if(dan){
MQA.Util._deleteDOMObject(this.flowImage);
}
this.flowImage=null;
}
if(this.prnstyle.styleSheet){
this.prnstyle.styleSheet.cssText="";
if(_125){
this.prnstyle.styleSheet.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.prnstyle.styleSheet);
}
if(dan){
MQA.Util._deleteDOMObject(this.prnstyle);
}
}else{
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.prnstyle);
}
if(dan){
MQA.Util._deleteDOMObject(this.prnstyle);
}
}
this.prnstyle=null;
this.infowindow.dispose();
this.infowindow=null;
if(_125){
this.iwparent.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.iwparent);
}
if(dan){
MQA.Util._deleteDOMObject(this.iwparent);
}
this.iwparent=null;
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow.dispose();
this.rolloverwindow=null;
if(_125){
this.div.ldiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.ldiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.ldiv);
}
this.div.ldiv=null;
if(_125){
this.div.mapdiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.mapdiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.mapdiv);
}
this.div.mapdiv=null;
if(_125){
this.div.satdiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.satdiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.satdiv);
}
this.div.satdiv=null;
if(_125){
this.div.hybdiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.hybdiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.hybdiv);
}
this.div.hybdiv=null;
if(_125){
this.div.staticmapdiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.staticmapdiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.staticmapdiv);
}
this.div.staticmapdiv=null;
if(_125){
this.div.poidiv.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div.poidiv);
}
if(dan){
MQA.Util._deleteDOMObject(this.div.poidiv);
}
this.div.poidiv=null;
if(_125){
this.div.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div);
}
if(dan){
MQA.Util._deleteDOMObject(this.div);
}
this.div=null;
if(_125){
this.div1.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.div1);
}
if(dan){
MQA.Util._deleteDOMObject(this.div1);
}
this.div1=null;
for(var a=0;a<this.mapcols;a++){
for(var b=0;b<this.maprows;b++){
this.tiles[a][b].dispose();
this.tiles[a][b].innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.tiles[a][b]);
this.tiles[a][b]=null;
}
}
this.tiles=null;
if(_125){
this.parent.innerHTML=null;
}
if(_126){
MQA.Util._setOuterHTMLToEmptyString(this.parent);
}
if(dan){
MQA.Util._deleteDOMObject(this.parent);
}
this.parent=null;
var logo;
for(var i=0;i<this.logos.length;i++){
logo=this.logos[i];
MQA.Util._deleteDOMObject(logo);
logo=null;
}
this.logos=null;
if(dan){
MQA.Util._deleteDOMObject(this.loading);
}
this.loading=null;
this.rtehighlight.onload=null;
if(dan){
MQA.Util._deleteDOMObject(this.rtehighlight);
}
this.rtehighlight=null;
delete this.prnstyle;
delete this.logos;
delete this.maptiler;
delete this.hybtiler;
delete this.sattiler;
delete this.loading;
delete this.div1;
delete this.parent;
delete this.rtehighlight;
this._subDispose();
this.sendTransactions(true);
};
MQA.TileMap.prototype.getZoom=function(RECT,_12f,_130,_131,_132,SIZE){
var SIZE=(typeof (SIZE)!="undefined")?SIZE:this.getSize();
if(_130==null){
_130=false;
}
if(_131==null){
_131=1;
}else{
_131=parseInt(_131);
if(_131<1||_131>15){
_131=1;
}
}
if(_132==null){
_132=16;
}else{
_132=parseInt(_132);
if(_132<1||_132>16){
_132=16;
}
if(_132<_131){
_132=_131+1;
}
}
var zoom=_131;
var _135=_132;
var _136=new MQA.PointFloatXY((RECT.ul.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.ul.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _137=new MQA.PointFloatXY((RECT.lr.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.lr.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _138=new MQA.PointLL(RECT.ul.lat,RECT.ul.lng);
var _139=new MQA.PointLL(RECT.lr.lat,RECT.lr.lng);
var _13a=Math.abs(_139.lng-_138.lng)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]);
var _13b=Math.abs(_139.lat-_138.lat)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]);
if(_130==true){
var ptXY=new MQA.PointFloatXY((_12f.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(_12f.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13d=Math.max(Math.abs(ptXY.x-_136.x),Math.abs(ptXY.x-_137.x));
var _13e=Math.max(Math.abs(ptXY.y-_136.y),Math.abs(ptXY.y-_137.y));
_13a=_13d*2;
_13b=_13e*2;
}
var _13f=(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 _140=Math.max((MQA.SCALES[zoom]*(_13a/(SIZE.width-(_13f*2)))),(MQA.SCALES[zoom]*(_13b/(SIZE.height-(_13f*2)))));
if(_140>MQA.SCALES[zoom]){
return zoom;
}
while(_140<MQA.SCALES[zoom]&&zoom<=_135){
zoom++;
}
return zoom-1;
};
MQA.TileMap.prototype.rebuildTiles=function(_141){
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";
_141=(typeof (_141)=="undefined")?false:_141;
if(this.tiles==null){
this.tiles=new Array(this.mapcols);
for(var a=0;a<this.mapcols;a++){
this.tiles[a]=new Array(this.maprows);
for(var b=0;b<this.maprows;b++){
this.tiles[a][b]=new MQA.Tile(this,this.div,(a-2)*this.tilesize+this.m_layoffX,(b-2)*this.tilesize+this.m_layoffY,this.m_centerX-2+a,this.m_centerY+2-b,this.scale,this.zoom,this.tilesize);
}
}
}else{
for(var a=0;a<this.mapcols;a++){
for(var b=0;b<this.maprows;b++){
this.tiles[a][b].loadingTile();
}
}
for(var a=0;a<this.mapcols;a++){
for(var b=0;b<this.maprows;b++){
this.tiles[a][b].updateTile((a-2)*this.tilesize+this.m_layoffX,(b-2)*this.tilesize+this.m_layoffY,this.m_centerX-2+a,this.m_centerY+2-b,this.scale,this.zoom,this.tilesize);
}
}
}
this.div.ldiv.tp=this.tiles[0][0].tp;
this.div.ldiv.lt=this.tiles[0][0].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.showMap){
this.mapaccum1+=1;
this.mapaccum2+=1;
}
if(this.showSat){
this.sataccum1+=1;
this.sataccum2+=1;
}
if(this.showHyb){
this.hybaccum1+=1;
this.hybaccum2+=1;
}
if(this.showRte){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
if(!_141&&this.pois){
var y=this.pois.length;
for(var x=0;x<y;x++){
var poi=this.pois[x];
var XY=this.getLLToXY(poi.ll);
poi.style.left=(XY.x+poi.offset.x-this.m_dragoffX)+"px";
poi.style.top=(XY.y+poi.offset.y-this.m_dragoffY)+"px";
}
}
};
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.setClickHandler=function(_14b,_14c){
if(this.clickEvent==MQA.EVENT_CLICK){
MQA._prEvent.stopObserving(this.parent,"click",this.clickHandler);
}else{
if(this.clickEvent==MQA.EVENT_DBLCLICK){
MQA._prEvent.stopObserving(this.parent,"dblclick",this.clickHandler);
}
}
this.clickEvent=_14b;
this.clickOper=_14c;
if(this.clickEvent==MQA.EVENT_CLICK){
this.clickHandler=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.parent,"click",this.clickHandler);
}else{
if(this.clickEvent==MQA.EVENT_DBLCLICK){
this.clickHandler=MQA._prEvent.EventCallback(this,"onDblClick");
MQA._prEvent.observe(this.parent,"dblclick",this.clickHandler);
}
}
};
MQA.TileMap.prototype.sendTransactions=function(_14d){
if(this.showMap&&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.showSat&&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.showHyb&&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(_14d!=null&&_14d==true){
MQA.Util.pause(250);
}
};
MQA.TileMap.prototype.getNewRouteHighlight=function(){
var _14e=MQA.getRowTile(this.routerect.ul.lat,this.scale);
var _14f=MQA.getColTile(this.routerect.ul.lng,this.scale);
var _150=MQA.getRowTile(this.routerect.lr.lat,this.scale);
var _151=MQA.getColTile(this.routerect.lr.lng,this.scale);
this.rteoffset=-1;
this.rtethresh=2;
if(this.tiles==null){
this.rebuildTiles();
}
var _152=this.tiles[0][0];
var _153=this.tiles[this.mapcols-1][this.maprows-1];
if(_14f>_152.x&&_14e<_152.y&&_151<_153.x&&_150>_153.y){
this.rteoffset=0;
this.rtethresh=-1;
_152=this.tiles[_14f-_152.x][_152.y-_14e];
_153=this.tiles[this.mapcols-1-(_153.x-_151)][this.maprows-1-(_150-_153.y)];
}
var _154=MQA.getLatTileRowOffset(_152.y+this.rteoffset*-1,255,this.scale);
var _155=MQA.getLngTileColOffset(_152.x-1+this.rteoffset*1,255,this.scale);
var _156=MQA.getLatTileRowOffset(_153.y-1+this.rteoffset*1,255,this.scale);
var _157=MQA.getLngTileColOffset(_153.x+this.rteoffset*-1,255,this.scale);
var WDTH=(1+(_153.x+this.rteoffset*-1)-(_152.x+this.rteoffset*1))*this.tilesize;
var HGHT=(1+(_152.y+this.rteoffset*-1)-(_153.y+this.rteoffset*1))*this.tilesize;
this.m_routeoffX=0;
this.m_routeoffY=0;
if(this.zoom<3&&_155>0&&this.centerlng<0){
_155-=360;
}
var _15a=!((_155>this.routerect.lr.lng)||(_157<this.routerect.ul.lng)||(_156>this.routerect.ul.lat)||(_154<this.routerect.lr.lat));
if(this.rteoffset==0||_15a){
this.rtehighlight.lt=(_152.lt+this.rteoffset*this.tilesize+1);
this.rtehighlight.tp=(_152.tp+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=(_154+_156)/2;
var CLNG=(_155+_157)/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="+_154+"&lngul="+_155+"&latlr="+_156+"&lnglr="+_157+"&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 _15f=0;
while(this.m_tileoffX+this.m_tileofX>MQA.TILESIZE){
this.tiles.unshift(this.tiles.pop());
for(var b=0;b<this.maprows;b++){
this.tiles[0][b].loadingTile();
}
for(var b=0;b<this.maprows;b++){
var _161=this.tiles[0][b];
var _162=this.tiles[1][b];
_161.updateTile(_162[this.tileNode].image.lt-this.tilesize,_161[this.tileNode].image.tp,_162.x-1,_161.y,this.scale,this.zoom);
}
this.m_tileoffX-=this.tilesize;
this.m_routeoffX--;
this.m_transoffX--;
_15f+=(this.maprows-2);
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.tiles.push(this.tiles.shift());
for(var b=0;b<this.maprows;b++){
this.tiles[this.mapcols-1][b].loadingTile();
}
for(var b=0;b<this.maprows;b++){
var _161=this.tiles[this.mapcols-1][b];
var _162=this.tiles[this.mapcols-2][b];
_161.updateTile(_162[this.tileNode].image.lt+this.tilesize,_161[this.tileNode].image.tp,_162.x+1,_161.y,this.scale,this.zoom);
}
this.m_tileoffX+=this.tilesize;
this.m_routeoffX++;
this.m_transoffX++;
_15f+=(this.maprows-2);
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){
for(var a=0;a<this.mapcols;a++){
this.tiles[a].unshift(this.tiles[a].pop());
this.tiles[a][0].loadingTile();
}
for(var a=0;a<this.mapcols;a++){
var _161=this.tiles[a][0];
var _162=this.tiles[a][1];
_161.updateTile(_161[this.tileNode].image.lt,_162[this.tileNode].image.tp-this.tilesize,_161.x,_162.y+1,this.scale,this.zoom);
}
this.m_tileoffY-=this.tilesize;
this.m_routeoffY--;
this.m_transoffY--;
_15f+=(this.mapcols-2);
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){
for(var a=0;a<this.mapcols;a++){
this.tiles[a].push(this.tiles[a].shift());
this.tiles[a][this.maprows-1].loadingTile();
}
for(var a=0;a<this.mapcols;a++){
var _161=this.tiles[a][this.maprows-1];
var _162=this.tiles[a][this.maprows-2];
_161.updateTile(_161[this.tileNode].image.lt,_162[this.tileNode].image.tp+this.tilesize,_161.x,_162.y-1,this.scale,this.zoom);
}
this.m_tileoffY+=this.tilesize;
this.m_routeoffY++;
this.m_transoffY++;
_15f+=(this.mapcols-2);
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.showMap){
this.mapaccum1+=_15f;
}
if(this.showSat){
this.sataccum1+=_15f;
}
if(this.showHyb){
this.hybaccum1+=_15f;
}
}
if(Math.abs(this.m_transoffY)>4||Math.abs(this.m_transoffX)>4){
this.sendTransactions();
}
var _164=Math.abs(this.m_dragoffX)%MQA.SURFACE_OFFSET;
var _165=Math.abs(this.m_dragoffY)%MQA.SURFACE_OFFSET;
var _166=Math.ceil(MQA.SURFACE_OFFSET/1.5);
if((_164>_166)&&this.updateOverlaysX){
this.handleOverlays();
this.updateOverlaysX=false;
}
if((_165>_166)&&this.updateOverlaysY){
this.handleOverlays();
this.updateOverlaysY=false;
}
if(_164<_166&&!this.updateOverlaysX){
this.updateOverlaysX=true;
}
if(_165<_166&&!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(_167,_168,_169,_16a,_16b,_16c,_16d,_16e){
var pc=_16c/_16d;
var dx=parseInt(pc*_16a)-_168;
var dy=parseInt(pc*_16b)-_169;
this.scrollMap(dx,dy);
_168+=dx;
_169+=dy;
_16c++;
if(_16c<=_16d){
setTimeout("MQA.MASTER_BROKER.DoSlide( "+_167+", "+_168+", "+_169+", "+_16a+", "+_16b+", "+_16c+", "+_16d+", "+_16e+" );",_16e);
}else{
this.slide=false;
this.moving=false;
this.handleMove("moveend");
}
};
MQA.TileMap.prototype.isPoi=function(_172){
if(this.pois==null){
return false;
}
while(_172!=null&&_172!=this.parent){
var j=this.pois.length;
for(var i=0;i<j;i++){
if(this.pois[i]==_172){
return true;
}
}
_172=_172.parentNode;
}
return false;
};
MQA.TileMap.prototype.onMouseMove=function(_175){
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.element.style.left=this.draggedObject.offsetX+_175.clientX-this.draggedObject.startX+"px";
this.draggedObject.element.style.top=this.draggedObject.offsetY+_175.clientY-this.draggedObject.startY+"px";
if(this.draggedObject.mqrw&&!this.draggedObject.mqrw.isHidden()&&(Math.abs(this.draggedObject.startX-_175.clientX)>3||Math.abs(this.draggedObject.startY-_175.clientY)>3)&&!this.getDeclutter().keepRolloversOnDrag){
this.draggedObject.mqrw.hide();
}
}
if(!this.drag||this.disabled){
return;
}
var _176=MQA.Util.getParentOffset(this.parent);
var cx=_175.clientX-_176.x;
var cy=_175.clientY-_176.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(_17d){
if(this.draggedObject&&this.mypois.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 _180=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.showMap&&_180){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.showSat&&_180){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.showHyb&&_180){
this.hybaccum2+=1;
this.diffaccum=0;
}
}
var _181=MQA.Util.getParentOffset(this.parent);
_17d.cx=_17d.clientX-_181.x;
_17d.cy=_17d.clientY-_181.y;
this.startingToMove=false;
if(this.moving){
this.moving=false;
this.handleMove("moveend");
}
this.startingToDrag=false;
if(this.drag&&!this.click){
this.handleDrag("dragend",_17d);
}
this.handleMouse("mouseup",_17d);
MQA._prEvent.stop(_17d);
this.drag=false;
};
MQA.TileMap.prototype.onMouseOver=function(_182){
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onMouseDown=function(_183){
this.click=true;
if(this.slide||this.disabled){
return;
}
if(this.isPoi(MQA._prEvent.element(_183))){
return;
}
var _184=MQA.Util.getParentOffset(this.parent);
this.current_mousecursor=this.grabbing_mousecursor;
this.div.style.cursor=this.current_mousecursor;
var cx=_183.clientX-_184.x;
var cy=_183.clientY-_184.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;
_183.cx=cx;
_183.cy=cy;
this.handleMouse("mousedown",_183);
MQA._prEvent.stop(_183);
};
MQA.TileMap.prototype.onMouseOut=function(_187){
if(!_187.relatedTarget&&!_187.toElement){
this.onMouseUp(_187);
}
};
MQA.TileMap.prototype.onDblClick=function(_188){
this.handleClickEvent(_188,false);
};
MQA.TileMap.prototype.handleClickEvent=function(_189,_18a){
if(this.drag||this.slide||(!this.click&&_18a)){
return;
}
this.click=false;
this.div.style.cursor="default";
var _18b=MQA.Util.getParentOffset(this.parent);
var cx=(_189.pageX||(_189.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-_18b.x;
var cy=(_189.pageY||(_189.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-_18b.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(_18f){
if(this.drag){
return;
}
if(_18f.wheelDelta>0&&this.zoom<16){
this.zoomIn();
}
if(_18f.wheelDelta<0&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.onKeyDown=function(_190){
if(this.drag){
return;
}
key=_190.which?_190.which:_190.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 _192=PTXY.x,_193=PTXY.y,_194=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_194,0,0,_192,_193,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 _197=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.showMap&&_197){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.showSat&&_197){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.showHyb&&_197){
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 _19b=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_19b,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 _19e=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.showMap&&_19e){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.showSat&&_19e){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.showHyb&&_19e){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.panNorth=function(_19f){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)-parseInt(this.height*(_19f/100))));
};
MQA.TileMap.prototype.panSouth=function(_1a0){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)+parseInt(this.height*(_1a0/100))));
};
MQA.TileMap.prototype.panEast=function(_1a1){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a1/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panWest=function(_1a2){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a2/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panNorthWest=function(_1a3){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a3/100)),parseInt(this.height/2)-parseInt(this.height*(_1a3/100))));
};
MQA.TileMap.prototype.panSouthWest=function(_1a4){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a4/100)),parseInt(this.height/2)+parseInt(this.height*(_1a4/100))));
};
MQA.TileMap.prototype.panNorthEast=function(_1a5){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a5/100)),parseInt(this.height/2)-parseInt(this.height*(_1a5/100))));
};
MQA.TileMap.prototype.panSouthEast=function(_1a6){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a6/100)),parseInt(this.height/2)+parseInt(this.height*(_1a6/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 _1b0=MQA.getColTile(LL.lng,this.scale);
var _1b1=MQA.getRowTile(LL.lat,this.scale);
var _1b2=MQA.getColTileOffset(LL.lng,this.scale);
var _1b3=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_1b0)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_1b2);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_1b1)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_1b3);
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.updatePoi=function(_1b8,_1b9,_1ba){
if(this.pois==null){
return;
}
var _1bb=false;
var j=this.pois.length;
for(var i=0;i<j;i++){
if(this.pois[i]==_1ba){
_1bb=true;
}
}
if(_1bb){
var xy=this.getLLToXY(_1b8);
_1ba.ll=_1b8;
_1ba.offset=_1b9;
_1ba.style.left=(xy.x+_1b9.x-this.m_dragoffX)+"px";
_1ba.style.top=(xy.y+_1b9.y-this.m_dragoffY)+"px";
}
};
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(_1bf,_1c0,_1c1){
if(this.routerect){
if(_1bf==null){
_1bf=false;
}
if(_1c0==null){
_1c0=1;
}
if(_1c1==null){
_1c1=16;
}
this._bestFit(this.routerect,_1bf,_1c0,_1c1);
}
};
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");
};

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_click=null;
this.zoomout_click=null;
this.revert_click=null;
this.zoomin_mouseover=null;
this.zoomout_mouseover=null;
this.revert_mouseover=null;
this.zoomin_mouseout=null;
this.zoomout_mouseout=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.backgroundImage="url("+MQA.Util._modifyImageSrc("http://img.mqcdn.com/mqmaptiled/map-controls-top-bg")+")";
_2.style.backgroundColor="transparent";
_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.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=null;
for(var i=0;i<16;i++){
MQA.Util._deleteDOMObject(this.zoomarea[0]);
}
this.zoomarea=null;
this.zoomin=MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
this.zoomout=MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoombox.innerHTML=null;
this.zoombox.outerHTML="";
this.zoombox=MQA.Util._deleteDOMObject(this.zoombox);
this.zoombox=null;
this.compassrosemap.innerHTML=null;
this.compassrosemap.outerHTML="";
this.compassroseimg=MQA.Util._deleteDOMObject(this.compassroseimg);
this.compassroseimg=null;
this.compassrose=MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.compassrosemap=MQA.Util._deleteDOMObject(this.compassrosemap);
this.compassrosemap=null;
this.revert=MQA.Util._deleteDOMObject(this.revert);
this.revert=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
this.elem=MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.LargeZoomControl2.prototype.eventmonitor=function(_e){
if(MQA._prEvent.element(_e)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_e)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_e)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_e)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_e)==this.pan[MQA.BEST_FIT]){
eventId="bestfit";
}
if(MQA._prEvent.element(_e)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_e)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_e)==this.revert){
eventId="revert";
}
if(MQA._prEvent.element(_e)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_e)==this.zoomarea[i]){
eventId=16-i;
}
}
switch(_e.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 _10=this.map.routerect;
var _11=this.map.mypois.getSize();
var _12=this.map.getPois();
if(_10&&(_11>0)){
var _13=new MQA.RectLL(new MQA.PointLL(_12.getAt(0).getLatLng().getLatitude(),_12.getAt(0).getLatLng().getLongitude()),new MQA.PointLL(_12.getAt(0).getLatLng().getLatitude(),_12.getAt(0).getLatLng().getLongitude()));
for(var i=1;i<_11;i++){
var _14=_12.getAt(i).getLatLng();
_13.ul.lat=Math.max(_14.lat,Math.max(_13.ul.lat,_10.ul.lat));
_13.ul.lng=Math.min(_14.lng,Math.min(_13.ul.lng,_10.ul.lng));
_13.lr.lat=Math.min(_14.lat,Math.min(_13.lr.lat,_10.lr.lat));
_13.lr.lng=Math.max(_14.lng,Math.max(_13.lr.lng,_10.lr.lng));
}
this.map._bestFit(_13,false,1,16);
this.setZoom(this.map.getZoomLevel());
}else{
if(_10&&(_11==0)){
this.map.bestFitRoute();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_10&&(_11>1)){
this.map.bestFitPois();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_10&&(_11==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(_e).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(_e).className!="o"){
return;
}
MQA._prEvent.element(_e).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(_15){
var z=this.zoombox.childNodes[2];
z.style.top=((16-_15)*12+1)+"px";
z.alt="Zoom to level "+_15;
z.title="Zoom to level "+_15;
};
MQA.LargeZoomControl2.prototype.selectZoom=function(_17){
this.zoombox.childNodes[0].style.left=0-((17-_17)*25)+"px";
};
MQA.LargeZoomControl2.prototype.unselectZoom=function(_18){
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";
var _19,_1a;
_19=document.createElement("ul");
_19.className="map-view screen";
this.elem.appendChild(_19);
_1a=document.createElement("li");
_1a.className="map-view-street";
_19.appendChild(_1a);
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";
_1a.appendChild(this.streetview);
_1a=document.createElement("li");
_1a.className="map-view-aerial";
_19.appendChild(_1a);
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";
_1a.appendChild(this.aerialview);
_1a=document.createElement("li");
_1a.className="map-view-hybrid";
_19.appendChild(_1a);
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="<div><input id='aerial-checkbox' type='checkbox' checked='true' /><label for='aerial-checkbox'>Show labels</label></div>";
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";
_1a.appendChild(this.hybridview);
_1a.appendChild(this.hybridcontent);
_19=null;
_1a=null;
};
MQA.ViewControl2.prototype=new MQA.Control();
MQA.ViewControl2.prototype.constructor=MQA.ViewControl2;
MQA.ViewControl2.prototype.dispose=function(){
this.map=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);
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridcontent=null;
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl2.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
var _1c=this.hybridcontent.childNodes[0].childNodes[0];
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridChkBxClick=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);
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.observe(_1c,"click",this.eHybridChkBxClick);
switch(this.map.getMapType()){
case "map":
this.updateControl("map");
break;
case "sat":
this.updateControl("sat");
break;
case "hyb":
this.updateControl("hyb");
break;
}
};
MQA.ViewControl2.prototype.eventmonitor=function(evt){
var _1e=MQA._prEvent.element(evt);
var _1f=this.hybridcontent.childNodes[0].childNodes[0];
switch(evt.type){
case "click":
if(_1e==this.streetview){
this.selectMode("street");
}else{
if(_1e==this.aerialview){
(_1f.checked)?this.selectMode("hybrid"):this.selectMode("aerial");
}else{
if(_1e.checked==true){
this.selectMode("hybrid");
}else{
if(_1e.checked==false){
this.selectMode("aerial");
}
}
}
}
break;
case "mouseover":
if(_1e.className!="a"){
_1e.className="o";
}
break;
case "mouseout":
if(_1e.className=="o"){
_1e.className="";
}
break;
}
};
MQA.ViewControl2.prototype.updateControl=function(_20){
var _21=this.hybridcontent.childNodes[0].childNodes[0];
switch(_20){
case "map":
this.streetview.className="a";
this.aerialview.className="";
this.hybridview.parentNode.style.display="none";
break;
case "sat":
this.streetview.className="";
this.aerialview.className="a";
_21.checked=false;
this.hybridview.parentNode.style.display="block";
break;
case "hyb":
this.streetview.className="";
this.aerialview.className="a";
_21.checked=true;
this.hybridview.parentNode.style.display="block";
break;
}
};
MQA.ViewControl2.prototype.selectMode=function(_22){
var _23=this.map.getMapType();
var _24="noChange";
if(_22=="street"&&_23!="map"){
_24="map";
}
if(_22=="aerial"&&_23!="sat"){
_24="sat";
}
if(_22=="hybrid"&&_23!="hyb"){
_24="hyb";
}
if(_24!="noChange"){
this.map.setMapType(_24);
this.map.placeControl(this,true);
}
};
MQA.ViewControl2.prototype.getHeight=function(){
var _25=(this.hybridview.parentNode.style.display=="block")?(this.hybridview.parentNode.offsetHeight-15):0;
return (this.streetview.parentNode.offsetHeight+_25);
};
MQA.ViewControl2.prototype.getWidth=function(){
return (this.elem.childNodes[0].offsetWidth);
};
MQViewControl2=MQA.ViewControl2;

MQA.TrafficServerResponseHandler=new function(){
this.trafficContainer=Array();
this.incidents=null;
this.markets=null;
this.onMarketReturn=function(_1){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_1){
this.trafficContainer[i].onMarketReturn(this.markets);
break;
}
}
};
this.onIncidentReturn=function(_3){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_3){
this.trafficContainer[i].onIncidentReturn(this.incidents);
break;
}
}
};
this.onMarketTimeout=function(_5){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_5){
this.trafficContainer[i].onMarketTimeout();
break;
}
}
};
this.onIncidentTimeout=function(_7){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_7){
this.trafficContainer[i].onIncidentTimeout();
break;
}
}
};
this.addInstance=function(t){
this.trafficContainer.push(t);
};
};
MQA.Traffic=function(_a){
this.trafficServer="http://"+TRAFFSERVER;
this.timeoutDuration=10000;
this.guid=MQA.Util._getRandomGUID(10);
if(typeof (_a)!="undefined"){
this.map=_a;
_a.hasTraffic=true;
}else{
this.map=null;
}
MQA.TrafficServerResponseHandler.addInstance(this);
this.available=true;
this.marketTimer=null;
this.incidentTimer=null;
this.marketScript=null;
this.marketData=null;
this.currentMarket=null;
this.incidentScript=null;
this.incidentData=null;
this.trafficPois=new MQA.PoiCollection();
this.flowImage=null;
this.autoDisplay=false;
this.incidentTitleCallback=null;
this.incidentContentCallback=null;
this.marketTitleCallback=null;
this.marketContentCallback=null;
this.infoWindowCallback=null;
this.incidentType=MQA.TRAFFIC_ALL;
this.minIncidentZoomLevel=7;
this.maxIncidentZoomLevel=16;
this.maxMarketZoomLevel=6;
this.minMarketZoomLevel=2;
this.minFlowZoomLevel=7;
this.maxFlowZoomLevel=16;
this.maxInfoWindowWidth=285;
this.lastUpdateTime=null;
this.incidentIcon0={url:"http://img.mqcdn.com/mqtraffic/incid_sev.png",width:29,height:29};
this.incidentIcon1={url:"http://img.mqcdn.com/mqtraffic/incid_mod.png",width:29,height:29};
this.incidentIcon2={url:"http://img.mqcdn.com/mqtraffic/incid_min.png",width:29,height:29};
this.constructionIcon0={url:"http://img.mqcdn.com/mqtraffic/const_sev.png",width:29,height:29};
this.constructionIcon1={url:"http://img.mqcdn.com/mqtraffic/const_mod.png",width:29,height:29};
this.constructionIcon2={url:"http://img.mqcdn.com/mqtraffic/const_min.png",width:29,height:29};
this.marketIcon={url:"http://img.mqcdn.com/mqtraffic/stoplight.png",width:16,height:30};
this.getLastUpdateTime=function(f){
if(typeof (f)=="undefined"){
f="h:ip z";
}
if(this.lastUpdateTime){
f=f.replace("h",(this.lastUpdateTime.hours>12?this.lastUpdateTime.hours-12:(this.lastUpdateTime.hours==0?"12":this.lastUpdateTime.hours)));
f=f.replace("H",this.lastUpdateTime.hours);
f=f.replace("i",(this.lastUpdateTime.minutes<10?"0"+this.lastUpdateTime.minutes:this.lastUpdateTime.minutes));
f=f.replace("s",(this.lastUpdateTime.seconds<10?"0"+this.lastUpdateTime.seconds:this.lastUpdateTime.seconds));
f=f.replace("y",this.lastUpdateTime.year.toString().substr(2,2));
f=f.replace("Y",this.lastUpdateTime.year);
f=f.replace("m",this.lastUpdateTime.month);
f=f.replace("d",this.lastUpdateTime.day);
f=f.replace("p",(this.lastUpdateTime.hours>=12?"pm":"am"));
f=f.replace("z",this.lastUpdateTime.timeZone);
return f;
}else{
return "notime";
}
};
this.setMaxInfoWindowWidth=function(w){
this.maxInfoWindowWidth=w;
};
this.getMaxInfoWindowWidth=function(){
return this.maxInfoWindowWidth;
};
this.getAvailable=function(){
return this.available;
};
this.isAvailable=function(){
return this.getAvailable();
};
this.setTimeoutDuration=function(x){
this.timeoutDuration=x;
};
this.getTimeoutDuration=function(){
return this.timeoutDuration;
};
this.setAutoDisplay=function(b){
this.autoDisplay=b;
};
this.getAutoDisplay=function(){
return this.autoDisplay;
};
this.setIncidentTitleCallback=function(fn){
this.incidentTitleCallback=fn;
};
this.setIncidentContentCallback=function(fn){
this.incidentContentCallback=fn;
};
this.setMarketTitleCallback=function(fn){
this.marketTitleCallback=fn;
};
this.setMarketContentCallback=function(fn){
this.marketContentCallback=fn;
};
this.setInfoWindowCallback=function(fn){
this.infoWindowCallback=fn;
};
this.setIncidentType=function(b){
this.incidentType=b;
if(this.incidentData){
this.updateTrafficPois();
}
};
this.getIncidentType=function(){
return this.incidentType;
};
this.retrieveMarketData=function(){
this.lastUpdateTime=this.getCurrentDateTimeInfo();
clearTimeout(this.marketTimer);
var _15="MQA.TrafficServerResponseHandler.markets";
this.marketScript=document.createElement("script");
this.marketScript.id="marketScript";
this.marketScript.src=this.trafficServer+"markets?format=json&var="+_15+"&fn=MQA.TrafficServerResponseHandler.onMarketReturn(\""+this.guid+"\")"+"&rand="+(Math.random()*10);
this.marketScript.type="text/javascript";
document.body.appendChild(this.marketScript);
this.marketTimer=setTimeout("MQA.TrafficServerResponseHandler.onMarketTimeout(\""+this.guid+"\")",this.timeoutDuration);
};
this.onMarketTimeout=function(){
clearTimeout(this.marketTimer);
this.marketTimer=null;
this.available=false;
var e=new MQA.Event("MQA.Traffic.marketDataTimeout");
e.srcObject=this;
this.onDataTimeout(e);
};
this.retrieveIncidentData=function(_17){
if(typeof (_17)=="undefined"&&this.map){
var _18=this.getMapRectInfo();
var _17=new MQA.RectLL(new MQA.LatLng(_18.ullat,_18.ullng),new MQA.LatLng(_18.lrlat,_18.lrlng));
}else{
if(typeof (_17)=="undefined"&&!this.map){
throw "retrieveIncidentData() failed. No bounding box specified.";
}
}
this.lastUpdateTime=this.getCurrentDateTimeInfo();
clearTimeout(this.incidentTimer);
var _19="MQA.TrafficServerResponseHandler.incidents";
var _1a="&ullat="+_17.ul.lat+"&ullng="+_17.ul.lng+"&lrlat="+_17.lr.lat+"&lrlng="+_17.lr.lng;
this.incidentScript=document.createElement("script");
this.incidentScript.id="incidentScript";
this.incidentScript.src=this.trafficServer+"incidents?format=json&key="+Key+"&var="+_19+"&fn=MQA.TrafficServerResponseHandler.onIncidentReturn(\""+this.guid+"\")"+_1a+"&rand="+(Math.random()*10);
this.incidentScript.type="text/javascript";
document.body.appendChild(this.incidentScript);
this.incidentTimer=setTimeout("MQA.TrafficServerResponseHandler.onIncidentTimeout(\""+this.guid+"\")",this.timeoutDuration);
};
this.onIncidentTimeout=function(){
clearTimeout(this.incidentTimer);
this.incidentTimer=null;
this.available=false;
var e=new MQA.Event("MQA.Traffic.incidentDataTimeout");
e.srcObject=this;
this.onDataTimeout(e);
};
this.getIncidentData=function(){
return this.incidentData.incidents;
};
this.getMarketData=function(){
return this.marketData;
};
this.onMarketReturn=function(_1c){
try{
document.body.removeChild(this.marketScript);
}
catch(e){
}
this.marketScript=null;
this.marketData=_1c;
this.available=true;
clearTimeout(this.marketTimer);
this.lastUpdateTime=this.getCurrentDateTimeInfo();
if(this.autoDisplay){
this.updateDisplay();
}
var e=new MQA.Event("MQA.Traffic.marketDataLoad");
e.srcObject=this;
this.onMarketDataLoaded(e);
};
this.onIncidentReturn=function(_1e){
try{
document.body.removeChild(this.incidentScript);
}
catch(e){
}
this.incidentScript=null;
this.incidentData=_1e;
if(parseInt(_1e.system.status)==-1){
this.available=false;
}else{
this.available=true;
}
clearTimeout(this.incidentTimer);
this.lastUpdateTime=this.getCurrentDateTimeInfo();
if(this.autoDisplay){
this.updateDisplay();
}
var e=new MQA.Event("MQA.Traffic.incidentDataLoad");
e.srcObject=this;
this.onIncidentDataLoaded(e);
};
this.showIncidents=function(){
if(!this.map){
return;
}
if(!this.incidentData){
return;
}
if(this.map.getZoomLevel()<this.minIncidentZoomLevel||this.map.getZoomLevel()>this.maxIncidentZoomLevel){
return;
}
this.removeTrafficPois();
if(this.incidentType==MQA.TRAFFIC_NONE){
return;
}
var _20,_21,_22,_23;
var _24=this.getIncidentData();
for(var x in _24){
if(_24[x].incidentType==2||_24[x].incidentType==3){
continue;
}
if(_24[x].incidentType==this.incidentType||this.incidentType==MQA.TRAFFIC_ALL){
_20=new MQA.Poi(new MQA.LatLng(_24[x].latitude,_24[x].longitude));
var _26=" ";
switch(parseInt(_24[x].severity)){
case 4:
_20.setTitleBackgroundColor("#E40404");
_26="<span style=\"color:white;font-weight:bold;font-size:12px\">Severe Impact ";
_22=this.constructionIcon0;
_23=this.incidentIcon0;
break;
case 2:
case 3:
_20.setTitleBackgroundColor("#FF9900");
_26="<span style=\"font-weight:bold;font-size:12px\">Medium Impact ";
_22=this.constructionIcon1;
_23=this.incidentIcon1;
break;
case 0:
case 1:
_20.setTitleBackgroundColor("#FBEF69");
_26="<span style=\"font-weight:bold;font-size:12px\">Minor Impact ";
_22=this.constructionIcon2;
_23=this.incidentIcon2;
break;
default:
_20.setTitleBackgroundColor("#FBEF69");
_26="<span style=\"font-weight:bold;font-size:12px\">Minor Impact ";
_22=this.constructionIcon2;
_23=this.incidentIcon2;
break;
}
switch(_24[x].incidentType){
case 1:
_21=new MQA.MapIcon();
_21.setImage(_22.url,_22.width,_22.height,false,true);
_26+="Construction";
break;
case 2:
_21=new MQA.MapIcon();
_26+="Event";
_21.setImage(_23.url,_23.width,_23.height,false,true);
break;
case 3:
_26+="Incident";
break;
case 4:
_21=new MQA.MapIcon();
_21.setImage(_23.url,_23.width,_23.height,false,true);
_26+="Incident";
break;
default:
_21=new MQA.MapIcon();
_21.setImage(_23.url,_23.width,_23.height,false,true);
_26+="Incident";
break;
}
_26+="</span>";
_20.setIcon(_21);
if(this.incidentTitleCallback){
_20.setInfoTitleHTML(this.incidentTitleCallback(_24[x]));
}else{
_20.setInfoTitleHTML(_24[x].title);
}
if(this.incidentContentCallback){
_20.setInfoContentHTML(this.incidentContentCallback(_24[x]));
}else{
_20.setInfoContentHTML(_24[x].description);
}
_20.setInfoWindowTitle(_26);
_20.setMaxInfoWindowWidth(this.maxInfoWindowWidth);
_20.trafficPOI=2;
this.trafficPois.add(_20);
if(this.infoWindowCallback){
MQA.EventManager.addListener(_20,"infowindowopen",this.infoWindowCallback);
}
}
}
var _27=this.map.getDeclutter().getDeclutterMode();
if(_27){
this.map.getDeclutter().setDeclutterMode(0);
}
this.map.addPois(this.trafficPois);
if(_27){
this.map.getDeclutter().setDeclutterMode(_27);
}
var e=new MQA.Event("MQA.Traffic.incidentsShow");
e.srcObject=this;
this.onIncidentsShow(e);
};
this.removeTrafficPois=function(){
if(!this.map){
return;
}
if(!this.map.getInfoWindow().isHidden()){
this.map.infowindow.hide();
}
var _29=this.map.getPois(true);
var _2a=this.map.getDeclutter().getDeclutterMode();
if(_2a){
this.map.getDeclutter().setDeclutterMode(0);
}
for(var i=0;i<_29.getSize();i++){
for(var k=0;k<this.trafficPois.getSize();k++){
if(this.trafficPois.getAt(k)==_29.getAt(i)){
if(this.infoWindowCallback){
MQA.EventManager.removeListener(this.trafficPois.getAt(k),"infowindowopen",this.infoWindowCallback);
}
this.map.removePoi(this.trafficPois.getAt(k));
this.trafficPois.getAt(k).dispose();
this.trafficPois.remove(k);
break;
}
}
}
if(_2a){
this.map.getDeclutter().setDeclutterMode(_2a);
}
var e=new MQA.Event("MQA.Traffic.trafficPoisRemove");
e.srcObject=this;
this.onTrafficPoisRemove(e);
};
this.showMarkets=function(){
if(!this.map){
return;
}
if(!this.marketData){
return;
}
if(this.map.getZoomLevel()<=this.maxMarketZoomLevel){
this.removeTrafficPois();
}
if((this.map.getZoomLevel()<this.minMarketZoomLevel)||(this.map.getZoomLevel()>this.maxMarketZoomLevel)){
return;
}
var _2e,_2f;
var _30=this.getMarketData();
for(var x in _30){
_2e=new MQA.Poi(new MQA.LatLng(_30[x].latitude,_30[x].longitude));
_2f=new MQA.MapIcon();
_2f.setImage(this.marketIcon.url,this.marketIcon.width,this.marketIcon.height,false,true);
_2e.setIcon(_2f);
if(this.marketTitleCallback){
_2e.setInfoTitleHTML(this.marketTitleCallback(_30[x]));
}else{
_2e.setInfoTitleHTML(_30[x].city+", "+_30[x].state);
}
if(this.marketContentCallback){
_2e.setInfoContentHTML(this.marketContentCallback(_30[x]));
}else{
_2e.setInfoContentHTML("Please zoom in to view traffic conditions.");
}
_2e.setTitleBackgroundColor("");
_2e.trafficPOI=1;
this.trafficPois.add(_2e);
if(this.infoWindowCallback){
MQA.EventManager.addListener(_2e,"infowindowopen",this.infoWindowCallback);
}
}
var _32=this.map.getDeclutter().getDeclutterMode();
if(_32){
this.map.getDeclutter().setDeclutterMode(0);
}
this.map.addPois(this.trafficPois);
if(_32){
this.map.getDeclutter().setDeclutterMode(_32);
}
var e=new MQA.Event("MQA.Traffic.marketsShow");
e.srcObject=this;
this.onMarketsShow(e);
};
this.showFlow=function(){
var _34="0.55";
if(!this.map){
return;
}
if(this.flowImage){
this.flowImage.parentNode.removeChild(this.flowImage);
this.flowImage=null;
}
if(this.map.getZoomLevel()<this.minFlowZoomLevel||this.map.getZoomLevel()>this.maxFlowZoomLevel){
return;
}
this.lastUpdateTime=this.getCurrentDateTimeInfo();
var _35=new Object;
_35.centerPoint=this.map.getCenter();
_35.width=this.map.width+1024;
_35.height=this.map.height+1024;
_35.scale=this.map.getScale();
_35.left=-512-this.map.getDragOffset().x;
_35.top=-512-this.map.getDragOffset().y;
_35.src=this.trafficServer+"flow?"+"lat="+_35.centerPoint.getLatitude()+"&lng="+_35.centerPoint.getLongitude()+"&width="+_35.width+"&height="+_35.height+"&scale="+_35.scale+"&key="+Key+"&rand="+(Math.random()*10);
this.flowImage=document.createElement("img");
this.flowImage.src=_35.src;
this.flowImage.style.left=_35.left+"px";
this.flowImage.style.top=_35.top+"px";
this.flowImage.style.opacity=_34;
this.flowImage.style.MozOpacity=_34;
this.flowImage.style.filter="alpha(opacity="+_34*100+")";
this.flowImage.style.position="absolute";
this.flowImage.setAttribute("unselectable","on");
this.flowImage.style.MozUserSelect="none";
this.map.div.appendChild(this.flowImage);
var e=new MQA.Event("MQA.Traffic.flowImageShow");
e.srcObject=this;
this.onFlowImageShow(e);
};
this.hideFlow=function(){
if(!this.map){
return;
}
if(this.flowImage){
this.flowImage.parentNode.removeChild(this.flowImage);
this.flowImage=null;
}
var e=new MQA.Event("MQA.Traffic.flowImageHide");
e.srcObject=this;
this.onFlowImageHide(e);
};
this.updateDisplay=function(){
this.showFlow();
this.showIncidents();
this.showMarkets();
};
this.updateTrafficPois=function(){
this.showIncidents();
this.showMarkets();
};
this.refresh=function(_38){
if(typeof (_38)=="undefined"&&this.map){
var _39=this.getMapRectInfo();
var _38=new MQA.RectLL(new MQA.LatLng(_39.ullat,_39.ullng),new MQA.LatLng(_39.lrlat,_39.lrlng));
}else{
if(typeof (_38)=="undefined"&&!this.map){
throw "Failed refresh(). No bounding box specified and no map specified.";
}
}
if(this.map.getZoomLevel()>=this.minIncidentZoomLevel&&this.map.getZoomLevel()<=this.maxIncidentZoomLevel){
this.retrieveIncidentData(_38);
}
if(this.map.getZoomLevel()<=this.maxMarketZoomLevel){
this.retrieveMarketData();
}
var e=new MQA.Event("MQA.Traffic.trafficDataRefresh");
e.srcObject=this;
this.onTrafficDataRefreshed(e);
};
this.onMarketDataLoaded=function(e){
MQA.EventManager.trigger(this,"marketdataload",e);
};
this.onIncidentDataLoaded=function(e){
MQA.EventManager.trigger(this,"incidentdataload",e);
};
this.onTrafficDataRefreshed=function(e){
MQA.EventManager.trigger(this,"trafficdatarefresh",e);
};
this.onFlowImageShow=function(e){
MQA.EventManager.trigger(this,"flowimageshow",e);
};
this.onFlowImageHide=function(e){
MQA.EventManager.trigger(this,"flowimagehide",e);
};
this.onMarketsShow=function(e){
MQA.EventManager.trigger(this,"marketsshow",e);
};
this.onIncidentsShow=function(e){
MQA.EventManager.trigger(this,"incidentsshow",e);
};
this.onTrafficPoisRemove=function(e){
MQA.EventManager.trigger(this,"trafficpoisremove",e);
};
this.onDataTimeout=function(e){
MQA.EventManager.trigger(this,"datatimeout",e);
};
this.getMapRectInfo=function(){
if(!this.map){
return null;
}
var _44=512;
var _45=this.map.getDragOffset();
topTileX=-512;
topTileY=-512;
var _46=new MQA.Point(topTileX,topTileY);
var _47=new MQA.Point(this.map.width+_44,this.map.height+_44);
var _48=this.map.pixToLL(_46);
var _49=this.map.pixToLL(_47);
var _4a=new MQA.RectLL(_48,_49);
var _4b=_47.x-_46.x;
var _4c=_47.y-_46.y;
var _4d=new Object;
_4d.ullat=_48.getLatitude();
_4d.ullng=_48.getLongitude();
_4d.lrlat=_49.getLatitude();
_4d.lrlng=_49.getLongitude();
_4d.scale=this.map.getScale();
_4d.width=_4b;
_4d.height=_4c;
_4d.left=topTileX-_45.x;
_4d.top=topTileY-_45.y;
return _4d;
};
this.getCurrentDateTimeInfo=function(){
var _4e;
iDate=new Date();
if((iDate.toString().indexOf("DT",0)!=-1)||(iDate.toString().indexOf("Daylight Time)",0)!=-1)){
_4e=60;
}else{
_4e=0;
}
var d=new Date();
var _50=new Object;
_50.year=d.getFullYear();
_50.month=d.getMonth();
_50.day=d.getDate();
_50.hours=d.getHours();
_50.minutes=d.getMinutes();
_50.seconds=d.getSeconds();
_50.ampm=((_50.hours>=12)&&(_50.minutes>0)?"pm":"am");
switch(d.getTimezoneOffset()+_4e){
case 300:
_50.timeZone=(_4e>0?"EDT":"EST");
break;
case 360:
_50.timeZone=(_4e>0?"CDT":"CST");
break;
case 420:
_50.timeZone=(_4e>0?"MDT":"MST");
break;
case 480:
_50.timeZone=(_4e>0?"PDT":"PST");
break;
case 600:
_50.timeZone=(_4e>0?"HDT":"HST");
break;
}
return _50;
};
};

MQA.TrafficControl=function(_1){
this.serverPath="http://img.mqcdn.com/mqtraffic/";
this.legendMarketsImage=MQA.Util._modifyImageSrc(this.serverPath+"legend_zoomedout");
this.legendIncidentsImage=MQA.Util._modifyImageSrc(this.serverPath+"legend_nocheckboxes");
this.legendClosedImage=MQA.Util._modifyImageSrc(this.serverPath+"legend_rolleddown");
this.legendOutageImage=MQA.Util._modifyImageSrc(this.serverPath+"legend_servicedown");
this.trafficButtonsImage=MQA.Util._modifyImageSrc(this.serverPath+"trafficbuttons");
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(65,0));
this.legendPosition=(typeof (_1)=="undefined")?new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,new MQA.Size(0,-54)):_1;
this.legendTop=0;
this.mode="off";
this.legend=null;
this.legendViewState="open";
this.traffic=new MQA.Traffic();
this.traffic.setAutoDisplay(true);
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.className="dotcom-traffic-ctrl";
this.trafficButtonDiv=document.createElement("div");
this.trafficButtonDiv.style.position="absolute";
this.trafficButtonDiv.style.overflow="hidden";
this.trafficButtonDiv.className="map-view-traffic";
this.trafficButton=document.createElement("img");
this.trafficButton.className="";
this.trafficButton.style.position="absolute";
this.trafficButton.border=0;
this.trafficButton.src=this.trafficButtonsImage;
this.trafficButton.alt="View Traffic";
this.trafficButton.title="View Traffic";
this.trafficButtonDiv.appendChild(this.trafficButton);
this.elem.appendChild(this.trafficButtonDiv);
this.placeLegendControl=function(){
var _2=this.legend;
var _3=this.getLegendPosition();
var _4=_3.getMapCorner();
var _5;
var _6;
if(_4==MQA.MapCorner.TOP_LEFT){
_5=5-parseInt(this.elem.style.left);
_6=5-parseInt(this.elem.style.top);
}else{
if(_4==MQA.MapCorner.TOP_RIGHT){
_5=(this.map.width-parseInt(_2.style.width)-parseInt(this.elem.style.left));
_6=5-parseInt(this.elem.style.top);
}else{
if(_4==MQA.MapCorner.BOTTOM_LEFT){
_5=5-parseInt(this.elem.style.left);
_6=(this.map.height-parseInt(_2.style.height)-parseInt(this.elem.style.top));
}else{
if(_4==MQA.MapCorner.BOTTOM_RIGHT){
_5=(this.map.width-parseInt(_2.style.width)-parseInt(this.elem.style.left));
_6=(this.map.height-parseInt(_2.style.height)-parseInt(this.elem.style.top));
}
}
}
}
_5+=_3.offsetSize.width;
_6+=_3.offsetSize.height;
_2.style.left=_5+"px";
_2.style.top=_6+"px";
if(this.legendViewState=="open"){
this.legendTop=parseInt(_2.style.top);
}else{
this.legendTop=parseInt(_2.style.top)-135;
}
};
this.destructor=function(){
this.dispose(false);
};
this.dispose=function(_7){
var _7=(typeof (_7)!="undefined"?_7:true);
this.traffic.hideFlow();
this.traffic.removeTrafficPois();
this.map=null;
MQA._prEvent.stopObserving(this.trafficButton,"click",this.eTrafficClick);
MQA._prEvent.stopObserving(this.trafficButton,"mouseover",this.eTrafficMouseOver);
MQA._prEvent.stopObserving(this.trafficButton,"mouseout",this.eTrafficMouseOut);
MQA._prEvent.stopObserving(this.help,"click",this.eHelpClick);
MQA._prEvent.stopObserving(this.refresh,"click",this.eRefreshClick);
MQA._prEvent.stopObserving(this.checkboxContainer,"click",this.eIncidentTypeClick);
MQA._prEvent.stopObserving(this.titleBar,"click",this.eTitleBarClick);
this.legend.innerHTML=null;
this.legend.outerHTML=null;
this.help=MQA.Util._deleteDOMObject(this.help);
this.refresh=null;
this.titleBar=null;
this.legendIncidents=null;
this.time=null;
this.checkboxContainer=null;
this.incidentCheck=null;
this.constructionCheck=null;
this.legendMarkets=null;
this.legendOutage=null;
this.legendClosed=null;
this.legend=MQA.Util._deleteDOMObject(this.legend);
this.mode="off";
if(_7){
this.traffic=null;
this.trafficButtonDiv.innerHTML="";
this.trafficButtonDiv.outerHTML="";
this.trafficButtonDiv=MQA.Util._deleteDOMObject(this.trafficButtonDiv);
this.elem=MQA.Util._deleteDOMObject(this.elem);
}
};
this.updateLegendTime=function(){
if(this.traffic.isAvailable()){
var _8=this.traffic.getLastUpdateTime();
this.updateTime="Last&nbsp;Updated:&nbsp;"+_8.replace(" ","&nbsp;");
this.time.innerHTML=this.updateTime;
}else{
this.updateTime="<font style='color:red'>Traffic&nbsp;Unavailable</font>";
this.time.innerHTML=this.updateTime;
}
};
this.getUpdateTime=function(){
return this.updateTime;
};
this.initialize=function(_9){
this.map=_9;
this.map.hasTraffic=true;
this.type=MQA.CONTROL_TRAFFIC;
this.updateTime="";
this.addLegend();
this.eTrafficClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eTrafficMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eTrafficMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.trafficButton,"click",this.eTrafficClick);
MQA._prEvent.observe(this.trafficButton,"mouseover",this.eTrafficMouseOver);
MQA._prEvent.observe(this.trafficButton,"mouseout",this.eTrafficMouseOut);
this.traffic.map=_9;
this.updateControl();
};
this.updateControl=function(){
switch(this.mode){
case "off":
this.trafficButton.className="";
this.legend.style.display="none";
break;
case "on":
this.placeLegendControl();
this.legendTop=parseInt(this.legend.style.top);
this.trafficButton.className="a";
this.traffic.setIncidentType(MQA.TRAFFIC_ALL);
this.updateLegend();
this.legend.style.display="block";
break;
}
};
this.updateLegend=function(){
if(this.mode=="on"){
if(this.legendViewState=="open"){
if(!this.traffic.available){
this.legendState="outage";
}
this.legend.style.top=this.legendTop+"px";
this.legend.style.height="215px";
var _a=this.map.getZoomLevel();
if(this.getLegendState()=="incidents"){
this.legendIncidents.style.display="block";
this.legendMarkets.style.display="none";
this.legendClosed.style.display="none";
this.legendOutage.style.display="none";
this.time.style.display="block";
this.checkboxContainer.style.display="block";
this.help.style.display="block";
}else{
if(this.getLegendState()=="markets"){
this.legendIncidents.style.display="none";
this.legendMarkets.style.display="block";
this.legendClosed.style.display="none";
this.legendOutage.style.display="none";
this.time.style.display="none";
this.checkboxContainer.style.display="none";
this.help.style.display="block";
}else{
this.legendIncidents.style.display="none";
this.legendMarkets.style.display="none";
this.legendClosed.style.display="none";
this.legendOutage.style.display="block";
this.time.style.display="none";
this.checkboxContainer.style.display="none";
this.help.style.display="block";
}
}
}else{
this.legendIncidents.style.display="none";
this.legendMarkets.style.display="none";
this.legendOutage.style.display="none";
this.time.style.display="none";
this.checkboxContainer.style.display="none";
this.help.style.display="none";
this.legend.style.height="80px";
var _b=parseInt(this.legend.style.top);
this.legend.style.top=this.legendTop+135+"px";
this.time.style.display="block";
this.legendClosed.style.display="block";
}
this.updateLegendTime();
}
};
this.eventmonitor=function(_c){
var _d=MQA._prEvent.element(_c);
switch(_c.type){
case "click":
if(_d==this.refresh){
this.traffic.refresh();
this.updateLegendTime();
var e=new MQA.Event("MQA.TrafficControl.refreshClick");
e.srcObject=this;
this.onRefreshClick(e);
MQA._prEvent.stop(_c);
}else{
if(_d==this.help){
var e=new MQA.Event("MQA.TrafficControl.helpClick");
e.srcObject=this;
this.onHelpClick(e);
MQA._prEvent.stop(_c);
}else{
if(_d==this.titleBar){
if(this.legendViewState=="open"){
this.legendViewState="closed";
this.updateLegend();
var e=new MQA.Event("MQA.TrafficControl.legendClose");
e.srcObject=this;
this.onLegendClose(e);
MQA._prEvent.stop(_c);
}else{
this.legendViewState="open";
this.updateLegend();
var e=new MQA.Event("MQA.TrafficControl.legendOpen");
e.srcObject=this;
this.onLegendOpen(e);
MQA._prEvent.stop(_c);
}
}else{
if(_d==this.trafficButton){
if(this.mode=="on"){
this.mode="off";
this.traffic.hideFlow();
this.traffic.removeTrafficPois();
this.updateControl();
var e=new MQA.Event("MQA.TrafficControl.deactivate");
e.srcObject=this;
this.onDeactivate(e);
MQA._prEvent.stop(_c);
}else{
this.mode="on";
this.traffic.refresh();
this.legendViewState="open";
this.updateLegend();
this.updateControl();
var e=new MQA.Event("MQA.TrafficControl.activate");
e.srcObject=this;
this.onActivate(e);
MQA._prEvent.stop(_c);
}
}else{
if(_d.id=="incident"||_d.id=="construction"){
var _f=this.incidentCheck.childNodes[0];
var _10=this.constructionCheck.childNodes[0];
if(_f.checked&&_10.checked){
this.traffic.setIncidentType(MQA.TRAFFIC_ALL);
}else{
if(!_f.checked&&_10.checked){
this.traffic.setIncidentType(MQA.TRAFFIC_CONSTRUCTION);
}else{
if(_f.checked&&!_10.checked){
this.traffic.setIncidentType(MQA.TRAFFIC_INCIDENTS);
}else{
if(!_f.checked&&!_10.checked){
this.traffic.setIncidentType(MQA.TRAFFIC_NONE);
}
}
}
}
if(_d.id=="incident"){
var e=new MQA.Event("MQA.TrafficControl.incidentClick");
e.srcObject=this;
this.onIncidentClick(e);
}else{
if(_d.id=="construction"){
var e=new MQA.Event("MQA.TrafficControl.constructionClick");
e.srcObject=this;
this.onConstructionClick(e);
}
}
}
}
}
}
}
break;
case "mouseover":
if(this.trafficButton.className!="a"){
this.trafficButton.className="o";
}
break;
case "mouseout":
if(this.trafficButton.className=="o"){
this.trafficButton.className="";
}
break;
}
};
this.getHeight=function(){
var _11=(this.incidentview.parentNode.style.display=="block")?(this.incidentview.parentNode.offsetHeight-15):0;
var _12=(this.trafficview.parentNode.style.display=="block")?(this.trafficview.parentNode.offsetHeight-15):0;
return (this.trafficview.parentNode.offsetHeight+_11+_12);
};
this.getTraffic=function(){
return this.traffic;
};
this.setLegendPosition=function(_13){
this.legendPosition=_13;
};
this.getLegendPosition=function(){
return this.legendPosition;
};
this.addLegend=function(){
this.legend=document.createElement("div");
this.legend.className="legend-content";
this.legend.style.overflow="visible";
this.legend.style.position="absolute";
this.legend.style.display="block";
this.legend.style.zIndex=0;
this.legend.style.width="238px";
this.legend.style.height="215px";
this.titleBar=document.createElement("div");
this.titleBar.style.position="absolute";
this.titleBar.style.zIndex=100;
this.titleBar.style.left="12px";
this.titleBar.style.top="15px";
this.titleBar.style.width="212px";
this.titleBar.style.height="20px";
this.titleBar.style.backgroundImage="url(http://img.mqcdn.com/a/a)";
this.legend.appendChild(this.titleBar);
this.help=document.createElement("div");
this.help.style.position="absolute";
this.help.style.cursor="pointer";
this.help.style.left="147px";
this.help.style.top="186px";
this.help.style.width="59px";
this.help.style.height="15px";
this.help.style.zIndex=100;
this.help.style.backgroundImage="url(http://img.mqcdn.com/a/a)";
this.legend.appendChild(this.help);
this.refresh=document.createElement("div");
this.refresh.style.position="absolute";
this.refresh.style.cursor="pointer";
this.refresh.style.left="157px";
this.refresh.style.top="44px";
this.refresh.style.width="39px";
this.refresh.style.height="14px";
this.refresh.style.zIndex=100;
this.refresh.style.backgroundImage="url(http://img.mqcdn.com/a/a)";
this.legend.appendChild(this.refresh);
this.legendIncidents=document.createElement("img");
this.legendIncidents.className="";
this.legendIncidents.border=0;
this.legendIncidents.src=this.legendIncidentsImage;
this.legendIncidents.style.position="absolute";
this.legendIncidents.style.display=(this.getLegendState()=="incidents"?"block":"none");
this.legendIncidents.style.left="0px";
this.legendIncidents.style.top="0px";
this.legendIncidents.style.zIndex=10;
this.legendIncidents.alt="Traffic Legend";
this.legendIncidents.title="Traffic Legend";
this.time=document.createElement("div");
this.time.className="";
this.time.style.position="absolute";
this.time.style.display="block";
this.time.style.left="13px";
this.time.style.top="42px";
this.time.style.width="144px";
this.time.style.fontFamily="Arial";
this.time.style.fontSize="10px";
this.time.style.fontWeight="bold";
this.time.style.textAlign="left";
this.time.innerHTML=this.getUpdateTime();
this.time.style.zIndex=100;
this.legend.appendChild(this.time);
this.checkboxContainer=document.createElement("div");
this.checkboxContainer.style.position="absolute";
this.checkboxContainer.style.left="13px";
this.checkboxContainer.style.top="63px";
this.checkboxContainer.style.width="203px";
this.checkboxContainer.style.height="20px";
this.checkboxContainer.style.zIndex=100;
this.checkboxContainer.style.display="block";
this.checkboxContainer.verticalAlign="bottom";
this.checkboxContainer.className="incident-content";
this.checkboxContainer.innerHTML="<div style=\"position:absolute;left:0px;top:0px;\"><b>Show:</b>&nbsp;</div>";
this.incidentCheck=document.createElement("div");
this.incidentCheck.style.position="absolute";
this.incidentCheck.style.verticalAlign="text-top";
this.incidentCheck.style.left="42px";
this.incidentCheck.style.top="0px";
this.incidentCheck.className="incident-content";
this.incidentCheck.innerHTML="<input id='incident' type='checkbox' checked='true' /><label for='incident'>Incidents&nbsp;&nbsp;</label>";
this.checkboxContainer.appendChild(this.incidentCheck);
this.constructionCheck=document.createElement("div");
this.constructionCheck.style.position="absolute";
this.constructionCheck.style.verticalAlign="text-top";
this.constructionCheck.style.left="110px";
this.constructionCheck.style.top="0px";
this.constructionCheck.className="construction-content";
this.constructionCheck.innerHTML="<input id='construction' type='checkbox' checked='true' /><label for='construction'>Construction</label>";
this.checkboxContainer.appendChild(this.constructionCheck);
this.legend.appendChild(this.checkboxContainer);
this.legend.appendChild(this.legendIncidents);
this.legendMarkets=document.createElement("img");
this.legendMarkets.className="";
this.legendMarkets.border=0;
this.legendMarkets.src=this.legendMarketsImage;
this.legendMarkets.style.position="absolute";
this.legendMarkets.style.display=(this.getLegendState()=="markets"?"block":"none");
this.legendMarkets.style.left="0px";
this.legendMarkets.style.top="0px";
this.legendMarkets.alt="Traffic Legend";
this.legendMarkets.title="Traffic Legend";
this.legend.appendChild(this.legendMarkets);
this.legendOutage=document.createElement("img");
this.legendOutage.className="";
this.legendOutage.border=0;
this.legendOutage.src=this.legendOutageImage;
this.legendOutage.style.position="absolute";
this.legendOutage.style.display=(this.getLegendState()=="outage"?"block":"none");
this.legendOutage.style.left="0px";
this.legendOutage.style.top="0px";
this.legendOutage.alt="Traffic Legend";
this.legendOutage.title="Traffic Legend";
this.legend.appendChild(this.legendOutage);
this.legendClosed=document.createElement("img");
this.legendClosed.className="";
this.legendClosed.border=0;
this.legendClosed.src=this.legendClosedImage;
this.legendClosed.style.position="absolute";
this.legendClosed.style.display=(this.legendState=="closed"?"block":"none");
this.legendClosed.style.left="0px";
this.legendClosed.style.top="0px";
this.legendClosed.alt="Traffic Legend";
this.legendClosed.title="Traffic Legend";
this.legend.appendChild(this.legendClosed);
this.elem.appendChild(this.legend);
this.updateLegendTime();
this.eTitleBarClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.titleBar,"click",this.eTitleBarClick);
this.eHelpClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.help,"click",this.eHelpClick);
this.eRefreshClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.refresh,"click",this.eRefreshClick);
this.eIncidentTypeClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.checkboxContainer,"click",this.eIncidentTypeClick);
};
this.getLegendState=function(){
var _14=this.map.getZoomLevel();
if(this.traffic.available){
if(_14>=this.traffic.minIncidentZoomLevel&&_14<=this.traffic.maxIncidentZoomLevel){
return "incidents";
}else{
return "markets";
}
}else{
return "outage";
}
};
this.onIncidentClick=function(e){
MQA.EventManager.trigger(this,"incidentclick",e);
};
this.onConstructionClick=function(e){
MQA.EventManager.trigger(this,"constructionclick",e);
};
this.onLegendOpen=function(e){
MQA.EventManager.trigger(this,"legendopen",e);
};
this.onLegendClose=function(e){
MQA.EventManager.trigger(this,"legendclose",e);
};
this.onActivate=function(e){
MQA.EventManager.trigger(this,"activate",e);
};
this.onDeactivate=function(e){
MQA.EventManager.trigger(this,"deactivate",e);
};
this.onHelpClick=function(e){
MQA.EventManager.trigger(this,"helpclick",e);
};
this.onRefreshClick=function(e){
MQA.EventManager.trigger(this,"refreshclick",e);
};
};
MQA.TrafficControl.prototype=new MQA.Control();
MQA.TrafficControl.prototype.constructor=MQA.TrafficControl;

if(typeof (MQCompatibilityMode)!="undefined"){
if(MQCompatibilityMode=="5.2.0"){
MQControl=MQA.Control;
MQLargeZoomControl=MQA.LargeZoomControl;
MQPanControl=MQA.PanControl;
MQZoomControl=MQA.ZoomControl;
MQViewControl=MQA.ViewControl;
MQEvent=MQA.Event;
MQEventManager=MQA.EventManager;
MQEventCallback=MQA._prEvent.EventCallback;
MQInfoWindow=MQA.InfoWindow;
PointFloatXY=MQA.PointFloatXY;
PointXY=MQA.PointXY;
PointLL=MQA.PointLL;
RectLL=MQA.RectLL;
RectXY=MQA.RectXY;
Tile=MQA.Tile;
MQTKObjectCollection=MQA.TKObjectCollection;
MQMapLogo=MQA.MapLogo;
MQMapCorner=MQA.MapCorner;
MQMapCornerPlacement=MQA.MapCornerPlacement;
MQRectLL=MQA.RectLL;
MQRectXY=MQA.RectXY;
MQSize=MQA.Size;
MQClip=MQA.Clip;
MQMapInit=MQA.MapInit;
MQInitOverlays=MQA.InitOverlays;
MQShapeOverlay=MQA.ShapeOverlay;
MQRectangleOverlay=MQA.RectangleOverlay;
MQLineOverlay=MQA.LineOverlay;
MQPolygonOverlay=MQA.PolygonOverlay;
MQEllipseOverlay=MQA.EllipseOverlay;
MQImageOverlay=MQA.ImageOverlay;
MQOverlayCollection=MQA.OverlayCollection;
MQPoiCollection=MQA.PoiCollection;
MQMapIcon=MQA.MapIcon;
MQPoi=MQA.Poi;
MQLeaderLineDotImage=MQA.LeaderLineDotImage;
MQLeaderLineDotIcon=MQA.LeaderLineDotIcon;
MQDeclutter=MQA.Declutter;
MQDeclutterPoi=MQA.DeclutterPoi;
MQPageMarkIcon=MQA.PageMarkIcon;
MQPrevNextIcon=MQA.PrevNextIcon;
MQDeclutterIcon=MQA.DeclutterIcon;
MQRolloverWindow=MQA.RolloverWindow;
SlideBroker=MQA.SlideBroker;
MQTileMap=MQA.TileMap;
pause=MQA.Util.pause;
asPix=MQA.Util.asPix;
createImage=MQA.Util.createImage;
calcPercentage=MQA.Util.calcPercentage;
stripHTMLTags=MQA.Util.stripHTMLTags;
panAngle=MQA.Util.panAngle;
isOverLimit=MQA.Util.isOverLimit;
MQInitDojo=MQA.Util.InitDojo;
getWindowScrollXY=MQA.Util.getWindowScrollXY;
getHTMLSubstring=MQA.Util.getHTMLSubstring;
getBrowserSize=MQA.Util.getBrowserSize;
isSupportedBrowser=MQA.Util.isSupportedBrowser;
getBrowserInfo=MQA.Util.getBrowserInfo;
mqBrowserInfo=MQA.Util.getBrowserInfo;
PIXERSPERLATDEGREE=MQA.PIXERSPERLATDEGREE;
PIXERSPERLNGDEGREE=MQA.PIXERSPERLNGDEGREE;
TILESIZE=MQA.TILESIZE;
SLIDESTEPS=MQA.SLIDESTEPS;
SLIDEDELAY=MQA.SLIDEDELAY;
SCALES=MQA.SCALES;
MODS=MQA.MODS;
VENDORLIST=MQA.VENDORLIST;
MAPVENDORS=MQA.MAPVENDORS;
RESOURCES=MQA.RESOURCES;
STATICRESOURCES=MQA.STATICRESOURCES;
CORNER_TOPLEFT=MQA.CORNER_TOPLEFT;
CORNER_TOPRIGHT=MQA.CORNER_TOPRIGHT;
CORNER_BOTTOMLEFT=MQA.CORNER_BOTTOMLEFT;
CORNER_BOTTOMRIGHT=MQA.CORNER_BOTTOMRIGHT;
LOGO_MQ_LOGO=MQA.LOGO_MQ_LOGO;
LOGO_MQ_SCALES=MQA.LOGO_MQ_SCALES;
LOGO_MQ_COPY=MQA.LOGO_MQ_COPY;
LOGO_NT_COPY=MQA.LOGO_NT_COPY;
LOGO_I3_COPY=MQA.LOGO_I3_COPY;
LOGO_MAP_COPY=MQA.LOGO_MAP_COPY;
LOGO_SAT_COPY=MQA.LOGO_SAT_COPY;
EVENT_NONE=MQA.EVENT_NONE;
EVENT_CLICK=MQA.EVENT_CLICK;
EVENT_DBLCLICK=MQA.EVENT_DBLCLICK;
OPER_RECENTER=MQA.OPER_RECENTER;
OPER_RECENTERZOOM=MQA.OPER_RECENTERZOOM;
MAXMAPHEIGHT=MQA.MAXMAPHEIGHT;
MAXMAPWIDTH=MQA.MAXMAPWIDTH;
BUTTON_MQ_LEFT=MQA.BUTTON_MQ_LEFT;
BUTTON_MQ_MIDDLE=MQA.BUTTON_MQ_MIDDLE;
BUTTON_MQ_RIGHT=MQA.BUTTON_MQ_RIGHT;
MASTER_BROKER=MQA.MASTER_BROKER;
SAFARI_BROWSER=MQA.SAFARI_BROWSER;
PAN_NORTH=MQA.PAN_NORTH;
PAN_SOUTH=MQA.PAN_SOUTH;
PAN_EAST=MQA.PAN_EAST;
PAN_WEST=MQA.PAN_WEST;
CONTROL_PANZOOM=MQA.CONTROL_PANZOOM;
CONTROL_PAN=MQA.CONTROL_PAN;
CONTROL_ZOOM=MQA.CONTROL_ZOOM;
CONTROL_TYPE=MQA.CONTROL_TYPE;
SURFACE_OFFSET=MQA.SURFACE_OFFSET;
NOTHING=MQA.NOTHING;
}
}

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(typeof (MQA.Common)=="undefined"){
MQA.Common=new Object();
}
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 _1=new MQA.Browser();
_1.name=_1.version=_1.os="unknown";
var _2=window.navigator.userAgent.toLowerCase();
var _3=window.navigator.appName;
var _4=window.navigator.appVersion;
var _5=new Array("firefox","msie","netscape","opera","safari");
var _6=new Array("linux","mac","windows","x11");
var _7=_5.length;
var _8="";
for(var i=0,n=_7;i<n;i++){
_8=_2.indexOf(_5[i])+1;
if(_8>0){
_1.name=_5[i];
var _b=_8+_1.name.length;
var _c=((_1.name=="safari")||(_2.charAt(_b+4)>0&&_2.charAt(_b+4)<9))?5:3;
_1.version=_2.substring(_b,_b+_c);
}
}
var _d=_6.length;
for(var j=0,m=_d;j<m;j++){
_8=_2.indexOf(_6[j])+1;
if(_8>0){
_1.os=_6[j];
}
}
if(_3=="Netscape"){
_1.appname="ns";
}else{
if(_3=="Microsoft Internet Explorer"){
_1.appname="ie";
}
}
_1.appVersion=_4;
_1.vMajor=parseInt(_1.appVersion);
_1.isNS=(_1.appname=="ns"&&_1.vMajor>=4);
_1.isNS4=(_1.appname=="ns"&&_1.vMajor==4);
_1.isNS6=(_1.appname=="ns"&&_1.vMajor==5);
_1.isIE=(_1.appname=="ie"&&_1.vMajor>=4);
_1.isIE4=(_1.appVersion.indexOf("MSIE 4")>0);
_1.isIE5=(_1.appVersion.indexOf("MSIE 5")>0);
_1.isDOM=(document.createElement&&document.appendChild&&document.getElementsByTagName)?true:false;
_1.isSafari=(_1.name=="safari");
if(_2.indexOf("win")>-1){
_1.platform="win";
}else{
if(_2.indexOf("mac")>-1){
_1.platform="mac";
}else{
_1.platform="other";
}
}
return _1;
};
mqGetBrowserInfo=MQA.getBrowserInfo;
MQA.BrowserInfo=MQA.getBrowserInfo();
MQA.Object=function(){
var _10=null;
this.getM_XmlDoc=function(){
return _10;
};
this.setM_XmlDoc=function(_11){
_10=_11;
};
var _12=null;
this.getM_Xpath=function(){
return _12;
};
this.setM_Xpath=function(_13){
_12=_13;
};
};
MQA.Object.prototype.getClassName=function(){
return "MQObject";
};
MQA.Object.prototype.getObjectVersion=function(){
return 0;
};
MQA.Object.prototype.setProperty=function(_14,_15){
var _16;
if(_14!==null){
_16="/"+this.getM_Xpath()+"/"+_14;
}else{
_16="/"+this.getM_Xpath();
}
var _17=mqSetNodeText(this.getM_XmlDoc(),_16,_15);
if(_17===null){
var _18=this.getM_XmlDoc().createElement(_14);
var _19=this.getM_XmlDoc().documentElement.appendChild(_18);
_17=mqSetNodeText(this.getM_XmlDoc(),_16,_15);
}
return _17;
};
MQA.Object.prototype.getProperty=function(_1a){
var _1b;
if(_1a!==null){
_1b="/"+this.getM_Xpath()+"/"+_1a;
}else{
_1b="/"+this.getM_Xpath();
}
return mqGetXPathNodeText(this.getM_XmlDoc(),_1b);
};
MQA.Object.prototype.copy=function(){
var cp=new this.constructor;
cp.loadXml(this.saveXml());
return cp;
};
MQA.Object.prototype.internalCopy=function(obj){
var _1e="<"+obj.getM_Xpath();
if(this.getObjectVersion()>0){
_1e=_1e+" Version=\""+this.getObjectVersion()+"\"";
}
_1e=_1e+">";
var _1f=this.getM_XmlDoc().documentElement;
var _20=_1f.childNodes;
var _21=_20.length;
for(var _22=0;_22<_21;_22++){
_1e=_1e+mqXmlToStr(_20[_22]);
}
_1e=_1e+"</"+obj.getM_Xpath()+">";
var cp=new this.constructor;
cp.loadXml(_1e);
return cp;
};
MQObject=MQA.Object;
MQA.Point=function(_24,_25){
this.x=0;
this.y=0;
this.setM_Xpath("Point");
if(arguments.length==1){
this.setM_Xpath(_24);
}else{
if(arguments.length==2){
this.x=parseInt(_24);
this.y=parseInt(_25);
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(_26){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_26));
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(_2c,_2d){
MQA.Object.call(this);
this.lat=0;
this.lng=0;
this.setM_Xpath("LatLng");
if(arguments.length==1){
this.setM_Xpath(_2c);
}else{
if(arguments.length==2){
this.lat=parseFloat(_2c);
this.lng=parseFloat(_2d);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQLatLng constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQLatLng 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(_2e){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_2e));
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(_2f){
this.lat=parseFloat(_2f);
if(isNaN(this.lat)){
throw new Error("MQLatLng.setLatitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLatitude=function(){
return this.lat;
};
MQA.LatLng.prototype.setLongitude=function(_30){
this.lng=parseFloat(_30);
if(isNaN(this.lng)){
throw new Error("MQLatLng.setLongitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLongitude=function(){
return this.lng;
};
MQA.LatLng.prototype.setLatLng=function(_31,_32){
this.lat=parseFloat(_31);
this.lng=parseFloat(_32);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQLatLng.setLatLng called with invalid parameter");
}
};
MQA.LatLng.prototype.arcDistance=function(ll2,_34){
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(_34){
mqIsClass("MQDistanceUnits",_34,false);
}else{
_34=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);
}
if(this.getLatitude()==ll2.getLatitude()&&this.getLongitude()==ll2.getLongitude()){
return 0;
}
var _35=ll2.getLongitude()-this.getLongitude();
var a=MQCONSTANT.MQLATLNG_RADIANS*(90-this.getLatitude());
var c=MQCONSTANT.MQLATLNG_RADIANS*(90-ll2.getLatitude());
var _38=(Math.cos(a)*Math.cos(c))+(Math.sin(a)*Math.sin(c)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*(_35)));
var _39=(_34.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES)?3963.205:6378.160187;
if(_38<-1){
return MQCONSTANT.PI*_39;
}else{
if(_38>=1){
return 0;
}else{
return Math.acos(_38)*_39;
}
}
}
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.createXMLDoc=function(_3b){
var _3c;
if(document.implementation.createDocument){
var _3d=new window.DOMParser();
if(MQA.BrowserInfo.isSafari){
_3b=_3b.replace(/&/g,"&amp;");
}
_3c=_3d.parseFromString(_3b,"text/xml");
}else{
if(window.ActiveXObject){
_3c=new window.ActiveXObject("Microsoft.XMLDOM");
_3c.async="false";
_3c.loadXML(_3b);
}
}
return _3c;
};
mqCreateXMLDoc=MQA.createXMLDoc;
MQA.createXMLDocFromNode=function(_3e){
var _3f;
_3e=_3e.documentElement;
if(document.implementation.createDocument){
var _3f=document.implementation.createDocument("","",null);
try{
_3f.appendChild(_3f.importNode(_3e,true));
}
catch(error){
alert(error);
alert(_3e.nodeName);
}
}else{
if(window.ActiveXObject){
_3f=new ActiveXObject("Microsoft.XMLDOM");
_3f.async="false";
_3f.loadXML(_3e.xml);
}
}
return _3f;
};
mqCreateXMLDocFromNode=MQA.createXMLDocFromNode;
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.TileMap.prototype.generatePFUrl=function(sz){
var _2="";
var _3=(typeof (sz)!="undefined")?sz.toString():this.getSize().toString();
var _4;
if(this.bestFitRect!=null){
var _5=this.getZoom(this.bestFitRect,this.keepCenter,null,null,sz);
_4=this.getScaleFromZoom(_5);
}else{
_4=this.getScale();
}
var _6={type:this.getMapType(),size:_3,scale:_4,center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_6.session=this.getRouteSession();
}
if(IsDotCom){
var _2="";
if(this.hasTraffic){
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
_2+="&traffic=";
var _7=this.controls[MQA.CONTROL_TRAFFIC].traffic.getIncidentType();
if(this.controls[MQA.CONTROL_TRAFFIC].mode=="on"){
switch(_7){
case MQA.TRAFFIC_NONE:
_2+=4;
break;
case MQA.TRAFFIC_CONSTRUCTION:
_2+=3;
break;
case MQA.TRAFFIC_INCIDENTS:
_2+=2;
break;
case MQA.TRAFFIC_ALL:
_2+=1;
break;
}
}
}
}
_6.stops=_6.pois="";
var _8=this.getPois();
for(var i=0,j=_8.getSize();i<j;i++){
var _b=_8.getAt(i);
var _c=(_b.dragLeft==null)?0:((-1*_b.dragLeft)-_b.mqMapIcon.getAnchorOffset().getX());
var _d=(_b.dragTop==null)?0:((-1*_b.dragTop)-_b.mqMapIcon.getAnchorOffset().getY());
switch(_b.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_6[_b.getKey()]=_b.getLatLng().toString()+","+_c+","+_d;
break;
default:
var _e=_b.getKey().split("-");
switch(_e[0]){
case "stops":
case "pois":
_6[_e[0]]+=_e[1].toUpperCase()+","+_b.getLatLng().toString()+","+_c+","+_d+"|";
break;
}
break;
}
}
}
var _f=MQA.getStaticMapResources()+"?";
for(var nv in _6){
_f+=(_6[nv]!="")?nv+"="+_6[nv]+"&":"";
}
return _f+"rand="+(Math.round((Math.random()*10000)))+_2;
};

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.routerect;
var _4=this.map.mypois.getSize();
var _5=this.map.getPois();
ua.a(":MQ08CompassC");
if(_3&&(_4>0)){
var _6=new MQA.RectLL(new MQA.PointLL(_5.getAt(0).getLatLng().getLatitude(),_5.getAt(0).getLatLng().getLongitude()),new MQA.PointLL(_5.getAt(0).getLatLng().getLatitude(),_5.getAt(0).getLatLng().getLongitude()));
for(var i=1;i<_4;i++){
var _7=_5.getAt(i).getLatLng();
_6.ul.lat=Math.max(_7.lat,Math.max(_6.ul.lat,_3.ul.lat));
_6.ul.lng=Math.min(_7.lng,Math.min(_6.ul.lng,_3.ul.lng));
_6.lr.lat=Math.min(_7.lat,Math.min(_6.lr.lat,_3.lr.lat));
_6.lr.lng=Math.max(_7.lng,Math.max(_6.lr.lng,_3.lr.lng));
}
this.map.bestFit(false,1,16);
this.setZoom(this.map.getZoomLevel());
}else{
if(_3&&(_4==0)){
this.map.bestFitRoute();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_3&&(_4>1)){
this.map.bestFit();
this.setZoom(this.map.getZoomLevel());
}else{
if(!_3&&(_4==1)){
this.map.setCenter(this.map.savedCenter);
}
}
}
}
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(_8){
if(MQA._prEvent.element(_8)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_8)==this.zoomout){
eventId="out";
}
try{
switch(_8.type){
case "click":
switch(eventId){
case "in":
ua.a(":MQ08ManMapZoomIn");
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
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(_8).className="o";
break;
default:
MQA._prEvent.element(_8).src="http://img.mqcdn.com/mqmaptiled/z-on.png";
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_8).className="a";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
MQA._prEvent.element(_8).src="http://img.mqcdn.com/mqmaptiled/z-"+eventId+".png";
}
}
break;
}
}
catch(e){
}
};

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.LocationListItem");
dojo.require("dijit.form.Button");
dojo.require("mq.widget.SavedRecent");
dojo.require("mq.widget.SendEmail");
dojo.require("mq.widget.SendToCell");
dojo.require("mq.widget.LinkToPage");
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.addnextlocationform");
dojo.require("mq.editlocationform");
dojo.require("mq.searcheditform");
dojo.require("mq.settingsform");
dojo.require("mq.diagnostics");
dojo.require("mq.weather");
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("/e")==hash.length-2)){
if(hash.substring(1,2)=="a"){
model=mq.util.hashToModel(hash.substring(3));
}
}
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;
}
}
updateDirRGFormWithSearch(serverResults);
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(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(model.showEmail){
view.mapView.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"));
if(view){
view.resizeLayout();
}
controller.togglePrint(false);
};
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.mapLocation=function(_17){
$d("maps0-addressInput").value=_17;
$d("map-button").click();
};
window.getDirections=function(_18,end){
$d("dir0-addressInput").value=_18;
$d("dir1-addressInput").value=end;
$d("dir-button").click();
};
window.getMPRoute=function(){
controller.showRoute(true);
var loc={};
var _1b={};
var _1c={};
loc.addressInput="Denver, CO";
_1b.addressInput="Aurora, CO";
_1c.addressInput="Boulder, CO";
$w("rgform").geocode([loc,_1b,_1c],["dirFrom.addressInput","dirTo.addressInput"]);
};
window.findPlace=function(_1d,_1e){
$d("search-addressInput").value=_1e;
$d("search-query").value=_1d;
$d("search-button").click();
};
window.bizLocatorSearch=function(id,_20){
controller._model.blId=id;
controller._model.blColor=_20;
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 _21;
if($d("trafficHelpControl")&&mq.getCookie("mqTrafficPromoPopup")==null){
if($d("trafficHelpControl").checked){
_21=3650;
}else{
_21="";
}
mq.setCookie("mqTrafficPromoPopup","never",_21,"/");
if($w("mapTrafficHelp")){
$w("mapTrafficHelp").handleCancel();
}
}
};
window.initTrafficPopup=function(id){
var str=window.trafficPopupContent;
var _24=view.getCurrentMode();
if(_24=="MAPS"&&!mq.getCookie("mqTrafficPromoPopup")&&!$w(id)){
var _25=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(){
if(window.IsTrafficEnabled!="true"){
return false;
}
var _1=new MQA.TrafficControl();
_1.traffic.setIncidentTitleCallback(this.newIncidentTitleHTML);
_1.traffic.setIncidentContentCallback(this.newIncidentContentHTML);
_1.traffic.setMarketTitleCallback(this.newMarketTitleHTML);
_1.traffic.setMarketContentCallback(this.newMarketContentHTML);
_1.traffic.setInfoWindowCallback(this.eventHandler);
MQA.EventManager.addListener(_1,"activate",this.eventHandler);
MQA.EventManager.addListener(_1,"deactivate",this.eventHandler);
MQA.EventManager.addListener(_1,"incidentclick",this.eventHandler);
MQA.EventManager.addListener(_1,"constructionclick",this.eventHandler);
MQA.EventManager.addListener(_1,"legendopen",this.eventHandler);
MQA.EventManager.addListener(_1,"legendclose",this.eventHandler);
MQA.EventManager.addListener(_1,"helpclick",this.eventHandler);
MQA.EventManager.addListener(_1,"refreshclick",this.eventHandler);
var _2=_1.traffic;
MQA.EventManager.addListener(_2,"marketdataload",this.eventHandler);
MQA.EventManager.addListener(_2,"incidentdataload",this.eventHandler);
MQA.EventManager.addListener(_2,"trafficdatarefresh",this.eventHandler);
MQA.EventManager.addListener(_2,"flowimageshow",this.eventHandler);
MQA.EventManager.addListener(_2,"flowimagehide",this.eventHandler);
MQA.EventManager.addListener(_2,"marketsshow",this.eventHandler);
MQA.EventManager.addListener(_2,"incidentsshow",this.eventHandler);
MQA.EventManager.addListener(_2,"trafficpoisremove",this.eventHandler);
MQA.EventManager.addListener(_2,"datatimeout",this.eventHandler);
return _1;
};
this.newIncidentTitleHTML=function(_3){
return _3.title;
};
this.newIncidentContentHTML=function(_4){
var s=_4.description+"<br/><br/>";
s+="<b>Start Time:</b> "+_4.startTime+"<br/>";
s+="<b>End Time:</b> "+_4.endTime+"<br/>";
s+="(All times estimated)<br/><br/>";
s+="<div class=\"allStatePrmo\" style=\"height:25px\"></div>";
return s;
};
this.newMarketTitleHTML=function(_6){
return _6.city+", "+_6.state;
};
this.newMarketContentHTML=function(_7){
var _8=view.getCurrentMode()=="MAPS"?"view.mapView":"view.searchView";
return "Please <a href onclick=\"ua.a(':MQ08TRFZoomIn');"+_8+"._tileMap.setCenter(new MQA.LatLng("+_7.latitude+","+_7.longitude+"),7);return false;\">click here</a> to view traffic conditions.";
};
this.eventHandler=function(e){
debug("mqtraffic event name --> "+e.eventName);
var _a=e.srcObject;
switch(e.eventName){
case "MQA.TrafficControl.helpClick":
mq.traffic.doHelpClickActions();
break;
case "MQA.TrafficControl.activate":
var _b=5;
if(TrafficRefreshTimer&&TrafficRefreshTimer!=""){
_b=TrafficRefreshTimer;
}
if(_b){
_a.refreshTimer=window.setInterval(function(){
_a.traffic.refresh();
_a.updateLegendTime();
},parseInt(_b)*60*1000);
debug("Setting traffic timer to "+_b+" min : "+_a.refreshTimer);
}
model["trafficEnabled"]=true;
controller.saveState();
if(!mq.traffic.autoSelect){
ua.a(":MQ08TrafficOn");
ua.commit();
}
break;
case "MQA.TrafficControl.deactivate":
window.incidentBubblePromo=null;
if(_a.refreshTimer){
window.clearInterval(_a.refreshTimer);
debug("Clearing timer :"+_a.refreshTimer);
}
model["trafficEnabled"]=false;
controller.saveState();
break;
case "MQA.TrafficControl.incidentClick":
var _c=e.srcObject.incidentCheck.childNodes[0];
if(_c.checked){
ua.a(":MQ08TRFIncidentsOn");
}else{
ua.a(":MQ08TRFIncidentsOff");
}
break;
case "MQA.TrafficControl.constructionClick":
var _d=e.srcObject.constructionCheck.childNodes[0];
if(_d.checked){
ua.a(":MQ08TRFConstructionOn");
}else{
ua.a(":MQ08TRFConstructionOff");
}
break;
case "MQA.Poi.infoWindowOpen":
var _e=dojo.query(".allStatePrmo",$d("popup-content"));
if(_e&&_e.length>0){
_e[0].innerHTML="";
_e[0].innerHTML=incidentPromo;
}
var _f;
if(view.getCurrentMode()=="MAPS"){
_f=view.mapView._tileMap;
}else{
if(view.getCurrentMode()=="SEARCH"){
_f=view.searchView._tileMap;
}
}
if(_f&&_f.infowindow&&_f.infowindow.opener){
var _10=_f.infowindow.opener.trafficPOI;
if(_10=="1"){
ua.a(":MQ08TRFLight");
}else{
if(_10=="2"){
ua.a(":MQ08TRFAlertDetails");
}
}
}
break;
}
var _11=mq.traffic.uaMapping[e.eventName];
if(_11){
ua.a(_11);
}
};
this.doHelpClickActions=function(){
window.location="http://help.mapquest.com/jive/kbcategory.jspa?categoryID=36";
return false;
};
this.autoSelect=false;
this.enable=function(_12,_13){
var tc=_12.controls[MQA.CONTROL_TRAFFIC];
if(!tc){
return;
}
if((_13&&tc.mode!="on")||(!_13&&tc.mode=="on")){
if(controller.numLocs()==0){
ua.a(":MQ08TrafficOn");
}
mq.traffic.autoSelect=true;
debug("Traffic Auto Select "+mq.traffic.autoSelect);
tc.eventmonitor({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._loader._layerLoaded('results');
