i50="tile24.mqcdn.com";j1="tile23.mqcdn.com";j0="tile22.mqcdn.com";i5="btilelog.access.mapquest.com";mqz=Array;h3="tile21.mqcdn.com";c44=new mqz(h3,j0,j1,i50);b33=new mqz(h3,j0,j1,i50);b12=new mqz(h3,j0,j1,i50);c21=h3;c25=i5;

if(typeof Prototype=="undefined")
{var Prototype={Version:'1.5.0',BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:'(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}}
var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];}
return destination;}
Object.extend(Object,{inspect:function(object){try{if(object===undefined)return'undefined';if(object===null)return'null';return object.inspect?object.inspect():object.toString();}catch(e){if(e instanceof RangeError)return'...';throw e;}},keys:function(object){var keys=[];for(var property in object)
keys.push(property);return keys;},values:function(object){var values=[];for(var property in object)
values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);}});var $break=new Object();var $continue=new Object();var Enumerable={each:function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=$continue)throw e;}});}catch(e){if(e!=$break)throw e;}
return this;},eachSlice:function(number,iterator){var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length)
slices.push(array.slice(index,index+number));return slices.map(iterator);},all:function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||Prototype.K)(value,index);if(!result)throw $break;});return result;},any:function(iterator){var result=false;this.each(function(value,index){if(result=!!(iterator||Prototype.K)(value,index))
throw $break;});return result;},collect:function(iterator){var results=[];this.each(function(value,index){results.push((iterator||Prototype.K)(value,index));});return results;},detect:function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator){var results=[];this.each(function(value,index){if(iterator(value,index))
results.push(value);});return results;},grep:function(pattern,iterator){var results=[];this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))
results.push((iterator||Prototype.K)(value,index));})
return results;},include:function(object){var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inGroupsOf:function(number,fillWith){fillWith=fillWith===undefined?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});},inject:function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});},max:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value>=result)
result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value<result)
result=value;});return result;},partition:function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||Prototype.K)(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;},reject:function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))
results.push(value);});return results;},sortBy:function(iterator){return this.map(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.map();},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(typeof args.last()=='function')
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},size:function(){return this.toArray().length;},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}}
Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0;i<iterable.length;i++)
results.push(iterable[i]);return results;}}
Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)
Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++)
iterator(this[i]);},clear:function(){this.length=0;return this;},first:function(){return this[0];},last:function(){return this[this.length-1];},compact:function(){return this.select(function(value){return value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(value&&value.constructor==Array?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},indexOf:function(object){for(var i=0,length=this.length;i<length;i++)
if(this[i]==object)return i;return-1;},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(){return this.inject([],function(array,value){return array.include(value)?array:array.concat([value]);});},clone:function(){return[].concat(this);},size:function(){return this.length;},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';}});if(!window.Element)
var Element=new Object();Element.extend=function(element){if(!element||_nativeExtensions||element.nodeType==3)return element;if(!element._extended&&element.tagName&&element!=window){var methods=Object.clone(Element.Methods),cache=Element.extend.cache;if(element.tagName=='FORM')
Object.extend(methods,Form.Methods);if(['INPUT','TEXTAREA','SELECT'].include(element.tagName))
Object.extend(methods,Form.Element.Methods);Object.extend(methods,Element.Methods.Simulated);for(var property in methods){var value=methods[property];if(typeof value=='function'&&!(property in element))
element[property]=cache.findOrStore(value);}}
element._extended=true;return element;};Element.extend.cache={findOrStore:function(value){return this[value]=this[value]||function(){return value.apply(null,[this].concat($A(arguments)));}}};Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,html){html=typeof html=='undefined'?'':html.toString();$(element).innerHTML=html.stripScripts();setTimeout(function(){html.evalScripts()},10);return element;},replace:function(element,html){element=$(element);html=typeof html=='undefined'?'':html.toString();if(element.outerHTML){element.outerHTML=html.stripScripts();}else{var range=element.ownerDocument.createRange();range.selectNodeContents(element);element.parentNode.replaceChild(range.createContextualFragment(html.stripScripts()),element);}
setTimeout(function(){html.evalScripts()},10);return element;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property])
if(element.nodeType==1)
elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){return $A($(element).getElementsByTagName('*'));},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){if(typeof selector=='string')
selector=new Selector(selector);return selector.match($(element));},up:function(element,expression,index){return Selector.findElement($(element).ancestors(),expression,index);},down:function(element,expression,index){return Selector.findElement($(element).descendants(),expression,index);},previous:function(element,expression,index){return Selector.findElement($(element).previousSiblings(),expression,index);},next:function(element,expression,index){return Selector.findElement($(element).nextSiblings(),expression,index);},getElementsBySelector:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},getElementsByClassName:function(element,className){return document.getElementsByClassName(className,element);},readAttribute:function(element,name){element=$(element);if(document.all&&!window.opera){var t=Element._attributeTranslations;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];var attribute=element.attributes[name];if(attribute)return attribute.nodeValue;}
return element.getAttribute(name);},getHeight:function(element){return $(element).getDimensions().height;},getWidth:function(element){return $(element).getDimensions().width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;if(elementClassName.length==0)return false;if(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))
return true;return false;},addClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).add(className);return element;},removeClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).remove(className);return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element)[element.hasClassName(className)?'remove':'add'](className);return element;},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first();},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
element.removeChild(node);node=nextNode;}
return element;},empty:function(element){return $(element).innerHTML.match(/^\s*$/);},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);while(element=element.parentNode)
if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=Position.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);if(['float','cssFloat'].include(style))
style=(typeof element.style.styleFloat!='undefined'?'styleFloat':'cssFloat');style=style.camelize();var value=element.style[style];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}else if(element.currentStyle){value=element.currentStyle[style];}}
if((value=='auto')&&['width','height'].include(style)&&(element.getStyle('display')!='none'))
value=element['offset'+style.capitalize()]+'px';if(window.opera&&['left','top','right','bottom'].include(style))
if(Element.getStyle(element,'position')=='static')value='auto';if(style=='opacity'){if(value)return parseFloat(value);if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))
if(value[1])return parseFloat(value[1])/100;return 1.0;}
return value=='auto'?null:value;},setStyle:function(element,style){element=$(element);for(var name in style){var value=style[name];if(name=='opacity'){if(value==1){value=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1.0;if(/MSIE/.test(navigator.userAgent)&&!window.opera)
element.style.filter=element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');}else if(value==''){if(/MSIE/.test(navigator.userAgent)&&!window.opera)
element.style.filter=element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');}else{if(value<0.00001)value=0;if(/MSIE/.test(navigator.userAgent)&&!window.opera)
element.style.filter=element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'')+'alpha(opacity='+value*100+')';}}else if(['float','cssFloat'].include(name))name=(typeof element.style.styleFloat!='undefined')?'styleFloat':'cssFloat';element.style[name.camelize()]=value;}
return element;},getDimensions:function(element){element=$(element);var display=$(element).getStyle('display');if(display!='none'&&display!=null)
return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='block';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}}
return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=element.style.overflow||'auto';if((Element.getStyle(element,'overflow')||'visible')!='hidden')
element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
['','Form','Input','TextArea','Select'].each(function(tag){var className='HTML'+tag+'Element';if(window[className])return;var klass=window[className]={};klass.prototype=document.createElement(tag?tag.toLowerCase():'div').__proto__;});Element.addMethods=function(methods){Object.extend(Element.Methods,methods||{});function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;var cache=Element.extend.cache;for(var property in methods){var value=methods[property];if(!onlyIfAbsent||!(property in destination))
destination[property]=cache.findOrStore(value);}}
if(typeof HTMLElement!='undefined'){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(klass){copy(Form.Element.Methods,klass.prototype);});_nativeExtensions=true;}}
var Toggle=new Object();Toggle.display=Element.toggle;Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
elements.push($(arguments[i]));return elements;}
if(typeof element=='string')
element=document.getElementById(element);return Element.extend(element);}
if(!window.Event){var Event=new Object();}
if(!window.Event){var Event=new Object();}
Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},pointerX:function(event){return event.pageX||(event.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(event){return event.pageY||(event.clientY+
(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))
element=element.parentNode;return element;},observers:false,_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer);}},unloadCache:function(){if(!Event.observers)return;for(var i=0,length=Event.observers.length;i<length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}
Event.observers=false;},observe:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))
name='keydown';Event._observeAndCache(element,name,observer,useCapture);},stopObserving:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))
name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){try{element.detachEvent('on'+name,observer);}catch(e){}}}});if(navigator.appVersion.match(/\bMSIE\b/))
Event.observe(window,'unload',Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},realOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return[valueL,valueT];},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName=='BODY')break;var p=Element.getStyle(element,'position');if(p=='relative'||p=='absolute')break;}}while(element);return[valueL,valueT];},offsetParent:function(element){if(element.offsetParent)return element.offsetParent;if(element==document.body)return element;while((element=element.parentNode)&&element!=document.body)
if(Element.getStyle(element,'position')!='static')
return element;return document.body;},within:function(element,x,y){if(this.includeScrollOffsets)
return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=this.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=this.realOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=this.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},page:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
if(Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!window.opera||element.tagName=='BODY'){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return[valueL,valueT];},clone:function(source,target){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{})
source=$(source);var p=Position.page(source);target=$(target);var delta=[0,0];var parent=null;if(Element.getStyle(target,'position')=='absolute'){parent=Position.offsetParent(target);delta=Position.page(parent);}
if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
if(options.setLeft)target.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)target.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)target.style.width=source.offsetWidth+'px';if(options.setHeight)target.style.height=source.offsetHeight+'px';},absolutize:function(element){element=$(element);if(element.style.position=='absolute')return;Position.prepare();var offsets=Position.positionedOffset(element);var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';element.style.left=left+'px';element.style.width=width+'px';element.style.height=height+'px';},relativize:function(element){element=$(element);if(element.style.position=='relative')return;Position.prepare();element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;}}}a9=7168;a8=72.0;a7=74900;a6=74999;a5=88011773;a4=90.0;a3=9000;a2=9778;a1=9779086;a0=99991;a50=1000000.0;i49="MASTER_BROKER.DoSlide( ";i47="mqcopy.gif";i46="grab.cur";i45="0";i44="mousemove";i43="475px";i42="mz4copy.gif";i41="103";i40="default";a49=107;a48=1084;a47=109;a46=11;a45=12;a44=13;a43=140818;a42=15;a41=1500;a40=1504475;i39="alpha(opacity='60')";i38="&s=";i37="grabbing.cur";i36="ak_10";i35="-moz-grab";i34="&scale=";i33="dragend";i32="&latlr=";i31="in core, about to rebuild tiles";i30=",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+128%2c8%2c0,1062:765,,,Visible+True+Line+Pen+Style+Solid+Size+150+Color+255%2c0%2c0+Opacity+255,1650.1:77,72,1,1400.2:,,,";a39=154950;a38=16;a37=179;a36=180;a35=180.0;a34=18000;a33=19558;a32=2.0;a31=22;a30=2272;i29="mz0copy.gif";i28="sz1copy.gif";i27="&lngul=";i25="ak_11";i24="SetTileMode";i23="&width=";i22="124";i21="0px";i20="nothing.gif";a29=234;a28=234698;a27=250;a26=2500;a25=250344597.90989706;a24=255;a23=256;a22=29337258;a21=315552459.66191697;a20=324767;i19="#FFFFFF";i18="mqhybdiv";i17="dragstart";i16="/hyb/Scale";i15=",";i14="div";i13="15";i12="mqsatdiv";i11="/sat/Scale";i10="/map/Scale";a19=352047;a18=3520471;a17=36;a16=360.0;a15=36000;a14=39116;a13=4694;a12=4700;a11=502;a10=701289;ak_8="http://";ak_7=Math.max;ak_6=Math.abs;ak_5=Math.random;ak_4=Math.floor;ak_3=Math.ceil;ak_2=parseFloat;ak_1=parseInt;h50="ak_9";h49="text/css";h48="move";h47=" );";h46="ak_13";h45="IMG";h44="mjtd%7Clu6zn1ua2d%2C7s%3Do5-l6b29";h43="on";h42="&lat=";h41="/tilelog/transaction?transaction=log&t=a&c=";h40="550px";h39="mqpoidiv";h38=", 1, ";h37="mqmapdiv";h36="-moz-grabbing";h35="mqtiledmap";h34="95";h33=", 0, 0, ";h32="mqlogo.gif";h31="";h30="&lnglr=";h29="&rand=";h28="auto";h27="&height=";h26="mz1copy.gif";h25="no";h24="/?e=0&GetMapFromUpdatedSession.1=1280:";h22="style";h21="&latul=";h20="ak_14";h19="print";h18="hidden";h17="mouseover";h16="mqrtehl";h15="mousedown";h14="mouseup";h13=", ";h12="movestart";h11="/";h10="moveend";i9="off";i8="115";i7="ak_12";i6="drag";i4="&key=";i2="dblclick";i1="mz7copy.gif";i0="0.6";mqz=Array;h9="&c2=";h8="190";h7="&lng=";h6="click";h5="/tilelog/transaction?transaction=log&t=m&c=";h4="18";h2="mouseout";h1="dg_1";h0="relative";g50=",1270:2,1190:,rtehl,";g49="/res/";g48="12";g47="/tilelog/transaction?transaction=log&t=h&c=";g46="img";g45="img#mqrtehl { visibility:hidden; display:none }";aj="loading.gif";ai="hyb";ah="sat";ag="map";ai_7="absolute";ai_6="block";ai_5="none";ai_4="/scales/zoom";ai_3="px";ai_2=".jpg";b7=0.0;ai_1=".gif";b6=0.40;b5=1.0;b4=1.5;b3=100;b2=100.0;b1=1000;b0=1000000;Key=h44;b47=a21;c37=a25;c50=a23;b34=9;c42=a46;d5=new mqz(0,a5,a22,a1,a18,a40,a10,a20,a39,a6,a15,a34,a3,a12,a26,a41,b1);b15=new mqz(0,4,a45,a17,b3,a29,a11,a48,a30,a13,a2,a33,a14,a7,a43,a28,a19);c38=new mqz(h31,h26,i42,i1,i29);c41=new mqz(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4);c14=ak_8+c21+g49;b23=c14+i20;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;c13=a9;b28=a9;BUTTON_MQ_LEFT=0;BUTTON_MQ_MIDDLE=1;BUTTON_MQ_RIGHT=2;MASTER_BROKER=null;SURFACE_OFFSET=2*c50;function pause(f_0){var e48=new Date();var g9=e48.getTime()+f_0;while(true){e48=new Date();if(e48.getTime()>g9)return;};};function d28(f_0,f_1){var y=(f_0+a4)*(b47/f_1);var b36=ak_1(y/c50);return b36;};function e4(f_0,f_1){var y=(f_0+a4)*(b47/f_1);var b36=ak_1(y/c50);return (y-b36*c50);};function g3(f_0,f_1,f_2){var y=f_0*c50+f_1;var c28=y/(b47/f_2)-a4;c28=ak_1(c28*b0)/a50;return c28;};function f44(f_0,f_1){var x=(f_0+a35)*(c37/f_1);var b26=ak_1(x/c50);return b26;};function g16(f_0,f_1){var x=(f_0+a35)*(c37/f_1);var b26=ak_1(x/c50);return (x-b26*c50);};function d14(f_0,f_1,f_2){var x=f_0*c50+f_1;var c20=x/(c37/f_2)-a35;c20=ak_1(c20*b0)/a50;while(c20>a35)c20-=a16;while(c20<-a35)c20+=a16;return c20;};function e8(f_0){var b18=new PointXY(0,0);while(f_0){b18.x+=f_0.offsetLeft;b18.y+=f_0.offsetTop;f_0=f_0.offsetParent;};return b18;};function g8(f_0){return f_0+ai_3;};function g0(f_0,f_1,f_2,f_3,f_4,f_5){var c9;c9=document.createElement(h45);c9.src=f_0;c9.galleryimg=h25;c9.lt=f_1;c9.tp=f_2;var d6=c9.style;d6.width=g8(f_3);d6.height=g8(f_4);d6.position=ai_7;d6.left=g8(f_1);d6.top=g8(f_2);d6.zIndex=f_5;d6.MozUserSelect=ai_5;d6.border=i45;d6.display=ai_6;c9.unselectable=h43;c9.onselectstart=function(){return false;};c9.oncontextmenu=function(){return false;};return c9;};function MQEventCallback(f_0,f_1){var c26=f_0;return function(event){if(!event)event=window.event;c26[f_1](event);};};function SlideBroker(){this.g6=new mqz();}SlideBroker.prototype={f47:function(f_0){var f20=this.g6.length;this.g6[f20]=f_0;return f20;},DoSlide:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7){this.g6[f_0].ak_18(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7);}};function PointXY(f_0,f_1){this.x=ak_1(f_0);this.y=ak_1(f_1);};function PointLL(f_0,f_1){this.lat=ak_2(f_0);this.lng=ak_2(f_1);};function RectLL(f_0,f_1){this.ul=new PointLL(f_0.lat,f_0.lng);this.lr=new PointLL(f_1.lat,f_1.lng);};function RectXY(f_0,f_1){this.ul=new PointXY(f_0.x,f_0.y);this.lr=new PointXY(f_1.x,f_1.y);};function Size(f_0,f_1){this.width=ak_1(f_0);this.height=ak_1(f_1);};function Image(){this.image=null;};function Tile(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7,f_8){this.parent=f_0;this.div=f_1;this.f13=f_8;this.e33=c14+aj;if(this.parent.f43){this.mag=new Image();this.mag.image=g0(b23,f_2,f_3,f_8,f_8,0);this.div.e3.appendChild(this.mag.image);}if(this.parent.e10){this.mah=new Image();this.mah.image=g0(b23,f_2,f_3,f_8,f_8,0);this.div.d12.appendChild(this.mah.image);}if(this.parent.d35){this.mai=new Image();this.mai.image=g0(b23,f_2,f_3,f_8,f_8,0);this.div.d21.appendChild(this.mai.image);}this.d19(f_2,f_3,f_4,f_5,f_6,f_7);};Tile.prototype={d19:function(f_0,f_1,f_2,f_3,f_4,f_5){var c5=ak_1(f_2/b1);var b8=ak_1(f_3/b1);this.lt=f_0;this.tp=f_1;this.x=f_2;this.y=f_3;while(f_2<0)f_2+=b15[f_5];while(f_2>=b15[f_5])f_2-=b15[f_5];c5=ak_1(f_2/b1);b8=ak_1(f_3/b1);if(this.parent.f43){this.e50=ak_8+c44[f_2%c44.length]+i10+f_4+h11+b8+h11+(f_3-b8*b1)+h11+c5+h11+(f_2-c5*b1)+ai_1;this.mag.image.src=this.e50;this.mag.image.lt=this.lt;this.mag.image.tp=this.tp;this.mag.image.style.left=g8(this.lt);this.mag.image.style.top=g8(this.tp);}if(this.parent.e10){this.e50=ak_8+b12[f_2%b12.length]+i11+f_4+h11+b8+h11+(f_3-b8*b1)+h11+c5+h11+(f_2-c5*b1)+ai_2;this.mah.image.src=this.e50;this.mah.image.lt=this.lt;this.mah.image.tp=this.tp;this.mah.image.style.left=g8(this.lt);this.mah.image.style.top=g8(this.tp);}if(this.parent.d35){this.e50=ak_8+b33[f_2%b33.length]+i16+f_4+h11+b8+h11+(f_3-b8*b1)+h11+c5+h11+(f_2-c5*b1)+ai_1;this.mai.image.src=this.e50;this.mai.image.lt=this.lt;this.mai.image.tp=this.tp;this.mai.image.style.left=g8(this.lt);this.mai.image.style.top=g8(this.tp);}},e20:function(){if(this.parent.f43){if(!this.mag){this.mag=new Image();this.mag.image=g0(b23,this.lt,this.tp,this.f13,this.f13,0);this.div.e3.appendChild(this.mag.image);}this.mag.image.src=this.e33;}if(this.parent.e10){if(!this.mah){this.mah=new Image();this.mah.image=g0(b23,this.lt,this.tp,this.f13,this.f13,0);this.div.d12.appendChild(this.mah.image);}this.mah.image.src=this.e33;}if(this.parent.d35){if(!this.mai){this.mai=new Image();this.mai.image=g0(b23,this.lt,this.tp,this.f13,this.f13,0);this.div.d21.appendChild(this.mai.image);}this.mai.image.src=this.e33;}}};function Map(f_0,f_1,f_2,f_3){this.f43=true;this.e10=false;this.d35=false;this.f41=false;this.d42=true;this.d41=true;this.d26=ag;this.e6="mag";if(f_3==ah){this.e10=true;this.f43=false;this.d26=f_3;this.e6="mah";}if(f_3==ai){this.e10=true;this.d35=true;this.f43=false;this.d26=f_3;this.e6="mai";}var ak_17=this;window.onunload=function(){ak_17.d11(true);};document.body.onunload=function(){ak_17.d11(true);};if(MASTER_BROKER==null){MASTER_BROKER=new SlideBroker();}this.f21=MASTER_BROKER.f47(ak_17);this.parent=f_0;this.f18=(f_1>a38)?a38:ak_1(f_1);this.f30=d5[this.f18];if(!this.parent.style.height||ak_1(this.parent.style.height)<b3){this.parent.style.width=h40;this.parent.style.height=i43;}this.width=ak_1(this.parent.style.width);this.height=ak_1(this.parent.style.height);if(this.width>b28)this.width=b28;if(this.height>c13)this.height=c13;this.f31=c50;this.g14=f_2.lat;this.e41=f_2.lng;this.d37=this.g14;this.f12=this.e41;this.e9=ak_3(this.height/this.f31)+2;this.e21=ak_3(this.width/this.f31)+2;this.f0=false;this.d13=false;this.e43=false;this.d34=null;this.g15=null;this.e7=EVENT_NONE;this.g5=-1;this.f11=h31;this.e42=h31;this.f10=b7;this.e38=b7;this.f3=b7;this.f9=b7;this.e37=b7;this.f2=b7;this.e5=b7;this.f32=false;this.f25=false;this.div=document.createElement(i14);this.div.id=h35;this.div.lt=0;this.div.tp=0;this.div.style.position=ai_7;this.div.style.top=i21;this.div.style.left=i21;this.parent.style.overflow=h18;this.parent.style.background=i19;this.parent.style.position=h0;this.parent.style.top=i21;this.parent.style.left=i21;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;this.parent.appendChild(this.div);Event.observe(document,i44,MQEventCallback(this,h50));Event.observe(document,h14,MQEventCallback(this,i36));Event.observe(document,h2,MQEventCallback(this,i25));Event.observe(this.parent,h17,MQEventCallback(this,i7));Event.observe(this.parent,h15,MQEventCallback(this,h46));this.g4(EVENT_DBLCLICK,OPER_RECENTER);this.e29=document.createElement(g46);this.e29.id=h16;this.e29.src=b23;this.e29.onload=function(){ak_17.d50();};this.e29.onselectstart=function(){return false;};this.e29.oncontextmenu=function(){return false;};this.e29.style.MozUserSelect=ai_5;this.e29.unselectable=h43;this.e29.style.zIndex=5;this.e29.style.display=ai_5;this.e29.style.position=ai_7;this.e29.style.opacity=i0;this.e29.style.filter=i39;this.div.appendChild(this.e29);this.e13=document.createElement(h22);this.e13.type=h49;this.e13.media=h19;var c35=g45;if(this.e13.styleSheet){this.e13.styleSheet.cssText=c35;}else{var b30=document.createTextNode(c35);this.e13.appendChild(b30);}document.body.appendChild(this.e13);this.e33=document.createElement(g46);this.e33.src=c14+aj;this.e33.unselectable=h43;this.e33.style.MozUserSelect=ai_5;this.e33.style.display=ai_5;this.parent.appendChild(this.e33);this.f28=document.createElement(g46);this.f28.src=b23;this.f28.unselectable=h43;this.f28.style.MozUserSelect=ai_5;this.f28.style.display=ai_5;this.parent.appendChild(this.f28);this.d20=document.createElement(g46);this.d20.src=b23;this.d20.unselectable=h43;this.d20.style.MozUserSelect=ai_5;this.d20.style.display=ai_5;this.parent.appendChild(this.d20);this.e2=document.createElement(g46);this.e2.src=b23;this.e2.unselectable=h43;this.e2.style.MozUserSelect=ai_5;this.e2.style.display=ai_5;this.parent.appendChild(this.e2);this.e44=new mqz(5);this.e44[0]=document.createElement(g46);this.e44[0].style.MozUserSelect=ai_5;this.e44[0].unselectable=h43;this.e44[0].corner=0;this.e44[0].offset=new PointXY(0,0);this.e44[0].style.position=ai_7;this.e44[0].style.display=ai_6;this.e44[0].style.zIndex=a31;this.e44[0].src=c14+h32;this.e44[0].width=h34;this.e44[0].height=i13;this.d43(this.e44[0]);this.parent.appendChild(this.e44[0]);this.e44[1]=document.createElement(g46);this.e44[1].style.MozUserSelect=ai_5;this.e44[1].unselectable=h43;this.e44[1].corner=1;this.e44[1].offset=new PointXY(0,0);this.e44[1].style.position=ai_7;this.e44[1].style.display=ai_6;this.e44[1].style.zIndex=a31;this.e44[1].src=ak_8+c21+ai_4+this.f18+ai_1;this.e44[1].width=i22;this.e44[1].height=h4;this.d43(this.e44[1]);this.parent.appendChild(this.e44[1]);this.e44[2]=document.createElement(g46);this.e44[2].style.MozUserSelect=ai_5;this.e44[2].unselectable=h43;this.e44[2].corner=2;this.e44[2].offset=new PointXY(0,0);this.e44[2].style.position=ai_7;this.e44[2].style.display=ai_6;this.e44[2].style.zIndex=a31;this.e44[2].src=c14+i47;this.e44[2].width=i41;this.e44[2].height=g48;this.d43(this.e44[2]);this.parent.appendChild(this.e44[2]);this.e44[LOGO_MAP_COPY]=document.createElement(g46);this.e44[LOGO_MAP_COPY].style.MozUserSelect=ai_5;this.e44[LOGO_MAP_COPY].unselectable=h43;this.e44[LOGO_MAP_COPY].corner=3;this.e44[LOGO_MAP_COPY].offset=new PointXY(0,0);this.e44[LOGO_MAP_COPY].style.position=ai_7;this.e44[LOGO_MAP_COPY].style.display=(this.d26!=ah)?ai_6:ai_5;this.e44[LOGO_MAP_COPY].style.zIndex=a31;this.e44[LOGO_MAP_COPY].width=h8;this.e44[LOGO_MAP_COPY].height=g48;this.e44[LOGO_MAP_COPY].src=c14+c38[1];this.d43(this.e44[LOGO_MAP_COPY]);this.parent.appendChild(this.e44[LOGO_MAP_COPY]);this.e44[LOGO_SAT_COPY]=document.createElement(g46);this.e44[LOGO_SAT_COPY].style.MozUserSelect=ai_5;this.e44[LOGO_SAT_COPY].unselectable=h43;this.e44[LOGO_SAT_COPY].corner=3;this.e44[LOGO_SAT_COPY].offset=new PointXY(0,-a44);this.e44[LOGO_SAT_COPY].style.position=ai_7;this.e44[LOGO_SAT_COPY].style.display=(this.d26!=ag)?ai_6:ai_5;this.e44[LOGO_SAT_COPY].style.zIndex=a31;this.e44[LOGO_SAT_COPY].src=c14+i28;this.e44[LOGO_SAT_COPY].width=i8;this.e44[LOGO_SAT_COPY].height=g48;this.d43(this.e44[LOGO_SAT_COPY]);this.parent.appendChild(this.e44[LOGO_SAT_COPY]);this.g20=this.div.attachEvent?c14+i46:i35;this.g33=this.div.attachEvent?c14+i37:h36;this.g24=this.g20;this.div.style.cursor=this.g24;this.e33.style.cursor=this.g33;this.div.e3=document.createElement(i14);this.div.e3.id=h37;this.div.e3.lt=0;this.div.e3.tp=0;this.div.e3.style.position=ai_7;this.div.e3.style.top=i21;this.div.e3.style.left=i21;this.div.appendChild(this.div.e3);this.div.d12=document.createElement(i14);this.div.d12.id=i12;this.div.d12.lt=0;this.div.d12.tp=0;this.div.d12.style.position=ai_7;this.div.d12.style.top=i21;this.div.d12.style.left=i21;this.div.appendChild(this.div.d12);this.div.d21=document.createElement(i14);this.div.d21.id=i18;this.div.d21.lt=0;this.div.d21.tp=0;this.div.d21.style.position=ai_7;this.div.d21.style.top=i21;this.div.d21.style.left=i21;this.div.appendChild(this.div.d21);this.div.f22=document.createElement(i14);this.div.f22.id=h39;this.div.f22.lt=0;this.div.f22.tp=0;this.div.f22.style.position=ai_7;this.div.f22.style.top=i21;this.div.f22.style.left=i21;this.div.f22.style.cursor=h28;this.div.f22.style.zIndex=9;this.div.f22.UNSELECTABLE=i9;this.div.appendChild(this.div.f22);this.f19();};Map.prototype={f19:function(){this.d37=this.g14;this.f12=this.e41;this.g40=f44(this.e41,this.f30);this.g38=d28(this.g14,this.f30);this.g41=g16(this.e41,this.f30);this.g39=this.f31-e4(this.g14,this.f30);this.g21=ak_4(this.g41);this.g44=ak_4(this.g39);this.g36=ak_1(this.width/2)-this.g21;this.g34=ak_1(this.height/2)-this.g44;this.g23=0;this.g22=0;while(this.g36<0){this.g36+=this.f31;this.g23--;this.g40++;};while(this.g34<0){this.g34+=this.f31;this.g22--;this.g38--;};while(this.g36>2*this.f31){this.g36-=this.f31;this.g23++;this.g40--;};while(this.g34>2*this.f31){this.g34-=this.f31;this.g22++;this.g38++;};this.g32=this.g36;this.g31=this.g34;while(this.g32>this.f31)this.g32-=this.f31;while(this.g31>this.f31)this.g31-=this.f31;this.g26=0;this.g25=0;this.g43=0;this.g42=0;this.g37=0;this.g35=0;this.g28=0;this.g27=0;this.g30=0;this.g29=0;this.e5=0;this.div.lt=0;this.div.tp=0;this.div.style.left=this.div.lt+ai_3;this.div.style.top=this.div.tp+ai_3;if(this.d34==null){this.d34=new mqz(this.e21);for(var a=0;a<this.e21;a++){this.d34[a]=new mqz(this.e9);for(var b=0;b<this.e9;b++){this.d34[a][b]=new Tile(this,this.div,(a-2)*this.f31+this.g36,(b-2)*this.f31+this.g34,this.g40-2+a,this.g38+2-b,this.f30,this.f18,this.f31);}}}else{for(var a=0;a<this.e21;a++){for(var b=0;b<this.e9;b++){this.d34[a][b].e20();}}for(var a=0;a<this.e21;a++){for(var b=0;b<this.e9;b++){this.d34[a][b].d19((a-2)*this.f31+this.g36,(b-2)*this.f31+this.g34,this.g40-2+a,this.g38+2-b,this.f30,this.f18,this.f31);}}}this.e44[1].src=ak_8+c21+ai_4+this.f18+ai_1;this.e44[LOGO_MAP_COPY].src=c14+c38[c41[this.f18]];if(this.f43){this.f10+=b5;this.f9+=b5;}if(this.e10){this.e38+=b5;this.e37+=b5;}if(this.d35){this.f3+=b5;this.f2+=b5;}if(this.f41){this.e29.src=b23;this.e29.style.display=ai_5;this.f27();}if(this.e19){for(var x=0;x<this.e19.length;x++){var d18=this.e19[x];var b38=this.GetLLToXY(d18.ll);d18.style.left=(b38.x+d18.offset.x-this.g26)+ai_3;d18.style.top=(b38.y+d18.offset.y-this.g25)+ai_3;}}},d43:function(f_0){var b9;var b21;if(f_0.corner==0){b9=0;b21=0;}else if(f_0.corner==1){b9=this.width-ak_1(f_0.width);b21=0;}else if(f_0.corner==2){b9=0;b21=this.height-ak_1(f_0.height);}else if(f_0.corner==3){b9=this.width-ak_1(f_0.width);b21=this.height-ak_1(f_0.height);}b9+=f_0.offset.x;b21+=f_0.offset.y;f_0.style.left=b9+ai_3;f_0.style.top=b21+ai_3;},g4:function(f_0,f_1){if(this.e7==EVENT_CLICK){Event.stopObserving(this.parent,h6,this.d27);}else if(this.e7==EVENT_DBLCLICK){Event.stopObserving(this.parent,i2,this.d27);}this.e7=f_0;this.g5=f_1;if(this.e7==EVENT_CLICK){this.d27=MQEventCallback(this,h20);Event.observe(this.parent,h6,this.d27);}else if(this.e7==EVENT_DBLCLICK){this.d27=MQEventCallback(this,h1);Event.observe(this.parent,i2,this.d27);}},d11:function(f_0){if(this.f43&&this.f10>b7){this.f28.src=ak_8+c25+h5+(ak_1(this.f10*b0)/a50)+h9+(ak_1(this.f9*b0)/a50)+i38+this.f30+h42+this.d37+h7+this.f12+i4+Key+h29+ak_4(ak_5()*a0);this.f10=b7;this.f9=b7;}if(this.e10&&this.e38>b7){this.d20.src=ak_8+c25+h41+(ak_1(this.e38*b0)/a50)+h9+(ak_1(this.e37*b0)/a50)+i38+this.f30+h42+this.d37+h7+this.f12+i4+Key+h29+ak_4(ak_5()*a0);this.e38=b7;this.e37=b7;}if(this.d35&&this.f3>b7){this.e2.src=ak_8+c25+g47+(ak_1(this.f3*b0)/a50)+h9+(ak_1(this.f2*b0)/a50)+i38+this.f30+h42+this.d37+h7+this.f12+i4+Key+h29+ak_4(ak_5()*a0);this.f3=b7;this.f2=b7;}this.g28=0;this.g27=0;if(f_0!=null&&f_0==true)pause(a27);},f27:function(){var b41=d28(this.g15.ul.lat,this.f30);var b44=f44(this.g15.ul.lng,this.f30);var c23=d28(this.g15.lr.lat,this.f30);var c24=f44(this.g15.lr.lng,this.f30);this.g12=-1;this.d16=2;var b22=this.d34[0][0];var c19=this.d34[this.e21-1][this.e9-1];if(b44>b22.x&&b41<b22.y&&c24<c19.x&&c23>c19.y){this.g12=0;this.d16=-1;b22=this.d34[b44-b22.x][b22.y-b41];c19=this.d34[this.e21-1-(c19.x-c24)][this.e9-1-(c23-c19.y)];}var c15=g3(b22.y+this.g12*-1,a24,this.f30);var b42=d14(b22.x-1+this.g12*1,a24,this.f30);var d4=g3(c19.y-1+this.g12*1,a24,this.f30);var c36=d14(c19.x+this.g12*-1,a24,this.f30);var b24=(1+(c19.x+this.g12*-1)-(b22.x+this.g12*1))*this.f31;var c12=(1+(b22.y+this.g12*-1)-(c19.y+this.g12*1))*this.f31;this.g37=0;this.g35=0;if(this.f18<3&&b42>b7&&this.e41<b7){b42-=a16;}var d8=!((b42>this.g15.lr.lng)||(c36<this.g15.ul.lng)||(d4>this.g15.ul.lat)||(c15<this.g15.lr.lat));if(this.g12==0||d8){this.e29.lt=(b22.lt+this.g12*this.f31+1);this.e29.tp=(b22.tp+this.g12*this.f31+1);this.e29.style.left=this.e29.lt+ai_3;this.e29.style.top=this.e29.tp+ai_3;this.e29.style.width=b24+ai_3;this.e29.style.height=c12+ai_3;if(this.e42.length>0){var c4=(c15+d4)/a32;var b48=(b42+c36)/a32;this.e29.src=this.f11+h24+this.e42+g50+c4+i15+b48+i15+(b24/a8)+i15+(c12/a8)+i15+this.f30+i30+h29+ak_4(ak_5()*a0);}else{this.e29.src=this.f11+h21+c15+i27+b42+i32+d4+h30+c36+i23+b24+h27+c12+i34+this.f30+h29+ak_4(ak_5()*a0);}}},d50:function(){this.e29.style.display=ai_6;},d9:function(f_0,f_1){this.f32=true;if(f_0!=0||f_1!=0)this.HandleMove(h48);if((f_0!=0||f_1!=0)&&this.d13)this.HandleDrag(i6);this.g26+=f_0;this.g25+=f_1;this.g43+=f_0;this.g42+=f_1;this.g30+=f_0;this.g29+=f_1;this.div.lt=this.div.lt+f_0;this.div.tp=this.div.tp+f_1;this.div.style.left=this.div.lt+ai_3;this.div.style.top=this.div.tp+ai_3;var b31=b7;while(this.g43+this.g32>c50){this.d34.unshift(this.d34.pop());for(var b=0;b<this.e9;b++){this.d34[0][b].e20();}for(var b=0;b<this.e9;b++){var ak_15=this.d34[0][b];var ak_16=this.d34[1][b];ak_15.d19(eval("ak_16."+this.e6).image.lt-this.f31,eval("ak_15."+this.e6).image.tp,ak_16.x-1,ak_15.y,this.f30,this.f18);}this.g43-=this.f31;this.g37--;this.g28--;b31+=(this.e9-2);}while(this.g43+this.g32<0){this.d34.push(this.d34.shift());for(var b=0;b<this.e9;b++){this.d34[this.e21-1][b].e20();}for(var b=0;b<this.e9;b++){var ak_15=this.d34[this.e21-1][b];var ak_16=this.d34[this.e21-2][b];ak_15.d19(eval("ak_16."+this.e6).image.lt+this.f31,eval("ak_15."+this.e6).image.tp,ak_16.x+1,ak_15.y,this.f30,this.f18);}this.g43+=this.f31;this.g37++;this.g28++;b31+=(this.e9-2);}while(this.g42+this.g31>c50){for(var a=0;a<this.e21;a++){this.d34[a].unshift(this.d34[a].pop());this.d34[a][0].e20();}for(var a=0;a<this.e21;a++){var ak_15=this.d34[a][0];var ak_16=this.d34[a][1];ak_15.d19(eval("ak_15."+this.e6).image.lt,eval("ak_16."+this.e6).image.tp-this.f31,ak_15.x,ak_16.y+1,this.f30,this.f18);}this.g42-=this.f31;this.g35--;this.g27--;b31+=(this.e21-2);}while(this.g42+this.g31<0){for(var a=0;a<this.e21;a++){this.d34[a].push(this.d34[a].shift());this.d34[a][this.e9-1].e20();}for(var a=0;a<this.e21;a++){var ak_15=this.d34[a][this.e9-1];var ak_16=this.d34[a][this.e9-2];ak_15.d19(eval("ak_15."+this.e6).image.lt,eval("ak_16."+this.e6).image.tp+this.f31,ak_15.x,ak_16.y-1,this.f30,this.f18);}this.g42+=this.f31;this.g35++;this.g27++;b31+=(this.e21-2);}if(this.g26>1*b15[this.f18]*this.f31){this.g26-=b15[this.f18]*this.f31;}if(this.g26<-1*b15[this.f18]*this.f31){this.g26+=b15[this.f18]*this.f31;}if(b31>b7){b31=b31/((this.e21-2)*(this.e9-2)*9);if(this.f43)this.f10+=b31;if(this.e10)this.e38+=b31;if(this.d35)this.f3+=b31;}if(ak_6(this.g27)>4||ak_6(this.g28)>4){this.d11();}var g2=ak_6(this.g26)%SURFACE_OFFSET;var g1=ak_6(this.g25)%SURFACE_OFFSET;var f8=ak_3(SURFACE_OFFSET/b4);if((g2>f8)&&this.d42){this.HandleOverlays();this.d42=false;};if((g1>f8)&&this.d41){this.HandleOverlays();this.d41=false;};if(g2<f8&&!this.d42)this.d42=true;if(g1<f8&&!this.d41)this.d41=true;if(this.f41&&(this.d16>0)&&(this.g35>=this.d16||this.g35<=this.d16*-1||this.g37>=this.d16||this.g37<=this.d16*-1)){this.e29.src=b23;this.e29.style.display=ai_5;this.f27();}},ak_18:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7){var e18=f_5/f_6;var f39=ak_1(e18*f_3)-f_1;var f37=ak_1(e18*f_4)-f_2;this.d9(f39,f37);f_1+=f39;f_2+=f37;f_5++;if(f_5<=f_6){setTimeout(i49+f_0+h13+f_1+h13+f_2+h13+f_3+h13+f_4+h13+f_5+h13+f_6+h13+f_7+h47,f_7);}else{this.e43=false;this.f32=false;this.HandleMove(h10);}},e45:function(f_0){if(this.e19==null)return false;while(f_0!=null&&f_0!=this.parent){for(var i=0;i<this.e19.length;i++){if(this.e19[i]==f_0)return true;}f_0=f_0.parentNode;}return false;},ak_9:function(event){if(this.f25){this.f25=false;this.HandleMove(h12);}if(this.e30){this.e30=false;this.HandleDrag(i17);}this.g19=false;this.div.style.cursor=this.g24;if(!this.d13||this.f0)return;var e22=e8(this.parent);var f46=event.clientX-e22.x;var f45=event.clientY-e22.y;var f17=ak_1(this.width/2)-f46;var f16=ak_1(this.height/2)-f45;this.d37=g3(this.g38-this.g22,this.f31-this.g39+this.g25+f16,this.f30);this.f12=d14(this.g40+this.g23,this.g41-this.g26-f17,this.f30);var d33=f46-this.d24;var d31=f45-this.d23;this.d24=f46;this.d23=f45;this.d9(d33,d31);},ak_10:function(event){if(!this.d13||this.f0)return;this.g24=this.g20;this.div.style.cursor=this.g24;if(!this.g19){var e34=ak_6(this.g30-this.f26);var f5=ak_6(this.g29-this.f24);this.e5+=((e34*f5)+((this.width-e34)*f5)+((this.height-f5)*e34));var d10=((this.e5/(this.width*this.height))>=b6);if(this.f43&&d10){this.f9+=b5;this.e5=0;};if(this.e10&&d10){this.e37+=b5;this.e5=0;};if(this.d35&&d10){this.f2+=b5;this.e5=0;};}this.f25=false;if(this.f32){this.f32=false;this.HandleMove(h10);}this.e30=false;if(this.d13&&!this.g19){this.HandleDrag(i33);}var e22=e8(this.parent);event.f46=event.clientX-e22.x;;event.f45=event.clientY-e22.y;this.HandleMouse(h14,event);Event.stop(event);this.d13=false},ak_12:function(event){this.div.style.cursor=this.g24;},ak_13:function(event){if(this.e43||this.f0)return;if(this.e45(Event.element(event)))return;var e22=e8(this.parent);this.g24=this.g33;this.div.style.cursor=this.g24;var f46=event.clientX-e22.x;var f45=event.clientY-e22.y;this.f26=this.g30;this.f24=this.g29;this.d24=f46;this.d23=f45;this.d13=true;this.g19=true;this.f25=true;this.e30=true;event.f46=f46;event.f45=f45;this.HandleMouse(h15,event);Event.stop(event);},ak_11:function(event){if(!event.relatedTarget&&!event.toElement)this.ak_10(event);},ak_14:function(event){this.e0(event,true);},dg_1:function(event){this.e0(event,false);},e0:function(event,f_0){if(this.d13||this.e43||(!this.g19&&f_0))return;this.g19=false;this.div.style.cursor=i40;var e22=e8(this.parent);var f46=(event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-e22.x;var f45=(event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-e22.y;if(this.g5==OPER_RECENTER||this.f18==a38){this.SlideMapToPoint(new PointXY(f46,f45));}else{var e11=this.GetXYToLL(new PointXY(f46,f45));this.SetCenterLatLngZoomLevel(e11,this.f18+1);}this.div.style.cursor=this.g24;},d25:function(event){if(this.d13)return;if(event.wheelDelta>0&&this.f18<a38){this.ZoomIn();}if(event.wheelDelta<0&&this.f18>1){this.ZoomOut();}},d17:function(event){if(this.d13)return;key=event.which?event.which:event.keyCode;if(key==a49&&this.f18<a38){this.ZoomIn();}if(key==a47&&this.f18>1){this.ZoomOut();}},ZoomOut:function(){this.SetZoomLevel(this.f18-1);},ZoomIn:function(){this.SetZoomLevel(this.f18+1);},SetZoomLevel:function(f_0){f_0=ak_1(f_0);if(f_0<1||f_0>a38||this.d13||this.e43||f_0==this.f18)return;var e11=this.GetCenterLatLng();this.d11();this.g14=e11.lat;this.e41=e11.lng;this.f18=f_0;this.f30=d5[this.f18];this.f19();},GetZoomLevel:function(){return this.f18;},SlideMapByOffset:function(f_0){if(this.e43)return;this.HandleMove(h12);this.e43=true;setTimeout(i49+this.f21+h33+f_0.x+h13+f_0.y+h38+b34+h13+c42+h47,c42);var e34=ak_6(f_0.x);var f5=ak_6(f_0.y);this.e5+=((e34*f5)+((this.width-e34)*f5)+((this.height-f5)*e34));var d10=((this.e5/(this.width*this.height))>=b6);if(this.f43&&d10){this.f9+=b5;this.e5=0;};if(this.e10&&d10){this.e37+=b5;this.e5=0;};if(this.d35&&d10){this.f2+=b5;this.e5=0;};},SlideMapToPoint:function(f_0){if(this.e43)return;this.HandleMove(h12);var f17=ak_1(this.width/2)-f_0.x;var f16=ak_1(this.height/2)-f_0.y;this.e43=true;setTimeout(i49+this.f21+h33+f17+h13+f16+h38+b34+h13+c42+h47,c42);var e34=ak_6(f17);var f5=ak_6(f16);this.e5+=((e34*f5)+((this.width-e34)*f5)+((this.height-f5)*e34));var d10=((this.e5/(this.width*this.height))>=b6);if(this.f43&&d10){this.f9+=b5;this.e5=0;};if(this.e10&&d10){this.e37+=b5;this.e5=0;};if(this.d35&&d10){this.f2+=b5;this.e5=0;};},PanNorth:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouth:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},PanEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)));},PanWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)));},PanNorthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},PanNorthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},SetCenterLatLng:function(f_0){this.g14=ak_1(f_0.lat*b0)/a50;this.e41=ak_1(f_0.lng*b0)/a50;this.d11();this.f19();},SetCenterLatLngZoomLevel:function(f_0,f_1){f_1=ak_1(f_1);this.g14=ak_1(f_0.lat*b0)/a50;this.e41=ak_1(f_0.lng*b0)/a50;if(f_1<1)f_1=1;if(f_1>a38)f_1=a38;this.f18=f_1;this.f30=d5[f_1];this.d11();this.f19();},SetCenterXY:function(f_0){var f17=ak_1(this.width/2)-f_0.x;var f16=ak_1(this.height/2)-f_0.y;this.g14=g3(this.g38-this.g22,this.f31-this.g39+this.g25+f16,this.f30);this.e41=d14(this.g40+this.g23,this.g41+this.g26-f17,this.f30);this.d11();this.f19();},GetCenterLatLng:function(){var ll=new PointLL(0,0);ll.lat=g3(this.g38-this.g22,this.f31-this.g39+this.g25,this.f30);ll.lng=d14(this.g40+this.g23,this.g41-this.g26,this.f30);return ll;},GetLLToXY:function(f_0){var g17=new PointXY(0,0);var f34=f44(f_0.lng,this.f30);var f33=d28(f_0.lat,this.f30);var f7=g16(f_0.lng,this.f30);var f6=this.f31-e4(f_0.lat,this.f30);g17.x=ak_1(this.width/2)-((this.g40+this.g23-f34)*this.f31)-(this.g41-this.g26-f7);g17.y=ak_1(this.height/2)+((this.g38-this.g22-f33)*this.f31)-(this.g39-this.g25-f6);g17.x=ak_1(g17.x);g17.y=ak_1(g17.y);return g17;},GetXYToLL:function(f_0){var f17=ak_1(this.width/2)-f_0.x;var f16=ak_1(this.height/2)-f_0.y;var ll=new PointLL(b7,b7);ll.lat=g3(this.g38-this.g22,this.f31-this.g39+this.g25+f16,this.f30);ll.lng=d14(this.g40+this.g23,this.g41-this.g26-f17,this.f30);return ll;},ResizeMap:function(f_0){if(f_0.width==this.width&&f_0.height==this.height)return;var e11=this.GetCenterLatLng();this.width=ak_1(f_0.width);this.height=ak_1(f_0.height);if(this.width>b28)this.width=b28;if(this.height>c13)this.height=c13;this.g14=e11.lat;this.e41=e11.lng;this.e9=ak_3(this.height/this.f31)+2;this.e21=ak_3(this.width/this.f31)+2;this.d13=false;this.e43=false;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;for(i=0;i<this.e44.length;i++){this.d43(this.e44[i]);}this.d34=null;while(this.div.e3.hasChildNodes())this.div.e3.removeChild(this.div.e3.firstChild);while(this.div.d12.hasChildNodes())this.div.d12.removeChild(this.div.d12.firstChild);while(this.div.d21.hasChildNodes())this.div.d21.removeChild(this.div.d21.firstChild);this.d11();this.f19();},AddRouteHighlight:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6){this.g15=f_0;this.f11=f_1;if(f_2==null){this.e42=h31;}else{this.e42=f_2.toString();}if(this.g15.ul.lat<this.g15.lr.lat){var e15=this.g15.ul.lat;this.g15.ul.lat=this.g15.lr.lat;this.g15.lr.lat=e15;}if(this.g15.ul.lng>this.g15.lr.lng){var f42=this.g15.ul.lng;this.g15.ul.lng=this.g15.lr.lng;this.g15.lr.lng=f42;}this.f41=true;if(f_3==null||f_3==false){this.f27();}else{if(f_4==null)f_4=false;if(f_5==null)f_5=1;if(f_6==null)f_6=a38;this.BestFitRoute(f_4,f_5,f_6);}},RemoveRouteHighlight:function(){this.e29.src=b23;this.f41=false;this.g15=null;this.e29.style.display=ai_5;},AddPOI:function(f_0,f_1,f_2){if(this.e19==null)this.e19=new mqz();var g17=this.GetLLToXY(f_0);f_2.ll=f_0;f_2.offset=f_1;f_2.style.position=ai_7;f_2.style.zIndex=9;f_2.style.left=(g17.x+f_1.x-this.g26)+ai_3;f_2.style.top=(g17.y+f_1.y-this.g25)+ai_3;f_2.oncontextmenu=function(){return false;};this.e19.push(f_2);this.div.f22.appendChild(f_2);},UpdatePOI:function(f_0,f_1,f_2){if(this.e19==null)return;var e39=false;for(var i=0;i<this.e19.length;i++){if(this.e19[i]==f_2){e39=true;}}if(e39){var g17=this.GetLLToXY(f_0);f_2.ll=f_0;f_2.offset=f_1;f_2.style.left=(g17.x+f_1.x-this.g26)+ai_3;f_2.style.top=(g17.y+f_1.y-this.g25)+ai_3;}},RemovePOI:function(f_0){var e46=[];if(this.e19==null)return;for(var i=0;i<this.e19.length;i++){if(this.e19[i]!=f_0){e46.push(this.e19[i]);}else{this.div.f22.removeChild(this.e19[i]);}}this.e19.clear();this.e19=null;for(var i=0;i<e46.length;i++){if(this.e19==null)this.e19=new mqz();this.e19.push(e46[i]);}e46=null;},ClearPOIs:function(){if(this.e19==null)return;for(var i=0;i<this.e19.length;i++){this.div.f22.removeChild(this.e19[i]);}this.e19=null;},AppendOverlayDiv:function(f_0){this.div.appendChild(f_0);},GetTileSize:function(){return c50;},BestFit:function(f_0,f_1,f_2,f_3){var f14,f50,d46,e28,f18,f35;if(f_1==null)f_1=false;if(f_2==null){f18=1;}else{f_2=ak_1(f_2);if(f_2<1||f_2>a42){f18=1;}else{f18=f_2+1;}}if(f_3==null){f35=a38;}else{f_3=ak_1(f_3);if(f_3<1||f_3>a38){f35=a38;}else{f35=f_3;}if(f35<f18)f35=f18+1;}if(f_0.ul.x){f14=new PointXY(f_0.ul.x,f_0.ul.y);f50=new PointXY(f_0.lr.x,f_0.lr.y);d46=this.GetXYToLL(new PointXY(f_0.ul.x,f_0.ul.y));e28=this.GetXYToLL(new PointXY(f_0.lr.x,f_0.lr.y));}else{f14=this.GetLLToXY(new PointLL(f_0.ul.lat,f_0.ul.lng));f50=this.GetLLToXY(new PointLL(f_0.lr.lat,f_0.lr.lng));d46=new PointLL(f_0.ul.lat,f_0.ul.lng);e28=new PointLL(f_0.lr.lat,f_0.lr.lng);}var width=ak_6(e28.lng-d46.lng)*(c37/this.f30);var height=ak_6(e28.lat-d46.lat)*(b47/this.f30);if(f_1==true){var f38=this.GetLLToXY(this.GetCenterLatLng());var g7=ak_7(ak_6(f38.x-f14.x),ak_6(f38.x-f50.x));var d32=ak_7(ak_6(f38.y-f14.y),ak_6(f38.y-f50.y));width=g7*2;height=d32*2;}var f30=ak_7((this.f30*(width/this.width)),(this.f30*(height/this.height)));while(f30<d5[f18]&&f18<=f35)f18++;if(f_1==true){this.SetZoomLevel((f18-1));}else{this.SetCenterLatLngZoomLevel(new PointLL(((d46.lat+e28.lat)/a32),((d46.lng+e28.lng)/a32)),(f18-1));}},BestFitPOIs:function(f_0,f_1,f_2){if(this.e19==null)return;if(f_0==null)f_0=false;if(f_1==null)f_1=1;if(f_2==null)f_2=a38;var e24=new RectLL(new PointLL(this.e19[0].ll.lat,this.e19[0].ll.lng),new PointLL(this.e19[0].ll.lat,this.e19[0].ll.lng));for(var i=1;i<this.e19.length;i++){var d47=this.e19[i].ll;if(d47.lat>e24.ul.lat)e24.ul.lat=d47.lat;if(d47.lng<e24.ul.lng)e24.ul.lng=d47.lng;if(d47.lat<e24.lr.lat)e24.lr.lat=d47.lat;if(d47.lng>e24.lr.lng)e24.lr.lng=d47.lng;}this.BestFit(e24,f_0,f_1,f_2);},BestFitRoute:function(f_0,f_1,f_2){if(this.g15){if(f_0==null)f_0=false;if(f_1==null)f_1=1;if(f_2==null)f_2=a38;this.BestFit(this.g15,f_0,f_1,f_2);}},GetTileMode:function(){return this.d26;},SetTileMode:function(f_0){if(f_0==ag||f_0==ah||f_0==ai&&(this.d26!=f_0)){this.d11();this.f43=false;this.e10=false;this.d35=false;this.div.e3.style.display=ai_5;this.div.d12.style.display=ai_5;this.div.d21.style.display=ai_5;if(f_0==ag){this.f43=true;this.div.e3.style.display=ai_6;this.e44[LOGO_MAP_COPY].style.display=ai_6;this.e44[LOGO_SAT_COPY].style.display=ai_5;this.e6="mag";}if(f_0==ah){this.e10=true;this.div.d12.style.display=ai_6;this.e44[LOGO_MAP_COPY].style.display=ai_5;this.e44[LOGO_SAT_COPY].style.display=ai_6;this.e6="mah";}if(f_0==ai){this.e10=true;this.d35=true;this.div.d12.style.display=ai_6;this.div.d21.style.display=ai_6;this.e44[LOGO_MAP_COPY].style.display=ai_6;this.e44[LOGO_SAT_COPY].style.display=ai_6;this.e6="mai";}this.d26=f_0;var e11=this.GetCenterLatLng();this.g14=e11.lat;this.e41=e11.lng;this.f19();}},SetLogoPlacement:function(f_0,f_1,f_2){f_0=ak_1(f_0);f_1=ak_1(f_1);if(f_0>=0&&f_0<=LOGO_SAT_COPY&&f_1>=0&&f_1<=3){this.e44[f_0].corner=f_1;this.e44[f_0].offset=f_2;this.d43(this.e44[f_0]);}},GetLogoPlacement:function(f_0){f_0=ak_1(f_0);if(f_0>=0&&f_0<=LOGO_SAT_COPY){var e12=new Object();e12.corner=this.e44[f_0].corner;e12.offset=new PointXY(this.e44[f_0].offset.x,this.e44[f_0].offset.y);return e12;}},SetClickOperation:function(f_0,f_1){f_0=ak_1(f_0);f_1=ak_1(f_1);if(f_0>=EVENT_NONE&&f_0<=EVENT_DBLCLICK&&f_1>=OPER_RECENTER&&f_1<=OPER_RECENTERZOOM){this.g4(f_0,f_1);}},DisableDragging:function(f_0){this.f0=(f_0==true);},GetDraggingState:function(){return this.f0;},GetLatitudeDegreesPerPixel:function(f_0){return (b47/f_0);},GetLongitudeDegreesPerPixel:function(f_0){return (c37/f_0);},HandleMove:function(){},HandleDrag:function(){},HandleMouse:function(){},HandleOverlays:function(){},GetClickFlag:function(){return (this.g19)?this.g19:false;},GetDragOffset:function(){return new MQPoint(this.g26,this.g25);}};document.write("<link rel='stylesheet' href='http://btilelog.access.mapquest.com/tilelog/transaction?transaction=script&key=mjtd%7Clu6zn1ua2d%2C7s%3Do5-l6b29&v=5.1&itkcss=true 'type='text/css'  charset='iso-8859-1'/>");

function MQBrowser(){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;}
function mqGetBrowserInfo()
{var browser=new MQBrowser();browser.name=browser.version=browser.os="unknown";var userAgent=window.navigator.userAgent.toLowerCase();var appname=window.navigator.appName;var appVersion=window.navigator.appVersion;var browserListArray=new Array("firefox","msie","netscape","opera","safari");var osListArray=new Array("linux","mac","windows","x11");var browserListlength=browserListArray.length;var strPosition="";for(var i=0,n=browserListlength;i<n;i++)
{strPosition=userAgent.indexOf(browserListArray[i])+1;if(strPosition>0)
{browser.name=browserListArray[i];var versionPosition=strPosition+browser.name.length;var incr=((browser.name=="safari")||(userAgent.charAt(versionPosition+4)>0&&userAgent.charAt(versionPosition+4)<9))?5:3;browser.version=userAgent.substring(versionPosition,versionPosition+incr);}}
var osListArrayLength=osListArray.length;for(var j=0,m=osListArrayLength;j<m;j++)
{strPosition=userAgent.indexOf(osListArray[j])+1;if(strPosition>0)
{browser.os=osListArray[j];}}
if(appname=="Netscape")
browser.appname="ns";else if(appname=="Microsoft Internet Explorer")
browser.appname="ie";browser.appVersion=appVersion;browser.vMajor=parseInt(browser.appVersion);browser.isNS=(browser.appname=="ns"&&browser.vMajor>=4);browser.isNS4=(browser.appname=="ns"&&browser.vMajor==4);browser.isNS6=(browser.appname=="ns"&&browser.vMajor==5);browser.isIE=(browser.appname=="ie"&&browser.vMajor>=4);browser.isIE4=(browser.appVersion.indexOf('MSIE 4')>0);browser.isIE5=(browser.appVersion.indexOf('MSIE 5')>0);browser.isDOM=(document.createElement&&document.appendChild&&document.getElementsByTagName)?true:false;browser.isSafari=(browser.name=="safari");if(userAgent.indexOf("win")>-1)
browser.platform="win";else if(userAgent.indexOf("mac")>-1)
browser.platform="mac";else
browser.platform="other";return browser;}
var mqBrowserInfo=mqGetBrowserInfo();function MQObject(){var m_xmlDoc=null;this.getM_XmlDoc=function(){return m_xmlDoc;};this.setM_XmlDoc=function(xmlDoc){m_xmlDoc=xmlDoc;};var m_xpath=null;this.getM_Xpath=function(){return m_xpath;};this.setM_Xpath=function(xpath){m_xpath=xpath;};}
MQObject.prototype.getClassName=function(){return"MQObject";};MQObject.prototype.getObjectVersion=function(){return 0;};MQObject.prototype.setProperty=function(strPropName,strPropValue){var strXPathExpression;if(strPropName!==null)strXPathExpression="/"+this.getM_Xpath()+"/"+strPropName;else strXPathExpression="/"+this.getM_Xpath();var ndNewProp=mqSetNodeText(this.getM_XmlDoc(),strXPathExpression,strPropValue);if(ndNewProp===null){var ndNewPropParent=this.getM_XmlDoc().createElement(strPropName);var ndRoot=this.getM_XmlDoc().documentElement.appendChild(ndNewPropParent);ndNewProp=mqSetNodeText(this.getM_XmlDoc(),strXPathExpression,strPropValue);}
return ndNewProp;};MQObject.prototype.getProperty=function(strPropName){var strXPathExpression;if(strPropName!==null)strXPathExpression="/"+this.getM_Xpath()+"/"+strPropName;else strXPathExpression="/"+this.getM_Xpath();return mqGetXPathNodeText(this.getM_XmlDoc(),strXPathExpression);};MQObject.prototype.copy=function(){var cp=new this.constructor;cp.loadXml(this.saveXml());return cp;};MQObject.prototype.internalCopy=function(obj){var strXml="<"+obj.getM_Xpath();if(this.getObjectVersion()>0){strXml=strXml+" Version=\""+this.getObjectVersion()+"\"";}
strXml=strXml+">";var root=this.getM_XmlDoc().documentElement;var nodes=root.childNodes;var maxCount=nodes.length;for(var count=0;count<maxCount;count++){strXml=strXml+mqXmlToStr(nodes[count]);}
strXml=strXml+"</"+obj.getM_Xpath()+">";var cp=new this.constructor;cp.loadXml(strXml);return cp;};MQPoint.prototype=new MQObject();MQPoint.prototype.constructor=MQPoint;function MQPoint(param1,param2){MQObject.call(this);this.x=0;this.y=0;this.setM_Xpath("Point");if(arguments.length==1){this.setM_Xpath(param1);}
else if(arguments.length==2){this.x=parseInt(param1);this.y=parseInt(param2);if(isNaN(this.x)||isNaN(this.y))
throw new Error("MQPoint 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");}}
MQPoint.prototype.getClassName=function(){return"MQPoint";};MQPoint.prototype.getObjectVersion=function(){return 0;};MQPoint.prototype.loadXml=function(strXml){if("undefined"!==typeof(mqutils)){this.setM_XmlDoc(mqCreateXMLDoc(strXml));this.x=this.getProperty("X");this.y=this.getProperty("Y");}};MQPoint.prototype.saveXml=function(){return"<"+this.getM_Xpath()+"><X>"+this.x+"</X><Y>"+this.y+"</Y></"+this.getM_Xpath()+">";};MQPoint.prototype.setX=function(x){this.x=parseInt(x);if(isNaN(this.x))
throw new Error("MQPoint.setX called with invalid parameter");};MQPoint.prototype.getX=function(){return this.x;};MQPoint.prototype.setY=function(y){this.y=parseInt(y);if(isNaN(this.y))
throw new Error("MQPoint.setY called with invalid parameter");};MQPoint.prototype.getY=function(){return this.y;};MQPoint.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");};MQPoint.prototype.valid=function(){if("undefined"!==typeof(mqutils)){return(Math.abs(this.x!=MQCONSTANT.MQPOINT_INVALID)&&Math.abs(this.y!=MQCONSTANT.MQPOINT_INVALID));}
return false;};MQPoint.prototype.equals=function(pt){if(pt){return(this.x===pt.x&&this.y===pt.y);}
return false;};MQPoint.prototype.toString=function(){return this.x+","+this.y;};MQLatLng.prototype=new MQObject();MQLatLng.prototype.constructor=MQLatLng;function MQLatLng(param1,param2){MQObject.call(this);this.lat=0.0;this.lng=0.0;this.setM_Xpath("LatLng");if(arguments.length==1){this.setM_Xpath(param1);}
else if(arguments.length==2){this.lat=parseFloat(param1);this.lng=parseFloat(param2);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.");}}
MQLatLng.prototype.getClassName=function(){return"MQLatLng";};MQLatLng.prototype.getObjectVersion=function(){return 0;};MQLatLng.prototype.loadXml=function(strXml){if("undefined"!==typeof(mqutils)){this.setM_XmlDoc(mqCreateXMLDoc(strXml));this.lat=this.getProperty("Lat");this.lng=this.getProperty("Lng");}};MQLatLng.prototype.saveXml=function(){return"<"+this.getM_Xpath()+"><Lat>"+this.lat+"</Lat><Lng>"+this.lng+"</Lng></"+this.getM_Xpath()+">";};MQLatLng.prototype.setLatitude=function(fLatitude){this.lat=parseFloat(fLatitude);if(isNaN(this.lat))
throw new Error("MQLatLng.setLatitude called with invalid parameter");};MQLatLng.prototype.getLatitude=function(){return this.lat;};MQLatLng.prototype.setLongitude=function(fLongitude){this.lng=parseFloat(fLongitude);if(isNaN(this.lng))
throw new Error("MQLatLng.setLongitude called with invalid parameter");};MQLatLng.prototype.getLongitude=function(){return this.lng;};MQLatLng.prototype.setLatLng=function(fLatitude,fLongitude){this.lat=parseFloat(fLatitude);this.lng=parseFloat(fLongitude);if(isNaN(this.lat)||isNaN(this.lng))
throw new Error("MQLatLng.setLatLng called with invalid parameter");};MQLatLng.prototype.arcDistance=function(ll2,lUnits){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(lUnits){mqIsClass("MQDistanceUnits",lUnits,false);}else{lUnits=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);}
if(this.getLatitude()==ll2.getLatitude()&&this.getLongitude()==ll2.getLongitude()){return 0.0;}
var dLon=ll2.getLongitude()-this.getLongitude();var a=MQCONSTANT.MQLATLNG_RADIANS*(90.0-this.getLatitude());var c=MQCONSTANT.MQLATLNG_RADIANS*(90.0-ll2.getLatitude());var cosB=(Math.cos(a)*Math.cos(c))+(Math.sin(a)*Math.sin(c)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*(dLon)));var radius=(lUnits.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES)?3963.205:6378.160187;if(cosB<-1.0)
return MQCONSTANT.PI*radius;else if(cosB>=1.0)
return 0;else
return Math.acos(cosB)*radius;}
return-1;};MQLatLng.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;};MQLatLng.prototype.equals=function(ll){if(ll!==null){return(this.getLongitude()===ll.getLongitude()&&this.getLatitude()===ll.getLatitude());}
return false;};MQLatLng.prototype.toString=function(){return this.lat+","+this.lng;};function mqCreateXMLDoc(strXML){var newDoc;if(document.implementation.createDocument){var parser=new window.DOMParser();if(mqBrowserInfo.isSafari)
strXML=strXML.replace(/&/g,'&amp;');newDoc=parser.parseFromString(strXML,"text/xml");}else if(window.ActiveXObject){newDoc=new window.ActiveXObject("Microsoft.XMLDOM");newDoc.async="false";newDoc.loadXML(strXML);}
return newDoc;}
function mqCreateXMLDocFromNode(ndNewRoot){var newDoc;ndNewRoot=ndNewRoot.documentElement;if(document.implementation.createDocument){var newDoc=document.implementation.createDocument("","",null);try{newDoc.appendChild(newDoc.importNode(ndNewRoot,true))}catch(error){alert(error);alert(ndNewRoot.nodeName);};}else if(window.ActiveXObject){newDoc=new ActiveXObject("Microsoft.XMLDOM");newDoc.async="false";newDoc.loadXML(ndNewRoot.xml);}
return newDoc;}
function MQXMLDOC(){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.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.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=mqCreateXMLDoc("<AutoGeocodeCovSwitch/>");return this.AUTOGEOCODECOVSWITCH;}
this.getAUTOROUTECOVSWITCH=function(){if(this.AUTOROUTECOVSWITCH===null)
this.AUTOROUTECOVSWITCH=mqCreateXMLDoc("<AutoRouteCovSwitch><Name/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></AutoRouteCovSwitch>");return this.AUTOROUTECOVSWITCH;}
this.getAUTOMAPCOVSWITCH=function(){if(this.AUTOMAPCOVSWITCH===null)
this.AUTOMAPCOVSWITCH=mqCreateXMLDoc("<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=mqCreateXMLDoc("<DBLayerQuery/>");return this.DBLAYERQUERY;}
this.getLINEPRIMITIVE=function(){if(this.LINEPRIMITIVE===null)
this.LINEPRIMITIVE=mqCreateXMLDoc("<LinePrimitive Version=\"2\"/>");return this.LINEPRIMITIVE;}
this.getPOLYGONPRIMITIVE=function(){if(this.POLYGONPRIMITIVE===null)
this.POLYGONPRIMITIVE=mqCreateXMLDoc("<PolygonPrimitive Version=\"2\"/>");return this.POLYGONPRIMITIVE;}
this.getRECTANGLEPRIMITIVE=function(){if(this.RECTANGLEPRIMITIVE===null)
this.RECTANGLEPRIMITIVE=mqCreateXMLDoc("<RectanglePrimitive Version=\"2\"/>");return this.RECTANGLEPRIMITIVE;}
this.getELLIPSEPRIMITIVE=function(){if(this.ELLIPSEPRIMITIVE===null)
this.ELLIPSEPRIMITIVE=mqCreateXMLDoc("<EllipsePrimitive Version=\"2\"/>");return this.ELLIPSEPRIMITIVE;}
this.getTEXTPRIMITIVE=function(){if(this.TEXTPRIMITIVE===null)
this.TEXTPRIMITIVE=mqCreateXMLDoc("<TextPrimitive Version=\"2\"/>");return this.TEXTPRIMITIVE;}
this.getSYMBOLPRIMITIVE=function(){if(this.SYMBOLPRIMITIVE===null)
this.SYMBOLPRIMITIVE=mqCreateXMLDoc("<SymbolPrimitive Version=\"2\"/>");return this.SYMBOLPRIMITIVE;}
this.getLATLNG=function(){if(this.LATLNG===null)
this.LATLNG=mqCreateXMLDoc("<LatLng/>");return this.LATLNG;}
this.getPOINT=function(){if(this.POINT===null)
this.POINT=mqCreateXMLDoc("<Point/>");return this.POINT;}
this.getPOINTFEATURE=function(){if(this.POINTFEATURE===null)
this.POINTFEATURE=mqCreateXMLDoc("<PointFeature/>");return this.POINTFEATURE;}
this.getLINEFEATURE=function(){if(this.LINEFEATURE===null)
this.LINEFEATURE=mqCreateXMLDoc("<LineFeature/>");return this.LINEFEATURE;}
this.getPOLYGONFEATURE=function(){if(this.POLYGONFEATURE===null)
this.POLYGONFEATURE=mqCreateXMLDoc("<PolygonFeature/>");return this.POLYGONFEATURE;}
this.getLOCATION=function(){if(this.LOCATION===null)
this.LOCATION=mqCreateXMLDoc("<Location/>");return this.LOCATION;}
this.getADDRESS=function(){if(this.ADDRESS===null)
this.ADDRESS=mqCreateXMLDoc("<Address/>");return this.ADDRESS;}
this.getGEOADDRESS=function(){if(this.GEOADDRESS===null)
this.GEOADDRESS=mqCreateXMLDoc("<GeoAddress/>");return this.GEOADDRESS;}
this.getGEOCODEOPTIONS=function(){if(this.GEOCODEOPTIONS===null)
this.GEOCODEOPTIONS=mqCreateXMLDoc("<GeocodeOptions/>");return this.GEOCODEOPTIONS;}
this.getMANEUVER=function(){if(this.MANEUVER===null)
this.MANEUVER=mqCreateXMLDoc("<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=mqCreateXMLDoc("<RouteOptions Version=\"3\"><RouteType>0</RouteType><NarrativeType>1</NarrativeType><NarrativeDistanceUnitType>0</NarrativeDistanceUnitType><MaxShape>0</MaxShape><MaxGEFID>0</MaxGEFID><Language>English</Language><CoverageName>navt_r</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=mqCreateXMLDoc("<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=mqCreateXMLDoc("<RouteMatrixResults/>");return this.ROUTEMATRIXRESULTS;}
this.getRADIUSSEARCHCRITERIA=function(){if(this.RADIUSSEARCHCRITERIA===null)
this.RADIUSSEARCHCRITERIA=mqCreateXMLDoc("<RadiusSearchCriteria/>");return this.RADIUSSEARCHCRITERIA;}
this.getRECTSEARCHCRITERIA=function(){if(this.RECTSEARCHCRITERIA===null)
this.RECTSEARCHCRITERIA=mqCreateXMLDoc("<RectSearchCriteria/>");return this.RECTSEARCHCRITERIA;}
this.getPOLYSEARCHCRITERIA=function(){if(this.POLYSEARCHCRITERIA===null)
this.POLYSEARCHCRITERIA=mqCreateXMLDoc("<PolySearchCriteria/>");return this.POLYSEARCHCRITERIA;}
this.getCORRIDORSEARCHCRITERIA=function(){if(this.CORRIDORSEARCHCRITERIA===null)
this.CORRIDORSEARCHCRITERIA=mqCreateXMLDoc("<CorridorSearchCriteria/>");return this.CORRIDORSEARCHCRITERIA;}
this.getSIGN=function(){if(this.SIGN===null)
this.SIGN=mqCreateXMLDoc("<Sign><Type>0</Type><Text></Text><ExtraText></ExtraText><Direction>0</Direction></Sign>");return this.SIGN;}
this.getTREKROUTE=function(){if(this.TREKROUTE===null)
this.TREKROUTE=mqCreateXMLDoc("<TrekRoute><Maneuvers Count=\"0\"/></TrekRoute>");return this.TREKROUTE;}
this.getINTCOLLECTION=function(){if(this.INTCOLLECTION===null)
this.INTCOLLECTION=mqCreateXMLDoc("<IntCollection Count=\"0\"/>");return this.INTCOLLECTION;}
this.getDTCOLLECTION=function(){if(this.DTCOLLECTION===null)
this.DTCOLLECTION=mqCreateXMLDoc("<DTCollection Version=\"1\" Count=\"0\"/>");return this.DTCOLLECTION;}
this.getLATLNGCOLLECTION=function(){if(this.LATLNGCOLLECTION===null)
this.LATLNGCOLLECTION=mqCreateXMLDoc("<LatLngCollection Version=\"1\" Count=\"0\"/>");return this.LATLNGCOLLECTION;}
this.getLOCATIONCOLLECTION=function(){if(this.LOCATIONCOLLECTION===null)
this.LOCATIONCOLLECTION=mqCreateXMLDoc("<LocationCollection Count=\"0\"/>");return this.LOCATIONCOLLECTION;}
this.getMANEUVERCOLLECTION=function(){if(this.MANEUVERCOLLECTION===null)
this.MANEUVERCOLLECTION=mqCreateXMLDoc("<ManeuverCollection Count=\"0\"/>");return this.MANEUVERCOLLECTION;}
this.getSIGNCOLLECTION=function(){if(this.SIGNCOLLECTION===null)
this.SIGNCOLLECTION=mqCreateXMLDoc("<SignCollection Count=\"0\"/>");return this.SIGNCOLLECTION;}
this.getSTRINGCOLLECTION=function(){if(this.STRINGCOLLECTION===null)
this.STRINGCOLLECTION=mqCreateXMLDoc("<StringCollection Count=\"0\"/>");return this.STRINGCOLLECTION;}
this.getSTRCOLCOLLECTION=function(){if(this.STRCOLCOLLECTION===null)
this.STRCOLCOLLECTION=mqCreateXMLDoc("<StrColCollectin/>");return this.STRCOLCOLLECTION;}
this.getFEATURECOLLECTION=function(){if(this.FEATURECOLLECTION===null)
this.FEATURECOLLECTION=mqCreateXMLDoc("<FeatureCollection Count=\"0\"/>");return this.FEATURECOLLECTION;}
this.getPRIMITIVECOLLECTION=function(){if(this.PRIMITIVECOLLECTION===null)
this.PRIMITIVECOLLECTION=mqCreateXMLDoc("<PrimitiveCollection Count=\"0\"/>");return this.PRIMITIVECOLLECTION;}
this.getPOINTCOLLECTION=function(){if(this.POINTCOLLECTION===null)
this.POINTCOLLECTION=mqCreateXMLDoc("<PointCollection Count=\"0\"/>");return this.POINTCOLLECTION;}
this.getTREKROUTECOLLECTION=function(){if(this.TREKROUTECOLLECTION===null)
this.TREKROUTECOLLECTION=mqCreateXMLDoc("<TrekRouteCollection Count=\"0\"/>");return this.TREKROUTECOLLECTION;}
this.getFEATURESPECIFIERCOLLECTION=function(){if(this.FEATURESPECIFIERCOLLECTION===null)
this.FEATURESPECIFIERCOLLECTION=mqCreateXMLDoc("<FeatureSpecifierCollection Count=\"0\"/>");return this.FEATURESPECIFIERCOLLECTION;}
this.getGEOCODEOPTIONSCOLLECTION=function(){if(this.GEOCODEOPTIONSCOLLECTION===null)
this.GEOCODEOPTIONSCOLLECTION=mqCreateXMLDoc("<GeocodeOptionsCollection Count=\"0\"/>");return this.GEOCODEOPTIONSCOLLECTION;}
this.getCOVERAGESTYLE=function(){if(this.COVERAGESTYLE===null)
this.COVERAGESTYLE=mqCreateXMLDoc("<CoverageStyle/>");return this.COVERAGESTYLE;}
this.getRECORDSET=function(){if(this.RECORDSET===null)
this.RECORDSET=mqCreateXMLDoc("<RecordSet/>");return this.RECORDSET;}
this.getMAPSTATE=function(){if(this.MAPSTATE===null)
this.MAPSTATE=mqCreateXMLDoc("<MapState/>");return this.MAPSTATE;}
this.getSESSION=function(){if(this.SESSION===null)
this.SESSION=mqCreateXMLDoc("<Session Count=\"0\"/>");return this.SESSION;}
this.getSESSIONID=function(){if(this.SESSIONID===null)
this.SESSIONID=mqCreateXMLDoc("<SessionID/>");return this.SESSIONID;}
this.getDTSTYLE=function(){if(this.DTSTYLE===null)
this.DTSTYLE=mqCreateXMLDoc("<DTStyle/>");return this.DTSTYLE;}
this.getDTSTYLEEX=function(){if(this.DTSTYLEEX===null)
this.DTSTYLEEX=mqCreateXMLDoc("<DTStyleEx/>");return this.DTSTYLEEX;}
this.getDTFEATURESTYLEEX=function(){if(this.DTFEATURESTYLEEX===null)
this.DTFEATURESTYLEEX=mqCreateXMLDoc("<DTFeatureStyleEx/>");return this.DTFEATURESTYLEEX;}
this.getFEATURESPECIFIER=function(){if(this.FEATURESPECIFIER===null)
this.FEATURESPECIFIER=mqCreateXMLDoc("<FeatureSpecifier/>");return this.FEATURESPECIFIER;}
this.getBESTFIT=function(){if(this.BESTFIT===null)
this.BESTFIT=mqCreateXMLDoc("<BestFit Version=\"2\"/>");return this.BESTFIT;}
this.getBESTFITLL=function(){if(this.BESTFITLL===null)
this.BESTFITLL=mqCreateXMLDoc("<BestFitLL Version=\"2\"/>");return this.BESTFITLL;}
this.getCENTER=function(){if(this.CENTER===null)
this.CENTER=mqCreateXMLDoc("<Center/>");return this.CENTER;}
this.getCENTERLATLNG=function(){if(this.CENTERLATLNG===null)
this.CENTERLATLNG=mqCreateXMLDoc("<CenterLatLng/>");return this.CENTERLATLNG;}
this.getPAN=function(){if(this.PAN===null)
this.PAN=mqCreateXMLDoc("<Pan/>");return this.PAN;}
this.getZOOMIN=function(){if(this.ZOOMIN===null)
this.ZOOMIN=mqCreateXMLDoc("<ZoomIn/>");return this.ZOOMIN;}
this.getZOOMOUT=function(){if(this.ZOOMOUT===null)
this.ZOOMOUT=mqCreateXMLDoc("<ZoomOut/>");return this.ZOOMOUT;}
this.getZOOMTO=function(){if(this.ZOOMTO===null)
this.ZOOMTO=mqCreateXMLDoc("<ZoomTo/>");return this.ZOOMTO;}
this.getZOOMTORECT=function(){if(this.ZOOMTORECT===null)
this.ZOOMTORECT=mqCreateXMLDoc("<ZoomToRect/>");return this.ZOOMTORECT;}
this.getZOOMTORECTLATLNG=function(){if(this.ZOOMTORECTLATLNG===null)
this.ZOOMTORECTLATLNG=mqCreateXMLDoc("<ZoomToRectLatLng/>");return this.ZOOMTORECTLATLNG;}}
var MQXML=new MQXMLDOC();MQObjectCollection.prototype=new MQObject();MQObjectCollection.prototype.constructor=MQObjectCollection;function MQObjectCollection(max){MQObject.call(this);var m_items=new Array();this.getM_Items=function(){return m_items;};var m_maxItems=(max!==null)?max:-1;var validClassName="MQObject";this.getValidClassName=function(){return validClassName;};this.setValidClassName=function(className){validClassName=className;};this.add=function(obj){if(this.isValidObject(obj)){if(m_maxItems!==-1&&m_items.length===max)return;m_items.push(obj);return m_items.length;}
return;};this.getSize=function(){return m_items.length;};this.get=function(i){return m_items[i];};this.remove=function(iIndex){return m_items.splice(iIndex,1);};this.removeAll=function(){m_items=null;m_items=new Array();};this.contains=function(item){var size=this.getSize();for(var count=0;count<size;count++){if(m_items[count]===item){return true;}}
return false;};this.append=function(collection){if(this.getClassName()===collection.getClassName()){m_items=m_items.concat(collection.getM_Items());}else{alert("Invalid attempt to append "+this.getClassName()+" to "+collection.getClassName()+"!");throw"Invalid attempt to append "+this.getClassName()+" to "+collection.getClassName()+"!";}};this.set=function(i,newO){var oldO=get(i);m_items[i]=newO;return oldO;};this.isValidObject=function(obj){if(obj!==null){if(validClassName==="ALL"){return true;}else if(validClassName==="MQObject"){return true;}else if(validClassName==="String"){return true;}else if(validClassName==="int"){if(isNaN(obj)){return false;}else if(obj===Math.floor(obj)){return true;}}else if(obj.getClassName()===validClassName){return true;}}
return false;};var m_itemXpath="Item";this.getM_itemXpath=function(){return m_itemXpath;};this.setM_itemXpath=function(itemXpath){m_itemXpath=itemXpath;};this.getById=function(strId){try{for(var count=0;count<this.getSize();count++){if(m_items[count].getId()==strId){return m_items[count];}}}catch(Error){}
return null;};this.removeItem=function(item){for(var i=0;i<m_items.length;i++)
{if(m_items[i]==item)
{this.remove(i);i=m_items.length;}}};}
MQObjectCollection.prototype.getClassName=function(){return"MQObjectCollection";};MQObjectCollection.prototype.getObjectVersion=function(){return 0;};MQObjectCollection.prototype.getAt=function(i){return this.get(i);};MQLatLngCollection.prototype=new MQObjectCollection(32678);MQLatLngCollection.prototype.constructor=MQLatLngCollection;function MQLatLngCollection(){MQObjectCollection.call(this,32678);this.setValidClassName("MQLatLng");this.setM_Xpath("LatLngCollection");this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getLATLNGCOLLECTION()));}
MQLatLngCollection.prototype.getClassName=function(){return"MQLatLngCollection";};MQLatLngCollection.prototype.getObjectVersion=function(){return 1;};MQLatLngCollection.prototype.loadXml=function(strXml){this.removeAll();var xmlDoc=mqCreateXMLDoc(strXml);this.setM_XmlDoc(xmlDoc);if(xmlDoc!==null){this._loadCollection(xmlDoc);}};MQLatLngCollection.prototype.loadXmlFromNode=function(xmlNode){this.removeAll();var xmlDoc=mqCreateXMLDocImportNode(xmlNode);this.setM_XmlDoc(xmlDoc);if(xmlDoc!==null){this._loadCollection(xmlDoc);}};MQLatLngCollection.prototype._loadCollection=function(xmlDoc){var root=xmlDoc.documentElement;var nodes=root.childNodes;var maxCount=nodes.length;maxCount=(maxCount<32678)?maxCount:32678;var prevLat=0;var prevLng=0;var currentLat=0;var currentLng=0;var latlng=null;if(this.getValidClassName()==="MQLatLng"){for(var count=0;count<maxCount;count++){if(count==0){if(nodes[count].firstChild!==null){currentLat=nodes[count].firstChild.nodeValue/1000000;}
count++;if(nodes[count].firstChild!==null){currentLng=nodes[count].firstChild.nodeValue/1000000;}}else{if(nodes[count].firstChild!==null){currentLat=prevLat+(nodes[count].firstChild.nodeValue/1000000);}
count++;if(nodes[count].firstChild!==null){currentLng=prevLng+(nodes[count].firstChild.nodeValue/1000000);}}
prevLat=currentLat;prevLng=currentLng;latlng=new MQLatLng(currentLat,currentLng);this.add(latlng);}}};MQLatLngCollection.prototype.saveXml=function(){var strRet="<"+this.getM_Xpath()+" Version=\""+this.getObjectVersion()+"\" Count=\""+this.getSize()+"\">";var size=parseInt(this.getSize());if(size>=1){var nLat=nLng=nPrevLat=nPrevLng=nDeltaLat=nDeltaLng=0;var latLng=null;for(var i=0;i<size;i++){latLng=this.getAt(i);nLat=parseInt(latLng.getLatitude()*1000000);nLng=parseInt(latLng.getLongitude()*1000000);nDeltaLat=nLat-nPrevLat;nDeltaLng=nLng-nPrevLng;strRet+="<Lat>"+nDeltaLat+"</Lat>";strRet+="<Lng>"+nDeltaLng+"</Lng>";nPrevLat=nLat;nPrevLng=nLng;}}
strRet=strRet+"</"+this.getM_Xpath()+">";return strRet;};MQLatLngCollection.prototype.generalize=function(dDeviance){var SOrigPoint=function()
{this.pLL=new MQLatLng();this.dSegmentLength=0.0;this.dPriorLength=0.0;};var SDerivedPoint=function()
{this.pLL=new MQLatLng();this.ulOriginalPoint=0;};mqllAnchor=new MQLatLng();var ulAnchor;var i;var dAccumLength=0;var nPoints=getSize();pOrigPoints=new Array(nPoints);var llcTemp=new LatLngCollection();var pDerivedPoints=new Array(nPoints);var nDerivedPoints=0;if(nPoints<2)
return;for(i=0;i<nPoints;i++)
{pOrigPoints[i]=new SOrigPoint();pDerivedPoints[i]=new SDerivedPoint();try
{pOrigPoints[i].pLL=getAt(i);}
catch(e)
{}}
for(i=0;i<nPoints-1;i++)
{try
{llcTemp.add(pOrigPoints[i].pLL);llcTemp.add(pOrigPoints[i+1].pLL);pOrigPoints[i].dSegmentLength=llcTemp.arcDistance();}
catch(e)
{}
if(i==0)
pOrigPoints[i].dPriorLength=0;else
pOrigPoints[i].dPriorLength=dAccumLength;dAccumLength+=pOrigPoints[i].dSegmentLength;llcTemp.removeAll();}
mqllAnchor=pOrigPoints[0].pLL;ulAnchor=0;pDerivedPoints[0].pLL=mqllAnchor;pDerivedPoints[0].ulOriginalPoint=0;nDerivedPoints=1;for(i=2;i<nPoints;i++)
{if(!isEverybodyWithinDeviation(pOrigPoints,ulAnchor,i,dDeviance))
{mqllAnchor=pOrigPoints[i-1].pLL;ulAnchor=i-1;pDerivedPoints[nDerivedPoints].pLL=mqllAnchor;pDerivedPoints[nDerivedPoints].ulOriginalPoint=i-1;nDerivedPoints++;}}
pDerivedPoints[nDerivedPoints].pLL=pOrigPoints[nPoints-1].pLL;pDerivedPoints[nDerivedPoints].ulOriginalPoint=nPoints-1;nDerivedPoints++;var nPrev=nPoints;for(var nCount=(nDerivedPoints-1);nCount>=0;nCount--)
{if((nPrev-1)!=pDerivedPoints[nCount].ulOriginalPoint)
{for(var x=(nPrev-1);x>pDerivedPoints[nCount].ulOriginalPoint;x--)
{try
{remove(x);}
catch(e)
{}}
nPrev=pDerivedPoints[nCount].ulOriginalPoint;}
else
{nPrev--;}}
pOrigPoints=null;pDerivedPoints=null;this.prototype.isEverybodyWithinDeviation=function(pOrigPoints,ulOrigStartPoint,ulOrigEndPoint,dMaxDeviation)
{var dMilesPerLng=0.0;var dMaxDeviationSquared=0.0;var mqllStartPoint=new MQLatLng();var mqllEndPoint=new MQLatLng();var dLineLatMiles=0.0;var dLineLngMiles=0.0;var dLineLengthSquared=0.0;var i;var mqllPoint=new MQLatLng();var dPointLatMiles=0.0;var dPointLngMiles=0.0;var dPointLengthSquared=0.0;var dRatio=0.0;var dNumerator=0.0;var dDenominator=0.0;var dProjectionLengthSquared=0.0;var dDeviationLengthSquared=0.0;var da=new DistanceApproximation();dMilesPerLng=da.getMilesPerLngDeg(pOrigPoints[ulOrigStartPoint].pLL.getLatitude());dMaxDeviationSquared=dMaxDeviation*dMaxDeviation;mqllStartPoint=pOrigPoints[ulOrigStartPoint].pLL;mqllEndPoint=pOrigPoints[ulOrigEndPoint].pLL;dLineLatMiles=(mqllEndPoint.getLatitude()-mqllStartPoint.getLatitude())*DistanceApproximation.MILES_PER_LATITUDE;dLineLngMiles=(mqllEndPoint.getLongitude()-mqllStartPoint.getLongitude())*dMilesPerLng;dLineLengthSquared=dLineLatMiles*dLineLatMiles+dLineLngMiles*dLineLngMiles;for(i=ulOrigStartPoint+1;i<ulOrigEndPoint;i++)
{mqllPoint=pOrigPoints[i].pLL;dPointLatMiles=(mqllPoint.getLatitude()-mqllStartPoint.getLatitude())*DistanceApproximation.MILES_PER_LATITUDE;;dPointLngMiles=(mqllPoint.getLongitude()-mqllStartPoint.getLongitude())*dMilesPerLng;dPointLengthSquared=dPointLatMiles*dPointLatMiles+dPointLngMiles*dPointLngMiles;dNumerator=dLineLatMiles*dPointLatMiles+dLineLngMiles*dPointLngMiles;dDenominator=dLineLatMiles*dLineLatMiles+dLineLngMiles*dLineLngMiles;if(dDenominator==0)
dRatio=0;else
dRatio=dNumerator/dDenominator;dProjectionLengthSquared=dRatio*dRatio*dLineLengthSquared;dDeviationLengthSquared=dPointLengthSquared-dProjectionLengthSquared;if(dDeviationLengthSquared>dMaxDeviationSquared)
return false;}
return true;}};function DistanceApproximation()
{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.170310,61.631630,61.074176,60.498118,59.903632,59.290899,58.660106,58.011443,57.345111,56.661310,55.960250,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.585570,41.627796,40.657342,39.674504,38.679582,37.672877,36.654698,35.625354,34.585159,33.534429,32.473485,31.402650,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.381280,13.198283,12.011266,10.820591,9.626619,8.429716,7.230245,6.028572,4.825062,3.620083,2.414002,1.207185,1.000000);this.MILES_PER_LATITUDE=69.170976;this.KILOMETERS_PER_MILE=1.609347;this.prototype.setTestPoint=function(lat,lng)
{m_testLat=lat;m_testLng=lng;m_mpd=m_milesPerLngDeg[(Math.abs(lat)+0.5)];}
this.prototype.getDistanceSq=function(lat,lng)
{var latMiles=(lat-m_testLat)*MILES_PER_LATITUDE;var lngMiles=(lng-m_testLng)*m_mpd;return(latMiles*latMiles+lngMiles*lngMiles);}
this.prototype.getDistanceSq=function(lat1,lng1,lat2,lng2)
{var v1y=lat2-lat1;var v1x=lng2-lng1;var v2y=m_testLat-lat1;var v2x=m_testLng-lng1;var dot=v1x*v2x+v1y*v2y;if(dot<=0.0)
return getDistanceSq(lat1,lng1);var c=dot/(v1x*v1x+v1y*v1y);if(c>=1.0)
return getDistanceSq(lat2,lng2);return getDistanceSq((lat1+v1y*c),(lng1+v1x*c));}
this.prototype.getMilesPerLngDeg=function(lat)
{return(Math.abs(lat)<=90.0)?m_milesPerLngDeg[(Math.abs(lat)+0.5)]:69.170976;}}
Object.extend(Event,{trigger:function(element,event,fakeEvent)
{element=$(element);fakeEvent=fakeEvent||{type:event};this.observers.each(function(cache)
{if(cache[0]==element&&cache[1]==event)
cache[2].call(element,fakeEvent);});}});function MQTKObjectCollection(max){var m_items=new Array();var m_maxItems=max||-1;this.add=function(obj){if(m_maxItems!=-1&&m_items.length==max)return;m_items.push(obj);return m_items.length;}
this.getSize=function(){return m_items.length;}
this.getAt=function(iIndex){return m_items[iIndex];}
this.remove=function(iIndex){return m_items.splice(iIndex,1);}
this.removeAll=function(){m_items=null;m_items=new Array();}
this.contains=function(item){for(var count=0;count<this.getSize();count++){if(m_items[count]==item){return true;}}
return false;}
this.getById=function(strId){for(var count=0;count<this.getSize();count++){if(m_items[count].getId()==strId){return m_items[count];}}
return null;}
this.removeItem=function(item){for(i=0;i<m_items.length;i++)
{if(m_items[i]==item)
{this.remove(i);i=m_items.length;}}}}
CONTROL_PANZOOM=0;CONTROL_PAN=1;CONTROL_ZOOM=2;CONTROL_TYPE=3;function MQMapLogo()
{throw new Error("Do NOT instantiate MQMapLogo - use static values");}
MQMapLogo.MAPQUEST=LOGO_MQ_LOGO;MQMapLogo.SCALES=LOGO_MQ_SCALES;MQMapLogo.MAPQUEST_COPYRIGHT=LOGO_MQ_COPY;MQMapLogo.NAVTEQ_COPYRIGHT=LOGO_NT_COPY;MQMapLogo.ICUBED_COPYRIGHT=LOGO_I3_COPY;function MQMapCorner()
{throw new Error("Do NOT instantiate MQMapCorner - use static values");}
MQMapCorner.TOP_LEFT=CORNER_TOPLEFT;MQMapCorner.TOP_RIGHT=CORNER_TOPRIGHT;MQMapCorner.BOTTOM_LEFT=CORNER_BOTTOMLEFT;MQMapCorner.BOTTOM_RIGHT=CORNER_BOTTOMRIGHT;function MQMapCornerPlacement(mapCorner,offsetSize)
{if(mapCorner==null)mapCorner=MQMapCorner.TOP_LEFT;if(offsetSize==null)offsetSize=new MQSize(0,0);this.mapCorner=mapCorner;this.offsetSize=new MQSize(offsetSize.getWidth(),offsetSize.getHeight());}
MQMapCornerPlacement.prototype.getMapCorner=function()
{return this.mapCorner;}
MQMapCornerPlacement.prototype.getOffsetSize=function()
{return new MQSize(this.offsetSize.getWidth(),this.offsetSize.getHeight());}
MQRectLL.prototype=RectLL.prototype;MQRectLL.prototype.constructor=MQRectLL;function MQRectLL(ulPoint,lrPoint)
{if(ulPoint==null)ulPoint=new MQLatLng(0.0,0.0);if(lrPoint==null)lrPoint=new MQLatLng(0.0,0.0);RectLL.call(this,ulPoint,lrPoint);}
MQRectLL.prototype.setLowerRight=function(mqLatLng)
{this.lr=new MQLatLng(mqLatLng.getLatitude(),mqLatLng.getLongitude());}
MQRectLL.prototype.setUpperLeft=function(mqLatLng)
{this.ul=new MQLatLng(mqLatLng.getLatitude(),mqLatLng.getLongitude());}
MQRectLL.prototype.getUpperLeft=function()
{return new MQLatLng(this.ul.lat,this.ul.lng);}
MQRectLL.prototype.getLowerRight=function()
{return new MQLatLng(this.lr.lat,this.lr.lng);}
MQRectLL.prototype.setBounds=function(arrayLL)
{for(var i=1;i<arrayLL.length;i++)
{var poiLL=arrayLL[i];this.extend(poiLL)}}
MQRectLL.prototype.extend=function(mqLatLng)
{if(mqLatLng.lat>this.ul.lat)this.ul.lat=mqLatLng.lat;if(mqLatLng.lng<this.ul.lng)this.ul.lng=mqLatLng.lng;if(mqLatLng.lat<this.lr.lat)this.lr.lat=mqLatLng.lat;if(mqLatLng.lng>this.lr.lng)this.lr.lng=mqLatLng.lng;}
MQRectXY.prototype=RectXY.prototype;MQRectXY.prototype.constructor=MQRectXY;function MQRectXY(ulPoint,lrPoint)
{if(ulPoint==null)ulPoint=new MQPoint(0,0);if(lrPoint==null)lrPoint=new MQPoint(0,0);RectXY.call(this,ulPoint,lrPoint);}
MQRectXY.prototype.setUpperLeft=function(mqPoint)
{this.ul=new MQPoint(mqPoint.getX(),mqPoint.getY());}
MQRectXY.prototype.setLowerRight=function(mqPoint)
{this.lr=new MQPoint(mqPoint.getX(),mqPoint.getY());}
MQRectXY.prototype.getUpperLeft=function()
{return new MQPoint(this.ul.x,this.ul.y);}
MQRectXY.prototype.getLowerRight=function()
{return new MQPoint(this.lr.x,this.lr.y);}
MQSize.prototype=Size.prototype;MQSize.prototype.constructor=MQSize;function MQSize(w,h)
{if(w==null)w=0;if(h==null)h=0;Size.call(this,w,h);}
MQSize.prototype.getWidth=function(){return this.width;}
MQSize.prototype.getHeight=function(){return this.height;}
MQSize.prototype.setWidth=function(w){this.width=parseInt(w);}
MQSize.prototype.setHeight=function(h){this.height=parseInt(h);}
MQSize.prototype.toString=function()
{return this.height+","+this.width;}
function isSupportedBrowser()
{browser=getBrowserInfo();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;}
function getBrowserInfo()
{browser=new Object();browser.name=browser.version=browser.os="unknown";var userAgent=navigator.userAgent.toLowerCase();var browserListArray=new Array("firefox","msie","netscape","opera","safari");var osListArray=new Array("linux","mac","windows","x11");for(var i=0,n=browserListArray.length;i<n;i++)
{var strPosition=userAgent.indexOf(browserListArray[i])+1;if(strPosition>0)
{browser.name=browserListArray[i];var versionPosition=strPosition+browser.name.length;var incr=((browser.name=="safari")||(userAgent.charAt(versionPosition+4)>0&&userAgent.charAt(versionPosition+4)<9))?5:3;browser.version=userAgent.substring(versionPosition,versionPosition+incr);}}
for(var i=0,n=osListArray.length;i<n;i++)
{var strPosition=userAgent.indexOf(osListArray[i])+1;if(strPosition>0)
{browser.os=osListArray[i];}}
return browser;}
function getBrowserSize()
{size=new MQSize(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;}
MQ=new Object();MQ.utils={_createImage:function(url,left,top,width,height,imgIsPng)
{var img;img=document.createElement("img");img.src=url;img.style.left=left+"px";img.style.top=top+"px";img.style.width=width+"px";img.style.height=height+"px";img.style.position="absolute";img.style.zIndex=9;img.style.MozUserSelect="none";img.style.border="none";img.style.display="block";img.unselectable="on";img.onselectstart=function(){return false;};img.oncontextmenu=function(){return false;};if(imgIsPng==null)imgIsPng=false;if(imgIsPng)
img.isPng=imgIsPng;else
img.isPng=this._hasPngExtention(url);return img;},_hasPngExtention:function(url)
{var urlLowerCase=url.toLowerCase();var extIndex=urlLowerCase.lastIndexOf(".png");if((extIndex!=-1)&&(extIndex==(urlLowerCase.length-4)))
return true;return false;},pngFilter:function(imgObj)
{if(!document.getElementsByTagName)return;if(MQ.browser.info.name=="msie"&&((MQ.browser.info.version<7)||MQ.browser.info.version>5))
{var images=(imgObj)?imgObj:document.images;for(var i=0,l=images.length;i<l;i++)
{var img=images[i];var imageName=img.src;if(imageName)
{var imageLength=imageName.length;if(imageName.toLowerCase().substring(imageLength-4,imageLength)==".png")
{if(!img.title)
{img.title=(img.alt)?img.alt:"";}
img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"');";img.src=MQ.art.spacer;}}}}},getOffsetLftTop:function(element)
{var left=0;var top=0;lftTop=new Object();while(element)
{left+=element.offsetLeft;top+=element.offsetTop;element=element.offsetParent;}
lftTop.left=left;lftTop.top=top;return lftTop;},deleteElement:function(obj)
{if(obj)
{obj.parentNode.removeChild(obj);}},deleteChildElements:function(obj)
{if(obj&&obj.childNodes.length>0)
{for(var i=(obj.childNodes.length-1);i>=0;i--)
{obj.removeChild(obj.childNodes[i]);}}},centreElement:function(element)
{element.style.left=(MQ.browser.size().width-element.offsetWidth)/2+"px";element.style.top=(MQ.browser.size().height-element.offsetHeight)/2+"px";},getTop:function(element)
{var top=0;while(element){top+=parseInt(element.offsetTop);element=element.offsetParent;}
return(top);},isMouseLeaveOrEnter:function(e,handler)
{if(e.type!='mouseout'&&e.type!='mouseover')return false;var reltg=e.relatedTarget?e.relatedTarget:e.type=='mouseout'?e.toElement:e.fromElement;while(reltg&&reltg!=handler)reltg=reltg.parentNode;return(reltg!=handler);}}
MQTileMap.prototype=Map.prototype;MQTileMap.prototype.constructor=MQTileMap;function MQTileMap(parent,scale,mqLatLng,mtype)
{this.div1=document.createElement("div");this.div1.style.width=parent.style.width;this.div1.style.height=parent.style.height;parent.style.position="relative";this.parent2=parent;parent.appendChild(this.div1);this.controls=[];this.mypois=new MQPoiCollection();this.myoverlays=new MQOverlayCollection();try{this.mydeclutter=new MQDeclutter(this);}catch(err){this.mydeclutter=null;};this.iwparent=document.createElement("div");if(scale==null)scale=1;if(mqLatLng==null)mqLatLng=new MQLatLng(38.134557,-98.4375);Map.call(this,this.div1,scale,mqLatLng,mtype);this.SetClickOperation(EVENT_DBLCLICK,OPER_RECENTER);this.surface=null;this.infowindow=new MQInfoWindow(this);this.infoWindowTitle=null;this.infoWindowContent=null;this.rolloverwindow=new MQRolloverWindow(this);this.rolloversEnabled=true;Event.observe(this.div1,"click",MQEventCallback(this,"onClick"));this.savedCenter=null;this.savedZoomLevel=null;this.savedMapType=null;this.saveState();}
MQTileMap.prototype._getParentOffset=function(element)
{var ptOffset=new MQPoint(0,0);while(element)
{ptOffset.x+=element.offsetLeft;ptOffset.y+=element.offsetTop;element=element.offsetParent;}
return ptOffset;}
MQTileMap.prototype.getDragOffset=function()
{return this.GetDragOffset();}
MQTileMap.prototype.onClick=function(e)
{if(this.GetClickFlag()||!this.getDragEnabled())
{var ptOffset=this._getParentOffset(this.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;e.xy=new MQPoint(cx,cy);e.ll=this.pixToLL(e.xy);MQEventManager.trigger(this,"click",e);}}
MQTileMap.prototype.onZoomEnd=function(e)
{if(this.GetDragOffset().x!=this.overlayOffsetX||this.GetDragOffset().y!=this.overlayOffsetY){this.HandleOverlays();};MQEventManager.trigger(this,"zoomend",e);}
MQTileMap.prototype.onMapTypeChanged=function(e)
{if(this.GetDragOffset().x!=this.overlayOffsetX||this.GetDragOffset().y!=this.overlayOffsetY){this.HandleOverlays();};MQEventManager.trigger(this,"maptypechanged",e);}
MQTileMap.prototype.onPoiAdded=function(e)
{MQEventManager.trigger(this,"poiadded",e);}
MQTileMap.prototype.onPoiRemoved=function(e)
{MQEventManager.trigger(this,"poiremoved",e);}
MQTileMap.prototype.onMapCleared=function(e)
{MQEventManager.trigger(this,"mapcleared",e);}
MQTileMap.prototype.onOverlayAdded=function(e)
{MQEventManager.trigger(this,"overlayadded",e);}
MQTileMap.prototype.onOverlayRemoved=function(e)
{MQEventManager.trigger(this,"overlayremoved",e);}
MQTileMap.prototype.onInfoWindowOpen=function(e)
{MQEventManager.trigger(this,"infowindowopen",e);}
MQTileMap.prototype.onInfoWindowClose=function(e)
{MQEventManager.trigger(this,"infowindowclose",e);}
MQTileMap.prototype.onMoveStart=function(e)
{MQEventManager.trigger(this,"movestart",e);}
MQTileMap.prototype.onMove=function(e)
{MQEventManager.trigger(this,"move",e);}
MQTileMap.prototype.onMoveEnd=function(e)
{MQEventManager.trigger(this,"moveend",e);}
MQTileMap.prototype.HandleMove=function()
{if(arguments.length==1)
{var e=new MQEvent();var movePhase=arguments[0];if(movePhase=="move")this.onMove(e);else if(movePhase=="movestart")this.onMoveStart(e);else if(movePhase=="moveend")this.onMoveEnd(e);}}
MQTileMap.prototype.onDragStart=function(e)
{MQEventManager.trigger(this,"dragstart",e);}
MQTileMap.prototype.onDrag=function(e)
{MQEventManager.trigger(this,"drag",e);}
MQTileMap.prototype.onDragEnd=function(e)
{MQEventManager.trigger(this,"dragend",e);}
MQTileMap.prototype.HandleDrag=function()
{if(arguments.length==1)
{var e=new MQEvent();var dragPhase=arguments[0];if(dragPhase=="drag")this.onDrag(e);else if(dragPhase=="dragstart")this.onDragStart(e);else if(dragPhase=="dragend")this.onDragEnd(e);}}
MQTileMap.prototype.onTKMouseDown=function(e)
{MQEventManager.trigger(this,"mousedown",e);}
MQTileMap.prototype.onTKMouseUp=function(e)
{MQEventManager.trigger(this,"mouseup",e);}
MQTileMap.prototype.HandleMouse=function()
{if(arguments.length==2)
{var baseEvent=arguments[1];var str="";var e=new MQEvent();var ptOffset=this._getParentOffset(this.parent);e.button=(Event.isLeftClick(baseEvent))?BUTTON_MQ_LEFT:BUTTON_MQ_RIGHT;e.clientX=baseEvent.clientX-ptOffset.x;e.clientY=baseEvent.clientY-ptOffset.y;var mousePhase=arguments[0];if(mousePhase=="mousedown")this.onTKMouseDown(e);else if(mousePhase=="mouseup")this.onTKMouseUp(e);}}
MQTileMap.prototype.addControl=function(control,position)
{control.initialize(this);this.controls[control.type]=control;var style=control.elem.style;if(position!=null)
control.position=position;this.parent2.appendChild(control.elem);this.placeControl(control);style.display="block";}
MQTileMap.prototype.removeControl=function(control)
{this.parent2.removeChild(control.elem);}
MQTileMap.prototype.updateZoom=function(which)
{if(this.controls[CONTROL_PANZOOM]!=null){if(which=="on"){this.controls[CONTROL_PANZOOM].selectZoom(this.getZoomLevel());this.redrawOverlays();}else{this.controls[CONTROL_PANZOOM].unselectZoom(this.getZoomLevel());}}}
MQTileMap.prototype.placeControl=function(control)
{var pos=control.getPosition();var mapCorner=pos.getMapCorner();var left;var top;if(mapCorner==MQMapCorner.TOP_LEFT)
{left=0;top=0;}
else if(mapCorner==MQMapCorner.TOP_RIGHT)
{left=this.width-control.getWidth();top=0;pos.offsetSize.width*=-1;}
else if(mapCorner==MQMapCorner.BOTTOM_LEFT)
{left=0;top=this.height-control.getHeight();pos.offsetSize.height*=-1;}
else if(mapCorner==MQMapCorner.BOTTOM_RIGHT)
{left=this.width-control.getWidth();top=this.height-control.getHeight();pos.offsetSize.width*=-1;pos.offsetSize.height*=-1;}
left+=pos.offsetSize.width;top+=pos.offsetSize.height;control.elem.style.left=left+"px";control.elem.style.top=top+"px";}
MQTileMap.prototype.setLogoPlacement=function(mapLogo,mapCornerPlacement)
{var mapCorner=mapCornerPlacement.getMapCorner();var offsetWidth=Math.abs(mapCornerPlacement.getOffsetSize().getWidth());var offsetHeight=Math.abs(mapCornerPlacement.getOffsetSize().getHeight());var leftOffset=0;var topOffset=0;if(mapCorner==MQMapCorner.TOP_LEFT)
{leftOffset=offsetWidth;topOffset=offsetHeight;}
else if(mapCorner==MQMapCorner.TOP_RIGHT)
{leftOffset=(-offsetWidth);topOffset=offsetHeight;}
else if(mapCorner==MQMapCorner.BOTTOM_LEFT)
{leftOffset=offsetWidth;topOffset=(-offsetHeight);}
else if(mapCorner==MQMapCorner.BOTTOM_RIGHT)
{leftOffset=(-offsetWidth);topOffset=(-offsetHeight);}
else
{return;}
this.SetLogoPlacement(mapLogo,mapCorner,new MQPoint(leftOffset,topOffset));}
MQTileMap.prototype.addPoi=function(mqPoi)
{if(this.mypois.contains(mqPoi))return;mqPoi.getIcon()._checkInit();this.AddPOI(mqPoi.getLatLng(),mqPoi.getIcon().getAnchorOffset(),mqPoi.getElement());this.mypois.add(mqPoi);var e=new MQEvent();e.poi=mqPoi;this.onPoiAdded(e);mqPoi.redrawLabel();mqPoi.map=this;mqPoi.mqrw=this.getRolloverWindow();mqPoi.mqiw=this.getInfoWindow();if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.removePoi=function(mqPoi)
{this.RemovePOI(mqPoi.element);this.mypois.removeItem(mqPoi);var e=new MQEvent();mqPoi.onRemoved(e);e.poi=mqPoi;this.onPoiRemoved(e);mqPoi.map=null;if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.removeAllPois=function()
{if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(0);};while(this.mypois.getSize()>0)
{this.removePoi(this.mypois.getAt(0));}
this.onMapCleared(new MQEvent());}
MQTileMap.prototype.replacePois=function(mypois)
{if(this.getDeclutter()){var dcm=this.getDeclutter().getDeclutterMode();};this.removeAllPois();for(i=0;i<mypois.getSize();i++)
{this.addPoi(mypois.getAt(i));}
if(this.getDeclutter()){if(dcm!=0)this.getDeclutter().setDeclutterMode(dcm);};}
MQTileMap.prototype.createOverlaySurface=function()
{try{if(dojo.gfx.createSurface){this.TILESIZE=this.GetTileSize();this.SURFACE_OFFSET=2*this.TILESIZE;this.overlayOffsetX=0;this.overlayOffsetY=0;this.overlaydiv=document.createElement("div");this.overlaydiv.id="mqOverlayDiv";var vpWidth=this.div1.style.width.replace('px','');var vpHeight=this.div1.style.height.replace('px','');var tileBlocksWidth=Math.ceil(vpWidth/this.TILESIZE)*this.TILESIZE;var tileBlocksHeight=Math.ceil(vpHeight/this.TILESIZE)*this.TILESIZE;var surfaceWidth=tileBlocksWidth+(2*this.SURFACE_OFFSET);var surfaceHeight=tileBlocksHeight+(2*this.SURFACE_OFFSET);var offsetX=-(Math.round((tileBlocksWidth-vpWidth)/2)+this.SURFACE_OFFSET);var offsetY=-(Math.round((tileBlocksHeight-vpHeight)/2)+this.SURFACE_OFFSET);var offsetX=-(this.SURFACE_OFFSET);var offsetY=-(this.SURFACE_OFFSET);this.overlaydiv.lt=offsetX+'px';this.overlaydiv.tp=offsetY+'px';this.overlaydiv.style.position="absolute";this.overlaydiv.style.top=offsetY+'px';this.overlaydiv.style.left=offsetX+'px';this.overlaydiv.style.height=surfaceHeight+'px';this.overlaydiv.style.width=surfaceWidth+'px';this.overlaydiv.style.cursor="auto";this.overlaydiv.style.zIndex=8;this.overlaydiv.UNSELECTABLE="off";this.AppendOverlayDiv(this.overlaydiv);this.surface=dojo.gfx.createSurface(this.overlaydiv,surfaceWidth,surfaceHeight);}else{this.surface=null;};}catch(err){this.surface=null;};};MQTileMap.prototype.getOverlays=function()
{var i;var tempOverlayCollection=new MQOverlayCollection;for(i=0;i<this.myoverlays.getSize();i++)
{tempOverlayCollection.add(this.myoverlays.getAt(i));}
tempOverlayCollection.setName(this.myoverlays.getName());return tempOverlayCollection;}
MQTileMap.prototype.addOverlay=function(mqOverlay)
{if(!this.surface){try{this.createOverlaySurface();}catch(err){this.surface=null;};};if(!this.surface)throw('Overlay drawing surface does not exist.');if(this.myoverlays.contains(mqOverlay))return;mqOverlay.map=this;this.myoverlays.add(mqOverlay);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{mqOverlay.drawShape();};var e=new MQEvent();e.overlay=mqOverlay;this.onOverlayAdded(e);}
MQTileMap.prototype.removeOverlay=function(mqOverlay)
{var i;if(mqOverlay){for(i=0;i<this.myoverlays.getSize();i++){if(mqOverlay==this.myoverlays.getAt(i)){this.surface.remove(mqOverlay.shape);mqOverlay.map=null;this.myoverlays.remove(i,1);var e=new MQEvent();e.overlay=mqOverlay;this.onOverlayRemoved(e);break;};};};}
MQTileMap.prototype.removeAllOverlays=function()
{while(this.myoverlays.getSize()>0)
{this.removeOverlay(this.myoverlays.getAt(0));}}
MQTileMap.prototype.replaceOverlays=function(myOverlayCollection)
{var i;this.removeAllOverlays();for(i=0;i<myOverlayCollection.getSize();i++)
{this.addOverlay(myOverlayCollection.getAt(i));}
this.myoverlays.setName(myOverlayCollection.getName());}
MQTileMap.prototype.redrawOverlays=function()
{var i;for(i=0;i<this.myoverlays.getSize();i++)
{this.myoverlays.getAt(i).redraw();}}
MQTileMap.prototype.HandleOverlays=function()
{if(this.surface){this.overlayOffsetX=this.GetDragOffset().x;this.overlayOffsetY=this.GetDragOffset().y;this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+'px';this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+'px';this.redrawOverlays();};};MQTileMap.prototype.getMapType=function()
{return this.GetTileMode();}
MQTileMap.prototype.pixToLL=function(mqPoint)
{var ll=this.GetXYToLL(mqPoint);return new MQLatLng(ll.lat,ll.lng);}
MQTileMap.prototype.llToPix=function(mqLatLng)
{var xy=this.GetLLToXY(mqLatLng);return new MQPoint(xy.x,xy.y);}
MQTileMap.prototype.setMapType=function(type)
{var prevMT=this.getMapType();if(prevMT!=type){var newMode="";switch(type)
{case"map":case"sat":case"hyb":break;default:return;}
this.SetTileMode(type);this.redrawOverlays();if(this.controls[CONTROL_TYPE]!=null){this.controls[CONTROL_TYPE].updateControl(type);}
var evt=new MQEvent();evt.prevMapType=prevMT;evt.mapType=type;this.onMapTypeChanged(evt);}}
MQTileMap.prototype.zoomIn=function()
{var prevZoom=this.getZoomLevel();this.updateZoom("off");this.ZoomIn();this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.zoomOut=function()
{var prevZoom=this.getZoomLevel();this.updateZoom("off");this.ZoomOut();this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.setZoomLevel=function(level)
{var prevZoom=this.getZoomLevel();this.updateZoom("off");this.SetZoomLevel(level);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.getZoomLevel=function()
{return this.GetZoomLevel();}
MQTileMap.prototype.zoomToRect=function(rectLL,keepcenter,minzoom,maxzoom)
{var prevZoom=this.getZoomLevel();if(keepcenter==null)keepcenter=false;if(minzoom==null)minzoom=1;if(maxzoom==null)maxzoom=16;this.updateZoom("off");this.BestFit(rectLL,keepcenter,minzoom,maxzoom);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.bestFit=function(keepCenter,minZoomLevel,maxZoomLevel)
{var prevZoom=this.getZoomLevel();if(keepCenter==null)keepCenter=false;if(minZoomLevel==null)minZoomLevel=1;if(maxZoomLevel==null)maxZoomLevel=16;this.updateZoom("off");this.BestFitPOIs(keepCenter,minZoomLevel,maxZoomLevel);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());};}
MQTileMap.prototype.bestFitLL=function(arrayLL,keepCenter,minZoomLevel,maxZoomLevel)
{if(!arrayLL.length)return;if(keepCenter==null)keepCenter=false;if(minZoomLevel==null)minZoomLevel=1;if(maxZoomLevel==null)maxZoomLevel=16;var rect=new MQRectLL(arrayLL[0],arrayLL[0]);rect.setBounds(arrayLL);this.zoomToRect(rect,keepCenter,minZoomLevel,maxZoomLevel);}
MQTileMap.prototype.getCenter=function()
{var ll=this.GetCenterLatLng();return new MQLatLng(ll.lat,ll.lng);}
MQTileMap.prototype.setCenter=function(mqLatLng,zoom)
{if(zoom==null)
{this.SetCenterLatLng(mqLatLng);}else{var prevZoom=this.getZoomLevel();this.updateZoom("off");this.SetCenterLatLngZoomLevel(mqLatLng,zoom);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);}}
MQTileMap.prototype.panToLatLng=function(mqLatLng)
{var pnt=this.llToPix(mqLatLng)
if((pnt.getX()>-100&&pnt.getX()<this.width+100)||(pnt.getY()>-100&&pnt.getY()<this.height+100)){this.SlideMapToPoint(pnt);}else{this.setCenter(mqLatLng);}}
MQTileMap.prototype.getRolloverWindow=function()
{return this.rolloverwindow;}
MQTileMap.prototype.getInfoWindow=function()
{return this.infowindow;}
MQTileMap.prototype.setInfoTitleHTML=function(title)
{var container=document.createElement("div");container.innerHTML="<div>"+title+"</div>";this.infoWindowTitle=container;}
MQTileMap.prototype.setInfoContentHTML=function(content)
{var container=document.createElement("div");container.innerHTML="<div>"+content+"</div>";this.infoWindowContent=container;}
MQTileMap.prototype.setInfoTitleElement=function(titleContainer)
{this.infoWindowTitle=titleContainer;}
MQTileMap.prototype.setInfoContentElement=function(contentContainer)
{this.infoWindowContent=contentContainer;}
MQTileMap.prototype.openInfoWindow=function(mqPoint)
{if(this.iwparent.parentNode)
{this.RemovePOI(this.iwparent);}
this.AddPOI(this.pixToLL(mqPoint),new MQPoint(0,0),this.iwparent);this.iwparent.appendChild(this.infowindow.popup);this.infowindow.modify(mqPoint,this.infoWindowTitle,this.infoWindowContent,new MQPoint(-7,-14));this.infowindow.setOpenerAndShow(this);this.onInfoWindowOpen(new MQEvent());}
MQTileMap.prototype.setRolloversEnabled=function(benable)
{this.rolloversEnabled=benable;}
MQTileMap.prototype.getRolloversEnabled=function()
{return this.rolloversEnabled;}
MQTileMap.prototype.enableDragging=function(benable)
{this.DisableDragging(!benable);}
MQTileMap.prototype.getDragEnabled=function()
{return!this.GetDraggingState();}
MQTileMap.prototype.getPois=function()
{var i;var tempPoiCollection=new MQPoiCollection;for(i=0;i<this.mypois.getSize();i++)
{tempPoiCollection.add(this.mypois.getAt(i));}
return tempPoiCollection;}
MQTileMap.prototype.getSize=function()
{return new MQSize(this.div1.style.width,this.div1.style.height);}
MQTileMap.prototype.setSize=function(mqSize)
{this.ResizeMap(mqSize);}
MQTileMap.prototype.getRectFromMapstate=function(mqmapstate)
{try{var exist=new MQMapState();exist=null;}catch(e)
{throw"The JSAPI must be included to use this function.";return;}
if(mqmapstate==null)return;var cLat=parseFloat(mqmapstate.getCenter().getLatitude());var cLng=parseFloat(mqmapstate.getCenter().getLongitude());var heightpx=mqmapstate.getHeightPixels();var widthpx=mqmapstate.getWidthPixels();var scale=mqmapstate.getMapScale();var deltaLat=(heightpx/2)/this.GetLatitudeDegreesPerPixel(scale);var deltaLng=(widthpx/2)/this.GetLongitudeDegreesPerPixel(scale);deltaLat=parseInt(deltaLat*1000000.0)/1000000.0;deltaLng=parseInt(deltaLng*1000000.0)/1000000.0;var ul=new MQLatLng(cLat+deltaLat,cLng-deltaLng);var lr=new MQLatLng(cLat-deltaLat,cLng+deltaLng);return new MQRectLL(ul,lr);}
MQTileMap.prototype.addRouteHighlight=function(rectll,mapserverurl,sessionid,bestfit)
{var prevZoom=this.getZoomLevel();this.updateZoom("off");this.AddRouteHighlight(rectll,mapserverurl,sessionid,bestfit);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);}
MQTileMap.prototype.getBounds=function()
{var ulLL=this.pixToLL(new MQPoint(0,0));var lrLL=this.pixToLL(new MQPoint(this.div1.style.width,this.div1.style.height));return new MQRectLL(ulLL,lrLL);}
MQTileMap.prototype.restoreState=function()
{this.setCenter(this.savedCenter);this.setZoomLevel(this.savedZoomLevel);this.setMapType(this.savedMapType);}
MQTileMap.prototype.saveState=function()
{this.savedCenter=this.getCenter();this.savedZoomLevel=this.getZoomLevel();this.savedMapType=this.getMapType();}
MQTileMap.prototype.removeRouteHighlight=function()
{this.RemoveRouteHighlight();}
MQTileMap.prototype.getDeclutter=function()
{return this.mydeclutter;}
document.write('<script src="http://o.aolcdn.com/dojo/0.4.2/dojo.js" type="text/javascript"><\/script>');function MQInitOverlays(callback)
{if(dojo.require){dojo.require("dojo.gfx.*");if(callback){dojo.addOnLoad(callback);};};};MQShapeOverlay.prototype=new MQObject();MQShapeOverlay.prototype.constructor=MQShapeOverlay;function MQShapeOverlay()
{this.map=null;this.key='';this.color=[0,0,0,1];this.altColor=null;this.colorAlpha='1';this.altColorAlpha=null;this.fillColor=[0,0,0,1];this.altFillColor=null;this.fillColorAlpha='1';this.altFillColorAlplha=null;this.borderWidth='3';this.altBorderWidth=null;this.altStateFlag=false;this.visible=true;this.className='MQShapeOverlay';this.shapePoints=null;this.shape=null;};MQShapeOverlay.prototype.adjustXY=function(pntXY)
{pntXY.x=pntXY.x+(this.map.SURFACE_OFFSET);pntXY.y=pntXY.y+(this.map.SURFACE_OFFSET);return pntXY;};MQShapeOverlay.prototype.setKey=function(key)
{this.key=key;};MQShapeOverlay.prototype.getKey=function()
{return this.key;};MQShapeOverlay.prototype.setColor=function(color)
{this.color=dojo.gfx.normalizeColor(color).toRgba();this.color[3]=this.colorAlpha;if(this.shape&&!this.altStateFlag){this.shape.setStroke({color:this.color,width:this.borderWidth});};};MQShapeOverlay.prototype.getColor=function()
{return[this.color[0],this.color[1],this.color[2]];};MQShapeOverlay.prototype.setAltColor=function(altColor)
{this.altColor=dojo.gfx.normalizeColor(altColor).toRgba();this.altColor[3]=this.altColorAlpha;if(this.shape&&this.altStateFlag){this.shape.setStroke({color:this.altColor,width:this.altBorderWidth});};};MQShapeOverlay.prototype.getAltColor=function()
{if(this.altColor){return[this.altColor[0],this.altColor[1],this.altColor[2]];}else{return[this.color[0],this.color[1],this.color[2]];};};MQShapeOverlay.prototype.setColorAlpha=function(colorAlpha)
{var c=this.color;c[3]=(colorAlpha!=0?colorAlpha:0.001);this.color=c;this.colorAlpha=c[3];if(this.shape&&!this.altStateFlag){this.shape.setStroke({color:this.color,width:this.borderWidth});};};MQShapeOverlay.prototype.getColorAlpha=function()
{return(this.colorAlpha!=0.001?this.colorAlpha:0);};MQShapeOverlay.prototype.setAltColorAlpha=function(altColorAlpha)
{var c=(this.altColor!=null?this.altColor:this.color);c[3]=(altColorAlpha!=0?altColorAlpha:0.001);this.altColorAlpha=c[3];if(this.shape&&this.altStateFlag){this.shape.setStroke({color:c,width:this.altBorderWidth});};};MQShapeOverlay.prototype.getAltColorAlpha=function()
{if(this.altColorAlpha!=null){return(this.altColorAlpha!=0.001?this.altColorAlpha:0);}else{return(this.colorAlpha!=0.001?this.colorAlpha:0);};};MQShapeOverlay.prototype.setFillColor=function(fillColor)
{this.fillColor=dojo.gfx.normalizeColor(fillColor).toRgba();this.fillColor[3]=this.fillColorAlpha;if(this.shape&&!this.altStateFlag){this.shape.setFill(this.fillColor);};};MQShapeOverlay.prototype.getFillColor=function()
{return[this.fillColor[0],this.fillColor[1],this.fillColor[2]];};MQShapeOverlay.prototype.setAltFillColor=function(altFillColor)
{this.altFillColor=dojo.gfx.normalizeColor(altFillColor).toRgba();this.altFillColor[3]=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);if(this.shape&&this.altStateFlag){this.shape.setFill(this.altFillColor);};};MQShapeOverlay.prototype.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]];};};MQShapeOverlay.prototype.setFillColorAlpha=function(fillColorAlpha)
{var c=this.fillColor;c[3]=(fillColorAlpha!=0?fillColorAlpha:0.001);this.fillColor=c;this.fillColorAlpha=c[3];if(this.shape&&!this.altStateFlag){this.shape.setFill(this.fillColor);};};MQShapeOverlay.prototype.getFillColorAlpha=function()
{return(this.fillColorAlpha!=0.001?this.fillColorAlpha:0);};MQShapeOverlay.prototype.setAltFillColorAlpha=function(altFillColorAlpha)
{var c=(this.altFillColor!=null?this.altFillColor:this.fillColor);c[3]=(altFillColorAlpha!=0?altFillColorAlpha:0.001);this.altFillColorAlpha=c[3];if(this.shape&&this.altStateFlag){this.shape.setFill(c);};};MQShapeOverlay.prototype.getAltFillColorAlpha=function()
{if(this.altFillColorAlpha!=null){return(this.altFillColorAlpha!=0.001?this.altFillColorAlpha:0);}else{return(this.fillColorAlpha!=0.001?this.fillColorAlpha:0);};};MQShapeOverlay.prototype.setBorderWidth=function(lineWidth)
{this.borderWidth=lineWidth;if(this.shape&&!this.altStateFlag){this.shape.setStroke({color:this.color,width:this.borderWidth});};};MQShapeOverlay.prototype.getBorderWidth=function()
{return this.borderWidth;};MQShapeOverlay.prototype.setAltBorderWidth=function(lineWidth)
{this.altBorderWidth=lineWidth;if(this.shape&&this.altStateFlag){this.shape.setStroke({color:this.altColor,width:this.altBorderWidth});};};MQShapeOverlay.prototype.getAltBorderWidth=function()
{if(this.altBorderWidth!=null){return this.altBorderWidth;}else{return this.borderWidth;};};MQShapeOverlay.prototype.setAltStateFlag=function(altStateFlag)
{this.altStateFlag=altStateFlag;if(this.shape){props=this.getCurrentState();this.shape.setStroke({color:props.color,width:props.borderWidth});this.shape.setFill(props.fillColor);};};MQShapeOverlay.prototype.getAltStateFlag=function()
{return this.altStateFlag;};MQShapeOverlay.prototype.setVisible=function(bVisible)
{this.visible=bVisible;if(this.shape){this.shape.rawNode.style.display=(bVisible?'inline':'none');};};MQShapeOverlay.prototype.getVisible=function()
{return this.visible;};MQShapeOverlay.prototype.getClassName=function()
{return this.className;};MQShapeOverlay.prototype.setShapePoints=function(shapePnts)
{if(shapePnts.setLowerRight){var newShapePoints=new MQLatLngCollection;newShapePoints.add(new MQLatLng(shapePnts.ul.lat,shapePnts.ul.lng));newShapePoints.add(new MQLatLng(shapePnts.lr.lat,shapePnts.lr.lng));shapePnts=newShapePoints;};this.shapePoints=shapePnts;};MQShapeOverlay.prototype.getShapePoints=function()
{return this.shapePoints;};MQShapeOverlay.prototype.setAll=function(params)
{if(typeof(params.shapePoints)!='undefined')this.setShapePoints(params.shapePoints);if(typeof(params.key)!='undefined')this.setKey(params.key);if(typeof(params.color)!='undefined')this.setColor(params.color);if(typeof(params.altColor)!='undefined')this.setAltColor(params.altColor);if(typeof(params.colorAlpha)!='undefined')this.setColorAlpha(params.colorAlpha);if(typeof(params.altColorAlpha)!='undefined')this.setAltColorAlpha(params.altColorAlpha);if(this.className!='MQLineOverlay'){if(typeof(params.fillColor)!='undefined')this.setFillColor(params.fillColor);if(typeof(params.altFillColor)!='undefined')this.setAltFillColor(params.altFillColor);if(typeof(params.fillColorAlpha)!='undefined')this.setfillColorAlpha(params.fillColorAlpha);if(typeof(params.altFillColorAlpha)!='undefined')this.setAltFillColorAlpha(params.altFillColorAlpha);};if(typeof(params.borderWidth)!='undefined')this.setBorderWidth(params.borderWidth);if(typeof(params.altBorderWidth)!='undefined')this.setAltBorderWidth(params.altBorderWidth);if(typeof(params.altStateFlag)!='undefined')this.setAltStateFlag(params.altStateFlag);if(typeof(params.visible)!='undefined')this.setVisible(params.visible);};MQShapeOverlay.prototype.getCurrentState=function()
{var propSet=new Object();if(!this.altStateFlag){propSet.color=this.color;propSet.colorAlpha=this.colorAlpha;propSet.fillColor=this.fillColor;propSet.fillColorAlpha=this.fillColorAlpha;propSet.borderWidth=this.borderWidth;propSet.color[3]=this.colorAlpha;propSet.fillColor[3]=this.fillColorAlpha;}else{propSet.color=(this.altColor!=null?this.altColor:this.color);propSet.colorAlpha=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);propSet.fillColor=(this.altFillColor!=null?this.altFillColor:this.fillColor);propSet.fillColorAlpha=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);propSet.borderWidth=(this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);propSet.color[3]=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha)
propSet.fillColor[3]=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);};propSet.visible=this.visible;return propSet;};MQShapeOverlay.prototype.clone=function(overlayToClone)
{this.key=overlayToClone.key;this.color=overlayToClone.color;this.altColor=overlayToClone.altColor;this.colorAlpha=overlayToClone.colorAlpha;this.altColorAlpha=overlayToClone.altColorAlpha;this.fillColor=overlayToClone.fillColor;this.altFillColor=overlayToClone.altFillColor;this.fillColorAlpha=overlayToClone.fillColorAlpha;this.altFillColorAlpha=overlayToClone.altFillColorAlpha;this.borderWidth=overlayToClone.borderWidth;this.altBorderWidth=overlayToClone.altBorderWidth;this.altStateFlag=overlayToClone.altStateFlag;this.visible=overlayToClone.visible;this.shapePoints=overlayToClone.shapePoints;this.shape=null;this.map=null;};MQShapeOverlay.prototype.redraw=function()
{if(!this.map)return;this.drawShape();};MQRectangleOverlay.prototype=new MQShapeOverlay();MQRectangleOverlay.prototype.constructor=MQRectangleOverlay;function MQRectangleOverlay(overlayToClone)
{MQShapeOverlay.call(this);this.className='MQRectangleOverlay';if(overlayToClone){if(overlayToClone.getClassName()==this.className){this.clone(overlayToClone);};};};MQRectangleOverlay.prototype.drawShape=function()
{var xy1,xy2,iHeight,iWidth,propSet,tempx1,tempx2,tempy1,tempy2;xy1=this.map.llToPix(this.shapePoints.get(0));xy2=this.map.llToPix(this.shapePoints.get(1));xy1=this.adjustXY(xy1);xy2=this.adjustXY(xy2);tempx1=xy1.x;tempx2=xy2.x;tempy1=xy1.y;tempy2=xy2.y;if(xy1.x>xy2.x){xy1.x=tempx2;xy2.x=tempx1;};if(xy1.y>xy2.y){xy1.y=tempy2;xy2.y=tempy1;};propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};var surfaceWidth=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));var surfaceHeight=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);iHeight=xy2.y-xy1.y;iWidth=xy2.x-xy1.x;iHeight=(iHeight>surfaceHeight?surfaceHeight:iHeight);iWidth=(iWidth>surfaceWidth?surfaceWidth:iWidth);if(!(iHeight<1||iWidth<1)){this.shape=this.map.surface.createRect({x:xy1.x,y:xy1.y,width:iWidth,height:iHeight}).setFill(propSet.fillColor).setStroke({color:propSet.color,width:propSet.borderWidth});this.shape.rawNode.style.display=(propSet.visible?'inline':'none');};};MQLineOverlay.prototype=new MQShapeOverlay();MQLineOverlay.prototype.constructor=MQLineOverlay;function MQLineOverlay(overlayToClone)
{MQShapeOverlay.call(this);this.className='MQLineOverlay';this.fillColorAlpha='0.001';this.altFillColorAlpha='0.001';if(overlayToClone){if(overlayToClone.getClassName()==this.className){this.clone(overlayToClone);};};};MQLineOverlay.prototype.drawShape=function()
{var i;var xy=new Array;for(i=0;i<this.shapePoints.getSize();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 propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};var clippedXY=new Array();if(this.isOverLimit(xy)){var surfaceWidth=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));var surfaceHeight=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));clippedXY=this.Clip(0,surfaceWidth,0,surfaceHeight,xy,false);}else{clippedXY=xy;};if(clippedXY.length){var s='M '+Math.round(clippedXY[0].x)+','+Math.round(clippedXY[0].y)+' L ';for(var i=1;i<clippedXY.length;i++){s+=Math.round(clippedXY[i].x)+','+Math.round(clippedXY[i].y)+' ';};this.shape=this.map.surface.createPath(s).setFill(propSet.fillColor).setStroke({color:propSet.color,width:propSet.borderWidth});this.shape.rawNode.style.display=(propSet.visible?'inline':'none');};};MQLineOverlay.prototype.setFillColor=function()
{};MQLineOverlay.prototype.setAltFillColor=function()
{};MQLineOverlay.prototype.setFillColorAlpha=function()
{};MQLineOverlay.prototype.setAltFillColorAlpha=function()
{};MQPolygonOverlay.prototype=new MQShapeOverlay();MQPolygonOverlay.prototype.constructor=MQPolygonOverlay;function MQPolygonOverlay(overlayToClone)
{MQShapeOverlay.call(this);this.className='MQPolygonOverlay';if(overlayToClone){if(overlayToClone.getClassName()==this.className){this.clone(overlayToClone);};};};MQPolygonOverlay.prototype.drawShape=function()
{function alertXY(a){var s='';for(var i=0;i<a.length;i++){s+=a[i].x+', '+a[i].y+"\n";};alert(s);};var i;var xy=new Array;for(i=0;i<this.shapePoints.getSize();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 propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};var clippedXY=new Array();if(this.isOverLimit(xy)){var surfaceWidth=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));var surfaceHeight=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));clippedXY=this.Clip(0,surfaceWidth,0,surfaceHeight,xy,true);}else{clippedXY=xy;};if(clippedXY.length){var s='M '+Math.round(clippedXY[0].x)+','+Math.round(clippedXY[0].y)+' L ';for(var i=1;i<clippedXY.length;i++){s+=Math.round(clippedXY[i].x)+','+Math.round(clippedXY[i].y)+' ';};s+='Z';this.shape=this.map.surface.createPath(s).setFill(propSet.fillColor).setStroke({color:propSet.color,width:propSet.borderWidth});this.shape.rawNode.style.display=(propSet.visible?'inline':'none');};};MQEllipseOverlay.prototype=new MQShapeOverlay();MQEllipseOverlay.prototype.constructor=MQEllipseOverlay;function MQEllipseOverlay(overlayToClone)
{MQShapeOverlay.call(this);this.className='MQEllipseOverlay';if(overlayToClone){if(overlayToClone.getClassName()==this.className){this.clone(overlayToClone);};};};MQEllipseOverlay.prototype.drawShape=function()
{var xy1,xy2,iHeight,iWidth,propSet,tempx1,tempx2,tempy1,tempy2;var xRadius,yRadius,centerX,centerY;xy1=this.map.llToPix(this.shapePoints.get(0));xy2=this.map.llToPix(this.shapePoints.get(1));xy1=this.adjustXY(xy1);xy2=this.adjustXY(xy2);tempx1=xy1.x;tempx2=xy2.x;tempy1=xy1.y;tempy2=xy2.y;if(xy1.x>xy2.x){xy1.x=tempx2;xy2.x=tempx1;};if(xy1.y>xy2.y){xy1.y=tempy2;xy2.y=tempy1;};xRadius=Math.round((xy2.x-xy1.x)/2);yRadius=Math.round((xy2.y-xy1.y)/2);centerX=xy1.x+xRadius;centerY=xy1.y+yRadius;var surfaceWidth=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));var surfaceHeight=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));var drawMethod=0;if((xy1.x>surfaceWidth)||(xy2.x<0)||(xy1.y>surfaceHeight)||(xy2.y<0))drawMethod=1;if(!drawMethod){var x,y,c;var isInside=false;x=0;y=0;isInside=((x-centerX)*(x-centerX)/(xRadius*xRadius)+(y-centerY)*(y-centerY)/(yRadius*yRadius))<1;if(isInside){x=surfaceWidth;y=0;isInside=isInside&&(((x-centerX)*(x-centerX)/(xRadius*xRadius)+(y-centerY)*(y-centerY)/(yRadius*yRadius))<1);if(isInside){x=0;y=surfaceHeight;isInside=isInside&&(((x-centerX)*(x-centerX)/(xRadius*xRadius)+(y-centerY)*(y-centerY)/(yRadius*yRadius))<1);if(isInside){x=surfaceWidth;y=surfaceHeight;isInside=isInside&&(((x-centerX)*(x-centerX)/(xRadius*xRadius)+(y-centerY)*(y-centerY)/(yRadius*yRadius))<1);};};};if(isInside)drawMethod=2;};if(!drawMethod){if((xRadius*2)>32000||(yRadius*2)>32000){drawMethod=3;};};var propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};switch(drawMethod){case 0:if(xRadius>1&&yRadius>1){this.shape=this.map.surface.createEllipse({cx:centerX,cy:centerY,rx:xRadius,ry:yRadius}).setFill(propSet.fillColor).setStroke({color:propSet.color,width:propSet.borderWidth});this.shape.rawNode.style.display=(propSet.visible?'inline':'none');};break;case 1:break;case 2:this.shape=this.map.surface.createRect({x:0,y:0,width:surfaceWidth,height:surfaceHeight}).setFill(propSet.fillColor).setStroke({color:propSet.color,width:propSet.borderWidth});this.shape.rawNode.style.display=(propSet.visible?'inline':'none');break;case 3:break;};};MQOverlayCollection.prototype=new MQTKObjectCollection();MQOverlayCollection.prototype.constructor=MQOverlayCollection;function MQOverlayCollection()
{MQTKObjectCollection.call(this);this.overlayCollectionName='default';};MQOverlayCollection.prototype.append=function(myOverlayCollection)
{var i;for(i=0;i<myOverlayCollection.getSize();i++)
{this.add(myOverlayCollection.getAt(i));};};MQOverlayCollection.prototype.getName=function()
{return this.overlayCollectionName;};MQOverlayCollection.prototype.setName=function(mqOverlayCollectionName)
{this.overlayCollectionName=mqOverlayCollectionName;};MQShapeOverlay.prototype.isOverLimit=function(pnts)
{var overLimit=false;var limit=16000;for(var i=0;i<pnts.length;i++){if(pnts[i].x>limit||pnts[i].x<-limit||pnts[i].y>limit||pnts[i].y<-limit){overLimit=true;break;};};return overLimit;};MQShapeOverlay.prototype.Clip=function(xMin,xMax,yMin,yMax,vIn,closed)
{var vOut=new Array();var D=(closed?3:2);if(vIn.length<D)
{return vOut;}
vOut=clipAgainstEdge(0,vIn,closed)
var vOut2=clipAgainstEdge(1,vOut,closed)
var vOut3=clipAgainstEdge(2,vOut2,closed)
var vOut4=clipAgainstEdge(3,vOut3,closed)
return vOut4;function clipAgainstEdge(lEdge,lVin,lClosed)
{var v1;var v1in,v2in;var newv;var lVout=new Array();for(var v2=0;v2<lVin.length;v2++)
{if(closed)
v1=(v2==0?lVin.length-1:v2-1);else
v1=(v2==0?0:v2-1);v1in=inside(lEdge,lVin[v1]);v2in=inside(lEdge,lVin[v2]);if(v1in&&v2in)
{lVout.push(lVin[v2]);}
else if(!v1in&&v2in)
{newv=clipIntersection(lEdge,lVin[v2],lVin[v1]);lVout.push(newv);lVout.push(lVin[v2]);}
else if(v1in&&!v2in)
{newv=clipIntersection(lEdge,lVin[v1],lVin[v2]);lVout.push(newv);};};return lVout;};function clipIntersection(llEdge,inv,outv)
{var x1=inv.x;var y1=inv.y;var x2=outv.x;var y2=outv.y;var AU=0;var newv={x:0,y:0};switch(llEdge)
{case 0:var x3=xMin;var y3=yMin;var x4=xMin;var y4=yMax;break;case 1:var x3=xMax;var y3=yMin;var x4=xMax;var y4=yMax;break;case 2:var x3=xMin;var y3=yMax;var x4=xMax;var y4=yMax;break;case 3:var x3=xMin;var y3=yMin;var x4=xMax;var y4=yMin;break;};UA=(((x4-x3)*(y1-y3))-((y4-y3)*(x1-x3)))/(((y4-y3)*(x2-x1))-((x4-x3)*(y2-y1)));newv.x=x1+(UA*(x2-x1));newv.y=y1+(UA*(y2-y1));return newv;};function inside(edge,v)
{switch(edge)
{case 0:return(v.x>xMin);case 1:return(v.x<xMax);case 2:return(v.y<yMax);case 3:return(v.y>yMin);};return false;};};
PAN_NORTH=0;PAN_SOUTH=1;PAN_EAST=2;PAN_WEST=3;function MQControl()
{}
MQControl.prototype.initialize=function(map)
{this.map=map;}
MQControl.prototype.getPosition=function()
{return this.position;}
MQControl.prototype.getHeight=function()
{return this.getHeightInternal(this.elem);}
MQControl.prototype.getHeightInternal=function(parent)
{var children=parent.childNodes;var height=0;for(var i=0;i<children.length;i++)
{if(children[i].childNodes.length>0&&children[i].style.overflow!="hidden"){childHeight=this.getHeightInternal(children[i]);if(childHeight>height)height=childHeight;}
if(children[i].offsetHeight>height)height=children[i].offsetHeight;}
return height;}
MQControl.prototype.getWidth=function()
{return this.getWidthInternal(this.elem);}
MQControl.prototype.getWidthInternal=function(parent)
{var children=parent.childNodes;var width=0;for(var i=0;i<children.length;i++)
{if(children[i].childNodes.length>0&&children[i].style.overflow!="hidden"){childWidth=this.getWidthInternal(children[i]);if(childWidth>width)width=childWidth;}
if(children[i].offsetWidth>width)width=children[i].offsetWidth;}
return width;}
function MQLargeZoomControl()
{browser=getBrowserInfo();this.pan=new Array();this.zoombar=new Array();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(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.className="map-compass-wrapper";temp.appendChild(temp1);temp1=document.createElement("div");temp1.className="map-zoom";temp.appendChild(temp1);temp1=document.createElement("div");temp1.className="map-revert";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")
{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.alt="Pan or recenter the map";temp3.useMap="#mq-zoomcontrol-linkmap";temp3.title="Pan or recenter the map";temp2.appendChild(temp3);temp3=document.createElement("map");temp3.name="mq-zoomcontrol-linkmap";temp3.id="mq-zoomcontrol-linkmap";temp2.appendChild(temp3);temp4=document.createElement("area");temp4.shape="poly";temp4.coords="14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21";temp4.href="#center";temp4.title="Fit to Screen";temp4.alt="Fit to Screen";temp3.appendChild(temp4);temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,1,29,12";temp4.href="#north";temp4.title="Pan North";temp4.alt="Pan North";temp3.appendChild(temp4);this.pan[PAN_NORTH]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="27,13,40,28";temp4.href="#east";temp4.title="Pan East";temp4.alt="Pan East";temp3.appendChild(temp4);this.pan[PAN_EAST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="1,13,14,28";temp4.href="#west";temp4.title="Pan West";temp4.alt="Pan West";temp3.appendChild(temp4);this.pan[PAN_WEST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,29,29,40";temp4.href="#south";temp4.title="Pan South";temp4.alt="Pan South";temp3.appendChild(temp4);this.pan[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")
{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);for(var i=16;i>0;i--)
{this.zoombar[i]=document.createElement("img");this.zoombar[i].alt="Zoom to level "+i;this.zoombar[i].title="Zoom to level "+i;this.zoombar[i].border=0;this.zoombar[i].style.display="block";if(browser.name=="msie")
{this.zoombar[i].src="http://img.mqcdn.com/a/a";f="http://img.mqcdn.com/mqtoolkit/z-"+i+".png";this.zoombar[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"', sizingMethod='image')";}else{this.zoombar[i].src="http://img.mqcdn.com/mqtoolkit/z-"+i+".png";}
temp1.appendChild(this.zoombar[i]);}
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")
{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);}
MQLargeZoomControl.prototype=new MQControl();MQLargeZoomControl.prototype.constructor=MQLargeZoomControl;MQLargeZoomControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_PANZOOM;this.selectZoom(this.map.GetZoomLevel());for(var i=0;i<4;i++)
{Event.observe(this.pan[i],'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.pan[i],'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.pan[i],'mouseout',MQEventCallback(this,"eventmonitor"));}
Event.observe(this.zoomin,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomin,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomin,'mouseout',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'mouseout',MQEventCallback(this,"eventmonitor"));for(var i=1;i<17;i++)
{Event.observe(this.zoombar[i],'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoombar[i],'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoombar[i],'mouseout',MQEventCallback(this,"eventmonitor"));}}
MQLargeZoomControl.prototype.eventmonitor=function(evt)
{if(Event.element(evt)==this.pan[PAN_NORTH])eventId="n";if(Event.element(evt)==this.pan[PAN_SOUTH])eventId="s";if(Event.element(evt)==this.pan[PAN_EAST])eventId="e";if(Event.element(evt)==this.pan[PAN_WEST])eventId="w";if(Event.element(evt)==this.zoomin)eventId="in";if(Event.element(evt)==this.zoomout)eventId="out";for(var i=1;i<17;i++)
{if(Event.element(evt)==this.zoombar[i])eventId=i;}
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;default:this.map.setZoomLevel(eventId);break;}
break;case"mouseover":switch(eventId)
{case"in":case"out":Event.element(evt).addClassName("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;case"mouseout":switch(eventId)
{case"in":case"out":Event.element(evt).removeClassName("o");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;}}
MQLargeZoomControl.prototype.selectZoom=function(level)
{this.zoombar[level].src="http://img.mqcdn.com/mqmaptiled/z-on.png";}
MQLargeZoomControl.prototype.unselectZoom=function(level)
{this.zoombar[level].src="http://img.mqcdn.com/mqmaptiled/z-"+level+".png";}
MQLargeZoomControl.prototype.getHeight=function()
{return 304;}
MQLargeZoomControl.prototype.getWidth=function()
{return 50;}
function MQPanControl()
{browser=getBrowserInfo();this.pans=new Array();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(0,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.className="map-box-wrapper";temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-box-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")
{temp3.src="http://img.mqcdn.com/a/a";temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/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.alt="Pan or recenter the map";temp3.useMap="#mq-pancontrol-linkmap";temp3.title="Pan or recenter the map";temp2.appendChild(temp3);temp3=document.createElement("map");temp3.id="mq-pancontrol-linkmap";temp3.name="mq-pancontrol-linkmap";temp2.appendChild(temp3);temp4=document.createElement("area");temp4.shape="poly";temp4.coords="14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21";temp4.href="#center";temp4.title="Fit to Screen";temp4.alt="Fit to Screen";temp3.appendChild(temp4);temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,1,29,12";temp4.href="#north";temp4.title="Pan North";temp4.alt="Pan North";temp3.appendChild(temp4);this.pans[PAN_NORTH]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="27,13,40,28";temp4.href="#east";temp4.title="Pan East";temp4.alt="Pan East";temp3.appendChild(temp4);this.pans[PAN_EAST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="1,13,14,28";temp4.href="#west";temp4.title="Pan West";temp4.alt="Pan West";temp3.appendChild(temp4);this.pans[PAN_WEST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,29,29,40";temp4.href="#south";temp4.title="Pan South";temp4.alt="Pan South";temp3.appendChild(temp4);this.pans[PAN_SOUTH]=temp4;}
MQPanControl.prototype=new MQControl();MQPanControl.prototype.constructor=MQPanControl;MQPanControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_PAN;for(var i=0;i<4;i++)
{Event.observe(this.pans[i],'click',MQEventCallback(this,"eventmonitors"));Event.observe(this.pans[i],'mouseover',MQEventCallback(this,"eventmonitors"));Event.observe(this.pans[i],'mouseout',MQEventCallback(this,"eventmonitors"));}}
MQPanControl.prototype.eventmonitors=function(evt)
{if(Event.element(evt)==this.pans[PAN_NORTH])eventId="n";if(Event.element(evt)==this.pans[PAN_SOUTH])eventId="s";if(Event.element(evt)==this.pans[PAN_EAST])eventId="e";if(Event.element(evt)==this.pans[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;}}
MQPanControl.prototype.getHeight=function()
{return 52;}
MQPanControl.prototype.getWidth=function()
{return 54;}
function MQZoomControl()
{browser=getBrowserInfo();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(0,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";temp.style.width="60px";this.elem.appendChild(temp);temp1=document.createElement("div");temp1.className="map-zoombox-wrapper";temp1.style.width="60px";temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-zoom";temp1.style.width="60px";temp1.style.height="50px";temp.appendChild(temp1);temp2=document.createElement("div");temp2.style.position="absolute";temp2.style.left="6px";temp2.style.top="8px";temp2.style.width="22px";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")
{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);temp2=document.createElement("div");temp2.style.position="absolute";temp2.style.left="29px";temp2.style.top="6px";temp2.style.width="22px";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")
{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);}
MQZoomControl.prototype=new MQControl();MQZoomControl.prototype.constructor=MQZoomControl;MQZoomControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_ZOOM;Event.observe(this.zoomin,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomin,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomin,'mouseout',MQEventCallback(this,"eventmonitor"));Event.observe(this.zoomout,'mouseout',MQEventCallback(this,"eventmonitor"));}
MQZoomControl.prototype.eventmonitor=function(evt)
{if(Event.element(evt)==this.zoomin)eventId="in";if(Event.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":Event.element(evt).addClassName("o");break;default:Event.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-on.png";}
break;case"mouseout":switch(eventId)
{case"in":case"out":Event.element(evt).removeClassName("o");break;default:if(parseFloat(eventId)!=this.map.getZoomLevel())
{Event.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-"+eventId+".png";}}
break;}}
MQZoomControl.prototype.getHeight=function()
{return 55;}
MQZoomControl.prototype.getWidth=function()
{return 66;}
function MQViewControl()
{browser=getBrowserInfo();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_RIGHT,new MQSize(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")
{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")
{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")
{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);}
MQViewControl.prototype=new MQControl();MQViewControl.prototype.constructor=MQViewControl;MQViewControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_TYPE;Event.observe(this.streetview,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.streetview,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.streetview,'mouseout',MQEventCallback(this,"eventmonitor"));Event.observe(this.aerialview,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.aerialview,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.aerialview,'mouseout',MQEventCallback(this,"eventmonitor"));Event.observe(this.hybridview,'click',MQEventCallback(this,"eventmonitor"));Event.observe(this.hybridview,'mouseover',MQEventCallback(this,"eventmonitor"));Event.observe(this.hybridview,'mouseout',MQEventCallback(this,"eventmonitor"));if(this.map.getMapType()=="map")this.streetview.addClassName("a");if(this.map.getMapType()=="sat")this.aerialview.addClassName("a");if(this.map.getMapType()=="hyb")this.hybridview.addClassName("a");}
MQViewControl.prototype.eventmonitor=function(evt)
{switch(evt.type)
{case"click":if(Event.element(evt)==this.streetview)this.selectMode("street");if(Event.element(evt)==this.aerialview)this.selectMode("aerial");if(Event.element(evt)==this.hybridview)this.selectMode("hybrid");break;case"mouseover":Event.element(evt).addClassName("o");break;case"mouseout":Event.element(evt).removeClassName("o");break;}}
MQViewControl.prototype.updateControl=function(mtype)
{switch(mtype)
{case"map":this.aerialview.removeClassName("a");this.hybridview.removeClassName("a");this.streetview.addClassName("a");break;case"sat":this.hybridview.removeClassName("a");this.streetview.removeClassName("a");this.aerialview.addClassName("a");break;case"hyb":this.aerialview.removeClassName("a");this.streetview.removeClassName("a");this.hybridview.addClassName("a");break;}}
MQViewControl.prototype.selectMode=function(mode)
{var mtype=this.map.getMapType();var newMT="noChange";if(mode=="street"&&mtype!="map")
{newMT="map";}
if(mode=="aerial"&&mtype!="sat")
{newMT="sat";}
if(mode=="hybrid"&&mtype!="hyb")
{newMT="hyb";}
if(newMT!="noChange")
{this.map.setMapType(newMT);}}
MQViewControl.prototype.getHeight=function()
{return 26;}
MQViewControl.prototype.getWidth=function()
{return 220;}
MQPoiCollection.prototype=new MQTKObjectCollection();MQPoiCollection.prototype.constructor=MQPoiCollection;function MQPoiCollection()
{MQTKObjectCollection.call(this);}
MQPoiCollection.prototype.append=function(mqPoiCollection)
{for(i=0;i<mqPoiCollection.getSize();i++)
{this.add(mqPoiCollection.getAt(i));}}
function MQMapIcon(source)
{this.parentPoi=null;this.element=document.createElement("div");this.element.style.position="absolute";this.element.style.display="block";this.image=null;this.shadow=null;this.anchorOffset=null;this.infoWindowAnchor=null;if(source&&(source instanceof MQMapIcon))
{if(source.image)
{this.image=this._createImage(this._getImgSrc(source.image),parseInt(source.image.style.left),parseInt(source.image.style.top),parseInt(source.image.style.width),parseInt(source.image.style.height),source.image.isPng);}
if(source.shadow)
{this.shadow=this._createImage(this._getImgSrc(source.shadow),parseInt(source.shadow.style.left),parseInt(source.shadow.style.top),parseInt(source.shadow.style.width),parseInt(source.shadow.style.height),source.shadow.isPng);}
this.anchorOffset=new MQPoint(source.getAnchorOffset().getX(),source.getAnchorOffset().getY());this.infoWindowAnchor=new MQPoint(source.getInfoWindowAnchor().getX(),source.getInfoWindowAnchor().getY());}
else
{this.image=null;this.shadow=null;this.anchorOffset=new MQPoint(0,0);this.infoWindowAnchor=new MQPoint(0,0);this._calculateAnchors();}
if(this.image)
{this.element.appendChild(this.image);this._fixPng(this.image);}
if(this.shadow)
{this.element.appendChild(this.shadow);this._fixPng(this.shadow);}
this._defImageHeight=29;this._defImageWidth=29;}
MQMapIcon.prototype._calculateAnchors=function()
{if(this.image)
{this.anchorOffset.setX(-(parseInt(this.image.style.width)/2));this.anchorOffset.setY(-(parseInt(this.image.style.height)/2));this.infoWindowAnchor.setX(parseInt(this.image.style.width)/2);this.infoWindowAnchor.setY(0);}}
MQMapIcon.prototype._fixPng=function(img)
{if((img.isPng)&&(getBrowserInfo().name=="msie"))
{img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"', sizingMethod='image')";img.src="http://img.mqcdn.com/a/a";}}
MQMapIcon.prototype._getImgSrc=function(img)
{if(img)
{if((img.isPng)&&(getBrowserInfo().name=="msie"))
{var filter=img.style.filter;var startIndex=filter.indexOf("src='");if(startIndex==-1)
throw new Error("MQMapIcon._getImgSrc: missing start of src string");startIndex+=5;var endIndex=filter.indexOf("'",startIndex);if(endIndex==-1)
throw new Error("MQMapIcon._getImgSrc: missing end of src string");var src=filter.substr(startIndex,endIndex-startIndex);return src;}
else
return img.src;}}
MQMapIcon.prototype.getImage=function()
{return this.image;}
MQMapIcon.prototype.setImage=function(url,width,height,recalculateAnchors,imgIsPng)
{if(this.image)this.element.removeChild(this.image);this.image=this._createImage(url,0,0,width,height,imgIsPng);this.element.appendChild(this.image);if((recalculateAnchors==null)||(recalculateAnchors==true))
this._calculateAnchors();this._fixPng(this.image);}
MQMapIcon.prototype.getShadow=function()
{return this.shadow;}
MQMapIcon.prototype.setShadow=function(url,left,top,width,height,imgIsPng)
{if(this.shadow)this.element.removeChild(this.shadow);this.shadow=this._createImage(url,left,top,width,height,imgIsPng);this.element.appendChild(this.shadow);this._fixPng(this.shadow);}
MQMapIcon.prototype.getElement=function()
{return this.element;}
MQMapIcon.prototype.getAnchorOffset=function()
{return this.anchorOffset;}
MQMapIcon.prototype.setAnchorOffset=function(mqPoint)
{this.anchorOffset=mqPoint;this.redraw();}
MQMapIcon.prototype.getInfoWindowAnchor=function()
{return this.infoWindowAnchor;}
MQMapIcon.prototype.setInfoWindowAnchor=function(mqPoint)
{this.infoWindowAnchor=mqPoint;}
MQMapIcon.prototype.redraw=function()
{if(!this.parentPoi)return;this.parentPoi.redraw();}
MQMapIcon.prototype._createImage=function(url,left,top,width,height,imgIsPng)
{return MQ.utils._createImage(url,left,top,width,height,imgIsPng);}
MQMapIcon.prototype._hasPngExtention=function(url)
{return MQ.utils._hasPngExtension(url);}
MQMapIcon.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);this._fixPng(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);this._fixPng(this.shadow);}
this._calculateAnchors();}
function MQPoi(mqLatLng,mqMapIcon)
{this.map=null;this.mqrw=null;this.mqiw=null;this.mqMapIcon=null;if(mqMapIcon&&(mqMapIcon instanceof MQMapIcon))
this.mqMapIcon=mqMapIcon;else
this.mqMapIcon=new MQMapIcon();this.mqMapIcon.parentPoi=this;this.element=document.createElement("div");this.element.ll=new MQLatLng(mqLatLng.getLatitude(),mqLatLng.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;Event.observe(this.element,"click",MQEventCallback(this,"onClick"));Event.observe(this.element,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.element,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.element,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.element,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.element,"mouseout",MQEventCallback(this,"onMouseOut"));}
MQPoi.prototype.getElement=function()
{return this.element;}
MQPoi.prototype.onClick=function(e)
{if(Event.element(e).id=="poiclose")return;if(this.mqiw!=null&&this.mqiw.opener==this)return;this.showInfoWindow();MQEventManager.trigger(this,"click",e);e.poi=this;this.map.onClick(e);Event.stop(e);}
MQPoi.prototype.onDoubleClick=function(e)
{MQEventManager.trigger(this,"dblclick",e);}
MQPoi.prototype.onMouseDown=function(e)
{MQEventManager.trigger(this,"mousedown",e);}
MQPoi.prototype.onMouseUp=function(e)
{MQEventManager.trigger(this,"mouseup",e);}
MQPoi.prototype.onMouseOver=function(e)
{if(MQ.utils.isMouseLeaveOrEnter(e,this.element)){this.showRolloverWindow(e);MQEventManager.trigger(this,"mouseover",e);}}
MQPoi.prototype.onMouseOut=function(e)
{if(MQ.utils.isMouseLeaveOrEnter(e,this.element)){if(this.isRolloverShowable())
{this.mqrw.hide();}
MQEventManager.trigger(this,"mouseout",e);}}
MQPoi.prototype.onInfoWindowOpen=function(e)
{this.element.style.zIndex=10;MQEventManager.trigger(this,"infowindowopen",e);}
MQPoi.prototype.onInfoWindowClose=function(e)
{this.showingInfo=false;this.element.style.zIndex=9;MQEventManager.trigger(this,"infowindowclose",e);}
MQPoi.prototype.onRolloverOpen=function(e)
{this.element.style.zIndex=11;MQEventManager.trigger(this,"rolloveropen",e);}
MQPoi.prototype.onRolloverClose=function(e)
{this.element.style.zIndex=9;MQEventManager.trigger(this,"rolloverclose",e);}
MQPoi.prototype.onRemoved=function(e)
{MQEventManager.trigger(this,"removed",e);}
MQPoi.prototype.getLatLng=function()
{return new MQLatLng(this.element.ll.lat,this.element.ll.lng);}
MQPoi.prototype.setLatLng=function(mqLatLng)
{this.element.ll=new MQLatLng(mqLatLng.getLatitude(),mqLatLng.getLongitude());this.redraw();}
MQPoi.prototype.getIcon=function()
{return this.mqMapIcon;}
MQPoi.prototype.setIcon=function(mqMapIcon)
{this.element.removeChild(this.mqMapIcon.getElement());this.mqMapIcon=mqMapIcon;this.element.appendChild(this.mqMapIcon.getElement());this.mqMapIcon.parentpoi=this;this.redraw();}
MQPoi.prototype.isIconVisible=function()
{return(this.mqMapIcon.getElement().style.display!="none"?true:false);}
MQPoi.prototype.setIconVisible=function(b)
{if(b)
this.mqMapIcon.getElement().style.display="block";else
this.mqMapIcon.getElement().style.display="none";}
MQPoi.prototype.getKey=function()
{return this.key;}
MQPoi.prototype.setKey=function(key)
{this.key=key;}
MQPoi.prototype.isVisible=function()
{return(this.element.style.display!="none"?true:false);}
MQPoi.prototype.setVisible=function(b)
{if(b)
this.element.style.display="block";else
this.element.style.display="none";}
MQPoi.prototype.getLabel=function()
{return(this.labelText==null)?"":this.labelText.data;}
MQPoi.prototype.setLabel=function(label,className)
{if(!this.labelDiv){this.labelDiv=document.createElement("div");this.labelDiv.className="mq-poi-label";this.labelDiv.style.MozUserSelect="none";this.labelDiv.onselectstart=function(){return false;};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=label;if(!className)
{this.labelDiv.className="mq-poi-label";this.redrawLabel();}
else
{this.labelDiv.className=className;}}
MQPoi.prototype.getLabelStyle=function()
{return this.labelDiv.style;}
MQPoi.prototype.isLabelVisible=function()
{return(this.labelDiv.style.display!="none"?true:false);}
MQPoi.prototype.setLabelVisible=function(b)
{if(b)
{this.labelDiv.style.display="block";this.redrawLabel();}
else
this.labelDiv.style.display="none";}
MQPoi.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 width=(this.mqMapIcon.getImage())?this.mqMapIcon.getImage().style.width:this.mqMapIcon._defImageWidth;var height=(this.mqMapIcon.getImage())?this.mqMapIcon.getImage().height:this.mqMapIcon._defImageHeight;this.labelDiv.style.left=(parseInt(width)/2-this.labelSpan.offsetWidth/2)+"px";this.labelDiv.style.top=height+"px";};};}
MQPoi.prototype.redraw=function()
{if(!this.map)return;this.map.UpdatePOI(this.element.ll,this.mqMapIcon.getAnchorOffset(),this.element);this.redrawLabel();}
MQPoi.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.mqrw.setOpenerAndShow(this);this.onRolloverOpen(new MQEvent());}}
MQPoi.prototype.showInfoWindow=function()
{if(this.infoWindowContent!=null)
{if(this.mqiw==null)
{this.mqiw=this.map.getInfoWindow();}
if(this.isRolloverShowable())
{this.mqrw.hide();}
this.element.appendChild(this.mqiw.popup);this.mqiw.modify(this.map.GetLLToXY(this.element.ll),this.rolloverContent,this.infoWindowContent,this.getIcon().getInfoWindowAnchor());this.mqiw.setOpenerAndShow(this);this.showingInfo=true;this.onInfoWindowOpen(new MQEvent());}}
MQPoi.prototype.setInfoTitleHTML=function(title)
{var container=document.createElement("div");container.innerHTML="<div>"+title+"</div>";this.rolloverContent=container;}
MQPoi.prototype.setInfoContentHTML=function(content)
{var container=document.createElement("div");container.innerHTML="<div>"+content+"</div>";this.infoWindowContent=container;}
MQPoi.prototype.setInfoTitleElement=function(titleContainer)
{this.rolloverContent=titleContainer;}
MQPoi.prototype.setInfoContentElement=function(contentContainer)
{this.infoWindowContent=contentContainer;}
MQPoi.prototype.setRolloverEnabled=function(benable)
{this.rolloverEnabled=benable;}
MQPoi.prototype.isRolloverEnabled=function()
{return this.rolloverEnabled;}
MQPoi.prototype.isRolloverShowable=function()
{return this.isRolloverEnabled()&&this.map.getRolloversEnabled()&&(this.rolloverContent!=null)&&!this.showingInfo;}
MQPoi.prototype.getInfoWindow=function()
{return this.mqiw;}
function MQInfoWindow(map)
{this.map=map;this.enabled=true;this.point=null;this.title=null;this.content=null;this.offset=null;this.maxwidth=null;this.opener=null;this.artUrl="http://img.mqcdn.com/mqtoolkit/";this.popup=document.createElement("div");this.popup.id="popupcontainer";this.popup.className="mqpoipopup";this.popup.currentElement=null;this.popup.oncontextmenu=function(){return false;};var str="<img id='poiclose' src='"+this.artUrl+"stc-close' class='mqpoiclose'/>";str+="<div id='popuptop' class='mqpoitop'></div>";str+="<div id='popupcenter' class='mqpoicenter'><div id='popupinfocontainer' style='padding-right:10px'><ol id='popupol' class='results'></ol></div></div>";str+="<div id='popupbottom' class='mqpoibottom'></div>";this.popup.innerHTML=str;this.popup.style.position="absolute";this.popup.style.visibility="hidden";document.body.appendChild(this.popup);var poiclose=this.popup.childNodes[0];Event.observe(poiclose,"click",MQEventCallback(this,"clickClose"));this.popup.content=this.popup.childNodes[2].childNodes[0].childNodes[0];if(getBrowserInfo().name=='msie')
{if(parseFloat(getBrowserInfo().version)<7.0){$("popupcenter").style.height="4px";}else{$("popupcenter").style.height="100%";}
$("popuptop").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-top.png', sizingMethod='scale')";$("popupcenter").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-center.png', sizingMethod='scale')";$("popupbottom").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-bottom-left.png', sizingMethod='scale')";}
else
{$("popuptop").style.background="transparent url("+this.artUrl+"popup-top.png) no-repeat left";$("popupcenter").style.background="transparent url("+this.artUrl+"popup-center.png) left";$("popupbottom").style.background="transparent url("+this.artUrl+"popup-bottom-left.png) no-repeat left";}}
MQInfoWindow.prototype.onOpen=function(e)
{MQEventManager.trigger(this,"opened",e);}
MQInfoWindow.prototype.onClose=function(e)
{MQEventManager.trigger(this,"closed",e);}
MQInfoWindow.prototype.onClickedClosed=function(e)
{MQEventManager.trigger(this,"clickedclosed",e);}
MQInfoWindow.prototype.clickClose=function(evt)
{this.hide();this.onClickedClosed(evt);}
MQInfoWindow.prototype.hide=function()
{if(!this.isHidden())
{if(this.popup.style.visibility!="hidden")this.popup.style.visibility="hidden";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 MQEvent());this.opener=null;}
this.onClose(new MQEvent());}}
MQInfoWindow.prototype.setOpenerAndShow=function(opener)
{this.show();this.opener=opener;}
MQInfoWindow.prototype.show=function()
{if(!this.isHidden())this.hide();var offsetY=this.offset.y;var offsetHeight=this.popup.offsetHeight-17;var offsetX=this.offset.x;var offsetWidth=27;this.popup.style.top=(offsetY-offsetHeight)+"px";this.popup.style.left=(offsetX-offsetWidth)+"px";this.popup.style.visibility="visible";this.avoidPopupCollisions(this.popup);this.onOpen(new MQEvent());}
MQInfoWindow.prototype.isHidden=function()
{return(this.popup.style.visibility=="hidden");}
MQInfoWindow.prototype.modify=function(point,title,content,offset)
{if(point)this.point=point;if(title)this.title=title;if(content)this.content=content;this.offset=new PointXY(0,0);if(offset)this.offset=offset;this.popup.style.position="absolute";this.popup.style.zIndex=9;this.popup.content.innerHTML="<div class='mqpoiheading'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";}
MQInfoWindow.prototype.getMaxWidth=function()
{return this.maxWidth;}
MQInfoWindow.prototype.setMaxWidth=function(width)
{this.maxWidth=width;}
MQInfoWindow.prototype.getPointLL=function()
{return this.map.GetXYToLL(this.point);}
MQInfoWindow.prototype.getPointXY=function()
{return this.point;}
MQInfoWindow.prototype.getPixelOffset=function()
{return this.offset;}
MQInfoWindow.prototype.avoidPopupCollisions=function(popup){var collisionInfo=this.getCollisionInfo(popup);if(collisionInfo.panX!=0||collisionInfo.panY!=0){this.map.SlideMapByOffset(new PointXY(collisionInfo.panX,collisionInfo.panY));}}
MQInfoWindow.prototype.getCollisionInfo=function(element)
{var mapElement=this.map.parent;var collisionInfo={panX:0,panY:0};var mapLftTop=MQ.utils.getOffsetLftTop(mapElement);var elemPos=Position.cumulativeOffset(element);var leftTopPad=10;elemPos[0]=elemPos[0]-mapLftTop.left-leftTopPad;elemPos[1]=elemPos[1]-mapLftTop.top-leftTopPad;var compassDims={width:37,height:300}
var viewBtnDims={width:139,height:15}
var leftBound=(elemPos[0]<compassDims.width&&elemPos[1]<compassDims.height+leftTopPad)?compassDims.width:0;var topBound=(elemPos[0]+element.clientWidth>mapElement.clientWidth-viewBtnDims.width&&elemPos[1]<viewBtnDims.height+leftTopPad)?viewBtnDims.height:0;if(element.clientWidth>0&&element.clientHeight>0){if(elemPos[0]<leftBound){collisionInfo.panX=Math.abs(elemPos[0]-leftBound);}
else if(elemPos[0]+leftTopPad+element.clientWidth>mapElement.clientWidth){collisionInfo.panX=-1*(element.clientWidth+elemPos[0]+leftTopPad-mapElement.clientWidth);}
if(elemPos[1]<topBound){collisionInfo.panY=Math.abs(elemPos[1]-topBound);}
else if(elemPos[1]+element.clientHeight>mapElement.clientHeight){collisionInfo.panY=mapElement.clientHeight-elemPos[1]-element.clientHeight;}}
return collisionInfo;}
MQInfoWindow.prototype.getOpener=function()
{return this.opener;}
function MQRolloverWindow(map)
{this.map=map;this.enabled=true;this.point=null;this.title=null;this.content=null;this.offset=new MQPoint(0,0);this.opener=null;this.maxwidth=null;this.artUrl="http://img.mqcdn.com/mqtoolkit/";this.minipopup=document.createElement("div");this.minipopup.id="minipopup";this.minipopup.className="mqminipopup";this.minipopup.currentElement=null;this.minipopup.oncontextmenu=function(){return false;};if(getBrowserInfo().name!="msie"){this.minipopup.style.background="url("+this.artUrl+"rollover-left.png) left";}
if(getBrowserInfo().name=="msie")
{this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"rollover-left.png', sizingMethod='scale')";}
else
{this.minipopup.style.background="";this.minipopup.style.background="url("+this.artUrl+"rollover-left.png) left";}
document.body.appendChild(this.minipopup);this.minipopup.style.position="absolute";this.minipopup.style.visibility="hidden";}
MQRolloverWindow.prototype.onOpen=function(e)
{MQEventManager.trigger(this,"opened",e);}
MQRolloverWindow.prototype.onClose=function(e)
{MQEventManager.trigger(this,"closed",e);}
MQRolloverWindow.prototype.hide=function(evt)
{if(!this.isHidden())
{if(this.minipopup.style.visibility!="hidden")this.minipopup.style.visibility="hidden";if(this.opener!=null)
{this.opener.onRolloverClose(new MQEvent());this.opener=null;}
this.onClose(new MQEvent());}}
MQRolloverWindow.prototype.setOpenerAndShow=function(opener)
{this.opener=opener;this.show();}
MQRolloverWindow.prototype.show=function()
{if(!this.isHidden())this.hide();var offsetY=this.offset.y;var offsetHeight=this.minipopup.offsetHeight-13;var offsetX=this.offset.x;var offsetWidth=25;this.minipopup.style.top=(offsetY-offsetHeight)+"px";this.minipopup.style.left=(offsetX-offsetWidth)+"px";this.minipopup.style.visibility="visible";this.onOpen(new MQEvent());}
MQRolloverWindow.prototype.isHidden=function()
{return(this.minipopup.style.visibility=="hidden");}
MQRolloverWindow.prototype.modify=function(point,content,offset)
{if(point)this.point=point;if(content)this.content=content;if(offset)this.offset=offset;this.minipopup.style.position="absolute";this.minipopup.style.zIndex=9;this.minipopup.innerHTML="<div class='mqminipopuphead'>"+this.content.innerHTML+"</div>";}
MQRolloverWindow.prototype.getMaxWidth=function()
{return this.maxWidth;}
MQRolloverWindow.prototype.setMaxWidth=function(width)
{this.maxWidth=width;}
MQRolloverWindow.prototype.getPointLL=function()
{return this.map.GetXYToLL(this.point);}
MQRolloverWindow.prototype.getPointXY=function()
{return this.point;}
MQRolloverWindow.prototype.getPixelOffset=function()
{return this.offset;}
function MQEvent()
{this.type="event";}
var MQEventManager=new function()
{this.addListener=function(source,eventType,handler,target)
{if(!this.observers)this.observers=[];if(target==null)target=source;this.observers.push([source,eventType,handler,target]);}
this.removeListener=function(source,eventType,handler,target)
{if(this.observers)
{if(target==null)target=source;for(x=this.observers.length-1;x>=0;x--)
{var cache=this.observers[x];if(cache[0]==source&&cache[1]==eventType&&cache[2]==handler&&cache[3]==target)
this.observers.splice(x,1);}}}
this.clearListeners=function(source,eventType)
{if(this.observers)
{for(x=this.observers.length-1;x>=0;x--)
{var cache=this.observers[x];if(cache[0]==source)
{if(eventType&&cache[1]!=eventType)continue;this.observers.splice(x,1);}}}}
this.trigger=function(source,eventType,event)
{if(this.observers)
{event=event||{type:event};this.observers.each(function(cache){if(cache[0]==source&&cache[1]==eventType)
cache[2].call(cache[3],event);});}}}
function MQDeclutter(map)
{this.map=map;this.mode=0;this.declutterIcon=null;this.dcCollection=null;this.pnIcons=null;this.nextPageIcon=null;this.prevPageIcon=null;this.stackHeight=2;this.stackWidth=5;this.currentPage=1;};MQDeclutter.prototype.setDeclutterMode=function(declutterMode)
{if(declutterMode!=0){if(this.mode!=0)this.doDeclutter(0);if(!this.declutterIcon)this.setDeclutterIcon('http://img.mqcdn.com/mqtoolkit/declut_star.png',29,29);if(!this.nextPageIcon)this.setNextPageIcon('http://img.mqcdn.com/mqtoolkit/page_right.png',29,13);if(!this.prevPageIcon)this.setPrevPageIcon('http://img.mqcdn.com/mqtoolkit/page_left.png',29,13);this.dcCollection=new Array;this.pnIcons=new Array(null,null);this.currentPage=1;this.map.getInfoWindow().hide();this.doDeclutter(declutterMode);}else{this.doDeclutter(0);};this.mode=declutterMode;};MQDeclutter.prototype.doDeclutter=function(dcmode)
{var i;var x=100;var y=50;var pageSize=this.stackHeight*this.stackWidth;var pageNum=1;var newPage=false;var xPos;var yPos;var origXPos;var origYPos;var dcSpacer=1;var dcOffset=5;var dcVisible=true;switch(dcmode){case 0:if(this.mode){for(i=0;i<this.dcCollection.length;i++){this.dcCollection[i].poi.setVisible(true);this.dcCollection[i].setVisible(false);this.dcCollection[i]=null;};if(this.pnIcons[0]){this.pnIcons[0].setVisible(false);this.pnIcons[1].setVisible(false);};};break;case 1:var poiWidth,poiHeight;var xy1,xy2;var currRect;var intersect;var i,x;var dcLatLng;var myCollection=this.map.getPois();var sortedArray=new Array;var dcCount=0;for(i=0;i<myCollection.getSize();i++){sortedArray[i]=new Array(myCollection.getAt(i).getLatLng().getLatitude(),myCollection.getAt(i).getLatLng().getLongitude(),i,0);};sortedArray.sort(this.sortPois);var dcRect=new RectXY(new PointXY(0,0),new PointXY(0,0));var prevRect=new RectXY(new PointXY(0,0),new PointXY(0,0));for(i=0;i<sortedArray.length;i++){poiWidth=myCollection.getAt(i).getIcon().getImage().width+2;poiHeight=myCollection.getAt(i).getIcon().getImage().height+2;xy1=this.map.GetLLToXY(new PointLL(sortedArray[i][0],sortedArray[i][1]));xy1.x-=Math.ceil(poiWidth/2);xy1.y-=Math.ceil(poiHeight/2);xy2=new PointXY(xy1.x+poiWidth,xy1.y+poiHeight);currRect=new RectXY(xy1,xy2);intersect=false;for(x=i-1;x>=0;x--){if(sortedArray[x][3]==0){xy1=this.map.GetLLToXY(new PointLL(sortedArray[x][0],sortedArray[x][1]));xy1.x-=Math.ceil(poiWidth/2);xy1.y-=Math.ceil(poiHeight/2);xy2=new PointXY(xy1.x+poiWidth,xy1.y+poiHeight);prevRect=new RectXY(xy1,xy2);intersect=intersect||this.isIntersected(currRect,prevRect);};if(intersect){sortedArray[i][3]=1;break;};};intersect=intersect||this.isIntersected(dcRect,currRect);if(intersect){dcLatLng=myCollection.getAt(sortedArray[i][2]).getLatLng();if(dcCount==0){xPos=(this.map.GetLLToXY(dcLatLng).x-this.declutterIcon.width)-dcOffset;xPos-=Math.ceil(poiWidth/2);yPos=(this.map.GetLLToXY(dcLatLng).y-this.declutterIcon.height)-dcOffset;yPos-=Math.ceil(poiHeight/2);origXPos=xPos;origYPos=yPos;dcRect.ul.x=xPos;dcRect.ul.y=yPos-(this.nextPageIcon.height+dcSpacer);dcRect.lr.x=xPos+this.declutterIcon.width+dcOffset;dcRect.lr.y=yPos+this.declutterIcon.height+dcOffset;}else{if(dcCount==(pageSize*pageNum)){xPos=origXPos+(this.declutterIcon.width+dcSpacer);yPos=origYPos+(this.declutterIcon.height+dcSpacer);newPage=true;pageNum++;dcVisible=false;};if((dcCount%this.stackHeight)!=0){yPos-=(this.declutterIcon.height+dcSpacer);if((dcCount+1)<=this.stackHeight){dcRect.ul.y-=(this.declutterIcon.height+dcSpacer);};}else{xPos-=(this.declutterIcon.width+dcSpacer);yPos=origYPos;if(!newPage){dcRect.ul.x-=(this.declutterIcon.width+dcSpacer)};};if(newPage){if(!this.pnIcons[0]){this.pnIcons[0]=new MQPrevNextIcon(this.prevPageIcon,dcRect.ul.x+dcOffset,dcRect.ul.y,this.map,false,-1);this.pnIcons[1]=new MQPrevNextIcon(this.nextPageIcon,dcRect.lr.x-this.nextPageIcon.width-dcOffset,dcRect.ul.y,this.map,true,1);};};};this.addDeclutterPoi(xPos,yPos,myCollection.getAt(sortedArray[i][2]),dcVisible);dcCount++;};};break;case 2:break;};};MQDeclutter.prototype.sortPois=function(a,b)
{return(b[1]-a[1]);}
MQDeclutter.prototype.isIntersected=function(rect1,rect2)
{var intersect=(rect1.lr.x>rect2.ul.x)&&(rect1.ul.x<rect2.lr.x)&&(rect1.lr.y>rect2.ul.y)&&(rect1.ul.y<rect2.lr.y);return intersect;};MQDeclutter.prototype.getDeclutterMode=function()
{return this.mode;};MQDeclutter.prototype.setDeclutterIcon=function(url,width,height)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.declutterIcon=new MQDeclutterIcon(url,width,height);if(m)this.setDeclutterMode(m);};MQDeclutter.prototype.getDeclutterIcon=function()
{return this.declutterIcon;};MQDeclutter.prototype.setNextPageIcon=function(url,width,height)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.nextPageIcon=new MQDeclutterIcon(url,width,height);if(m)this.setDeclutterMode(m);};MQDeclutter.prototype.getNextPageIcon=function()
{return this.nextPageIcon;};MQDeclutter.prototype.setPrevPageIcon=function(url,width,height)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.prevPageIcon=new MQDeclutterIcon(url,width,height);if(m)this.setDeclutterMode(m);};MQDeclutter.prototype.getPrevPageIcon=function()
{return this.prevPageIcon;};MQDeclutter.prototype.setStackHeight=function(n)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.stackHeight=n;if(m)this.setDeclutterMode(m);};MQDeclutter.prototype.getStackHeight=function()
{return this.stackHeight;};MQDeclutter.prototype.setStackWidth=function(n)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.stackWidth=n;if(m)this.setDeclutterMode(m);};MQDeclutter.prototype.getStackWidth=function()
{return this.stackWidth;};MQDeclutter.prototype.addDeclutterPoi=function(x,y,poi,isVisible)
{var dcpoi=new MQDeclutterPoi(this.map,poi,isVisible);this.dcCollection.push(dcpoi);var ll=this.map.pixToLL(new MQPoint(x,y));this.map.AddPOI(ll,new PointXY(0,0),dcpoi.div);};MQDeclutter.prototype.turnPage=function(direction)
{var i;var pageSize=this.stackHeight*this.stackWidth;var dcIconArraySize=this.dcCollection.length;if(this.currentPage==1&&direction==-1)return;if(((this.currentPage*pageSize)>=dcIconArraySize)&&direction==1)return;this.currentPage=this.currentPage+direction;for(i=0;i<dcIconArraySize;i++){this.dcCollection[i].setVisible(false);};var maxItemIndex=(this.currentPage*pageSize);if(maxItemIndex>dcIconArraySize)maxItemIndex=dcIconArraySize;var startItemIndex=(this.currentPage*pageSize)-pageSize;for(i=startItemIndex;i<maxItemIndex;i++){this.dcCollection[i].setVisible(true);};if(startItemIndex>0){this.pnIcons[0].setVisible(true);}else{this.pnIcons[0].setVisible(false);};if(maxItemIndex<dcIconArraySize){this.pnIcons[1].setVisible(true);}else{this.pnIcons[1].setVisible(false);};};function MQDeclutterPoi(map,poi,isVisible){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');this.div.im.src=this.map.mydeclutter.declutterIcon.url;this.div.im.style.height=this.map.mydeclutter.declutterIcon.height;this.div.im.style.width=this.map.mydeclutter.declutterIcon.width;this.div.im.style.position='absolute';if(isVisible){this.div.im.style.display='block';}else{this.div.im.style.display='none';};this.div.style.MozUserSelect="none";this.div.appendChild(this.div.im);Event.observe(this.div.im,"click",MQEventCallback(poi,"onClick"));Event.observe(this.div.im,"dblclick",MQEventCallback(poi,"onDoubleClick"));Event.observe(this.div.im,"mousedown",MQEventCallback(poi,"onMouseDown"));Event.observe(this.div.im,"mouseup",MQEventCallback(poi,"onMouseUp"));Event.observe(this.div.im,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.div.im,"mouseout",MQEventCallback(this,"onMouseOut"));poi.setVisible(false);};MQDeclutterPoi.prototype.setVisible=function(v)
{if(v){this.div.im.style.display='block';}else{this.div.im.style.display='none';};};function MQPrevNextIcon(ponIcon,x,y,map,isVisible,increment){this.map=map;this.increment=increment;this.div=document.createElement('div');this.div.className="pois";this.div.im=document.createElement('img');this.div.im.src=ponIcon.url;this.div.im.style.position='absolute';if(isVisible){this.div.im.style.display='block';}else{this.div.im.style.display='none';};this.div.im.style.height=ponIcon.height;this.div.im.style.width=ponIcon.width;this.div.style.MozUserSelect="none";this.div.appendChild(this.div.im);this.map.mydeclutter.pnIcons.push(this);var ll=this.map.pixToLL(new MQPoint(x,y));this.map.AddPOI(ll,new PointXY(0,0),this.div);Event.observe(this.div.im,"click",MQEventCallback(this,"onClick"));Event.observe(this.div.im,"dblclick",MQEventCallback(this,"onDblClick"));};MQPrevNextIcon.prototype.setVisible=function(v)
{if(v){this.div.im.style.display='block';}else{this.div.im.style.display='none';};};MQPrevNextIcon.prototype.onClick=function(e)
{this.map.getDeclutter().turnPage(this.increment);};MQPrevNextIcon.prototype.onDblClick=function(e)
{e.stop;};MQDeclutterPoi.prototype.onMouseOut=function(e)
{if(this.poi.showingInfo!=true){this.poi.setVisible(false);};this.poi.onMouseOut(e);};MQDeclutterPoi.prototype.onMouseOver=function(e)
{this.poi.setVisible(true);this.poi.onMouseOver(e);};function MQDeclutterIcon(url,width,height)
{this.url=url;this.width=width;this.height=height;};