i18="tile21.mqcdn.com";i10="btileprint.access.mapquest.com";mqz=Array;j27="btilelog.access.mapquest.com:80";k31="tile23.mqcdn.com";k30="tile22.mqcdn.com";k29="tile24.mqcdn.com";d17=new mqz(i18,k30,k31,k29);b43=new mqz(i18,k30,k31,k29);b22=new mqz(i18,k30,k31,k29);c39=i18;c44=j27;c43=i10;IsDotCom=false;
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=74900;a8=74999;a7=88011773;a6=90;a5=90.0;a4=9000;a3=95;a2=9778;a1=9779086;a0=99991;i50="mqloading";a50=13;i49="&lnglr=";i48="&rand=";i47="auto";i46="&height=";i45="/scales/scalebar.gif' />";i44="mz1copy.gif";i43="no";i42="/?e=0&GetMapFromUpdatedSession.1=1280:";i41="style";i40="&latul=";a49=140818;a48=15;a47=1500;a46=1504475;a45=154950;a44=16;a43=179;a42=18;a41=180;a40=180.0;i39="ak_14";i38="print";i37="url(";i35="hidden";i34="mouseover";i33="mqrtehl";i32="mousedown";i31="mouseup";a39=18000;a38=190;a37=19558;a36=2.0;a35=22;a34=2272;a33=234;a32=234698;a31=250;a30=2500;i29=", ";i28="movestart";i27="/";i26="moveend";i25="&c2=";i24="190";i23="&lng=";i22="click";i21="/tilelog/transaction?transaction=log&t=m&c=";i20="18";a29=250344597.90989706;a28=255;a27=256;a26=29337258;a25=315552459.66191697;a24=324767;a23=352047;a22=3520471;a21=36;a20=360.0;i17="mouseout";i16="loading.gif)";i15="dg_1";i14="relative";i13=",1270:2,1190:,rtehl,";i12="/res/";i11="12";a19=36000;a18=39116;a17=4694;a16=4700;a15=50;a14=502;a13=60;a12=701289;a11=7168;a10=72.0;mqz=Array;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;j50="ak_11";j49="SetTileMode";j48="&width=";j47="/tileprint.php";j46="124";j45="Safari";j44="0px";j43="nothing.gif";j42="#FFFFFF";j41="mqhybdiv";j40="dragstart";j39="/hyb/Scale";j38=",";j37="div";j36="15";j35="/sat/Scale";j34="mqsatdiv";j33="/map/Scale";j31="off";j30="115";j29="ak_12";j28="drag";j26="&key=";j25="dblclick";j24="mz7copy.gif";j23="0.6";j22="ak_9";j21="text/css";j20="move";j19="124px";j18="18px";j17=" );";j16="ak_13";j15="IMG";j14="mjtd%7Clu6tnuuanq%2Cr0%3Do5-lw7gu";j13="on";j12="&lat=";j11="/tilelog/transaction?transaction=log&t=a&c=";j10="550px";b16=0.0;b15=0.40;b14=1.0;b13=1.5;b12=100;b11=100.0;b10=1000;ai_7="absolute";ai_6="block";ai_5="none";ai_4="/scales/zoom";ai_3="px";ai_2=".jpg";ai_1=".gif";k9="-moz-grab";k8="&scale=";k7="dragend";k6="BackgroundImageCache";k5="&latlr=";k4="in core, about to rebuild tiles";k3="mz0copy.gif";k2="repeat";k1="sz1copy.gif";k0="&lngul=";j9="mqpoidiv";j8=", 1, ";j7="mqtiledmap";j6="-moz-grabbing";j5="mqmapdiv";j4="MSIE";j3="95";j2=", 0, 0, ";j1="mqlogo.gif";j0="";i9="/tilelog/transaction?transaction=log&t=h&c=";i8="img";i7="img#mqrtehl { visibility:hidden; display:none }";k28="MASTER_BROKER.DoSlide( ";k27="<img style='-moz-user-select:none;' unselectable='on' src='http://";k26="visible";k25="mqcopy.gif";k24="grab.cur";k23="0";k22="mousemove";k21="mqstaticmapdiv";k20="475px";aj="loading.gif";ai="hyb";ah="sat";ag="map";b9=1000000;b8=1000000.0;k19="msie";b7=103;k18="undefined";b6=107;k17="mz4copy.gif";b5=1084;k16="103";b4=109;b3=11;k15="default";b2=115;k14="alpha(opacity='60')";b1=12;k13="&s=";b0=124;k12="grabbing.cur";k11=",1050:6,nodata,1062:1537,,,Visible+False,1062:1577,,,Visible+False,1062:1578,,,Visible+False,1062:764,,,Visible+False,1062:1279,,,polygon+brush+style+solid+color+224%2c224%2c224,1062:765,,,Visible+True+Line+Pen+Style+Solid+Size+150+Color+255%2c0%2c0+Opacity+255+CasePen+Style+Solid+Size+210+Color+255%2c255%2c255+Opacity+255,1650.1:77,72,1,1400.2:,,,";k10="ak_10";Key=j14;MQTileMapCount=0;c7=a25;d6=a29;d26=a27;b45=9;d14=b3;d34=new mqz(0,a7,a26,a1,a22,a46,a12,a24,a45,a8,a19,a39,a4,a16,a30,a47,b10);b25=new mqz(0,4,b1,a21,b12,a33,a14,b5,a34,a17,a2,a37,a18,a9,a49,a32,a23);d8=new mqz(j0,i44,k17,j24,k3);d13=new mqz(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4);c31=ak_8+c39+i12;c10=ak_8+c43+j47;b33=c31+j43;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;c30=a11;b38=a11;BUTTON_MQ_LEFT=0;BUTTON_MQ_MIDDLE=1;BUTTON_MQ_RIGHT=2;MASTER_BROKER=null;SURFACE_OFFSET=2*d26;SAFARI_BROWSER=(navigator.userAgent.indexOf(j45)>=0);function GetMapResources(){return c31;}function GetStaticMapResources(){return c10;}function IncrMQTileMapCount(){MQTileMapCount=MQTileMapCount+1;return MQTileMapCount;}function GetMQTileMapCount(){return MQTileMapCount;}function pause(f_0){var g0=new Date();var h22=g0.getTime()+f_0;while(true){g0=new Date();if(g0.getTime()>h22)return;};};function e13(f_0,f_1){var y=(f_0+a5)*(c7/f_1);var b46=ak_1(y/d26);return b46;};function e44(f_0,f_1){var y=(f_0+a5)*(c7/f_1);var b46=ak_1(y/d26);return (y-b46*d26);};function h13(f_0,f_1,f_2){var y=f_0*d26+f_1;var c47=y/(c7/f_2)-a5;c47=ak_1(c47*b9)/b8;return c47;};function h1(f_0,f_1){var x=(f_0+a40)*(d6/f_1);var b36=ak_1(x/d26);return b36;};function h28(f_0,f_1){var x=(f_0+a40)*(d6/f_1);var b36=ak_1(x/d26);return (x-b36*d26);};function d45(f_0,f_1,f_2){var x=f_0*d26+f_1;var c38=x/(d6/f_2)-a40;c38=ak_1(c38*b9)/b8;while(c38>a40)c38-=a20;while(c38<-a40)c38+=a20;return c38;};function e50(f_0){var b28=new PointXY(0,0);while(f_0){b28.x+=f_0.offsetLeft;b28.y+=f_0.offsetTop;f_0=f_0.offsetParent;};return b28;};function h21(f_0){return f_0+ai_3;};function h9(f_0,f_1,f_2,f_3,f_4,f_5){var c25;c25=document.createElement(j15);c25.galleryimg=i43;c25.lt=f_1;c25.tp=f_2;var d35=c25.style;d35.width=h21(f_3);d35.height=h21(f_4);d35.position=ai_7;d35.left=h21(f_1);d35.top=h21(f_2);d35.zIndex=f_5;d35.MozUserSelect=ai_5;d35.display=ai_6;d35.border=k23;if(f_0.length==0){d35.visibility=i35;}else{d35.visibility=k26;c25.src=f_0;}c25.unselectable=j13;c25.onselectstart=function(){return false;};c25.oncontextmenu=function(){return false;};return c25;};function MQEventCallback(f_0,f_1){var c45=f_0;return function(event){if(c45.turnEventsOff||(c45.f22&&c45.f22.turnEventsOff))return;if(!event)event=window.event;c45[f_1](event);};};function SlideBroker(){this.h18=new mqz();}SlideBroker.prototype={h5:function(f_0){var g25=this.h18.length;this.h18[g25]=f_0;return g25;},DoSlide:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7){this.h18[f_0].ak_18(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7);}};function PointFloatXY(f_0,f_1){this.x=ak_2(f_0);this.y=ak_2(f_1);};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.g19=f_8;this.lt=f_2;this.tp=f_3;var ak_17=this;if(this.parent.h0){this.mag=new Image();if(!SAFARI_BROWSER){this.mag.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mag.image.onload=function(){ak_17.f50();};}else{this.mag.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.e43.appendChild(this.mag.image);}if(this.parent.f4){this.mah=new Image();if(!SAFARI_BROWSER){this.mah.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mah.image.onload=function(){ak_17.f33();};}else{this.mah.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.d42.appendChild(this.mah.image);}if(this.parent.e23){this.mai=new Image();if(!SAFARI_BROWSER){this.mai.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mai.image.onload=function(){ak_17.f45();};}else{this.mai.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.e3.appendChild(this.mai.image);}this.e1(f_2,f_3,f_4,f_5,f_6,f_7);};Tile.prototype={e1:function(f_0,f_1,f_2,f_3,f_4,f_5){var c20=ak_1(f_2/b10);var b17=ak_1(f_3/b10);this.lt=f_0;this.tp=f_1;this.x=f_2;this.y=f_3;while(f_2<0)f_2+=b25[f_5];while(f_2>=b25[f_5])f_2-=b25[f_5];c20=ak_1(f_2/b10);b17=ak_1(f_3/b10);if(this.parent.h0){this.g2=ak_8+d17[f_2%d17.length]+j33+f_4+i27+b17+i27+(f_3-b17*b10)+i27+c20+i27+(f_2-c20*b10)+ai_1;this.mag.image.src=this.g2;this.mag.image.lt=this.lt;this.mag.image.tp=this.tp;this.mag.image.style.left=h21(this.lt);this.mag.image.style.top=h21(this.tp);}if(this.parent.f4){this.g2=ak_8+b22[f_2%b22.length]+j35+f_4+i27+b17+i27+(f_3-b17*b10)+i27+c20+i27+(f_2-c20*b10)+ai_2;this.mah.image.src=this.g2;this.mah.image.lt=this.lt;this.mah.image.tp=this.tp;this.mah.image.style.left=h21(this.lt);this.mah.image.style.top=h21(this.tp);}if(this.parent.e23){this.g2=ak_8+b43[f_2%b43.length]+j39+f_4+i27+b17+i27+(f_3-b17*b10)+i27+c20+i27+(f_2-c20*b10)+ai_1;this.mai.image.src=this.g2;this.mai.image.lt=this.lt;this.mai.image.tp=this.tp;this.mai.image.style.left=h21(this.lt);this.mai.image.style.top=h21(this.tp);}},f15:function(){var ak_17=this;if(this.parent.h0){if(!this.mag){this.mag=new Image();if(!SAFARI_BROWSER){this.mag.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mag.image.onload=function(){ak_17.f50();};}else{this.mag.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.e43.appendChild(this.mag.image);}else{if(!SAFARI_BROWSER){this.mag.image.style.visibility=i35;}else{this.mag.image.src=c31+aj;}}}if(this.parent.f4){if(!this.mah){this.mah=new Image();if(!SAFARI_BROWSER){this.mah.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mah.image.onload=function(){ak_17.f33();};}else{this.mah.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.d42.appendChild(this.mah.image);}else{if(!SAFARI_BROWSER){this.mah.image.style.visibility=i35;}else{this.mah.image.src=c31+aj;}}}if(this.parent.e23){if(!this.mai){this.mai=new Image();if(!SAFARI_BROWSER){this.mai.image=h9(j0,this.lt,this.tp,this.g19,this.g19,0);this.mai.image.onload=function(){ak_17.f45();};}else{this.mai.image=h9(c31+aj,this.lt,this.tp,this.g19,this.g19,0);}this.div.e3.appendChild(this.mai.image);}else{if(!SAFARI_BROWSER){this.mai.image.style.visibility=i35;}else{this.mai.image.src=c31+aj;}}}},f50:function(){if(this.parent.h0){this.mag.image.style.visibility=k26;}},f33:function(){if(this.parent.f4){this.mah.image.style.visibility=k26;}},f45:function(){if(this.parent.e23){this.mai.image.style.visibility=k26;}}};function Map(f_0,f_1,f_2,f_3,f_4){this.h0=true;this.f4=false;this.e23=false;this.g48=false;this.e30=true;this.e29=true;this.e11=ag;this.e47="mag";this.g49=null;this.e20=null;this.f47=0;if(f_3==ah){this.f4=true;this.h0=false;this.e11=f_3;this.e47="mah";}if(f_3==ai){this.f4=true;this.e23=true;this.h0=false;this.e11=f_3;this.e47="mai";}var ak_17=this;window.onunload=function(){ak_17.d40(true);};document.body.onunload=function(){ak_17.d40(true);};if(MASTER_BROKER==null){MASTER_BROKER=new SlideBroker();}this.g26=MASTER_BROKER.h5(ak_17);this.parent=f_0;if(!this.parent.style.height||ak_1(this.parent.style.height)<b12){this.parent.style.width=j10;this.parent.style.height=k20;}this.width=ak_1(this.parent.style.width);this.height=ak_1(this.parent.style.height);if(this.width>b38)this.width=b38;if(this.height>c30)this.height=c30;if(f_4!=null){if(f_4.getBestFitMargin()!=null){this.SetBestFitMargin(f_4.getBestFitMargin())}if(f_4.getBestFitRect()!=null){this.SetBestFitRect(f_4.getBestFitRect());this.SetKeepCenter(f_4.isKeepCenter());f_1=this.GetZoom(f_4.getBestFitRect(),f_2,f_4.isKeepCenter(),f_4.getMinZoom(),f_4.getMaxZoom());if(f_4.isKeepCenter()==false){f_2=this.GetPtLlCenter(f_4.getBestFitRect());}}}this.zoom=(f_1>a44)?a44:ak_1(f_1);this.scale=d34[this.zoom];this.g36=d26;this.centerlat=f_2.lat;this.centerlng=f_2.lng;this.e25=this.centerlat;this.g17=this.centerlng;this.f1=ak_3(this.height/this.g36)+2;this.f17=ak_3(this.width/this.g36)+2;this.g3=false;this.d44=false;this.f43=false;this.e22=null;this.h27=null;this.e49=EVENT_NONE;this.h15=-1;this.g16=j0;this.f40=j0;this.d41=false;this.g14=b16;this.f36=b16;this.g6=b16;this.g13=b16;this.f35=b16;this.g5=b16;this.e45=b16;this.g37=false;this.g30=false;this.div=this.CreateParentDiv(j7,0,0,ai_7,0,0,0,null,null);this.parent.style.overflow=i35;this.parent.style.background=j42;this.parent.style.position=i14;this.parent.style.top=j44;this.parent.style.left=j44;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;this.parent.appendChild(this.div);if(navigator.userAgent.indexOf(j4)>=0)document.execCommand(k6,false,true);this.div.f42=this.CreateParentDiv(i50,0,0,ai_7,0,0,0,(this.f17*d26),(this.f1*d26));this.div.f42.style.backgroundImage=i37+c31+i16;this.div.f42.style.backgroundRepeat=k2;this.div.appendChild(this.div.f42);Event.observe(document,k22,MQEventCallback(this,j22));Event.observe(document,i31,MQEventCallback(this,k10));Event.observe(document,i17,MQEventCallback(this,j50));Event.observe(this.parent,i34,MQEventCallback(this,j29));Event.observe(this.parent,i32,MQEventCallback(this,j16));this.h14(EVENT_DBLCLICK,OPER_RECENTER);this.f25=this.h31(null,j13,ai_5,ai_5,a15);this.f25.id=i33;this.f25.onload=function(){ak_17.e38();};this.f25.onselectstart=function(){return false;};this.f25.oncontextmenu=function(){return false;};this.f25.style.position=ai_7;this.f25.style.opacity=j23;this.f25.style.filter=k14;this.div.appendChild(this.f25);this.f7=document.createElement(i41);this.f7.type=j21;this.f7.media=i38;var d4=i7;if(this.f7.styleSheet){this.f7.styleSheet.cssText=d4;}else{var b40=document.createTextNode(d4);this.f7.appendChild(b40);}document.body.appendChild(this.f7);this.f29=this.h31(null,j13,ai_5,ai_5,null);this.f29.src=c31+aj;this.parent.appendChild(this.f29);this.g34=this.h31(b33,j13,ai_5,ai_5,null);this.parent.appendChild(this.g34);this.e2=this.h31(b33,j13,ai_5,ai_5,null);this.parent.appendChild(this.e2);this.e41=this.h31(b33,j13,ai_5,ai_5,null);this.parent.appendChild(this.e41);this.f44=new mqz(5);this.f44[0]=this.CreateImgLogo(ai_5,j13,0,new PointXY(0,0),ai_7,ai_6,a35,null,a3,a48);this.f44[0].src=c31+j1;this.e31(this.f44[0]);this.parent.appendChild(this.f44[0]);this.f44[1]=document.createElement(j37);this.f44[1].corner=1;this.f44[1].offset=new PointXY(0,0);this.f44[1].style.position=ai_7;this.f44[1].style.display=ai_6;this.f44[1].style.zIndex=a35;this.f44[1].width=j46;this.f44[1].height=i20;this.f44[1].style.overflow=i35;this.f44[1].style.width=j19;this.f44[1].style.height=j18;this.f44[1].innerHTML=k27+c39+i45;this.e31(this.f44[1]);this.parent.appendChild(this.f44[1]);this.f44[2]=this.CreateImgLogo(ai_5,j13,2,new PointXY(0,0),ai_7,ai_6,a35,null,b7,b1);this.f44[2].src=c31+k25;this.e31(this.f44[2]);this.parent.appendChild(this.f44[2]);d43=(this.e11!=ah)?ai_6:ai_5;this.f44[LOGO_MAP_COPY]=this.CreateImgLogo(ai_5,j13,3,new PointXY(0,0),ai_7,d43,a35,null,a38,b1);this.f44[LOGO_MAP_COPY].src=c31+d8[1];this.e31(this.f44[LOGO_MAP_COPY]);this.parent.appendChild(this.f44[LOGO_MAP_COPY]);d43=(this.e11!=ag)?ai_6:ai_5;this.f44[LOGO_SAT_COPY]=this.CreateImgLogo(ai_5,j13,3,new PointXY(0,-a50),ai_7,d43,a35,null,b2,b1);this.f44[LOGO_SAT_COPY].src=c31+k1;this.e31(this.f44[LOGO_SAT_COPY]);this.parent.appendChild(this.f44[LOGO_SAT_COPY]);this.h33=this.div.attachEvent?c31+k24:k9;this.h46=this.div.attachEvent?c31+k12:j6;this.h37=this.h33;this.div.style.cursor=this.h37;this.div.e43=this.CreateParentDiv(j5,0,0,ai_7,0,0,null,null,null);this.div.appendChild(this.div.e43);this.div.d42=this.CreateParentDiv(j34,0,0,ai_7,0,0,null,null,null);this.div.appendChild(this.div.d42);this.div.e3=this.CreateParentDiv(j41,0,0,ai_7,0,0,null,null,null);this.div.appendChild(this.div.e3);this.div.e6=this.CreateParentDiv(k21,0,0,ai_7,0,0,a13,null,null);this.div.appendChild(this.div.e6);this.div.g27=this.CreateParentDiv(j9,0,0,ai_7,0,0,a6,null,null);this.div.g27.style.cursor=i47;this.div.g27.UNSELECTABLE=j31;this.div.appendChild(this.div.g27);this.RebuildTiles();};Map.prototype={GetZoom:function(f_0,f_1,f_2,f_3,f_4,f_5){var f_5=(typeof(f_5)!=k18)?f_5:this.getSize();if(f_2==null)f_2=false;if(f_3==null){f_3=1;}else{f_3=ak_1(f_3);if(f_3<1||f_3>a48){f_3=1;}}if(f_4==null){f_4=a44;}else{f_4=ak_1(f_4);if(f_4<1||f_4>a44){f_4=a44;}if(f_4<f_3){f_4=f_3+1;}}var zoom=f_3;var e46=f_4;var g21=new PointFloatXY((f_0.ul.lng+a40)*(d6/d34[zoom]),(f_0.ul.lat+a5)*(c7/d34[zoom]));var h8=new PointFloatXY((f_0.lr.lng+a40)*(d6/d34[zoom]),(f_0.lr.lat+a5)*(c7/d34[zoom]));var e33=new PointLL(f_0.ul.lat,f_0.ul.lng);var f24=new PointLL(f_0.lr.lat,f_0.lr.lng);var width=ak_6(f24.lng-e33.lng)*(d6/d34[zoom]);var height=ak_6(f24.lat-e33.lat)*(c7/d34[zoom]);if(f_2==true){var g46=new PointFloatXY((f_1.lng+a40)*(d6/d34[zoom]),(f_1.lat+a5)*(c7/d34[zoom]));var h20=ak_7(ak_6(g46.x-g21.x),ak_6(g46.x-h8.x));var e18=ak_7(ak_6(g46.y-g21.y),ak_6(g46.y-h8.y));width=h20*2;height=e18*2;}var f47=(this.f47<(f_5.width/2)&&this.f47<(f_5.height/2)?this.f47:Math.round(Math.min(((f_5.width/2)-1),((f_5.height/2)-1))));var scale=ak_7((d34[zoom]*(width/(f_5.width-(f47*2)))),(d34[zoom]*(height/(f_5.height-(f47*2)))));if(scale>d34[zoom]){return zoom;}while(scale<d34[zoom]&&zoom<=e46){zoom++;}return zoom-1;},GetPtLlCenter:function(f_0){var e33=new PointLL(f_0.ul.lat,f_0.ul.lng);var f24=new PointLL(f_0.lr.lat,f_0.lr.lng);var f16=new PointLL(((e33.lat+f24.lat)/a36),((e33.lng+f24.lng)/a36));return f16;},RebuildTiles:function(f_0){this.e25=this.centerlat;this.g17=this.centerlng;this.i2=h1(this.centerlng,this.scale);this.i0=e13(this.centerlat,this.scale);this.i3=h28(this.centerlng,this.scale);this.i1=this.g36-e44(this.centerlat,this.scale);this.h34=ak_4(this.i3);this.i6=ak_4(this.i1);this.h49=ak_1(this.width/2)-this.h34;this.h47=ak_1(this.height/2)-this.i6;this.h36=0;this.h35=0;while(this.h49<0){this.h49+=this.g36;this.h36--;this.i2++;};while(this.h47<0){this.h47+=this.g36;this.h35--;this.i0--;};while(this.h49>2*this.g36){this.h49-=this.g36;this.h36++;this.i2--;};while(this.h47>2*this.g36){this.h47-=this.g36;this.h35++;this.i0++;};this.h45=this.h49;this.h44=this.h47;while(this.h45>this.g36)this.h45-=this.g36;while(this.h44>this.g36)this.h44-=this.g36;this.h39=0;this.h38=0;this.i5=0;this.i4=0;this.h50=0;this.h48=0;this.h41=0;this.h40=0;this.h43=0;this.h42=0;this.e45=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;f_0=(typeof(f_0)==k18)?false:f_0;if(this.e22==null){this.e22=new mqz(this.f17);for(var a=0;a<this.f17;a++){this.e22[a]=new mqz(this.f1);for(var b=0;b<this.f1;b++){this.e22[a][b]=new Tile(this,this.div,(a-2)*this.g36+this.h49,(b-2)*this.g36+this.h47,this.i2-2+a,this.i0+2-b,this.scale,this.zoom,this.g36);}}}else{for(var a=0;a<this.f17;a++){for(var b=0;b<this.f1;b++){this.e22[a][b].f15();}}for(var a=0;a<this.f17;a++){for(var b=0;b<this.f1;b++){this.e22[a][b].e1((a-2)*this.g36+this.h49,(b-2)*this.g36+this.h47,this.i2-2+a,this.i0+2-b,this.scale,this.zoom,this.g36);}}}this.div.f42.tp=this.e22[0][0].tp;this.div.f42.lt=this.e22[0][0].lt;this.div.f42.style.top=h21(this.div.f42.tp);this.div.f42.style.left=h21(this.div.f42.lt);this.f44[1].childNodes[0].style.marginTop=-((this.zoom-1)*ak_1(this.f44[1].height))+ai_3;this.f44[LOGO_MAP_COPY].src=c31+d8[d13[this.zoom]];if(this.h0){this.g14+=b14;this.g13+=b14;}if(this.f4){this.f36+=b14;this.f35+=b14;}if(this.e23){this.g6+=b14;this.g5+=b14;}if(this.g48){this.f25.style.display=ai_5;this.g33();}if(!f_0&&this.f14){var y=this.f14.length;for(var x=0;x<y;x++){var e0=this.f14[x];var b48=this.GetLLToXY(e0.ll);e0.style.left=(b48.x+e0.offset.x-this.h39)+ai_3;e0.style.top=(b48.y+e0.offset.y-this.h38)+ai_3;}}},TilesExist:function(){return (this.e22!=null);},e31:function(f_0){var b18;var b32;if(f_0.corner==0){b18=0;b32=0;}else if(f_0.corner==1){b18=this.width-ak_1(f_0.width);b32=0;}else if(f_0.corner==2){b18=0;b32=this.height-ak_1(f_0.height);}else if(f_0.corner==3){b18=this.width-ak_1(f_0.width);b32=this.height-ak_1(f_0.height);}b18+=f_0.offset.x;b32+=f_0.offset.y;f_0.style.left=b18+ai_3;f_0.style.top=b32+ai_3;},SetLogoZindex:function(f_0,f_1){f_0=ak_1(f_0);f_1=ak_1(f_1);var g41=this.f44[f_0];if(g41.style){g41.style.zIndex=f_1;}},h14:function(f_0,f_1){if(this.e49==EVENT_CLICK){Event.stopObserving(this.parent,i22,this.e12);}else if(this.e49==EVENT_DBLCLICK){Event.stopObserving(this.parent,j25,this.e12);}this.e49=f_0;this.h15=f_1;if(this.e49==EVENT_CLICK){this.e12=MQEventCallback(this,i39);Event.observe(this.parent,i22,this.e12);}else if(this.e49==EVENT_DBLCLICK){this.e12=MQEventCallback(this,i15);Event.observe(this.parent,j25,this.e12);}},d40:function(f_0){if(this.h0&&this.g14>b16){this.g34.src=ak_8+c44+i21+(ak_1(this.g14*b9)/b8)+i25+(ak_1(this.g13*b9)/b8)+k13+this.scale+j12+this.e25+i23+this.g17+j26+Key+i48+ak_4(ak_5()*a0);this.g14=b16;this.g13=b16;}if(this.f4&&this.f36>b16){this.e2.src=ak_8+c44+j11+(ak_1(this.f36*b9)/b8)+i25+(ak_1(this.f35*b9)/b8)+k13+this.scale+j12+this.e25+i23+this.g17+j26+Key+i48+ak_4(ak_5()*a0);this.f36=b16;this.f35=b16;}if(this.e23&&this.g6>b16){this.e41.src=ak_8+c44+i9+(ak_1(this.g6*b9)/b8)+i25+(ak_1(this.g5*b9)/b8)+k13+this.scale+j12+this.e25+i23+this.g17+j26+Key+i48+ak_4(ak_5()*a0);this.g6=b16;this.g5=b16;}this.h41=0;this.h40=0;if(f_0!=null&&f_0==true)pause(a31);},g33:function(){var c1=e13(this.h27.ul.lat,this.scale);var c3=h1(this.h27.ul.lng,this.scale);var c41=e13(this.h27.lr.lat,this.scale);var c42=h1(this.h27.lr.lng,this.scale);this.h25=-1;this.d48=2;if(this.e22==null){this.RebuildTiles();}var b30=this.e22[0][0];var c37=this.e22[this.f17-1][this.f1-1];if(c3>b30.x&&c1<b30.y&&c42<c37.x&&c41>c37.y){this.h25=0;this.d48=-1;b30=this.e22[c3-b30.x][b30.y-c1];c37=this.e22[this.f17-1-(c37.x-c42)][this.f1-1-(c41-c37.y)];}var c32=h13(b30.y+this.h25*-1,a28,this.scale);var c2=d45(b30.x-1+this.h25*1,a28,this.scale);var d33=h13(c37.y-1+this.h25*1,a28,this.scale);var d5=d45(c37.x+this.h25*-1,a28,this.scale);var b34=(1+(c37.x+this.h25*-1)-(b30.x+this.h25*1))*this.g36;var c29=(1+(b30.y+this.h25*-1)-(c37.y+this.h25*1))*this.g36;this.h50=0;this.h48=0;if(this.zoom<3&&c2>b16&&this.centerlng<b16){c2-=a20;}var d37=!((c2>this.h27.lr.lng)||(d5<this.h27.ul.lng)||(d33>this.h27.ul.lat)||(c32<this.h27.lr.lat));if(this.h25==0||d37){this.f25.lt=(b30.lt+this.h25*this.g36+1);this.f25.tp=(b30.tp+this.h25*this.g36+1);this.f25.style.left=this.f25.lt+ai_3;this.f25.style.top=this.f25.tp+ai_3;this.f25.style.width=b34+ai_3;this.f25.style.height=c29+ai_3;if(this.f40.length>0){var c17=(c32+d33)/a36;var c9=(c2+d5)/a36;this.f25.src=this.g16+i42+this.f40+i13+c17+j38+c9+j38+(b34/a10)+j38+(c29/a10)+j38+this.scale+k11+i48+ak_4(ak_5()*a0);}else{this.f25.src=this.g16+i40+c32+k0+c2+k5+d33+i49+d5+j48+b34+i46+c29+k8+this.scale+i48+ak_4(ak_5()*a0);}}},e38:function(){this.f25.style.display=ai_6;},d38:function(f_0,f_1){this.g37=true;if(f_0!=0||f_1!=0)this.HandleMove(j20);if((f_0!=0||f_1!=0)&&this.d44)this.HandleDrag(j28);this.h39+=f_0;this.h38+=f_1;this.i5+=f_0;this.i4+=f_1;this.h43+=f_0;this.h42+=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 b41=b16;while(this.i5+this.h45>d26){this.e22.unshift(this.e22.pop());for(var b=0;b<this.f1;b++){this.e22[0][b].f15();}for(var b=0;b<this.f1;b++){var ak_15=this.e22[0][b];var ak_16=this.e22[1][b];ak_15.e1(ak_16[this.e47].image.lt-this.g36,ak_15[this.e47].image.tp,ak_16.x-1,ak_15.y,this.scale,this.zoom);}this.i5-=this.g36;this.h50--;this.h41--;b41+=(this.f1-2);this.div.f42.lt-=d26;this.div.f42.style.left=h21(this.div.f42.lt);}while(this.i5+this.h45<0){this.e22.push(this.e22.shift());for(var b=0;b<this.f1;b++){this.e22[this.f17-1][b].f15();}for(var b=0;b<this.f1;b++){var ak_15=this.e22[this.f17-1][b];var ak_16=this.e22[this.f17-2][b];ak_15.e1(ak_16[this.e47].image.lt+this.g36,ak_15[this.e47].image.tp,ak_16.x+1,ak_15.y,this.scale,this.zoom);}this.i5+=this.g36;this.h50++;this.h41++;b41+=(this.f1-2);this.div.f42.lt+=d26;this.div.f42.style.left=h21(this.div.f42.lt);}while(this.i4+this.h44>d26){for(var a=0;a<this.f17;a++){this.e22[a].unshift(this.e22[a].pop());this.e22[a][0].f15();}for(var a=0;a<this.f17;a++){var ak_15=this.e22[a][0];var ak_16=this.e22[a][1];ak_15.e1(ak_15[this.e47].image.lt,ak_16[this.e47].image.tp-this.g36,ak_15.x,ak_16.y+1,this.scale,this.zoom);}this.i4-=this.g36;this.h48--;this.h40--;b41+=(this.f17-2);this.div.f42.tp-=d26;this.div.f42.style.top=h21(this.div.f42.tp);}while(this.i4+this.h44<0){for(var a=0;a<this.f17;a++){this.e22[a].push(this.e22[a].shift());this.e22[a][this.f1-1].f15();}for(var a=0;a<this.f17;a++){var ak_15=this.e22[a][this.f1-1];var ak_16=this.e22[a][this.f1-2];ak_15.e1(ak_15[this.e47].image.lt,ak_16[this.e47].image.tp+this.g36,ak_15.x,ak_16.y-1,this.scale,this.zoom);}this.i4+=this.g36;this.h48++;this.h40++;b41+=(this.f17-2);this.div.f42.tp+=d26;this.div.f42.style.top=h21(this.div.f42.tp);}if(this.h39>1*b25[this.zoom]*this.g36){this.h39-=b25[this.zoom]*this.g36;}if(this.h39<-1*b25[this.zoom]*this.g36){this.h39+=b25[this.zoom]*this.g36;}if(b41>b16){b41=b41/((this.f17-2)*(this.f1-2)*9);if(this.h0)this.g14+=b41;if(this.f4)this.f36+=b41;if(this.e23)this.g6+=b41;}if(ak_6(this.h40)>4||ak_6(this.h41)>4){this.d40();}var h12=ak_6(this.h39)%SURFACE_OFFSET;var h11=ak_6(this.h38)%SURFACE_OFFSET;var g12=ak_3(SURFACE_OFFSET/b13);if((h12>g12)&&this.e30){this.HandleOverlays();this.e30=false;};if((h11>g12)&&this.e29){this.HandleOverlays();this.e29=false;};if(h12<g12&&!this.e30)this.e30=true;if(h11<g12&&!this.e29)this.e29=true;if(this.g48&&(this.d48>0)&&(this.h48>=this.d48||this.h48<=this.d48*-1||this.h50>=this.d48||this.h50<=this.d48*-1)){this.f25.style.display=ai_5;this.g33();}},ak_18:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6,f_7){var f13=f_5/f_6;var g45=ak_1(f13*f_3)-f_1;var g44=ak_1(f13*f_4)-f_2;this.d38(g45,g44);f_1+=g45;f_2+=g44;f_5++;if(f_5<=f_6){setTimeout(k28+f_0+i29+f_1+i29+f_2+i29+f_3+i29+f_4+i29+f_5+i29+f_6+i29+f_7+j17,f_7);}else{this.f43=false;this.g37=false;this.HandleMove(i26);}},f46:function(f_0){if(this.f14==null)return false;while(f_0!=null&&f_0!=this.parent){var j=this.f14.length;for(var i=0;i<j;i++){if(this.f14[i]==f_0)return true;}f_0=f_0.parentNode;}return false;},ak_9:function(event){if(this.g30){this.g30=false;this.HandleMove(i28);}if(this.f26){this.f26=false;this.HandleDrag(j40);}this.h32=false;this.HandleObjectDrag(event);if(!this.d44||this.g3)return;var f18=e50(this.parent);var h3=event.clientX-f18.x;var h2=event.clientY-f18.y;var g24=ak_1(this.width/2)-h3;var g23=ak_1(this.height/2)-h2;this.e25=h13(this.i0-this.h35,this.g36-this.i1+this.h38+g23,this.scale);this.g17=d45(this.i2+this.h36,this.i3-this.h39-g24,this.scale);var e17=h3-this.e8;var e16=h2-this.e7;this.e8=h3;this.e7=h2;this.d38(e17,e16);},ak_10:function(event){this.HandleObjectDrop(event);if(!this.d44||this.g3)return;this.h37=this.h33;this.div.style.cursor=this.h37;if(!this.h32){var f30=ak_6(this.h43-this.g31);var g8=ak_6(this.h42-this.g29);this.e45+=((f30*g8)+((this.width-f30)*g8)+((this.height-g8)*f30));var d39=((this.e45/(this.width*this.height))>=b15);if(this.h0&&d39){this.g13+=b14;this.e45=0;};if(this.f4&&d39){this.f35+=b14;this.e45=0;};if(this.e23&&d39){this.g5+=b14;this.e45=0;};}var f18=e50(this.parent);event.h3=event.clientX-f18.x;event.h2=event.clientY-f18.y;this.g30=false;if(this.g37){this.g37=false;this.HandleMove(i26);}this.f26=false;if(this.d44&&!this.h32){this.HandleDrag(k7,event);}this.HandleMouse(i31,event);Event.stop(event);this.d44=false},ak_12:function(event){this.div.style.cursor=this.h37;},ak_13:function(event){this.h32=true;if(this.f43||this.g3)return;if(this.f46(Event.element(event)))return;var f18=e50(this.parent);this.h37=this.h46;this.div.style.cursor=this.h37;var h3=event.clientX-f18.x;var h2=event.clientY-f18.y;this.g31=this.h43;this.g29=this.h42;this.e8=h3;this.e7=h2;this.d44=true;this.g30=true;this.f26=true;event.h3=h3;event.h2=h2;this.HandleMouse(i32,event);Event.stop(event);},ak_11:function(event){if(!event.relatedTarget&&!event.toElement)this.ak_10(event);},ak_14:function(event){this.e39(event,true);},dg_1:function(event){this.e39(event,false);},e39:function(event,f_0){if(this.d44||this.f43||(!this.h32&&f_0))return;this.h32=false;this.div.style.cursor=k15;var f18=e50(this.parent);var h3=(event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-f18.x;var h2=(event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-f18.y;if(this.h15==OPER_RECENTER||this.zoom==a44){this.SlideMapToPoint(new PointXY(h3,h2));}else{var f5=this.GetXYToLL(new PointXY(h3,h2));this.SetCenterLatLngZoomLevel(f5,this.zoom+1);}this.div.style.cursor=this.h37;},e10:function(event){if(this.d44)return;if(event.wheelDelta>0&&this.zoom<a44){this.ZoomIn();}if(event.wheelDelta<0&&this.zoom>1){this.ZoomOut();}},d50:function(event){if(this.d44)return;key=event.which?event.which:event.keyCode;if(key==b6&&this.zoom<a44){this.ZoomIn();}if(key==b4&&this.zoom>1){this.ZoomOut();}},ZoomOut:function(){this.SetZoomLevel(this.zoom-1);},ZoomIn:function(){this.SetZoomLevel(this.zoom+1);},SetZoomLevel:function(f_0){f_0=ak_1(f_0);if(f_0<1||f_0>a44||this.d44||this.f43||f_0==this.zoom)return;var f5=this.GetCenterLatLng();this.d40();this.centerlat=f5.lat;this.centerlng=f5.lng;this.zoom=f_0;this.scale=d34[this.zoom];this.RebuildTiles();},GetZoomLevel:function(){return this.zoom;},GetScaleFromZoom:function(f_0){var i=(f_0)?(((f_0>=1)&&(f_0<=a44))?f_0:0):0;return d34[i];},SlideMapByOffset:function(f_0){if(this.f43)return;this.HandleMove(i28);this.f43=true;setTimeout(k28+this.g26+j2+f_0.x+i29+f_0.y+j8+b45+i29+d14+j17,d14);var f30=ak_6(f_0.x);var g8=ak_6(f_0.y);this.e45+=((f30*g8)+((this.width-f30)*g8)+((this.height-g8)*f30));var d39=((this.e45/(this.width*this.height))>=b15);if(this.h0&&d39){this.g13+=b14;this.e45=0;};if(this.f4&&d39){this.f35+=b14;this.e45=0;};if(this.e23&&d39){this.g5+=b14;this.e45=0;};},SlideMapToPoint:function(f_0){if(this.f43)return;this.HandleMove(i28);var g24=ak_1(this.width/2)-f_0.x;var g23=ak_1(this.height/2)-f_0.y;this.f43=true;setTimeout(k28+this.g26+j2+g24+i29+g23+j8+b45+i29+d14+j17,d14);var f30=ak_6(g24);var g8=ak_6(g23);this.e45+=((f30*g8)+((this.width-f30)*g8)+((this.height-g8)*f30));var d39=((this.e45/(this.width*this.height))>=b15);if(this.h0&&d39){this.g13+=b14;this.e45=0;};if(this.f4&&d39){this.f35+=b14;this.e45=0;};if(this.e23&&d39){this.g5+=b14;this.e45=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/b11))));},PanSouth:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2),ak_1(this.height/2)+ak_1(this.height*(f_0/b11))));},PanEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b11)),ak_1(this.height/2)));},PanWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b11)),ak_1(this.height/2)));},PanNorthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b11)),ak_1(this.height/2)-ak_1(this.height*(f_0/b11))));},PanSouthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b11)),ak_1(this.height/2)+ak_1(this.height*(f_0/b11))));},PanNorthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b11)),ak_1(this.height/2)-ak_1(this.height*(f_0/b11))));},PanSouthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b11)),ak_1(this.height/2)+ak_1(this.height*(f_0/b11))));},SetCenterLatLng:function(f_0){this.centerlat=ak_1(f_0.lat*b9)/b8;this.centerlng=ak_1(f_0.lng*b9)/b8;this.d40();this.RebuildTiles();},SetCenterLatLngZoomLevel:function(f_0,f_1){f_1=ak_1(f_1);this.centerlat=ak_1(f_0.lat*b9)/b8;this.centerlng=ak_1(f_0.lng*b9)/b8;if(f_1<1){f_1=1;}if(f_1>a44){f_1=a44;}this.zoom=f_1;this.scale=d34[f_1];this.d40();this.RebuildTiles();},SetCenterXY:function(f_0){var g24=ak_1(this.width/2)-f_0.x;var g23=ak_1(this.height/2)-f_0.y;this.centerlat=h13(this.i0-this.h35,this.g36-this.i1+this.h38+g23,this.scale);this.centerlng=d45(this.i2+this.h36,this.i3+this.h39-g24,this.scale);this.d40();this.RebuildTiles();},GetCenterLatLng:function(){var ll=new PointLL(0,0);ll.lat=h13(this.i0-this.h35,this.g36-this.i1+this.h38,this.scale);ll.lng=d45(this.i2+this.h36,this.i3-this.h39,this.scale);return ll;},GetLLToXY:function(f_0){var h29=new PointXY(0,0);var g39=h1(f_0.lng,this.scale);var g38=e13(f_0.lat,this.scale);var g11=h28(f_0.lng,this.scale);var g9=this.g36-e44(f_0.lat,this.scale);h29.x=ak_1(this.width/2)-((this.i2+this.h36-g39)*this.g36)-(this.i3-this.h39-g11);h29.y=ak_1(this.height/2)+((this.i0-this.h35-g38)*this.g36)-(this.i1-this.h38-g9);h29.x=ak_1(h29.x);h29.y=ak_1(h29.y);return h29;},GetXYToLL:function(f_0){var g24=ak_1(this.width/2)-f_0.x;var g23=ak_1(this.height/2)-f_0.y;var ll=new PointLL(b16,b16);ll.lat=h13(this.i0-this.h35,this.g36-this.i1+this.h38+g23,this.scale);ll.lng=d45(this.i2+this.h36,this.i3-this.h39-g24,this.scale);return ll;},ResizeMap:function(f_0){if(f_0.width==this.width&&f_0.height==this.height)return;var f5=this.GetCenterLatLng();this.width=ak_1(f_0.width);this.height=ak_1(f_0.height);if(this.width>b38)this.width=b38;if(this.height>c30)this.height=c30;this.centerlat=f5.lat;this.centerlng=f5.lng;this.f1=ak_3(this.height/this.g36)+2;this.f17=ak_3(this.width/this.g36)+2;this.d44=false;this.f43=false;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;var j=this.f44.length;for(i=0;i<j;i++){this.e31(this.f44[i]);}this.e22=null;while(this.div.e43.hasChildNodes())this.div.e43.removeChild(this.div.e43.firstChild);while(this.div.d42.hasChildNodes())this.div.d42.removeChild(this.div.d42.firstChild);while(this.div.e3.hasChildNodes())this.div.e3.removeChild(this.div.e3.firstChild);this.div.f42.style.width=(this.f17*d26)+ai_3;this.div.f42.style.height=(this.f1*d26)+ai_3;this.d40();this.RebuildTiles();},AddRouteHighlight:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6){this.h27=f_0;this.g16=f_1;if(f_2==null){this.f40=j0;}else{this.f40=f_2.toString();}if(this.h27.ul.lat<this.h27.lr.lat){var f9=this.h27.ul.lat;this.h27.ul.lat=this.h27.lr.lat;this.h27.lr.lat=f9;}if(this.h27.ul.lng>this.h27.lr.lng){var g50=this.h27.ul.lng;this.h27.ul.lng=this.h27.lr.lng;this.h27.lr.lng=g50;}this.g48=true;if(f_3==null||f_3==false){this.g33();}else{if(f_4==null)f_4=false;if(f_5==null)f_5=1;if(f_6==null)f_6=a44;this.BestFitRoute(f_4,f_5,f_6);}},RemoveRouteHighlight:function(){this.g48=false;this.h27=null;this.f25.style.display=ai_5;this.f40=j0;},SetRouteBestFit:function(f_0){this.d41=f_0;},IsRouteBestFit:function(){return this.d41;},SetRouteSession:function(f_0){this.f40=f_0;},GetRouteSession:function(){return this.f40;},SetRouteServer:function(f_0){this.g16=f_0;},GetRouteServer:function(){return this.g16;},AddPOI:function(f_0,f_1,f_2){if(this.f14==null){this.f14=new mqz();}var h29=this.GetLLToXY(f_0);f_2.ll=f_0;f_2.offset=f_1;f_2.style.position=ai_7;f_2.style.zIndex=a6;f_2.style.left=(h29.x+f_1.x-this.h39)+ai_3;f_2.style.top=(h29.y+f_1.y-this.h38)+ai_3;f_2.oncontextmenu=function(){return false;};this.f14.push(f_2);this.div.g27.appendChild(f_2);},UpdatePOI:function(f_0,f_1,f_2){if(this.f14==null)return;var f37=false;var j=this.f14.length;for(var i=0;i<j;i++){if(this.f14[i]==f_2){f37=true;}}if(f37){var h29=this.GetLLToXY(f_0);f_2.ll=f_0;f_2.offset=f_1;f_2.style.left=(h29.x+f_1.x-this.h39)+ai_3;f_2.style.top=(h29.y+f_1.y-this.h38)+ai_3;}},RemovePOI:function(f_0){var f48=[];if(this.f14==null)return;var j=this.f14.length;for(var i=0;i<j;i++){if(this.f14[i]!=f_0){f48.push(this.f14[i]);}else{if(this.div.g27.childNodes.length>0){this.div.g27.removeChild(this.f14[i]);}}}this.f14.clear();this.f14=null;var k=f48.length;for(var i=0;i<k;i++){if(this.f14==null)this.f14=new mqz();this.f14.push(f48[i]);}f48=null;},ClearPOIs:function(){if(this.f14==null)return;var j=this.f14.length;for(var i=0;i<j;i++){this.div.g27.removeChild(this.f14[i]);}this.f14=null;},AppendOverlayDiv:function(f_0){this.div.d46=f_0;this.div.appendChild(this.div.d46);},GetTileSize:function(){return d26;},GetLoadingDiv:function(){return this.div.f42;},GetMapDiv:function(){return this.div.e43;},GetStaticMapDiv:function(){return this.div.e6;},GetOverlayDiv:function(){return this.div.d46;},GetPoiDiv:function(){return this.div.g27;},BestFit:function(f_0,f_1,f_2,f_3){var g21,h8,e33,f24,zoom,g40;if(f_1==null)f_1=false;if(f_2==null){zoom=1;}else{f_2=ak_1(f_2);if(f_2<1||f_2>a48){zoom=1;}else{zoom=f_2+1;}}if(f_3==null){g40=a44;}else{f_3=ak_1(f_3);if(f_3<1||f_3>a44){g40=a44;}else{g40=f_3;}if(g40<zoom)g40=zoom+1;}if(f_0.ul.x){g21=new PointXY(f_0.ul.x,f_0.ul.y);h8=new PointXY(f_0.lr.x,f_0.lr.y);e33=this.GetXYToLL(new PointXY(f_0.ul.x,f_0.ul.y));f24=this.GetXYToLL(new PointXY(f_0.lr.x,f_0.lr.y));}else{g21=this.GetLLToXY(new PointLL(f_0.ul.lat,f_0.ul.lng));h8=this.GetLLToXY(new PointLL(f_0.lr.lat,f_0.lr.lng));e33=new PointLL(f_0.ul.lat,f_0.ul.lng);f24=new PointLL(f_0.lr.lat,f_0.lr.lng);}var width=ak_6(f24.lng-e33.lng)*(d6/this.scale);var height=ak_6(f24.lat-e33.lat)*(c7/this.scale);if(f_1==true){var g46=this.GetLLToXY(this.GetCenterLatLng());var h20=ak_7(ak_6(g46.x-g21.x),ak_6(g46.x-h8.x));var e18=ak_7(ak_6(g46.y-g21.y),ak_6(g46.y-h8.y));width=h20*2;height=e18*2;}var f47=(this.f47<(this.width/2)&&this.f47<(this.height/2)?this.f47:Math.round(Math.min(((this.width/2)-1),((this.height/2)-1))));var scale=ak_7((this.scale*(width/(this.width-(f47*2)))),(this.scale*(height/(this.height-(f47*2)))));while(scale<d34[zoom]&&zoom<=g40)zoom++;if(f_1==true){this.SetZoomLevel((zoom-1));}else{this.SetCenterLatLngZoomLevel(new PointLL(((e33.lat+f24.lat)/a36),((e33.lng+f24.lng)/a36)),(zoom-1));}},BestFitPOIs:function(f_0,f_1,f_2){if(this.f14==null)return;if(f_0==null)f_0=false;if(f_1==null)f_1=1;if(f_2==null)f_2=a44;var f20=new RectLL(new PointLL(this.f14[0].ll.lat,this.f14[0].ll.lng),new PointLL(this.f14[0].ll.lat,this.f14[0].ll.lng));var j=this.f14.length;for(var i=1;i<j;i++){var e35=this.f14[i].ll;if(e35.lat>f20.ul.lat)f20.ul.lat=e35.lat;if(e35.lng<f20.ul.lng)f20.ul.lng=e35.lng;if(e35.lat<f20.lr.lat)f20.lr.lat=e35.lat;if(e35.lng>f20.lr.lng)f20.lr.lng=e35.lng;}this.BestFit(f20,f_0,f_1,f_2);},BestFitRoute:function(f_0,f_1,f_2){if(this.h27){if(f_0==null)f_0=false;if(f_1==null)f_1=1;if(f_2==null)f_2=a44;this.BestFit(this.h27,f_0,f_1,f_2);}},GetTileMode:function(){return this.e11;},SetTileMode:function(f_0,f_1){if(f_0==ag||f_0==ah||f_0==ai&&(this.e11!=f_0)){this.d40();this.h0=false;this.f4=false;this.e23=false;this.div.e43.style.display=ai_5;this.div.d42.style.display=ai_5;this.div.e3.style.display=ai_5;if(f_0==ag){this.h0=true;this.div.e43.style.display=ai_6;this.f44[LOGO_MAP_COPY].style.display=ai_6;this.f44[LOGO_SAT_COPY].style.display=ai_5;this.e47="mag";}if(f_0==ah){this.f4=true;this.div.d42.style.display=ai_6;this.f44[LOGO_MAP_COPY].style.display=ai_5;this.f44[LOGO_SAT_COPY].style.display=ai_6;this.e47="mah";}if(f_0==ai){this.f4=true;this.e23=true;this.div.d42.style.display=ai_6;this.div.e3.style.display=ai_6;this.f44[LOGO_MAP_COPY].style.display=ai_6;this.f44[LOGO_SAT_COPY].style.display=ai_6;this.e47="mai";}this.e11=f_0;f_1=(typeof(f_1)==k18)?false:f_1;if(!f_1){var f5=this.GetCenterLatLng();this.centerlat=f5.lat;this.centerlng=f5.lng;this.RebuildTiles();}}},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.f44[f_0].corner=f_1;this.f44[f_0].offset=f_2;this.e31(this.f44[f_0]);}},GetLogoPlacement:function(f_0){f_0=ak_1(f_0);if(f_0>=0&&f_0<=LOGO_SAT_COPY){var f6=new Object();f6.corner=this.f44[f_0].corner;f6.offset=new PointXY(this.f44[f_0].offset.x,this.f44[f_0].offset.y);return f6;}},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.h14(f_0,f_1);}},DisableDragging:function(f_0){this.g3=(f_0==true);},GetDraggingState:function(){return this.g3;},GetLatitudeDegreesPerPixel:function(scale){return (c7/scale);},GetLongitudeDegreesPerPixel:function(scale){return (d6/scale);},HandleMove:function(){},HandleDrag:function(){},HandleMouse:function(){},HandleOverlays:function(){},HandleObjectDrag:function(){},HandleObjectDrop:function(){},GetClickFlag:function(){return (this.h32)?this.h32:false;},GetDragOffset:function(){return new MQPoint(this.h39,this.h38);},GetRouteRect:function(){return this.h27;},SetRouteRect:function(f_0){this.h27=f_0;},GetBestFitRect:function(){return this.g49;},SetBestFitRect:function(f_0){this.g49=f_0;},IsKeepCenter:function(){return this.e20;},SetKeepCenter:function(f_0){this.e20=f_0;},h31:function(src,unselectable,f_0,display,f_1){var e48=document.createElement(i8);if(src!=null)e48.src=src;e48.unselectable=unselectable;e48.style.MozUserSelect=f_0;e48.style.display=display;if(f_1!=null)e48.style.zIndex=f_1;return e48;},CreateImgLogo:function(f_0,unselectable,corner,offset,position,display,f_1,src,width,height){var h17=document.createElement(i8);h17.style.MozUserSelect=f_0;h17.unselectable=unselectable;h17.corner=corner;h17.offset=offset;h17.style.position=position;h17.style.display=display;h17.style.zIndex=f_1;if(width!=null)h17.width=width;if(height!=null)h17.height=height;return h17;},CreateParentDiv:function(id,lt,tp,position,top,left,f_0,width,height){e19=document.createElement(j37);e19.id=id;e19.lt=lt;e19.tp=tp;e19.style.position=position;e19.style.top=top+ai_3;e19.style.left=left+ai_3;if(f_0!=null)e19.style.zIndex=f_0;if(width!=null)e19.style.width=width+ai_3;if(height!=null)e19.style.height=height+ai_3;return e19;},SetBestFitMargin:function(f_0){this.f47=f_0;},GetBestFitMargin:function(){return this.f47;}};document.write("<link rel='stylesheet' href='http://btilelog.access.mapquest.com/tilelog/transaction?transaction=script&key=mjtd%7Clu6tnuuanq%2Cr0%3Do5-lw7gu&v=5.2.0&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.SINGLELINEADDRESS=null;this.GEOADDRESS=null;this.GEOCODEOPTIONS=null;this.MANEUVER=null;this.ROUTEOPTIONS=null;this.ROUTERESULTS=null;this.ROUTEMATRIXRESULTS=null;this.RADIUSSEARCHCRITERIA=null;this.RECTSEARCHCRITERIA=null;this.POLYSEARCHCRITERIA=null;this.CORRIDORSEARCHCRITERIA=null;this.SIGN=null;this.TREKROUTE=null;this.INTCOLLECTION=null;this.DTCOLLECTION=null;this.LATLNGCOLLECTION=null;this.LOCATIONCOLLECTION=null;this.LOCATIONCOLLECTIONCOLLECTION=null;this.MANEUVERCOLLECTION=null;this.SIGNCOLLECTION=null;this.STRINGCOLLECTION=null;this.STRCOLCOLLECTION=null;this.FEATURECOLLECTION=null;this.PRIMITIVECOLLECTION=null;this.POINTCOLLECTION=null;this.TREKROUTECOLLECTION=null;this.FEATURESPECIFIERCOLLECTION=null;this.GEOCODEOPTIONSCOLLECTION=null;this.COVERAGESTYLE=null;this.RECORDSET=null;this.MAPSTATE=null;this.SESSION=null;this.SESSIONID=null;this.DTSTYLE=null;this.DTSTYLEEX=null;this.DTFEATURESTYLEEX=null;this.FEATURESPECIFIER=null;this.BESTFIT=null;this.BESTFITLL=null;this.CENTER=null;this.CENTERLATLNG=null;this.PAN=null;this.ZOOMIN=null;this.ZOOMOUT=null;this.ZOOMTO=null;this.ZOOMTORECT=null;this.ZOOMTORECTLATLNG=null;this.getAUTOGEOCODECOVSWITCH=function(){if(this.AUTOGEOCODECOVSWITCH===null)
this.AUTOGEOCODECOVSWITCH=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.getSINGLELINEADDRESS=function(){if(this.SINGLELINEADDRESS===null)
this.SINGLELINEADDRESS=mqCreateXMLDoc("<SingleLineAddress/>");return this.SINGLELINEADDRESS;}
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.getLOCATIONCOLLECTIONCOLLECTION=function(){if(this.LOCATIONCOLLECTIONCOLLECTION===null)
this.LOCATIONCOLLECTIONCOLLECTION=mqCreateXMLDoc("<LocationCollectionCollection Count=\"0\"/>");return this.LOCATIONCOLLECTIONCOLLECTION;}
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=null;this.dSegmentLength=0.0;this.dPriorLength=0.0;};var SDerivedPoint=function()
{this.pLL=null;this.ulOriginalPoint=0;};mqllAnchor=null;var ulAnchor;var i;var dAccumLength=0.0;var nPoints=this.getSize();var pOrigPoints=new Array(nPoints);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();pOrigPoints[i].pLL=this.getAt(i);}
for(i=0;i<nPoints-1;i++)
{pOrigPoints[i].dSegmentLength=pOrigPoints[i].pLL.arcDistance(pOrigPoints[(i+1)].pLL);if(i==0)
pOrigPoints[i].dPriorLength=0.0;else
pOrigPoints[i].dPriorLength=dAccumLength;dAccumLength+=pOrigPoints[i].dSegmentLength;}
mqllAnchor=pOrigPoints[0].pLL;ulAnchor=0;pDerivedPoints[0].pLL=mqllAnchor;pDerivedPoints[0].ulOriginalPoint=0;nDerivedPoints=1;for(i=2;i<nPoints;i++)
{if(!this.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;var nCount;for(nCount=(nDerivedPoints-1);nCount>=0;nCount--)
{if((nPrev-1)!=pDerivedPoints[nCount].ulOriginalPoint)
{for(var x=(nPrev-1);x>pDerivedPoints[nCount].ulOriginalPoint;x--)
{try
{this.remove(x);}
catch(e)
{}}
nPrev=pDerivedPoints[nCount].ulOriginalPoint;}
else
{nPrev--;}}
pOrigPoints=null;pDerivedPoints=null;};MQLatLngCollection.prototype.isEverybodyWithinDeviation=function(pOrigPoints,ulOrigStartPoint,ulOrigEndPoint,dMaxDeviation)
{var dMilesPerLng=0.0;var dMaxDeviationSquared=0.0;var mqllStartPoint=null;var mqllEndPoint=null;var dLineLatMiles=0.0;var dLineLngMiles=0.0;var dLineLengthSquared=0.0;var i;var mqllPoint=null;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;dMilesPerLng=DistanceApproximation.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;};var DistanceApproximation=new function()
{this.m_testLat;this.m_testLng;this.m_mpd;this.m_milesPerLngDeg=new Array(69.170976,69.160441,69.128838,69.076177,69.002475,68.907753,68.792041,68.655373,68.497792,68.319345,68.120088,67.900079,67.659387,67.398085,67.116253,66.813976,66.491346,66.148462,65.785428,65.402355,64.999359,64.576564,64.134098,63.672096,63.190698,62.690052,62.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.getMilesPerLngDeg=function(lat)
{return(Math.abs(lat)<=90.0)?this.m_milesPerLngDeg[parseInt(Math.abs(lat)+0.5)]:69.170976;}};
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,x=this.getSize();count<x;count++)
{if(m_items[count]==item)
{return true;}}
return false;}
this.getById=function(strId){for(var count=0,x=this.getSize();count<x;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.width+","+this.height;}
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.browser=getBrowserInfo();MQ.utils={_createImage:function(url,left,top,width,height,imgIsPng)
{var img;img=document.createElement("img");if(imgIsPng==null)imgIsPng=false;if(imgIsPng)
img.isPng=imgIsPng;else
img.isPng=this._hasPngExtention(url);if(!img.isPng)
{img.src=url;}
else
{if(MQ.browser.name=="msie"&&((MQ.browser.version<7)&&MQ.browser.version>5))
{img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='image')";img.src="http://img.mqcdn.com/a/a";}
else
{img.src=url;}}
img.style.left=left+"px";img.style.top=top+"px";img.style.width=width+"px";img.style.height=height+"px";img.style.position="absolute";img.style.zIndex=200;img.style.MozUserSelect="none";img.style.border="none";img.style.display="block";img.unselectable="on";img.onselectstart=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;},getSuperRect:function(RECT1,RECT2)
{var rectLL=new RectLL(new PointLL(0,0),new PointLL(0,0));rectLL.ul.lat=Math.max(RECT1.ul.lat,RECT2.ul.lat);rectLL.ul.lng=Math.min(RECT1.ul.lng,RECT2.ul.lng);rectLL.lr.lat=Math.min(RECT1.lr.lat,RECT2.lr.lat);rectLL.lr.lng=Math.max(RECT1.lr.lng,RECT2.lr.lng);return rectLL;},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);}}
function MQClip(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;};};function isOverLimit(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;};function calcPercentage(shift,percentOf)
{return Math.round((shift/percentOf)*100);};function panAngle(initialMouseX,initialMouseY,newMouseX,newMouseY)
{var b=(newMouseY-initialMouseY);var c=(newMouseX-initialMouseX);if(b<0)
b=b*-1;if(c<0)
c=c*-1;var a=Math.round(Math.sqrt(b*b+c*c));var angle=Math.round((Math.asin(b/a)*360)/(2*3.14));return angle;};function stripHTMLTags(s){return s.replace(/<\/?[^>]+>/gi,'');};function getHTMLSubstring(strHtml,length,truncationChar)
{var regExp=/<\/?[^>]+>/ig;var tagArray=new Array();var tempStr=strHtml.replace(regExp,'|');var textArray=tempStr.split('|');tagArray=strHtml.match(regExp);var resultStr="";var arraySkipFlag=false;for(var i=charCount=0;i<textArray.length;i++)
{charCount+=textArray[i].length;if(charCount>=length&&arraySkipFlag==false)
{charCount-=textArray[i].length;textArray[i]=textArray[i].substr(0,(length-charCount))+truncationChar;arraySkipFlag=true;continue;}
if(arraySkipFlag==true)textArray[i]="";}
for(var i=0;i<textArray.length;i++)
{resultStr+=textArray[i];if(tagArray&&(tagArray.length>0)&&(i<tagArray.length))
resultStr+=tagArray[i];}
return(resultStr);};function getWindowScrollXY()
{var scrOff=new MQPoint(0,0);if(typeof(window.pageYOffset)=='number')
{scrOff.setX(window.pageXOffset);scrOff.setY(window.pageYOffset);}
else if(document.body&&(document.body.scrollLeft||document.body.scrollTop))
{scrOff.setX(document.body.scrollLeft);scrOff.setY(document.body.scrollTop);}
else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop))
{scrOff.setX(document.documentElement.scrollLeft);scrOff.setY(document.documentElement.scrollTop);}
return(scrOff);};function MQInitDojo(callback)
{if(dojo.require)
{dojo.require("dojox.gfx");if(callback)
{dojo.addOnLoad(callback);};};};function MQMapInit()
{this.bestFitRect=null;this.bestFitMargin=0;this.keepCenter=false;this.minZoom=1;this.maxZoom=16;};MQMapInit.prototype={setBestFitRect:function(RECT)
{this.bestFitRect=RECT;},getBestFitRect:function()
{return this.bestFitRect;},setBestFitMargin:function(MARGIN)
{this.bestFitMargin=MARGIN;},getBestFitMargin:function()
{return this.bestFitMargin;},setKeepCenter:function(BOOL)
{this.keepCenter=BOOL;},isKeepCenter:function()
{return this.keepCenter;},setMinZoom:function(MINZOOM)
{MINZOOM=parseInt(MINZOOM);if(MINZOOM<1||MINZOOM>15)
{this.minZoom=1;}
else
{this.minZoom=MINZOOM;}
if(this.minZoom>this.maxZoom)
{this.minZoom=this.maxZoom;}},getMinZoom:function()
{return this.minZoom;},setMaxZoom:function(MAXZOOM)
{MAXZOOM=parseInt(MAXZOOM);if(MAXZOOM<1||MAXZOOM>16)
{this.maxZoom=16;}
else
{this.maxZoom=MAXZOOM;}
if(this.maxZoom<this.minZoom)
{this.maxZoom=this.minZoom;}},getMaxZoom:function()
{return this.maxZoom;}};
MQTileMap.prototype=Map.prototype;MQTileMap.prototype.constructor=MQTileMap;function MQTileMap(parent,zoom,mqLatLng,mtype,mqmapinit)
{this.div1=document.createElement("div");this.div1.style.width=parent.style.width;this.div1.style.height=parent.style.height;this.div1.style.zIndex=0;parent.style.position="relative";this.parent2=parent;parent.appendChild(this.div1);this.controls=[];this.mypois=new MQPoiCollection();try{this.myoverlays=new MQOverlayCollection();}catch(err){this.myoverlays=null;};try{this.mydeclutter=new MQDeclutter(this);}catch(err){this.mydeclutter=null;};this.iwparent=document.createElement("div");if(zoom==null)zoom=1;if(mqLatLng==null)mqLatLng=new MQLatLng(38.134557,-98.4375);Map.call(this,this.div1,zoom,mqLatLng,mtype,mqmapinit);this.SetClickOperation(EVENT_DBLCLICK,OPER_RECENTER);this.surface=null;this.overlayOffsetX=null;this.overlayOffsetY=null;this.dcCanvasDiv=null;this.dcCanvasContext=null;this.canvasOffsetX=null
this.canvasOffsetY=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();IncrMQTileMapCount();this.uniqueMapID=GetMQTileMapCount();this.startDragPoint=new MQPoint(0,0);this.endDragPoint=new MQPoint(0,0);this.draggedObject=null;this.staticMapEnabled=false;this.turnEventsOff=false;if(mqmapinit!=null)
{this.showDragableMap();}}
MQTileMap.prototype.tilesExist=function()
{return this.TilesExist();}
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(e.srcObject&&e.srcObject.createFillerDiv)return;if(this.GetClickFlag())
{var ptOffset=this._getParentOffset(this.parent);var ptOffsetX=0;var ptOffsetY=0;if(typeof(window.pageYOffset)=='number'){ptOffsetY=window.pageYOffset;ptOffsetX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){ptOffsetY=document.body.scrollTop;ptOffsetX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){ptOffsetY=document.documentElement.scrollTop;ptOffsetX=document.documentElement.scrollLeft;}
var mqe=new MQEvent();mqe.srcObject=e.srcObject;if(!e.clientX&&e.domEvent){mqe.domEvent=e.domEvent;}else{mqe.domEvent=e;};var cx=(mqe.domEvent.clientX+ptOffsetX)-ptOffset.x;var cy=(mqe.domEvent.clientY+ptOffsetY)-ptOffset.y;mqe.xy=new MQPoint(cx,cy);mqe.ll=this.pixToLL(mqe.xy);mqe.eventName='MQTileMap.click';MQEventManager.trigger(this,"click",mqe);}}
MQTileMap.prototype.onZoomStart=function(e)
{if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="hidden";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
MQEventManager.trigger(this,"zoomstart",e);}
MQTileMap.prototype.onZoomEnd=function(e)
{this.HandleOverlays();if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="auto";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
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)
{if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="hidden";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
MQEventManager.trigger(this,"movestart",e);}
MQTileMap.prototype.onMove=function(e)
{MQEventManager.trigger(this,"move",e);}
MQTileMap.prototype.onMoveEnd=function(e)
{if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="auto";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
MQEventManager.trigger(this,"moveend",e);}
MQTileMap.prototype.HandleMove=function()
{if(arguments.length==1)
{var e=new MQEvent();var movePhase=arguments[0];if(movePhase=="move"){e.eventName='MQTileMap.move';this.onMove(e);}else if(movePhase=="movestart"){e.eventName='MQTileMap.movestart';this.onMoveStart(e);}else if(movePhase=="moveend"){e.eventName='MQTileMap.moveend';this.onMoveEnd(e);};}}
MQTileMap.prototype.onDragStart=function(e)
{if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="hidden";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
MQEventManager.trigger(this,"dragstart",e);}
MQTileMap.prototype.onDrag=function(e)
{MQEventManager.trigger(this,"drag",e);}
MQTileMap.prototype.onDragEnd=function(e)
{if((getBrowserInfo().name=='firefox')&&this.infowindow.popup.content.childNodes[1]){var left=this.infowindow.popup.content.childNodes[1].scrollLeft;var top=this.infowindow.popup.content.childNodes[1].scrollTop;this.infowindow.popup.content.childNodes[1].style.overflow="auto";this.infowindow.popup.content.childNodes[1].scrollLeft=left;this.infowindow.popup.content.childNodes[1].scrollTop=top;}
MQEventManager.trigger(this,"dragend",e);}
MQTileMap.prototype.HandleDrag=function()
{if(arguments.length==1)
{var e=new MQEvent();var dragPhase=arguments[0];if(dragPhase=="drag"){e.eventName='MQTileMap.drag';this.onDrag(e);}else if(dragPhase=="dragstart"){e.eventName='MQTileMap.dragStart';this.onDragStart(e);}else if(dragPhase=="dragend"){e.eventName='MQTileMap.dragEnd';this.onDragEnd(e);};}else if(arguments.length==2){var e=new MQEvent();var dragPhase=arguments[0];if(dragPhase=="dragend"){var baseEvent=arguments[1];var ptOffset=this._getParentOffset(this.parent);e.clientX=baseEvent.clientX-ptOffset.x;e.clientY=baseEvent.clientY-ptOffset.y;this.endDragPoint=new MQPoint(e.clientX,e.clientY);e.dragDirection=this.direction(this.startDragPoint.x,this.startDragPoint.y,this.endDragPoint.x,this.endDragPoint.y);var directionsX=this.endDragPoint.x-this.startDragPoint.x;var directionsY=this.endDragPoint.y-this.startDragPoint.y;var panDistanceInfo=this.percentage(0,0,directionsX,directionsY,false);e.dragPercentage=Math.round(Math.sqrt(panDistanceInfo.shiftX*panDistanceInfo.shiftX+panDistanceInfo.shiftY*panDistanceInfo.shiftY));e.eventName='MQTileMap.dragEnd';this.onDragEnd(e);}}}
MQTileMap.prototype.direction=function(initialMouseX,initialMouseY,newMouseX,newMouseY)
{var mouseMoveDir="";if(newMouseY<initialMouseY)
{mouseMoveDir="n";}
else if(newMouseY>initialMouseY)
{mouseMoveDir="s";}
if(newMouseX>initialMouseX)
{mouseMoveDir+="e";}
else if(newMouseX<initialMouseX)
{mouseMoveDir+="w";}
var angle=panAngle(initialMouseX,initialMouseY,newMouseX,newMouseY);if(mouseMoveDir=="ne")
{if(angle<22)
mouseMoveDir="e";else if(angle>68)
mouseMoveDir="n";}
else if(mouseMoveDir=="nw")
{if(angle<22)
mouseMoveDir="w";else if(angle>68)
mouseMoveDir="n";}
else if(mouseMoveDir=="se")
{if(angle<22)
mouseMoveDir="e";else if(angle>68)
mouseMoveDir="s";}
else if(mouseMoveDir=="sw")
{if(angle<22)
mouseMoveDir="w";else if(angle>68)
mouseMoveDir="s";}
return mouseMoveDir;}
MQTileMap.prototype.percentage=function(initialMouseX,initialMouseY,newMouseX,newMouseY,returnInPixels)
{var panDistanceInfo={shiftX:0,shiftY:0};if(parseInt(newMouseX)>parseInt(initialMouseX))
{panDistanceInfo.shiftX=parseInt(newMouseX)-parseInt(initialMouseX);}
else
{panDistanceInfo.shiftX=parseInt(initialMouseX)-parseInt(newMouseX);}
if(parseInt(newMouseY)>parseInt(initialMouseY))
{panDistanceInfo.shiftY=parseInt(newMouseY)-parseInt(initialMouseY);}
else
{panDistanceInfo.shiftY=parseInt(initialMouseY)-parseInt(newMouseY);}
if(!returnInPixels||typeof(returnInPixels)=="undefined")
{panDistanceInfo.shiftY=calcPercentage(panDistanceInfo.shiftY,this.height);panDistanceInfo.shiftX=calcPercentage(panDistanceInfo.shiftX,this.width);}
return panDistanceInfo;}
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.startDragPoint=new MQPoint(e.clientX,e.clientY);if(this.surface){this.surface.rawNode.style.cursor=this.grab_mousecursor;this.overlaydiv.style.cursor=this.grab_mousecursor;};e.eventName='MQTileMap.mouseDown';this.onTKMouseDown(e);}else if(mousePhase=="mouseup"){if(this.surface){this.surface.rawNode.style.cursor=this.current_mousecursor;};e.eventName='MQTileMap.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";style.zIndex=0;}
MQTileMap.prototype.removeControl=function(control)
{if(control.destructor)
{control.destructor();}
this.parent2.removeChild(control.elem);this.controls[control.type]=null;}
MQTileMap.prototype.updateZoom=function(which)
{if(this.controls[CONTROL_PANZOOM]!=null){this.controls[CONTROL_PANZOOM].setZoom(this.getZoomLevel());this.controls[CONTROL_PANZOOM].unselectZoom(0);}}
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;var args=arguments;if(typeof args[1]=="undefined")
{pos.offsetSize.width*=-1;}}
else if(mapCorner==MQMapCorner.BOTTOM_LEFT)
{left=0;top=this.height-control.getHeight();var args=arguments;if(typeof args[1]=="undefined")
{pos.offsetSize.height*=-1;}}
else if(mapCorner==MQMapCorner.BOTTOM_RIGHT)
{left=this.width-control.getWidth();top=this.height-control.getHeight();var args=arguments;if(typeof args[1]=="undefined")
{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.setLogoZindex=function(mapLogo,index)
{this.SetLogoZindex(mapLogo,index);}
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.addPois=function(mqPois)
{if(mqPois)
{var h=mqPois.getSize();for(i=0;i<h;i++){this.addPoi(mqPois.getAt(i));}}}
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('MQTileMap.poiAdded');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('MQTileMap.poiRemoved');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()){var tempDCM=this.getDeclutter().getDeclutterMode();};if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()!=0)this.getDeclutter().setDeclutterMode(0);};while(this.mypois.getSize()>0)
{this.removePoi(this.mypois.getAt(0));}
if(this.getDeclutter()){if(tempDCM!=0){this.getDeclutter().setDeclutterMode(tempDCM);};};this.onMapCleared(new MQEvent('MQTileMap.mapCleared'));}
MQTileMap.prototype.replacePois=function(mypois)
{if(this.getDeclutter()){var dcm=this.getDeclutter().getDeclutterMode();};this.removeAllPois();for(var i=0,j=mypois.getSize();i<j;i++)
{this.addPoi(mypois.getAt(i));}
if(this.getDeclutter()){if(dcm!=0)this.getDeclutter().setDeclutterMode(dcm);};}
MQTileMap.prototype.createDrawingSurface=function()
{try{if(dojox.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.zIndex=70;this.overlaydiv.UNSELECTABLE="on";this.overlaydiv.style.MozUserSelect="none";this.overlaydiv.style.cursor=this.current_mousecursor;this.AppendOverlayDiv(this.overlaydiv);this.surface=dojox.gfx.createSurface(this.overlaydiv,surfaceWidth,surfaceHeight);}else{this.surface=null;};}catch(err){this.surface=null;};};MQTileMap.prototype.createCanvas=function()
{try{this.TILESIZE=this.GetTileSize();this.SURFACE_OFFSET=2*this.TILESIZE;this.canvasOffsetX=0;this.canvasOffsetY=0;this.dcCanvasDiv=document.createElement("div");this.dcCanvasDiv.id="mqCanvasDiv";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 canvasWidth=tileBlocksWidth+(2*this.SURFACE_OFFSET);var canvasHeight=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.dcCanvasDiv.style.position="absolute";this.dcCanvasDiv.style.top=offsetY+'px';this.dcCanvasDiv.style.left=offsetX+'px';this.dcCanvasDiv.style.height=canvasHeight+'px';this.dcCanvasDiv.style.width=canvasWidth+'px';this.dcCanvasDiv.style.cursor="auto";this.dcCanvasDiv.style.zIndex=70;this.dcCanvasDiv.UNSELECTABLE="off";this.AppendOverlayDiv(this.dcCanvasDiv);var c=document.createElement('canvas');c.setAttribute("height",parseInt(this.dcCanvasDiv.style.height));c.setAttribute("width",parseInt(this.dcCanvasDiv.style.width));c.setAttribute("id","mqCanvas");this.dcCanvasDiv.appendChild(c);this.dcCanvasContext=c.getContext('2d');}catch(err){this.dcCanvasDiv=null;this.dcCanvasContext=null;};};MQTileMap.prototype.getOverlays=function()
{if(this.myoverlays){var tempOverlayCollection=new MQOverlayCollection;for(var i=0,j=this.myoverlays.getSize();i<j;i++)
{tempOverlayCollection.add(this.myoverlays.getAt(i));}
tempOverlayCollection.setName(this.myoverlays.getName());return tempOverlayCollection;}else{return null;};}
MQTileMap.prototype.addOverlays=function(mqOverlays)
{if(mqOverlays)
{var h=mqOverlays.getSize();for(i=0;i<h;i++){this.addOverlay(mqOverlays.getAt(i));}}}
MQTileMap.prototype.addOverlay=function(mqOverlay)
{if(!this.getOverlays())throw('overlays.js has not been included.');if(!this.surface)this.createDrawingSurface();if(!this.surface)throw('Overlay drawing surface does not exist.');if(this.myoverlays.contains(mqOverlay))return;mqOverlay.map=this;if(mqOverlay.shapePointsXY){var newShapePoints=new MQLatLngCollection();for(var i=0,y=mqOverlay.shapePoints.getSize();i<y;i++){newShapePoints.add(this.pixToLL(mqOverlay.shapePoints.get(i)));};mqOverlay.shapePoints=newShapePoints;mqOverlay.shapePointsXY=0;};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('MQTileMap.overlayAdded');e.overlay=mqOverlay;this.onOverlayAdded(e);}
MQTileMap.prototype.removeOverlay=function(mqOverlay)
{function removeChildrenFromNode(node)
{if(node!==undefined&&node!==null)return;while(node.hasChildNodes()){node.removeChild(node.firstChild);};};if(!this.getOverlays())throw('overlays.js has not been included.');var i;if(mqOverlay){for(i=0;i<this.myoverlays.getSize();i++){if(mqOverlay==this.myoverlays.getAt(i)){mqOverlay.onRemoved(e);if(mqOverlay.className=='MQImageOverlay'&&mqOverlay.shape){mqOverlay.shape.firstChild.style.width='0px';mqOverlay.shape.firstChild.style.height='0px';mqOverlay.shape.firstChild.src='';mqOverlay.shape.removeChild(mqOverlay.shape.firstChild);this.overlaydiv.removeChild(mqOverlay.shape);mqOverlay.shape=null;}else{if(mqOverlay.shape)
{this.surface.remove(mqOverlay.shape);}
mqOverlay.shape=null;};mqOverlay.map=null;this.myoverlays.remove(i,1);var e=new MQEvent('MQTileMap.overlayRemoved');e.overlay=mqOverlay;this.onOverlayRemoved(e);break;};};};}
MQTileMap.prototype.removeAllOverlays=function()
{if(!this.getOverlays())throw('overlays.js has not been included.');while(this.myoverlays.getSize()>0)
{this.removeOverlay(this.myoverlays.getAt(0));}}
MQTileMap.prototype.replaceOverlays=function(myOverlayCollection)
{if(!this.getOverlays())throw('overlays.js has not been included.');var i;this.removeAllOverlays();for(i=0;i<myOverlayCollection.getSize();i++)
{this.addOverlay(myOverlayCollection.getAt(i));}
this.getOverlays().setName(myOverlayCollection.getName());}
MQTileMap.prototype.redrawOverlays=function()
{var i,j
if(!this.getOverlays())throw('overlays.js has not been included.');for(i=0,j=this.getOverlays().getSize();i<j;i++)
{this.getOverlays().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();if(this.getDeclutter()){if(this.getDeclutter().getDeclutterMode()==2){this.getDeclutter().adjustLeaderLineSurface();this.getDeclutter().redrawLeaderLines();};};};};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.getDeclutter()){if(this.getDeclutter().getDeclutterMode()==2){this.getDeclutter().resetDraggedPois();this.getDeclutter().redrawLeaderLines();};};if(this.controls[CONTROL_TYPE]!=null){this.controls[CONTROL_TYPE].updateControl(type);}
var evt=new MQEvent('MQTileMap.mapTypeChanged');evt.prevMapType=prevMT;evt.mapType=type;this.onMapTypeChanged(evt);}}
MQTileMap.prototype.zoomIn=function()
{var prevZoom=this.getZoomLevel();prevZoom++;this.setZoomLevel(prevZoom);}
MQTileMap.prototype.zoomOut=function()
{var prevZoom=this.getZoomLevel();prevZoom--;this.setZoomLevel(prevZoom);}
MQTileMap.prototype.setZoomLevel=function(level)
{var prevZoom=this.getZoomLevel();var evt=new MQEvent('MQTileMap.zoomStart');evt.zoom=prevZoom;this.onZoomStart(evt);this.SetZoomLevel(level);this.updateZoom("on");var e=new MQEvent('MQTileMap.zoomEnd');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;var evt=new MQEvent('MQTileMap.zoomStart');evt.zoom=prevZoom;this.onZoomStart(evt);this.updateZoom("off");this.BestFit(rectLL,keepcenter,minzoom,maxzoom);this.updateZoom("on");var e=new MQEvent('MQTileMap.zoomEnd');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.getScaleFromZoom=function()
{return this.GetScaleFromZoom(this.getZoomLevel());}
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;var evt=new MQEvent('MQTileMap.zoomStart');evt.zoom=prevZoom;this.onZoomStart(evt);this.updateZoom("off");this.BestFitPOIs(keepCenter,minZoomLevel,maxZoomLevel);this.updateZoom("on");var e=new MQEvent('MQTileMap.zoomEnd');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();var evt=new MQEvent('MQTileMap.zoomStart');evt.zoom=prevZoom;this.onZoomStart(evt);this.updateZoom("off");this.SetCenterLatLngZoomLevel(mqLatLng,zoom);this.updateZoom("on");var e=new MQEvent('MQTileMap.zoomEnd');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.infoWindowOpen'));}
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 tempPoiCollection=new MQPoiCollection;for(var i=0,j=this.mypois.getSize();i<j;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)
{if(typeof(mqSize)=='undefined')
{var mqSize={};}
var w=(typeof(mqSize.width)=='undefined')?this.parent2.clientWidth:mqSize.width;var h=(typeof(mqSize.height)=='undefined')?this.parent2.clientHeight:mqSize.height;this.ResizeMap(new MQSize(w,h));var dcMode=this.getDeclutter().getDeclutterMode();if(dcMode!=0){this.getDeclutter().setDeclutterMode(0);this.getDeclutter().setDeclutterMode(dcMode);};if(this.getOverlays()){this.redrawOverlays();};for(var x=0,y=this.controls.length;x<y;x++)
{if(this.controls[x])
{this.placeControl(this.controls[x],true);}}}
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();var evt=new MQEvent('MQTileMap.zoomStart');evt.zoom=prevZoom;this.onZoomStart(evt);this.updateZoom("off");this.AddRouteHighlight(rectll,mapserverurl,sessionid,bestfit);this.updateZoom("on");var e=new MQEvent('MQTileMap.zoomEnd');e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);}
MQTileMap.prototype.getRouteSession=function()
{return this.GetRouteSession();}
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;}
MQTileMap.prototype.showDragableMap=function()
{this.GetPoiDiv().style.zIndex=90;if(getBrowserInfo().name=='safari'&&this.dcCanvasDiv){this.dcCanvasDiv.style.zIndex=70;}
this.div1.style.zIndex=0;if(this.staticMapEnabled)
{this.RebuildTiles(true);}
if(this.GetRouteSession()!="")
{var tmpRect=(this.GetBestFitRect()!=null)?this.GetBestFitRect():this.GetRouteRect();this.addRouteHighlight(tmpRect,this.GetRouteServer(),this.GetRouteSession(),this.IsRouteBestFit());}
this.GetLoadingDiv().style.zIndex=-1;},MQTileMap.prototype.showStaticMap=function()
{this.GetLoadingDiv().style.zIndex=110;this.div1.style.zIndex=100;this.setLogoZindex(MQMapLogo.MAPQUEST_COPYRIGHT,-100);this.setLogoZindex(MQMapLogo.MAPQUEST,-100);this.setLogoZindex(MQMapLogo.SCALES,-100);this.setLogoZindex(MQMapLogo.ICUBED_COPYRIGHT,-100);this.setLogoZindex(MQMapLogo.NAVTEQ_COPYRIGHT,-100);this.turnEventsOff=true;var reqData={type:this.getMapType(),size:this.getSize().toString(),scale:this.getScaleFromZoom(),center:this.getCenter(),key:Key}
if(this.GetRouteSession()!="")
{reqData.session=this.GetRouteSession();}
if(IsDotCom)
{this.GetPoiDiv().style.zIndex=-100;if(getBrowserInfo().name=='safari'&&this.dcCanvasDiv){this.dcCanvasDiv.style.zIndex=-100;}
this.getDeclutter().removeLeaderLines();reqData.stops=reqData.pois="";var poiData=this.getPois();for(var i=0,j=poiData.getSize();i<j;i++)
{var thisPoi=poiData.getAt(i);var thisDragLeft=(thisPoi.dragLeft==null)?0:((-1*thisPoi.dragLeft)-thisPoi.mqMapIcon.getAnchorOffset().getX());var thisDragTop=(thisPoi.dragTop==null)?0:((-1*thisPoi.dragTop)-thisPoi.mqMapIcon.getAnchorOffset().getY());switch(thisPoi.getKey())
{case"mcenter":case"scenter":case"ecenter":case"pcenter":reqData[thisPoi.getKey()]=thisPoi.getLatLng().toString()+","+thisDragLeft+","+thisDragTop;break;default:var thisKeyLabel=thisPoi.getKey().split("-");switch(thisKeyLabel[0])
{case"stops":case"pois":reqData[thisKeyLabel[0]]+=thisKeyLabel[1].toUpperCase()+","+thisPoi.getLatLng().toString()+","+thisDragLeft+","+thisDragTop+"|";break;}
break;}}}
var staticMapImgSrc=GetStaticMapResources()+"?";for(var nv in reqData)
{staticMapImgSrc+=(reqData[nv]!="")?nv+"="+reqData[nv]+"&":"";}
staticMapImgSrc+"rand="+(Math.round((Math.random()*10000)));if(this.staticMapImg)
{var prevstaticMapImg=this.staticMapImg.src;if(prevstaticMapImg.split("&rand=")[0]==staticMapImgSrc.split("&rand=")[0])
{this.staticMapImg.style.display="block";this.GetLoadingDiv().style.zIndex=0;this.staticMapEnabled=true;return prevstaticMapImg;}}
var staticHW=this.getSize().toString().split(",");var tmpDiv=this.GetStaticMapDiv();tmpDiv.style.top=(0-this.getDragOffset().y)+"px";tmpDiv.style.left=(0-this.getDragOffset().x)+"px";if(!this.staticMapImg)
{this.staticMapImg=document.createElement("img");this.staticMapImg.className="map-static";this.staticMapImg.style.position="absolute";this.staticMapImg.style.top="0";this.staticMapImg.style.left="0";this.staticMapImg.style.border="none";this.staticMapImg.style.display="block";this.staticMapImg.alt="";tmpDiv.appendChild(this.staticMapImg);}
this.staticMapImg.style.width=staticHW[0]+"px";this.staticMapImg.style.height=staticHW[1]+"px";this.staticMapImg.src=staticMapImgSrc;this.staticMapImg.style.display="block";this.staticMapEnabled=true;this.GetLoadingDiv().style.zIndex=0;}
MQTileMap.prototype.hideStaticMap=function()
{if(!this.staticMapEnabled){return;}
this.turnEventsOff=false;if(!this.tilesExist())
{this.showDragableMap();}
if(this.staticMapImg)
{this.staticMapImg.style.display="none";this.div1.style.zIndex=0;this.GetPoiDiv().style.zIndex=90;if(getBrowserInfo().name=='safari'&&this.dcCanvasDiv){this.dcCanvasDiv.style.zIndex=70;}
this.setLogoZindex(MQMapLogo.MAPQUEST_COPYRIGHT,22);this.setLogoZindex(MQMapLogo.MAPQUEST,22);this.setLogoZindex(MQMapLogo.SCALES,22);this.setLogoZindex(MQMapLogo.ICUBED_COPYRIGHT,22);this.setLogoZindex(MQMapLogo.NAVTEQ_COPYRIGHT,22);this.getDeclutter().redrawLeaderLines();}
this.staticMapEnabled=false;}
MQTileMap.prototype.HandleObjectDrag=function(e)
{if(this.draggedObject){this.draggedObject.element.style.left=this.draggedObject.offsetX+e.clientX-this.draggedObject.startX+"px";this.draggedObject.element.style.top=this.draggedObject.offsetY+e.clientY-this.draggedObject.startY+"px";if(this.draggedObject.mqrw&&!this.draggedObject.mqrw.isHidden()&&(Math.abs(this.draggedObject.startX-e.clientX)>3||Math.abs(this.draggedObject.startY-e.clientY)>3)&&!this.getDeclutter().keepRolloversOnDrag)
this.draggedObject.mqrw.hide();};};MQTileMap.prototype.HandleObjectDrop=function(e)
{if(this.draggedObject&&this.mypois.contains(this.draggedObject)&&this.draggedObject.isDragging)
{this.draggedObject.mqrw.hide();this.draggedObject.finishDrag();}}
MQTileMap.prototype.setBestFitMargin=function(bestFitMargin)
{this.SetBestFitMargin(bestFitMargin);};MQTileMap.prototype.getBestFitMargin=function()
{return this.GetBestFitMargin();};
function MQInitOverlays(callback)
{if(dojo.require){dojo.require("dojox.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.shapePointsXY=0;this.shape=null;this.maxZoomLevel=16;this.minZoomLevel=1;};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=dojox.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=dojox.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=dojox.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=dojox.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){var theOverlay=(this.className=='MQImageOverlay'?this.shape.firstChild:this.shape.rawNode);theOverlay.style.display=(bVisible?'inline':'none');};};MQShapeOverlay.prototype.getVisible=function()
{return this.visible;};MQShapeOverlay.prototype.setMaxZoomLevel=function(level)
{var zoomLevel=parseInt(level);if(isNaN(zoomLevel))return;this.maxZoomLevel=(zoomLevel>16)?16:((zoomLevel<this.minZoomLevel)?this.minZoomLevel:zoomLevel);this.redraw();};MQShapeOverlay.prototype.getMaxZoomLevel=function()
{return this.maxZoomLevel;};MQShapeOverlay.prototype.setMinZoomLevel=function(level)
{var zoomLevel=parseInt(level);if(isNaN(zoomLevel))return;this.minZoomLevel=(zoomLevel<1)?1:((zoomLevel>this.maxZoomLevel)?this.maxZoomLevel:zoomLevel);this.redraw();};MQShapeOverlay.prototype.getMinZoomLevel=function()
{return this.minZoomLevel;};MQShapeOverlay.prototype.getClassName=function()
{return this.className;};MQShapeOverlay.prototype.setShapePoints=function(shapePnts)
{this.shapePointsXY=(arguments.length==2?arguments[1]:0);if(this.shapePointsXY){if(shapePnts.setLowerRight){var newShapePoints=new MQObjectCollection();newShapePoints.add(new MQPoint(shapePnts.ul.x,shapePnts.ul.y));newShapePoints.add(new MQPoint(shapePnts.lr.x,shapePnts.lr.y));shapePnts=newShapePoints;};}else{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;if(this.shape){this.drawShape();};};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;propSet.url=this.url;propSet.maxZoomLevel=this.maxZoomLevel;propSet.minZoomLevel=this.minZoomLevel;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.maxZoomLevel=overlayToClone.maxZoomLevel;this.minZoomLevel=overlayToClone.minZoomLevel;this.shapePoints=overlayToClone.shapePoints;this.shape=null;this.map=null;};MQShapeOverlay.prototype.redraw=function()
{if(!this.map)return;this.drawShape();};MQShapeOverlay.prototype.onClick=function(e)
{var mqe=new MQEvent(this.className+'.click');mqe.domEvent=e;MQEventManager.trigger(this,"click",mqe);mqe.srcObject=this;this.map.onClick(mqe);Event.stop(e);}
MQShapeOverlay.prototype.onDoubleClick=function(e)
{var mqe=new MQEvent(this.className+'.doubleClick');mqe.domEvent=e;MQEventManager.trigger(this,"dblclick",mqe);}
MQShapeOverlay.prototype.onMouseDown=function(e)
{var mqe=new MQEvent(this.className+'.mouseDown');mqe.domEvent=e;MQEventManager.trigger(this,"mousedown",mqe);}
MQShapeOverlay.prototype.onMouseUp=function(e)
{var mqe=new MQEvent(this.className+'.mouseUp');mqe.domEvent=e;MQEventManager.trigger(this,"mouseup",mqe);}
MQShapeOverlay.prototype.onMouseOver=function(e)
{var mqe=new MQEvent(this.className+'.mouseOver');mqe.domEvent=e;MQEventManager.trigger(this,"mouseover",mqe);Event.stop(e);}
MQShapeOverlay.prototype.onMouseOut=function(e)
{var mqe=new MQEvent(this.className+'.mouseOut');mqe.domEvent=e;MQEventManager.trigger(this,"mouseout",mqe);Event.stop(e);}
MQShapeOverlay.prototype.onRemoved=function(e)
{var mqe=new MQEvent(this.className+'.removed');mqe.domEvent=e;MQEventManager.trigger(this,"removed",mqe);}
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);};if((this.map.getZoomLevel()<propSet.minZoomLevel)||(this.map.getZoomLevel()>propSet.maxZoomLevel))return;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');};if(this.shape){Event.observe(this.shape.rawNode,"click",MQEventCallback(this,"onClick"));Event.observe(this.shape.rawNode,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.shape.rawNode,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.shape.rawNode,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.shape.rawNode,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.shape.rawNode,"mouseout",MQEventCallback(this,"onMouseOut"));};};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,j;var xy=new Array;for(i=0,j=this.shapePoints.getSize();i<j;i++){var p=new Object;p.x=this.map.llToPix(this.shapePoints.get(i)).x;p.y=this.map.llToPix(this.shapePoints.get(i)).y;p=this.adjustXY(p);xy[i]=p;};var propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};if((this.map.getZoomLevel()<propSet.minZoomLevel)||(this.map.getZoomLevel()>propSet.maxZoomLevel))return;var clippedXY=new Array();if(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=MQClip(0,surfaceWidth,0,surfaceHeight,xy,false);}else{clippedXY=xy;};if(clippedXY.length){var sArray=new Array();sArray[sArray.length]='M '+Math.round(clippedXY[0].x)+','+Math.round(clippedXY[0].y)+' L ';for(var i=1,x=clippedXY.length;i<x;i++){sArray[sArray.length]=Math.round(clippedXY[i].x)+','+Math.round(clippedXY[i].y)+' ';};var s=sArray.join("");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');};if(this.shape){Event.observe(this.shape.rawNode,"click",MQEventCallback(this,"onClick"));Event.observe(this.shape.rawNode,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.shape.rawNode,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.shape.rawNode,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.shape.rawNode,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.shape.rawNode,"mouseout",MQEventCallback(this,"onMouseOut"));};};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()
{var i,j;var xy=new Array;for(i=0,j=this.shapePoints.getSize();i<j;i++){var p=new Object;p.x=this.map.llToPix(this.shapePoints.get(i)).x;p.y=this.map.llToPix(this.shapePoints.get(i)).y;p=this.adjustXY(p);xy[i]=p;};var propSet=this.getCurrentState();if(this.shape!=null){this.map.surface.remove(this.shape);};if((this.map.getZoomLevel()<propSet.minZoomLevel)||(this.map.getZoomLevel()>propSet.maxZoomLevel))return;var clippedXY=new Array();if(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=MQClip(0,surfaceWidth,0,surfaceHeight,xy,true);}else{clippedXY=xy;};if(clippedXY.length){var sArray=new Array();sArray[sArray.length]='M '+Math.round(clippedXY[0].x)+','+Math.round(clippedXY[0].y)+' L ';for(var i=1,x=clippedXY.length;i<x;i++){sArray[sArray.length]=Math.round(clippedXY[i].x)+','+Math.round(clippedXY[i].y)+' ';};sArray[sArray.length]='Z';var s=sArray.join("");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');};if(this.shape){Event.observe(this.shape.rawNode,"click",MQEventCallback(this,"onClick"));Event.observe(this.shape.rawNode,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.shape.rawNode,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.shape.rawNode,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.shape.rawNode,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.shape.rawNode,"mouseout",MQEventCallback(this,"onMouseOut"));};};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);};if((this.map.getZoomLevel()<propSet.minZoomLevel)||(this.map.getZoomLevel()>propSet.maxZoomLevel))return;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;};if(this.shape){Event.observe(this.shape.rawNode,"click",MQEventCallback(this,"onClick"));Event.observe(this.shape.rawNode,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.shape.rawNode,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.shape.rawNode,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.shape.rawNode,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.shape.rawNode,"mouseout",MQEventCallback(this,"onMouseOut"));};};MQImageOverlay.prototype=new MQShapeOverlay();MQImageOverlay.prototype.constructor=MQImageOverlay;function MQImageOverlay(overlayToClone)
{MQShapeOverlay.call(this);this.className='MQImageOverlay';this.url=null;this.levels=null;this.opacity=1.0;if(overlayToClone){if(overlayToClone.getClassName()==this.className){this.clone(overlayToClone);};};};MQImageOverlay.prototype.drawShape=function()
{var xy1,xy2,iHeight,iWidth,propSet,tempx1,tempx2,tempy1,tempy2,iURL,currLevel,currDiff,newDiff,currImage;propSet=this.getCurrentState();if(this.levels){currLevel=this.map.getZoomLevel();currDiff=17;for(var i=0,j=this.levels.length;i<j;i++){if(this.levels[i].zoomLevel==currLevel){iURL=this.levels[i].url;break;}else{newDiff=Math.abs(this.levels[i].zoomLevel-currLevel);if(newDiff<currDiff){iURL=this.levels[i].url;currDiff=newDiff;};};};propSet.url=iURL;}else{propSet.url=this.url;};xy1=this.map.llToPix(this.shapePoints.get(0));xy2=this.map.llToPix(this.shapePoints.get(1));xy1=this.adjustXY(xy1);xy2=this.adjustXY(xy2);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;};if(this.shape!=null){this.shape.firstChild.style.width='0px';this.shape.firstChild.height='0px';this.shape.firstChild.src='';this.shape.removeChild(this.shape.firstChild);this.map.overlaydiv.removeChild(this.shape);this.shape=null;};if((this.map.getZoomLevel()<propSet.minZoomLevel)||(this.map.getZoomLevel()>propSet.maxZoomLevel))return;if(this.map.GetDragOffset().x!=this.map.overlayOffsetX||this.map.GetDragOffset().y!=this.map.overlayOffsetY)
{this.map.overlayOffsetX=this.map.GetDragOffset().x;this.map.overlayOffsetY=this.map.GetDragOffset().y;if(this.map.overlaydiv)
{this.map.overlaydiv.style.left=-(this.map.SURFACE_OFFSET+this.map.overlayOffsetX)+'px';this.map.overlaydiv.style.top=-(this.map.SURFACE_OFFSET+this.map.overlayOffsetY)+'px';};};iHeight=xy2.y-xy1.y;iWidth=xy2.x-xy1.x;if(!(iHeight<1||iWidth<1)){this.shape=document.createElement('div');this.shape.style.position='absolute';this.shape.style.left=xy1.x;this.shape.style.top=xy1.y;this.map.overlaydiv.appendChild(this.shape);var theImage=document.createElement('img');theImage.width=iWidth;theImage.height=iHeight;theImage.style.height=iHeight+'px';theImage.style.width=iWidth+'px';theImage.src=propSet.url;theImage.UNSELECTABLE="on";theImage.MozUserSelect="none";this.shape.appendChild(theImage);this.shape.firstChild.style.display=(propSet.visible?'inline':'none');this.setImageOpacity(this.opacity);};if(this.shape){Event.observe(this.shape,"click",MQEventCallback(this,"onClick"));Event.observe(this.shape,"dblclick",MQEventCallback(this,"onDoubleClick"));Event.observe(this.shape,"mousedown",MQEventCallback(this,"onMouseDown"));Event.observe(this.shape,"mouseup",MQEventCallback(this,"onMouseUp"));Event.observe(this.shape,"mouseover",MQEventCallback(this,"onMouseOver"));Event.observe(this.shape,"mouseout",MQEventCallback(this,"onMouseOut"));};};MQImageOverlay.prototype.setImageURL=function(url)
{if(this.levels==null)
{this.url=url;if(this.shape!=null)
{this.drawShape();};};};MQImageOverlay.prototype.getImageURL=function()
{return this.url;};function MQImageOverlayLevel(url,zoomLevel)
{this.url=url;this.zoomLevel=zoomLevel;};MQImageOverlay.prototype.setImageOverlayLevels=function(levels)
{this.levels=levels;if(this.shape!=null)
{this.drawShape();};};MQImageOverlay.prototype.getImageOverlayLevels=function()
{return this.levels;};MQImageOverlay.prototype.setImageOpacity=function(op)
{this.opacity=op;if(this.shape){if(getBrowserInfo().name=='msie'){this.shape.firstChild.style.filter='alpha(opacity='+(op*100)+')';};this.shape.firstChild.style.MozOpacity=op;this.shape.firstChild.style.opacity=op;};};MQImageOverlay.prototype.getImageOpacity=function()
{return this.opacity;};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;};
PAN_NORTH=0;PAN_SOUTH=1;PAN_EAST=2;PAN_WEST=3;function MQControl()
{}
MQControl.prototype={initialize:function(map)
{this.map=map;},getPosition:function()
{return this.position;},getHeight:function()
{return this.getHeightInternal(this.elem);},getHeightInternal:function(parent)
{var children=parent.childNodes;var height=0;for(var i=0,j=children.length;i<j;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;},getWidth:function()
{return this.getWidthInternal(this.elem);},getWidthInternal:function(parent)
{var children=parent.childNodes;var width=0;for(var i=0,j=children.length;i<j;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.style.position='relative';temp1.style.width='48px';temp1.style.height='45px';temp1.style.margin='0';temp1.style.padding='0 1px';if(browser.name=="msie"&&browser.version<7){temp1.style.backgroundImage="none";temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-top-bg.png', sizingMethod='image');";}else{temp1.style.backgroundColor="transparent";temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-top-bg.png)";temp1.style.backgroundPosition="0 0";temp1.style.backgroundRepeat="no-repeat";};temp.appendChild(temp1);temp1=document.createElement("div");temp1.style.position='relative';temp1.style.width='48px';temp1.style.height='236px';temp1.style.margin='0';temp1.style.padding='5px 0 0';if(browser.name=="msie"&&browser.version<7){temp1.style.backgroundImage="none";temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-middle-bg.png', sizingMethod='crop')";}else{temp1.style.backgroundColor="transparent";temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-middle-short-bg.png)";temp1.style.backgroundPosition="0 0";temp1.style.backgroundRepeat="repeat-y";};if(browser.name=='msie')
{temp1.style.height='241px';};temp.appendChild(temp1);temp1=document.createElement("div");temp1.style.position='relative';temp1.style.width='48px';temp1.style.height='18px';temp1.style.margin='0';temp1.style.padding='0';if(browser.name=="msie"&&browser.version<7){temp1.style.backgroundImage="none";temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png', sizingMethod='image')";}else{temp1.style.backgroundColor="transparent";temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png)";temp1.style.backgroundPosition="0 0";temp1.style.backgroundRepeat="no-repeat";};temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-compass-wrapper";temp.appendChild(temp1);temp2=document.createElement("div");temp2.className="map-compass";temp1.appendChild(temp2);temp3=document.createElement("img");temp3.border=0;if(browser.name=="msie"&&browser.version<7)
{temp3.src="http://img.mqcdn.com/a/a";temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/map-compassrose.png', sizingMethod='image')";}
else
{temp3.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";}
temp3.alt="compass rose";temp3.className="";temp2.appendChild(temp3);this.compassrose=temp3;temp3=document.createElement("img");temp3.border=0;temp3.src="http://img.mqcdn.com/a/a";temp3.className="map-compass-links";temp3.useMap="#mq-zoomcontrol-linkmap";temp2.appendChild(temp3);this.compassroseimg=temp3;temp3=document.createElement("map");temp3.name="mq-zoomcontrol-linkmap";temp3.id="mq-zoomcontrol-linkmap";temp2.appendChild(temp3);this.compassrosemap=temp3;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";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"&&browser.version<7)
{this.zoomin.src="http://img.mqcdn.com/a/a";this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";}
else
{this.zoomin.src="http://img.mqcdn.com/mqtoolkit/z-in.png";}
temp2.appendChild(this.zoomin);var ztemp=document.createElement("div");ztemp.className="map-zoombox";var obj=document.createElement("img");obj.border=0;if(browser.name=="msie"&&browser.version<7.0)
{obj.src="http://img.mqcdn.com/a/a";obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/zoombar.png', sizingMethod='image')";}
else
{obj.src="http://img.mqcdn.com/mqmaptiled/zoombar.png";}
ztemp.appendChild(obj);strHtm="<img src='http://img.mqcdn.com/a/a' border='0' class='map-zoom-links'/>";strHtm+="<img src='http://img.mqcdn.com/mqmaptiled/z-on.png' border='0' class='map-zoom-on'/>";strHtm+="<map>";var initX=1;var initY=10;for(var i=0;i<16;i++)
{strHtm+="<area alt='Zoom to level "+(16-i)+"' title='Zoom to level "+(16-i)+"' shape='rect' coords='1, "+(initX+i*12)+", 22, "+(initY+i*12)+"' />";}
strHtm+="</map>";ztemp.innerHTML+=strHtm;this.zoombox=ztemp;this.zoomarea=ztemp.childNodes[3].childNodes;temp1.appendChild(ztemp);temp2=document.createElement("div");temp2.className="io map-zoom-out";temp1.appendChild(temp2);this.zoomout=document.createElement("img");this.zoomout.alt="Zoom Out";this.zoomout.title="Zoom Out";this.zoomout.border=0;if(browser.name=="msie"&&browser.version<7)
{this.zoomout.src="http://img.mqcdn.com/a/a";this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";}
else
{this.zoomout.src="http://img.mqcdn.com/mqtoolkit/z-out.png";}
temp2.appendChild(this.zoomout);}
MQLargeZoomControl.prototype=new MQControl();MQLargeZoomControl.prototype.constructor=MQLargeZoomControl;MQLargeZoomControl.prototype.destructor=function()
{for(var i=0;i<4;i++)
{Event.stopObserving(this.pan[i],'click',this.MQEventCallbackObserver);Event.stopObserving(this.pan[i],'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.pan[i],'mouseout',this.MQEventCallbackObserver);}
Event.stopObserving(this.zoomin,'click',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'click',this.MQEventCallbackObserver);Event.stopObserving(this.zoomin,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.zoomin,'mouseout',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'mouseout',this.MQEventCallbackObserver);for(var i=0;i<16;i++)
{Event.stopObserving(this.zoomarea[i],'click',this.MQEventCallbackObserver);Event.stopObserving(this.zoomarea[i],'mouseover',this.MQEventCallbackObserver);}
Event.stopObserving(this.zoombox,'mouseout',this.MQEventCallbackObserver);},MQLargeZoomControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_PANZOOM;this.setZoom(this.map.GetZoomLevel());this.MQEventCallbackObserver=MQEventCallback(this,"eventmonitor");this.compassroseimg.useMap="#mq-zoomcontrol-linkmap"+this.map.uniqueMapID;this.compassrosemap.name="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;this.compassrosemap.id="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;this.zoombox.childNodes[1].useMap="#zoompositions"+this.map.uniqueMapID;this.zoombox.childNodes[3].name="zoompositions"+this.map.uniqueMapID;this.zoombox.childNodes[3].id="zoompositions"+this.map.uniqueMapID;for(var i=0;i<4;i++)
{Event.observe(this.pan[i],'click',this.MQEventCallbackObserver);Event.observe(this.pan[i],'mouseover',this.MQEventCallbackObserver);Event.observe(this.pan[i],'mouseout',this.MQEventCallbackObserver);}
Event.observe(this.zoomin,'click',this.MQEventCallbackObserver);Event.observe(this.zoomout,'click',this.MQEventCallbackObserver);Event.observe(this.zoomin,'mouseover',this.MQEventCallbackObserver);Event.observe(this.zoomout,'mouseover',this.MQEventCallbackObserver);Event.observe(this.zoomin,'mouseout',this.MQEventCallbackObserver);Event.observe(this.zoomout,'mouseout',this.MQEventCallbackObserver);for(var i=0;i<16;i++)
{Event.observe(this.zoomarea[i],'click',this.MQEventCallbackObserver);Event.observe(this.zoomarea[i],'mouseover',this.MQEventCallbackObserver);}
Event.observe(this.zoombox,'mouseout',this.MQEventCallbackObserver);}
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";if(Event.element(evt)==this.zoombox.childNodes[1])return;for(var i=0;i<16;i++)
{if(Event.element(evt)==this.zoomarea[i]){eventId=16-i;break;};}
switch(evt.type)
{case"click":switch(eventId)
{case"in":if(this.map.getZoomLevel()<16)
{this.map.zoomIn();}
break;case"out":this.map.zoomOut();break;case"n":this.map.PanNorth(50);break;case"s":this.map.PanSouth(50);break;case"e":this.map.PanEast(50);break;case"w":this.map.PanWest(50);break;case"nil":break;default:this.map.setZoomLevel(eventId);break;}
break;case"mouseover":switch(eventId)
{case"in":case"out":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;}
break;case"mouseout":switch(eventId)
{case"in":case"out":if(Event.element(evt).className!="o")return;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.setZoom=function(level)
{var z=this.zoombox.childNodes[2];z.style.top=((16-level)*12+1)+"px";z.alt="Zoom to level "+(level);z.title="Zoom to level "+(level);}
MQLargeZoomControl.prototype.selectZoom=function(level)
{this.zoombox.childNodes[0].style.left=0-((17-level)*25)+"px";}
MQLargeZoomControl.prototype.unselectZoom=function(level)
{this.zoombox.childNodes[0].style.left="0";}
MQLargeZoomControl.prototype.getHeight=function()
{return 298;}
MQLargeZoomControl.prototype.getWidth=function()
{return 45;}
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.style.position='relative';temp1.style.width='48px';temp1.style.height='52px';temp1.style.margin='0';temp1.style.padding='0 3px';if(browser.name=="msie"&&browser.version<7){temp1.style.backgroundImage="none";temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png', sizingMethod='image')";}else{temp1.style.backgroundColor="transparent";temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/map-controls-box-bg.png)";temp1.style.backgroundPosition="0 0";temp1.style.backgroundRepeat="no-repeat";};temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-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"&&browser.version<7)
{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.useMap="#mq-pancontrol-linkmap";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";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.destructor=function()
{for(var i=0;i<4;i++)
{Event.stopObserving(this.pans[i],'click',this.MQEventCallbackObserver);Event.stopObserving(this.pans[i],'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.pans[i],'mouseout',this.MQEventCallbackObserver);}}
MQPanControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_PAN;this.MQEventCallbackObserver=MQEventCallback(this,"eventmonitors");for(var i=0;i<4;i++)
{Event.observe(this.pans[i],'click',this.MQEventCallbackObserver);Event.observe(this.pans[i],'mouseover',this.MQEventCallbackObserver);Event.observe(this.pans[i],'mouseout',this.MQEventCallbackObserver);}}
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 48;}
MQPanControl.prototype.getWidth=function()
{return 47;}
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.style.position='relative';temp1.style.width='60px';temp1.style.height='45px';temp1.style.margin='0';temp1.style.padding='0';if(browser.name=="msie"&&browser.version<7){temp1.style.backgroundImage="none";temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png', sizingMethod='image')";}else{temp1.style.backgroundColor="transparent";temp1.style.backgroundImage="url(http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png)";temp1.style.backgroundPosition="0 0";temp1.style.backgroundRepeat="no-repeat";};temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-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"&&browser.version<7)
{this.zoomin.src="http://img.mqcdn.com/a/a";this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";}
else
{this.zoomin.src="http://img.mqcdn.com/mqtoolkit/z-in.png";}
temp2.appendChild(this.zoomin);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"&&browser.version<7)
{this.zoomout.src="http://img.mqcdn.com/a/a";this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";}
else
{this.zoomout.src="http://img.mqcdn.com/mqtoolkit/z-out.png";}
temp2.appendChild(this.zoomout);}
MQZoomControl.prototype=new MQControl();MQZoomControl.prototype.constructor=MQZoomControl;MQZoomControl.prototype.destructor=function()
{Event.stopObserving(this.zoomin,'click',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'click',this.MQEventCallbackObserver);Event.stopObserving(this.zoomin,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.zoomin,'mouseout',this.MQEventCallbackObserver);Event.stopObserving(this.zoomout,'mouseout',this.MQEventCallbackObserver);}
MQZoomControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_ZOOM;this.MQEventCallbackObserver=MQEventCallback(this,"eventmonitor");Event.observe(this.zoomin,'click',this.MQEventCallbackObserver);Event.observe(this.zoomout,'click',this.MQEventCallbackObserver);Event.observe(this.zoomin,'mouseover',this.MQEventCallbackObserver);Event.observe(this.zoomout,'mouseover',this.MQEventCallbackObserver);Event.observe(this.zoomin,'mouseout',this.MQEventCallbackObserver);Event.observe(this.zoomout,'mouseout',this.MQEventCallbackObserver);}
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 40;}
MQZoomControl.prototype.getWidth=function()
{return 62;}
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"&&browser.version<7)
{this.streetview.src="http://img.mqcdn.com/a/a";this.streetview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png', sizingMethod='image')";}
else
{this.streetview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png";}
this.streetview.alt="View Street Map";this.streetview.title="View Street Map";temp1.appendChild(this.streetview);temp1=document.createElement("li");temp1.className="map-view-aerial";temp.appendChild(temp1);this.aerialview=document.createElement("img");this.aerialview.className="";this.aerialview.border=0;if(browser.name=="msie"&&browser.version<7)
{this.aerialview.src="http://img.mqcdn.com/a/a";this.aerialview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png', sizingMethod='image')";}
else
{this.aerialview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png";}
this.aerialview.alt="View Aerial Image";this.aerialview.title="View Aerial Image";temp1.appendChild(this.aerialview);temp1=document.createElement("li");temp1.className="map-view-hybrid";temp.appendChild(temp1);this.hybridview=document.createElement("img");this.hybridview.className="";this.hybridview.border=0;if(browser.name=="msie"&&browser.version<7)
{this.hybridview.src="http://img.mqcdn.com/a/a";this.hybridview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png', sizingMethod='image')";}
else
{this.hybridview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png";}
this.hybridview.alt="View Hybrid Map";this.hybridview.title="View Hybrid Map";temp1.appendChild(this.hybridview);}
MQViewControl.prototype=new MQControl();MQViewControl.prototype.constructor=MQViewControl;MQViewControl.prototype.destructor=function()
{Event.stopObserving(this.streetview,'click',this.MQEventCallbackObserver);Event.stopObserving(this.streetview,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.streetview,'mouseout',this.MQEventCallbackObserver);Event.stopObserving(this.aerialview,'click',this.MQEventCallbackObserver);Event.stopObserving(this.aerialview,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.aerialview,'mouseout',this.MQEventCallbackObserver);Event.stopObserving(this.hybridview,'click',this.MQEventCallbackObserver);Event.stopObserving(this.hybridview,'mouseover',this.MQEventCallbackObserver);Event.stopObserving(this.hybridview,'mouseout',this.MQEventCallbackObserver);}
MQViewControl.prototype.initialize=function(map)
{this.map=map;this.type=CONTROL_TYPE;this.MQEventCallbackObserver=MQEventCallback(this,"eventmonitor");Event.observe(this.streetview,'click',this.MQEventCallbackObserver);Event.observe(this.streetview,'mouseover',this.MQEventCallbackObserver);Event.observe(this.streetview,'mouseout',this.MQEventCallbackObserver);Event.observe(this.aerialview,'click',this.MQEventCallbackObserver);Event.observe(this.aerialview,'mouseover',this.MQEventCallbackObserver);Event.observe(this.aerialview,'mouseout',this.MQEventCallbackObserver);Event.observe(this.hybridview,'click',this.MQEventCallbackObserver);Event.observe(this.hybridview,'mouseover',this.MQEventCallbackObserver);Event.observe(this.hybridview,'mouseout',this.MQEventCallbackObserver);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 22;}
MQViewControl.prototype.getWidth=function()
{return 209;}
if(MQ.browser.name=="msie"&&((MQ.browser.version<7)&&MQ.browser.version>5))
{MQ.utils._createImage("http://img.mqcdn.com/a/a",0,0,1,1,false);}
MQPoiCollection.prototype=new MQTKObjectCollection();MQPoiCollection.prototype.constructor=MQPoiCollection;function MQPoiCollection()
{MQTKObjectCollection.call(this);}
MQPoiCollection.prototype.getBoundingRect=function()
{if(this.getSize()==0)return null;var ulPoint=new MQLatLng(0.0,0.0);var lrPoint=new MQLatLng(0.0,0.0);for(i=0;i<this.getSize();i++)
{if(i==0)
{ulPoint.lat=this.getAt(i).element.ll.lat;ulPoint.lng=this.getAt(i).element.ll.lng;lrPoint.lat=this.getAt(i).element.ll.lat;lrPoint.lng=this.getAt(i).element.ll.lng;}
else
{if(this.getAt(i).element.ll.lat>ulPoint.lat)ulPoint.lat=this.getAt(i).element.ll.lat;if(this.getAt(i).element.ll.lat<lrPoint.lat)lrPoint.lat=this.getAt(i).element.ll.lat;if(this.getAt(i).element.ll.lng<ulPoint.lng)ulPoint.lng=this.getAt(i).element.ll.lng;if(this.getAt(i).element.ll.lng>lrPoint.lng)lrPoint.lng=this.getAt(i).element.ll.lng;}}
return new MQRectLL(ulPoint,lrPoint);}
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.element.style.zIndex=0;this.image=null;this.shadow=null;this.anchorOffset=null;this.infoWindowAnchor=null;this.infoContentExists=false;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=null;this.infoWindowAnchor=null;this._calculateAnchors();}
if(this.image)
{this.element.appendChild(this.image);}
if(this.shadow)
{this.element.appendChild(this.shadow);}
this._defImageHeight=29;this._defImageWidth=29;}
MQMapIcon.prototype._calculateAnchors=function()
{if(this.image)
{this.anchorOffset=new MQPoint(-(parseInt(this.image.style.width)/2),-(parseInt(this.image.style.height)/2));this.infoWindowAnchor=new MQPoint(parseInt(this.image.style.width)/2,0);}}
MQMapIcon.prototype._fixPng=function(img)
{if((img.isPng)&&(MQ.browser.name=="msie"&&((MQ.browser.version<7)&&MQ.browser.version>5)))
{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)&&(MQ.browser.name=="msie"&&((MQ.browser.version<7)&&MQ.browser.version>5)))
{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();}
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);}
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);}
if(this.shadow==null)
{this.shadow=this._createImage("http://img.mqcdn.com/mqtoolkit/shadow.png",6,25,23,7,true);this.element.appendChild(this.shadow);}
if(this.anchorOffset==null)
{this.anchorOffset=new MQPoint(-(parseInt(this.image.style.width)/2),-(parseInt(this.image.style.height)/2));}
if(this.infoWindowAnchor==null)
{this.infoWindowAnchor=new MQPoint(parseInt(this.image.style.width)/2,0);}}
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.mqAltMapIcon=null;this.altStateFlag=false;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;this.isDraggable=false;this.isDragging=false;this.dragFlag=false;this.snapback=false;this.keepRolloverOnDrag=true;this.leaderLine=false;this.leaderLineDot=false;this.leaderLineColor=null;this.leaderLineDotImage=null;this.leaderLineDotIcon=null;this.dragTop=null;this.dragLeft=null;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"||Event.element(e).parentNode.id=="poiclose")return;if(this.mqiw!=null&&this.mqiw.opener==this)return;if(!this.dragFlag||(this.dragFlag&&(Math.abs(this.startX-e.clientX)<3&&Math.abs(this.startY-e.clientY)<3))){this.showInfoWindow();var mqe=new MQEvent('MQPoi.click');var ptOffset=this.map._getParentOffset(this.map.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;mqe.xy=new MQPoint(cx,cy);mqe.button=(Event.isLeftClick(e))?BUTTON_MQ_LEFT:BUTTON_MQ_RIGHT;mqe.domEvent=e;MQEventManager.trigger(this,"click",mqe);mqe.srcObject=this;this.map.onClick(mqe);Event.stop(e);};this.dragFlag=false;}
MQPoi.prototype.onDoubleClick=function(e)
{var mqe=new MQEvent('MQPoi.dblClick');var ptOffset=this.map._getParentOffset(this.map.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;mqe.xy=new MQPoint(cx,cy);mqe.button=(Event.isLeftClick(e))?BUTTON_MQ_LEFT:BUTTON_MQ_RIGHT;mqe.domEvent=e;MQEventManager.trigger(this,"dblclick",mqe);}
MQPoi.prototype.onMouseDown=function(e)
{var mqe=new MQEvent('MQPoi.mouseDown');var ptOffset=this.map._getParentOffset(this.map.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;mqe.xy=new MQPoint(cx,cy);mqe.button=(Event.isLeftClick(e))?BUTTON_MQ_LEFT:BUTTON_MQ_RIGHT;mqe.domEvent=e;if(this.getDraggable()){var poiImg=(this.altStateFlag&&this.mqAltMapIcon)?this.mqAltMapIcon.image:this.mqMapIcon.image;var dragOffset=this.map.getDragOffset();var scrOff=getWindowScrollXY();var evtX=cx+scrOff.x;var evtY=cy+scrOff.y;var poiLeft=parseInt(this.element.style.left)+dragOffset.x;var poiTop=parseInt(this.element.style.top)+dragOffset.y;var poiMouseDownFlg=(evtY>=poiTop)&&(evtY<=(poiTop+parseInt(poiImg.height)));poiMouseDownFlg=poiMouseDownFlg&&(evtX>=poiLeft)&&evtX<=(poiLeft+parseInt(poiImg.width));if(!poiMouseDownFlg)
{MQEventManager.trigger(this,"mousedown",mqe);return;}
if(isNaN(parseInt(this.element.style.left))){this.element.style.left=0};if(isNaN(parseInt(this.element.style.top))){this.element.style.top=0};this.offsetX=parseInt(this.element.style.left);this.offsetY=parseInt(this.element.style.top);this.startX=e.clientX;this.startY=e.clientY;this.isDragging=true;this.map.draggedObject=this;if(this.leaderLine)this.map.surface.remove(this.leaderLine);if(this.leaderLineDot)this.map.surface.remove(this.leaderLineDot);if(this.map.dcCanvasContext){this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==2){this.map.getDeclutter().redrawLeaderLines(this);};};};if(this.leaderLineDotIcon)this.leaderLineDotIcon.div.im.style.display='none';if(this.map.getDeclutter()){if(!this.map.getDeclutter().keepRolloversOnDrag&&this.map.getDeclutter().getDeclutterMode()==2){if(this.isRolloverShowable())
{};}else{if(!this.keepRolloverOnDrag){if(this.isRolloverShowable())
{this.mqrw.hide();};};};}else{if(!this.keepRolloverOnDrag){if(this.isRolloverShowable())
{this.mqrw.hide();};};};if(e.preventDefault)e.preventDefault();if((getBrowserInfo().name=='firefox')&&this.mqiw&&this.mqiw.opener==this&&this.mqiw.popup.content.childNodes[1]){var left=this.mqiw.popup.content.childNodes[1].scrollLeft;var top=this.mqiw.popup.content.childNodes[1].scrollTop;this.mqiw.popup.content.childNodes[1].style.overflow="hidden";this.mqiw.popup.content.childNodes[1].scrollLeft=left;this.mqiw.popup.content.childNodes[1].scrollTop=top;}};MQEventManager.trigger(this,"mousedown",mqe);};MQPoi.prototype.onMouseUp=function(e)
{var mqe=new MQEvent('MQPoi.mouseUp');var ptOffset=this.map._getParentOffset(this.map.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;mqe.xy=new MQPoint(cx,cy);mqe.button=(Event.isLeftClick(e))?BUTTON_MQ_LEFT:BUTTON_MQ_RIGHT;mqe.domEvent=e;if(this.isDragging){if(this.isRolloverShowable()&&!this.map.getDeclutter().keepRolloversOnDrag)
{this.mqrw.setOpenerAndShow(this);this.element.style.zIndex=110;};this.finishDrag();};MQEventManager.trigger(this,"mouseup",mqe);}
MQPoi.prototype.finishDrag=function()
{var safari=(getBrowserInfo().name=='safari');this.isDragging=false;var dragOffset=this.map.getDragOffset();if(this.getAltStateFlag()){var iconOffsetX=this.getAltIcon().getAnchorOffset().getX();var iconOffsetY=this.getAltIcon().getAnchorOffset().getY();}else{var iconOffsetX=this.getIcon().getAnchorOffset().getX();var iconOffsetY=this.getIcon().getAnchorOffset().getY();};var newX=(parseInt(this.element.style.left)-iconOffsetX)+dragOffset.x;var newY=(parseInt(this.element.style.top)-iconOffsetY)+dragOffset.y;this.dragFlag=true;if((Math.abs(this.offsetX-parseInt(this.element.style.left))>3)||(Math.abs(this.offsetY-parseInt(this.element.style.top)>3))){if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==2&&!this.getAltStateFlag()){this.setAltStateFlag(true);};};};var dcMode=(this.map.getDeclutter()?this.map.getDeclutter().getDeclutterMode():0);if(this.snapback&&dcMode!=2){this.setLatLng(this.getLatLng());}else{if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==0){this.setLatLng(this.map.pixToLL(new MQPoint(newX,newY)));}else if(this.map.getDeclutter().getDeclutterMode()==2){theLatLngXY=this.map.llToPix(this.getLatLng())
this.dragLeft=theLatLngXY.x-(dragOffset.x+parseInt(this.element.style.left));this.dragTop=theLatLngXY.y-(dragOffset.y+parseInt(this.element.style.top));if((Math.abs(this.offsetX-parseInt(this.element.style.left))>3)||(Math.abs(this.offsetY-parseInt(this.element.style.top))>3)||this.getAltStateFlag()){if(!safari){this.map.getDeclutter().drawLeaderLine(this);}else{this.map.getDeclutter().redrawLeaderLines();};};}else{};}else{this.setLatLng(this.map.pixToLL(new MQPoint(newX,newY)));};};this.map.draggedObject=null;if((getBrowserInfo().name=='firefox')&&this.mqiw&&this.mqiw.opener==this&&this.mqiw.popup.content.childNodes[1]){var left=this.mqiw.popup.content.childNodes[1].scrollLeft;var top=this.mqiw.popup.content.childNodes[1].scrollTop;this.mqiw.popup.content.childNodes[1].style.overflow="auto";this.mqiw.popup.content.childNodes[1].scrollLeft=left;this.mqiw.popup.content.childNodes[1].scrollTop=top;}};MQPoi.prototype.onMouseOver=function(e)
{if(MQ.utils.isMouseLeaveOrEnter(e,this.element)){var mqe=new MQEvent('MQPoi.mouseOver');mqe.domEvent=e;var draggedPoiPresent=(this.map.draggedObject&&this.map.mypois.contains(this.map.draggedObject)&&this.map.draggedObject.isDragging)?true:false;if(!this.isDragging&&!draggedPoiPresent&&(this.mqrw.isHidden()||this.mqrw.opener!=this)){this.showRolloverWindow(mqe);};MQEventManager.trigger(this,"mouseover",mqe);}}
MQPoi.prototype.onMouseOut=function(e)
{if(MQ.utils.isMouseLeaveOrEnter(e,this.element)){if(this.isRolloverShowable()&&!this.isDragging&&this.mqrw.opener==this)
{this.mqrw.hide();}
var mqe=new MQEvent('MQPoi.mouseOut');mqe.domEvent=e;MQEventManager.trigger(this,"mouseout",mqe);}}
MQPoi.prototype.onInfoWindowOpen=function(e)
{this.element.style.zIndex=100;var mqe=new MQEvent('MQPoi.infoWindowOpen');mqe.domEvent=e;this.showRolloverWindow(mqe);MQEventManager.trigger(this,"infowindowopen",mqe);}
MQPoi.prototype.onInfoWindowClose=function(e)
{this.showingInfo=false;this.element.style.zIndex=90;var mqe=new MQEvent('MQPoi.infoWindowClose');mqe.domEvent=e;MQEventManager.trigger(this,"infowindowclose",mqe);}
MQPoi.prototype.onRolloverOpen=function(e)
{this.element.style.zIndex=110;MQEventManager.trigger(this,"rolloveropen",e);}
MQPoi.prototype.onRolloverClose=function(e)
{this.element.style.zIndex=90;MQEventManager.trigger(this,"rolloverclose",e);}
MQPoi.prototype.onRemoved=function(e)
{var mqe=new MQEvent('MQPoi.removed');mqe.domEvent=e;MQEventManager.trigger(this,"removed",mqe);}
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()
{var isVisible=false;isVisible=(this.mqMapIcon.getElement().style.display!="none");isVisible=isVisible||(this.mqAltMapIcon.getElement().style.display!="none");return isVisible;}
MQPoi.prototype.setIconVisible=function(b)
{if(b){if(this.altStateFlag){if(this.mqAltMapIcon){this.mqAltMapIcon.getElement().style.display="block";this.mqMapIcon.getElement().style.display="none";}else{this.mqMapIcon.getElement().style.display="block";};}else{this.mqMapIcon.getElement().style.display="block";if(this.mqAltMapIcon){this.mqAltMapIcon.getElement().style.display="none";};};}else{this.mqMapIcon.getElement().style.display="none";this.mqAltMapIcon.getElement().style.display="none";};};MQPoi.prototype.getAltIcon=function()
{if(this.mqAltMapIcon){return this.mqAltMapIcon;}else{return this.mqMapIcon;};}
MQPoi.prototype.setAltIcon=function(mqAltMapIcon)
{if(isNaN(parseInt(this.element.style.left))){this.element.style.left=0};if(isNaN(parseInt(this.element.style.top))){this.element.style.top=0};var cx=parseInt(this.element.style.left);var cy=parseInt(this.element.style.top);if(this.mqAltMapIcon){this.element.removeChild(this.mqAltMapIcon.getElement());};this.mqAltMapIcon=new MQMapIcon();this.mqAltMapIcon=mqAltMapIcon;this.mqAltMapIcon.parentPoi=this;this.element.appendChild(this.mqAltMapIcon.getElement());this.setAltStateFlag(this.altStateFlag);this.redraw();this.element.style.left=cx+"px";this.element.style.top=cy+"px";};MQPoi.prototype.setAltStateFlag=function(b)
{this.altStateFlag=b;if(this.mqAltMapIcon){if(this.map){var theDiffX=this.getIcon().getAnchorOffset().getX()-this.getAltIcon().getAnchorOffset().getX();var theDiffY=this.getIcon().getAnchorOffset().getY()-this.getAltIcon().getAnchorOffset().getY();}else{theDiffX=0;theDiffY=0;};if(b){this.element.style.left=(parseInt(this.element.style.left)+theDiffX)+'px';this.element.style.top=(parseInt(this.element.style.top)+theDiffY)+'px';this.mqAltMapIcon.getElement().style.display="block";this.mqMapIcon.getElement().style.display="none";}else{if(this.map&&(this.map.getDeclutter().getDeclutterMode()==0)){this.element.style.left=(parseInt(this.element.style.left)-theDiffX)+'px';this.element.style.top=(parseInt(this.element.style.top)-theDiffY)+'px';};this.mqAltMapIcon.getElement().style.display="none";this.mqMapIcon.getElement().style.display="block";};if(this.map){if(this.map.getDeclutter()&&b){if(this.map.getDeclutter().getDeclutterMode()==2)this.map.getDeclutter().drawLeaderLine(this);};};};}
MQPoi.prototype.getAltStateFlag=function()
{return this.altStateFlag;}
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.setLevel=function(i)
{this.element.style.zIndex=i;}
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);if(this.mqAltMapIcon&&this.altStateFlag){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);this.mqrw.setOpenerAndShow(this);this.onRolloverOpen(new MQEvent('MQPoi.rolloverOpen'));}}
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.infoWindowOpen'));}}
MQPoi.prototype.setInfoTitleHTML=function(title)
{var container=document.createElement("div");container.innerHTML="<div>"+title+"</div>";this.rolloverContent=container;}
MQPoi.prototype.setInfoContentHTML=function(content)
{if(content==undefined)return;if(content!="")this.infoContentExists=true;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;}
MQPoi.prototype.getDraggable=function()
{if(this.map){if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==2){return true;};};};return this.isDraggable;}
MQPoi.prototype.setDraggable=function(isEnabled)
{this.isDraggable=isEnabled;if(arguments.length>1){this.keepRolloverOnDrag=arguments[1];};}
MQPoi.prototype.getSnapback=function()
{return this.snapback;}
MQPoi.prototype.setSnapback=function(snap)
{this.snapback=snap;}
MQPoi.prototype.getLeaderLineColor=function()
{if(this.leaderLineColor){return this.leaderLineColor;}else{if(this.map.getDeclutter()){return this.map.getDeclutter().leaderLineColor;}else{return'#000000';};};};MQPoi.prototype.setLeaderLineColor=function(c)
{this.leaderLineColor=c;if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==2){this.map.getDeclutter().drawLeaderLine(this);};};};MQPoi.prototype.setRolloverDrag=function(b)
{this.keepRolloverOnDrag=b;};MQPoi.prototype.getRolloverDrag=function()
{return this.keepRolloverOnDrag;};MQPoi.prototype.setLeaderLineDotImage=function(url,width,height)
{this.leaderLineDotImage=new MQLeaderLineDotImage(url,width,height);if(this.map.getDeclutter()){if(this.map.getDeclutter().getDeclutterMode()==2){this.map.getDeclutter().drawLeaderLine(this);};};};MQPoi.prototype.getLeaderLineDotImage=function()
{return this.leaderLineDotImage;};function MQLeaderLineDotImage(url,width,height)
{this.url=url;this.width=width;this.height=height;};function MQLeaderLineDotIcon(dotImage,map,poi){this.map=map;this.div=document.createElement('div');this.div.im=document.createElement('img');this.div.im.src=dotImage.url;this.div.im.style.height=dotImage.height;this.div.im.style.width=dotImage.width;this.div.im.style.position='absolute';this.div.im.style.display='block';this.div.style.MozUserSelect="none";this.div.appendChild(this.div.im);this.map.AddPOI(poi.getLatLng(),new PointXY(-dotImage.width/2,-dotImage.height/2),this.div);};
function MQInfoWindow(map)
{this.map=map;this.enabled=true;this.point=null;this.title=null;this.content=null;this.offset=null;this.maxwidth=this.map.width-50;this.minwidth=60;this.maxheight=this.map.height-50;this.contentwidth=null;this.titlebackgroundcolor=null;this.opener=null;this.infoWindowSrc="http://img.mqcdn.com/mqtoolkit/infopopup.png";this.popup=document.createElement("div");this.popup.id="popupcontainer";this.popup.className="mqpoipopup";this.popup.currentElement=null;this.popup.oncontextmenu=function(){return false;};var str="<div id='poiclose' class='mqpoiclose'><div style='width:650px;height:685px;margin-left:-180px;margin-top:-650px;'></div></div>";str+="<div id='popup-topleft' style='position:absolute;overflow:hidden;'><div style='width:650px;height:685px;'></div></div>";str+="<div id='popup-topright' style='position:absolute;width:20px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;'></div></div>";str+="<div id='popup-bottomleft' style='position:absolute;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-top:-630px;'></div></div>";str+="<div id='popup-bottomright' style='position:absolute;width:20px;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;margin-top:-630px;'></div></div>";str+="<div id='popup-pointer' style='position:absolute;width:20px;height:22px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-50px;margin-top:-654px;'></div></div>";str+="<div id='popup-fillercontainer'></div>";str+="<div id='popup-content' style='position:absolute;left:13px;top:13px;overflow:auto;z-index:1;'></div></div>";this.popup.innerHTML=str;this.popup.style.position="absolute";this.popup.style.visibility="hidden";this.popup.style.left='-1000px';this.popup.style.top='-1000px';document.body.appendChild(this.popup);var poiclose=this.popup.childNodes[0];var popupTopLeft=this.popup.childNodes[1];var popupTopRight=this.popup.childNodes[2];var popupBottomLeft=this.popup.childNodes[3];var popupBottomRight=this.popup.childNodes[4];var popupPointer=this.popup.childNodes[5];var popupFillerContainer=this.popup.childNodes[6];Event.observe(poiclose,"click",MQEventCallback(this,"clickClose"));this.popup.content=this.popup.childNodes[7];;Event.observe(this.popup,"click",MQEventCallback(this,"onClick"));if(MQ.browser.name=="msie"&&(MQ.browser.version>5)&&(MQ.browser.version<7))
{popupTopLeft.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";popupTopRight.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";popupBottomLeft.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";popupBottomRight.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";popupPointer.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";poiclose.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";}
else
{popupTopLeft.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";popupTopRight.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";popupBottomLeft.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";popupBottomRight.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";popupPointer.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";poiclose.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";}}
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)
{e=new MQEvent('MQInfoWindow.clickedClosed');MQEventManager.trigger(this,"clickedclosed",e);Event.stop(e);}
MQInfoWindow.prototype.clickClose=function(evt)
{this.hide();this.onClickedClosed(evt);Event.stop(evt);}
MQInfoWindow.prototype.onClick=function(evt)
{evt.srcObject=this;};MQInfoWindow.prototype.hide=function()
{if(!this.isHidden())
{if(this.popup.style.visibility!="hidden"){this.popup.style.visibility="hidden";this.popup.style.display="none";}
if(this.opener!=null)
{if(this.map.getDeclutter()){if((this.map.getDeclutter().getDeclutterMode()!=0)&&this.opener.decluttered){this.opener.setVisible(false);};};this.opener.onInfoWindowClose(new MQEvent('MQTileMap.infoWindowClose'));this.opener=null;}
this.onClose(new MQEvent('MQInfoWindow.close'));}}
MQInfoWindow.prototype.setOpenerAndShow=function(opener)
{this.show();this.opener=opener;}
MQInfoWindow.prototype.show=function()
{if(!this.isHidden())this.hide();this.popup.style.display="block";var offsetY=this.offset.y;var offsetHeight=this.popup.offsetHeight+3;var offsetX=this.offset.x;var offsetWidth=25;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.open'));}
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.resize(false);}
MQInfoWindow.prototype.getMaxWidth=function()
{return this.maxwidth;}
MQInfoWindow.prototype.setMaxWidth=function(width)
{width=parseInt(width);if(isNaN(width))return;this.maxwidth=(width>this.map.width-50)?(this.map.width-50):(width<this.minwidth)?this.minwidth:width;}
MQInfoWindow.prototype.getMinWidth=function()
{return this.minwidth;}
MQInfoWindow.prototype.setMinWidth=function(width)
{width=parseInt(width);if(isNaN(width))return;this.minwidth=(width<60)?60:(width>this.maxwidth)?this.maxwidth:width;}
MQInfoWindow.prototype.getContentWidth=function()
{return this.contentwidth;}
MQInfoWindow.prototype.setContentWidth=function(width)
{this.contentwidth=width;}
MQInfoWindow.prototype.getTitleBackgroundColor=function()
{return this.titlebackgroundcolor;}
MQInfoWindow.prototype.setTitleBackgroundColor=function(color)
{this.titlebackgroundcolor=color;}
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;}
MQInfoWindow.prototype.resize=function(bContentChanged)
{var poiclose=this.popup.childNodes[0];var popupTopLeft=this.popup.childNodes[1];var popupTopRight=this.popup.childNodes[2];var popupBottomLeft=this.popup.childNodes[3];var popupBottomRight=this.popup.childNodes[4];var popupPointer=this.popup.childNodes[5];var popupFillerContainer=this.popup.childNodes[6];var xtraDivInfoForTitle="";if(this.getTitleBackgroundColor()){xtraDivInfoForTitle=" style=background:"+this.getTitleBackgroundColor();}
popupFillerContainer.innerHTML="";this.popup.style.display="block";this.popup.content.style.width="auto";this.popup.content.style.height="auto";this.popup.content.style.overflow="visible";var contentHtml="";if(bContentChanged){if(this.popup.content)
contentHtml=this.popup.content.innerHTML;}else{contentHtml="<div class='mqpoiheading'"+xtraDivInfoForTitle+" title='"+stripHTMLTags(this.title.innerHTML)+"'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";}
this.popup.content.innerHTML=contentHtml;var popupContentHeading=this.popup.content.childNodes[0];var popupContentText=this.popup.content.childNodes[1];popupContentHeading.style.display="none";popupContentText.style.whiteSpace="nowrap";popupContentText.style.overflow="visible";popupContentText.style.width="auto";popupContentText.style.height="auto";var popupOffWidth=this.popup.content.offsetWidth+35+2;var hScrollAdj=(popupOffWidth>this.maxwidth)?18:0;popupOffWidth=(popupOffWidth>this.maxwidth)?this.maxwidth:(popupOffWidth<this.minwidth)?this.minwidth:popupOffWidth;var contentWidth=popupOffWidth-35;popupContentText.style.width=contentWidth+"px";popupContentHeading.style.display="";popupContentText.style.whiteSpace="";var popupOffHeight=this.popup.content.offsetHeight+hScrollAdj+30+2;var vScrollAdj=(popupOffHeight>this.maxheight)?18:0;contentWidth+=vScrollAdj;popupOffWidth+=vScrollAdj;popupContentHeading.style.width=(contentWidth-18)+"px";var titleDiv=popupContentHeading.childNodes[0];if(typeof(titleDiv.tagName)=='undefined')
{popupContentHeading.innerHTML="<div>"+this.title.innerHTML+"</div>";titleDiv=popupContentHeading.childNodes[0];}
titleDiv.style.display="inline";if((titleDiv.offsetWidth>(contentWidth-18))&&((contentWidth-18)>25))
{var titleString=stripHTMLTags(this.title.innerHTML);var titleStringWithHTML=titleDiv.innerHTML;for(var i=titleString.length;(titleDiv.offsetWidth>=(contentWidth-18)&&i>0);i--)
{titleDiv.innerHTML=getHTMLSubstring(titleStringWithHTML,i,"&nbsp;...");}}
popupOffHeight=this.popup.content.offsetHeight+hScrollAdj+30+2;popupOffHeight=(popupOffHeight>this.maxheight)?this.maxheight:popupOffHeight;var contentHeight=popupOffHeight-30+2;var noOfHElements=Math.ceil(contentWidth/600);var lastHElementWidth=contentWidth%600;var noOfVElements=Math.ceil(contentHeight/600);var lastVElementHeight=contentHeight%600;var fillerWidth,fillerHeight,totalWidth,totalHeight;var fillerWidthAdj,fillerHeightAdj;var fillerTopAdjust,fillerLeftAdjust;var marginLeft,marginTop,fillerLeft,fillerTop;var maxFillerDivWidth=600;var maxFillerDivHeight=600;for(var i=1;i<=noOfVElements;i++){for(var j=1;j<=noOfHElements;j++){if(i==1&&j==1)continue;fillerWidth=(j==noOfHElements&&lastHElementWidth!=0)?lastHElementWidth:maxFillerDivWidth;fillerHeight=(i==noOfVElements&&lastVElementHeight!=0)?lastVElementHeight:maxFillerDivHeight;fillerWidthAdj=(j==1)?15:0;fillerHeightAdj=(i==1)?15:0;fillerTopAdjust=(i==1)?0:15;fillerLeftAdjust=(j==1)?0:15;marginLeft=(-1*fillerLeftAdjust);marginTop=(-1*fillerTopAdjust);totalWidth=(fillerWidth+fillerWidthAdj);totalHeight=(fillerHeight+fillerHeightAdj);fillerLeft=(((j-1)*maxFillerDivWidth)+fillerLeftAdjust);fillerTop=(((i-1)*maxFillerDivHeight)+fillerTopAdjust);this.createFillerDiv(marginLeft,marginTop,totalWidth,totalHeight,fillerLeft,fillerTop);if(i==1){marginLeft=-15;marginTop=-630;totalWidth=(fillerWidth+fillerWidthAdj);totalHeight=15;fillerLeft=(((j-1)*maxFillerDivWidth)+fillerLeftAdjust);fillerTop=(contentHeight+15);this.createFillerDiv(marginLeft,marginTop,totalWidth,totalHeight,fillerLeft,fillerTop);}}
if(i>1){marginLeft=-630;marginTop=-15;totalWidth=20;totalHeight=(fillerHeight+fillerHeightAdj);fillerLeft=(contentWidth+15);fillerTop=(((i-1)*maxFillerDivHeight)+fillerTopAdjust);this.createFillerDiv(marginLeft,marginTop,totalWidth,totalHeight,fillerLeft,fillerTop);}}
var topLeftWidth=(contentWidth>maxFillerDivWidth)?maxFillerDivWidth:contentWidth;var topLeftHeight=(contentHeight>maxFillerDivHeight)?maxFillerDivHeight:contentHeight;this.popup.style.width=(popupOffWidth)+"px";this.popup.style.height=(popupOffHeight)+"px";this.popup.content.style.width=contentWidth+"px";this.popup.content.style.height=contentHeight+"px";poiclose.style.left=(popupOffWidth-38)+"px";poiclose.style.top="12px";popupContentHeading.style.width=(contentWidth-18)+"px";popupContentText.style.width=contentWidth+"px";popupContentText.style.height=(contentHeight-popupContentHeading.offsetHeight-5)+"px";popupContentText.style.overflow="auto";popupTopLeft.style.width=topLeftWidth+15+"px";popupTopLeft.style.height=topLeftHeight+15+"px";popupTopRight.style.left=contentWidth+15+"px";popupTopRight.style.height=topLeftHeight+15+"px";popupBottomLeft.style.top=contentHeight+15+"px";popupBottomLeft.style.width=topLeftWidth+15+"px";popupBottomRight.style.top=contentHeight+15+"px";popupBottomRight.style.left=contentWidth+15+"px";popupPointer.style.left="14px";popupPointer.style.top=contentHeight+15+"px";if(bContentChanged){this.popup.style.visibility="hidden";this.show();}}
MQInfoWindow.prototype.createFillerDiv=function(marginLeft,marginTop,elementWidth,elementHeight,fillerLeft,fillerTop){var popupFillerContainer=this.popup.childNodes[6];var fillerDiv=document.createElement("div");fillerDiv.style.position="absolute";fillerDiv.style.overflow="hidden";var str="<div style='width:650px;height:685px;'></div>";fillerDiv.innerHTML=str;popupFillerContainer.appendChild(fillerDiv);if((getBrowserInfo().name=='msie')&&(parseFloat(getBrowserInfo().version)<7.0)){fillerDiv.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";}
else{fillerDiv.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";}
fillerDiv.childNodes[0].style.marginLeft=marginLeft+"px";fillerDiv.childNodes[0].style.marginTop=marginTop+"px";fillerDiv.style.width=elementWidth+"px";fillerDiv.style.height=elementHeight+"px";fillerDiv.style.left=fillerLeft+"px";fillerDiv.style.top=fillerTop+"px";}
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.flipStateEnabled=false;this.leftRolloverSrc=this.artUrl+"rollover-left.png";this.rightRolloverSrc=this.artUrl+"rollover-right.png";this.minipopup=null;this.textLength=31;this.leftRolloverOffsetX=-25;this.rightRolloverOffsetX=-193;this.createRolloverWindow();this.rolloverOffsetY=13-this.minipopup.offsetHeight;}
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('MQPoi.rolloverClose'));this.opener=null;}
this.onClose(new MQEvent('MQRolloverWindow.close'));}}
MQRolloverWindow.prototype.setOpenerAndShow=function(opener)
{this.show();this.opener=opener;}
MQRolloverWindow.prototype.show=function()
{if(!this.isHidden())this.hide();var offsetY=this.offset.y;var offsetX=this.offset.x;var rolloverSrc=this.leftRolloverSrc;this.minipopup.style.top=(offsetY+this.rolloverOffsetY)+"px";this.minipopup.style.left=(offsetX+this.leftRolloverOffsetX)+"px";if(this.flipStateEnabled)
{var collisionOffset=this.getCollisionInfo(this.minipopup);if(collisionOffset.panX<0)
{rolloverSrc=this.rightRolloverSrc;this.minipopup.style.top=(offsetY+this.rolloverOffsetY)+"px";this.minipopup.style.left=(offsetX+this.rightRolloverOffsetX)+"px";}}
if(MQ.browser.name=="msie"&&(MQ.browser.version>5)&&(MQ.browser.version<7))
{this.minipopup.style.display="none";this.minipopup.style.visibility="visible";this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+rolloverSrc+"', sizingMethod='scale')";this.minipopup.style.display="block";}
else
{this.minipopup.style.background="";this.minipopup.style.background="url("+rolloverSrc+") left";}
this.minipopup.style.visibility="visible";this.onOpen(new MQEvent('MQRolloverWindow.open'));}
MQRolloverWindow.prototype.isHidden=function()
{return(this.minipopup.style.visibility=="hidden");}
MQRolloverWindow.prototype.modify=function(point,content,offset,mqpoi)
{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;var titleString=stripHTMLTags(this.content.innerHTML);if(mqpoi.infoWindowContent&&this.textLength==31)this.textLength-=2;if(mqpoi.infoWindowContent)
{titleString=(titleString.length>this.textLength)?getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;...&nbsp;&raquo;"):getHTMLSubstring(this.content.innerHTML,titleString.length,"&nbsp;&raquo;");}
else
{titleString=(titleString.length>this.textLength)?getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;..."):getHTMLSubstring(this.content.innerHTML,titleString.length,"");}
this.minipopup.innerHTML="<div class='mqminipopuphead'>"+titleString+"</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;}
MQRolloverWindow.prototype.setRolloverGraphic=function(leftImgSrc,rightImgSrc)
{if(typeof leftImgSrc=='undefined')
this.leftRolloverSrc=this.artUrl+"rollover-left.png";else
this.leftRolloverSrc=leftImgSrc;this.rightRolloverSrc=rightImgSrc;}
MQRolloverWindow.prototype.setDefaultRollover=function()
{this.leftRolloverSrc=this.artUrl+"rollover-left.png";this.rightRolloverSrc=this.artUrl+"rollover-right.png";this.setRolloverGraphic(this.leftRolloverSrc,this.rightRolloverSrc);}
MQRolloverWindow.prototype.setFlipStateEnabled=function(benable)
{if(typeof benable=='undefined'||typeof benable!='boolean')
this.flipStateEnabled=false;else
this.flipStateEnabled=benable;}
MQRolloverWindow.prototype.getFlipStateEnabled=function()
{return this.flipStateEnabled;}
MQRolloverWindow.prototype.getCollisionInfo=function(element,compassPresent,viewBtnsPresent)
{var mapElement=this.map.parent;var collisionInfo={panX:0,panY:0};var isCompassPresent=(compassPresent)?compassPresent:false;var isViewBtnsPresent=(viewBtnsPresent)?viewBtnsPresent:false;var mapLftTop=MQ.utils.getOffsetLftTop(mapElement);var elemPos=Position.cumulativeOffset(element);var leftTopPad=0;elemPos[0]=elemPos[0]-mapLftTop.left-leftTopPad;elemPos[1]=elemPos[1]-mapLftTop.top-leftTopPad;var compassDims=(isCompassPresent)?{width:37,height:300}:{width:0,height:0};var viewBtnDims=(isViewBtnsPresent)?{width:139,height:15}:{width:0,height:0};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;}
MQRolloverWindow.prototype.createRolloverWindow=function()
{if(this.minipopup)this.minipopup.parentNode.removeChild(this.minipopup);this.minipopup=document.createElement("div");this.minipopup.id="minipopup";this.minipopup.className="mqminipopup";this.minipopup.currentElement=null;this.minipopup.style.left='-1000px';this.minipopup.style.top='-1000px';this.minipopup.oncontextmenu=function(){return false;};document.body.appendChild(this.minipopup);this.minipopup.style.position="absolute";this.minipopup.style.visibility="hidden";}
MQRolloverWindow.prototype.setTextLength=function(length)
{if(typeof length=='undefined'||isNaN(parseInt(length)))
this.textLength=31;else
this.textLength=parseInt(length);}
MQRolloverWindow.prototype.getTextLength=function()
{return this.textLength;}
MQRolloverWindow.prototype.setLeftRolloverOffsetX=function(offWidth)
{if(typeof offWidth=='undefined'||isNaN(parseInt(offWidth)))
this.leftRolloverOffsetX=-25;else
this.leftRolloverOffsetX=parseInt(offWidth);}
MQRolloverWindow.prototype.getLeftRolloverOffsetX=function()
{return this.leftRolloverOffsetX;}
MQRolloverWindow.prototype.setRightRolloverOffsetX=function(offWidth)
{if(typeof offWidth=='undefined'||isNaN(parseInt(offWidth)))
this.rightRolloverOffsetX=-193;else
this.rightRolloverOffsetX=parseInt(offWidth);}
MQRolloverWindow.prototype.getRightRolloverOffsetX=function()
{return this.rightRolloverOffsetX;}
MQRolloverWindow.prototype.setRolloverOffsetY=function(offHeight)
{if(typeof offHeight=='undefined'||isNaN(parseInt(offHeight)))
this.rolloverOffsetY=(13-this.minipopup.offsetHeight);else
this.rolloverOffsetY=parseInt(offHeight);}
MQRolloverWindow.prototype.getRolloverOffsetY=function()
{return this.rolloverOffsetY;}
function MQEvent()
{this.type="event";this.srcObject=null;if(arguments.length){this.eventName=arguments[0];}else{this.eventName="unnamed 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.declutterAltIcon=null;this.declutterOverIcon=null;this.declutterOverAltIcon=null;this.dcCollection=null;this.pnCollection=null;this.nextPageIcon=null;this.prevPageIcon=null;this.pageBarIcon=null;this.pageMarkIcon=null;this.stackHeight=1;this.stackWidth=3;this.currentPage=1;this.keepRolloversOnDrag=true;this.leaderLineColor='#000000';this.leaderLineDotMode=1;this.leaderLineDotImage=null;this.poiCollection=null;this.cpCollection=null;};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.declutterOverIcon)this.setDeclutterOverIcon('http://img.mqcdn.com/mqtoolkit/declut_star_over.png',29,29);if(!this.nextPageIcon)this.setNextPageIcon('http://img.mqcdn.com/mqtoolkit/page_right.png',29,19);if(!this.prevPageIcon)this.setPrevPageIcon('http://img.mqcdn.com/mqtoolkit/page_left.png',29,19);if(!this.pageBarIcon)this.pageBarIcon=new MQDeclutterIcon('http://img.mqcdn.com/mqtoolkit/page_bar.png',29,19);if(!this.pageMarkIcon)this.pageMarkIcon=new MQDeclutterIcon('http://img.mqcdn.com/mqtoolkit/page_mark.png',7,19);this.dcCollection=new Array;this.pnCollection=new Array;this.cpCollection=new Array;if(this.map)
{this.map.getInfoWindow().hide();this.doDeclutter(declutterMode);}}
else
{this.doDeclutter(0);}
this.mode=declutterMode;}
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.setDeclutterOverIcon=function(url,width,height)
{var m=this.getDeclutterMode();if(m)this.setDeclutterMode(0);this.declutterOverIcon=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<1?1: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<2?2:n);if(m)this.setDeclutterMode(m);}
MQDeclutter.prototype.getStackWidth=function()
{return this.stackWidth;}
MQDeclutter.prototype.setRolloverDrag=function(b)
{this.keepRolloversOnDrag=b;}
MQDeclutter.prototype.getRolloverDrag=function()
{return this.keepRolloversOnDrag;}
MQDeclutter.prototype.setLeaderLineColor=function(c)
{this.leaderLineColor=c;if(this.getDeclutterMode()==2)
{this.redrawLeaderLines();}}
MQDeclutter.prototype.getLeaderLineColor=function()
{return this.leaderLineColor;}
MQDeclutter.prototype.setLeaderLineDotMode=function(m)
{this.leaderLineDotMode=m;if(this.getDeclutterMode()==2)
{this.redrawLeaderLines();}}
MQDeclutter.prototype.getLeaderLineDotMode=function()
{return this.leaderLineDotMode;}
MQDeclutter.prototype.setLeaderLineDotImage=function(url,width,height)
{this.leaderLineDotImage=new MQLeaderLineDotImage(url,width,height);if(this.getDeclutterMode()==2)
{this.redrawLeaderLines();}}
MQDeclutter.prototype.getLeaderLineDotImage=function()
{return this.leaderLineDotImage;}
MQDeclutter.prototype.doDeclutter=function(dcmode)
{var i,j;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 dcVisible=true;dcmode=parseInt(dcmode);switch(dcmode)
{case 0:if(this.mode==1)
{for(var i=0,x=this.dcCollection.length;i<x;i++)
{for(var j=0,y=this.dcCollection[i].length;j<y;j++)
{this.dcCollection[i][j].poi.setVisible(true);this.dcCollection[i][j].setVisible(false);this.dcCollection[i][j]=null;}
this.dcCollection[i]=null;}
for(var i=0,x=this.pnCollection.length;i<x;i++)
{if(this.pnCollection[i]!=null)
{this.pnCollection[i][0].setVisible(false);this.pnCollection[i][1].setVisible(false);this.pnCollection[i][2].remove();this.pnCollection[i][0]=null;this.pnCollection[i][1]=null;this.pnCollection[i][2]=null;}}}
else if(this.mode==2)
{var poiCol=this.map.getPois();for(var i=0,x=poiCol.getSize();i<x;i++)
{this.removeLeaderLines();poiCol.getAt(i).setLatLng(poiCol.getAt(i).getLatLng());poiCol.getAt(i).dragLeft=null;poiCol.getAt(i).dragTop=null;poiCol.getAt(i).setAltStateFlag(false);}}
break;case 1:var poiWidth,poiHeight;var ptUL,ptLR;var currRect;var intersect;var b;var myCollection=this.map.getPois();var sortedArray=new Array;var declutterArray=new Array;for(var a=0,x=myCollection.getSize();a<x;a++)
{sortedArray[a]=new Array(myCollection.getAt(a).getLatLng().getLatitude(),myCollection.getAt(a).getLatLng().getLongitude(),a);}
sortedArray.sort(this.sortPoisRL);for(var a=0,e=sortedArray.length;a<e;a++)
{poiWidth=myCollection.getAt(sortedArray[a][2]).getIcon().getImage().width;poiHeight=myCollection.getAt(sortedArray[a][2]).getIcon().getImage().height;ptUL=this.map.GetLLToXY(new PointLL(sortedArray[a][0],sortedArray[a][1]));ptUL.x+=myCollection.getAt(sortedArray[a][2]).element.offset.x;ptUL.y+=myCollection.getAt(sortedArray[a][2]).element.offset.y;ptLR=new PointXY(ptUL.x+poiWidth,ptUL.y+poiHeight);if(this.declutterIcon.height>poiHeight)
{ptUL.y-=(this.declutterIcon.height-poiHeight);}
ptUL.y-=(this.nextPageIcon.height+dcSpacer);if(this.declutterIcon.width>poiWidth)
{ptLR.x-=(this.declutterIcon.width-poiWidth);}
currRect=new RectXY(ptUL,ptLR);intersect=false;for(b=0;!intersect&&b<declutterArray.length;b++)
{intersect=this.isIntersected(currRect,declutterArray[b][0]);}
if(intersect)
{b=b-1;declutterArray[b][1][declutterArray[b][1].length]=a;var clusterCnt=declutterArray[b][1].length;var clusterPag=parseInt((clusterCnt-1)%pageSize);var clusterRow=parseInt(clusterPag/this.stackWidth);var clusterCol=parseInt(clusterPag%this.stackWidth);xPos=declutterArray[b][3].x-(clusterCol+1)*(this.declutterIcon.width+dcSpacer);yPos=declutterArray[b][3].y-((clusterRow+1)*(this.declutterIcon.height+dcSpacer));dcVisible=(clusterCnt<=pageSize);if(clusterCnt<=this.stackWidth){declutterArray[b][0].ul.x-=(this.declutterIcon.width+dcSpacer);}
if(clusterCol==0&&clusterRow>0&&clusterRow<this.stackHeight){declutterArray[b][0].ul.y-=(this.declutterIcon.height+dcSpacer)+(this.pageMarkIcon.height+dcSpacer);}
this.addDeclutterPoi(xPos,yPos,myCollection.getAt(sortedArray[a][2]),dcVisible,b);if(clusterCnt>pageSize&&this.pnCollection[b]==null){this.pnCollection[b]=new Array();var declutterY=declutterArray[b][3].y-(this.stackHeight*(this.declutterIcon.height+dcSpacer)+(Math.max(this.nextPageIcon.height,this.pageBarIcon.height)+dcSpacer));this.pnCollection[b][0]=new MQPrevNextIcon(this.prevPageIcon,declutterArray[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+this.prevPageIcon.width+(3*dcSpacer)),declutterY,this.map,false,-1,b);this.pnCollection[b][1]=new MQPrevNextIcon(this.nextPageIcon,declutterArray[b][3].x-(this.nextPageIcon.width+dcSpacer),declutterY,this.map,true,1,b);this.pnCollection[b][2]=new MQPageMarkIcon(this.pageBarIcon,this.pageMarkIcon,declutterArray[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+(2*dcSpacer)),declutterY,this.map,b);}}
else
{if(this.declutterIcon.height>poiHeight)
{ptUL.y-=parseInt((this.declutterIcon.height-poiHeight)/2);}
ptUL.y+=(this.declutterIcon.height+dcSpacer);var declutterCluster=new Array();declutterCluster[0]=currRect;declutterCluster[1]=new Array();declutterCluster[2]=a;declutterCluster[3]=ptUL;declutterArray[declutterArray.length]=declutterCluster;this.pnCollection[this.pnCollection.length]=null;this.dcCollection[this.dcCollection.length]=new Array();this.cpCollection[this.cpCollection.length]=1;}}
break;case 2:this.getPOIDims();var declutPoiGrps=this.createDeclutterGrps();this.doDeclutterM2(declutPoiGrps);break;}}
MQDeclutter.prototype.getPOIDims=function()
{var poiCol=this.map.getPois();var poiCount=poiCol.getSize();this.poiCollection={length:poiCount};var sortedArray=new Array;for(var i=0;i<poiCount;i++)
{sortedArray[i]=new Array(poiCol.getAt(i).getLatLng().getLatitude(),poiCol.getAt(i).getLatLng().getLongitude(),i);}
sortedArray.sort(this.sortPois);for(var i=0,j=sortedArray.length;i<j;i++)
{tmpHW=poiCol.getAt(sortedArray[i][2]).getIcon().getImage();tmpXY=this.map.GetLLToXY(poiCol.getAt(sortedArray[i][2]).getLatLng());tmpXY.x-=Math.ceil(tmpHW.width/2);tmpXY.y-=Math.ceil(tmpHW.height/2);this.poiCollection[i]={ix:tmpXY.x,iy:tmpXY.y,x:tmpXY.x,y:tmpXY.y,h:tmpHW.height,w:tmpHW.width,indx:sortedArray[i][2]};}}
MQDeclutter.prototype.createDeclutterGrps=function()
{var excludeList=new Array();var declutPoiGrps=new Array;var nGrp=0;var groupCreated;for(var i=0,k=this.poiCollection.length;i<k;i++)
{if(excludeList.indexOf(i)>=0)continue;groupCreated=false;for(var j=i+1;j<k;j++)
{if(excludeList.indexOf(j)>=0)continue;if(this.isOverlapped(this.poiCollection[i],this.poiCollection[j]))
{if(!groupCreated)
{declutPoiGrps[nGrp]=new Array();declutPoiGrps[nGrp].push(i);excludeList.push(i);groupCreated=true;}
declutPoiGrps[nGrp].push(j);excludeList.push(j);}}
if(declutPoiGrps[nGrp]&&declutPoiGrps[nGrp].length>0)nGrp++;}
return declutPoiGrps;}
MQDeclutter.prototype.doDeclutterM2=function(declutpoigrps)
{var projPos={x:0,y:0,h:0,w:0};var PI=3.14;var theta,llFactor;var nx,ny;var n,centerPt;var nLoop;var thisPoi;var overlapped;var thePoi;var fullCircle=false;var indexOfM;if(declutpoigrps.length==1&&declutpoigrps[0].length==this.poiCollection.length)
{fullCircle=true;theta=360/declutpoigrps[0].length;llFactor=1350/theta;llFactor=(llFactor<75)?75:llFactor;}
else
{theta=10;llFactor=75;}
var templlFactor;var offsetX,offsetY;var mapDragOffsetXY=this.map.GetDragOffset();for(var i=0,p=declutpoigrps.length;i<p;i++)
{n=-180;centerPt=this.getDeclutCenterPt(declutpoigrps[i]);nLoop=1;templlFactor=llFactor;for(var k=0,q=declutpoigrps[i].length;k<q;k++)
{thisPoi=this.poiCollection[declutpoigrps[i][k]];offsetX=Math.ceil(thisPoi.w/2);offsetY=Math.ceil(thisPoi.h/2);for(var angle=n;;angle+=theta)
{if(angle>=180)
{++nLoop;angle-=360;if(nLoop>2)templlFactor+=30;}
if(nLoop>4)break;nx=Math.round(templlFactor*Math.cos(PI*angle/180));ny=Math.round(templlFactor*Math.sin(PI*angle/180));projPos.x=centerPt.x+nx-offsetX;projPos.y=centerPt.y+ny-offsetY;projPos.h=thisPoi.h;projPos.w=thisPoi.w;if(centerPt.x>0&&centerPt.y>0&&centerPt.x<this.map.width&&centerPt.y<this.map.height)
{if(projPos.x<=projPos.w||projPos.y<=projPos.h||projPos.x+projPos.w>=this.map.width||projPos.y+projPos.h>=this.map.height)continue;}
overlapped=false;for(var m=0,r=this.poiCollection.length;m<r;m++)
{indexOfM=declutpoigrps[i].indexOf(m);if((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y))
{if(this.checkLLIntersection(this.poiCollection[m].ix+offsetX,this.poiCollection[m].iy+offsetY,this.poiCollection[m].x+offsetX,this.poiCollection[m].y+offsetY,thisPoi.ix+offsetX,thisPoi.iy+offsetY,projPos.x+offsetX,projPos.y+offsetY))
{overlapped=true;break;}}
if(indexOfM<0)
{if((this.isOverlapped(projPos,this.poiCollection[m]))||((nLoop<2)&&this.checkLPIntersection((thisPoi.ix+offsetX),(thisPoi.iy+offsetY),projPos.x+offsetX,projPos.y+offsetY,this.poiCollection[m]))){overlapped=true;break;}
else if((nLoop<2)&&((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y)))
{if(this.checkLPIntersection(this.poiCollection[m].ix+(this.poiCollection[m].w/2),this.poiCollection[m].iy+(this.poiCollection[m].h/2),this.poiCollection[m].x+offsetX,this.poiCollection[m].y+offsetY,projPos))
{overlapped=true;break;}}}
else if((indexOfM>=0)&&(indexOfM<k)&&(this.isOverlapped(projPos,this.poiCollection[m])))
{overlapped=true;break;}}
if(overlapped)continue;n=angle+theta;thePoi=this.map.getPois().getAt(thisPoi.indx);thePoi.setAltStateFlag(true);thePoi.element.style.left=projPos.x-mapDragOffsetXY.x+'px';thePoi.element.style.top=projPos.y-mapDragOffsetXY.y+'px';this.drawLeaderLine(thePoi);theLatLngXY=this.map.llToPix(thePoi.getLatLng())
thePoi.dragLeft=theLatLngXY.x-projPos.x;thePoi.dragTop=theLatLngXY.y-projPos.y;thisPoi.x=projPos.x;thisPoi.y=projPos.y;break;}}}}
MQDeclutter.prototype.checkLPIntersection=function(x1,y1,x2,y2,poi)
{var m1=(x2-x1==0)?(y2-y1)/0.00000001:(y2-y1)/(x2-x1);var a1=y1-m1*x1;var hm2=0;var vm2=poi.h/0.00000001;var u1,v1,u2,v2;var a2,xi,yi;for(var i=1;i<=4;i++)
{switch(i)
{case 1:u1=poi.x;v1=poi.y;u2=poi.x+poi.w;v2=poi.y;break;case 2:u1=poi.x+poi.w;v1=poi.y;u2=poi.x+poi.w;v2=poi.y+poi.h;break;case 3:u1=poi.x;v1=poi.y+poi.h;u2=poi.x+poi.w;v2=poi.y+poi.h;break;case 4:u1=poi.x;v1=poi.y;u2=poi.x;v2=poi.y+poi.h;break;}
if(i%2==1)
{a2=v1;xi=Math.round(0-(a1-a2)/m1);yi=a2;}else{a2=v1-vm2*u1;xi=Math.round(0-(a1-a2)/(m1-vm2));yi=(Math.abs(m1)<Math.abs(vm2))?Math.round(a1+m1*xi):Math.round(a2+vm2*xi);}
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){return(true);}}
return(false);}
MQDeclutter.prototype.checkLLIntersection=function(x1,y1,x2,y2,u1,v1,u2,v2)
{var m1=(x2-x1==0)?(y2-y1)/0.00000001:(y2-y1)/(x2-x1);var a1=y1-m1*x1;var m2=(u2-u1==0)?(v2-v1)/0.00000001:(v2-v1)/(u2-u1);var a2=v1-m2*u1;var xi,yi;xi=Math.round(0-(a1-a2)/(m1-m2));yi=(Math.abs(m1)<Math.abs(m2))?Math.round(a1+m1*xi):Math.round(a2+m2*xi);if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi)))
{var proxVal=3;if(((Math.abs(x1-xi)<=proxVal)&&(Math.abs(y1-yi)<=proxVal))||((Math.abs(u1-xi)<=proxVal)&&(Math.abs(v1-yi)<=proxVal))||((Math.abs(x2-xi)<=proxVal)&&(Math.abs(y2-yi)<=proxVal))||((Math.abs(u2-xi)<=proxVal)&&(Math.abs(v2-yi)<=proxVal)))
{return(false);}
return(true);}
return(false);}
MQDeclutter.prototype.getDeclutCenterPt=function(declutgrp)
{var centerPosX=0;var centerPosY=0;var poi;var poiCount=declutgrp.length;for(var i=0;i<poiCount;i++)
{poi=this.poiCollection[declutgrp[i]];centerPosX+=poi.ix+poi.w/2;centerPosY+=poi.iy+poi.h/2;}
return(new PointXY(Math.round(centerPosX/poiCount),Math.round(centerPosY/poiCount)));}
MQDeclutter.prototype.isOverlapped=function(poiobj1,poiobj2)
{var x1,x2,y1,y2,w1,w2,h1,h2;x1=poiobj1.x;y1=poiobj1.y;h1=poiobj1.h;w1=poiobj1.w;x2=poiobj2.x;y2=poiobj2.y;h2=poiobj2.h;w2=poiobj2.w;if((((x1<=x2)&&((x1+w1)>=x2))&&(((y1<=y2)&&((y1+h1)>=y2))||((y1>=y2)&&((y2+h2)>=y1))))||(((x1>=x2)&&((x2+w2)>=x1))&&(((y1>=y2)&&((y2+h2)>=y1))||((y1<=y2)&&((y1+h1)>=y2)))))
{return(true);}
return(false);}
MQDeclutter.prototype.sortPois=function(a,b)
{return(a[1]-b[1]);}
MQDeclutter.prototype.sortPoisRL=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.setMap=function(map)
{this.map=map;}
MQDeclutter.prototype.addDeclutterPoi=function(x,y,poi,isVisible,index)
{var dcpoi=new MQDeclutterPoi(this.map,poi,isVisible);this.dcCollection[index].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,index)
{var i;var pageSize=this.stackHeight*this.stackWidth;var dcIconArraySize=this.dcCollection[index].length;if(this.cpCollection[index]==1&&direction==-1)return;if(((this.cpCollection[index]*pageSize)>=dcIconArraySize)&&direction==1)return;this.cpCollection[index]=this.cpCollection[index]+direction;for(i=0;i<dcIconArraySize;i++)
{this.dcCollection[index][i].setVisible(false);}
var maxItemIndex=(this.cpCollection[index]*pageSize);if(maxItemIndex>dcIconArraySize)maxItemIndex=dcIconArraySize;var startItemIndex=(this.cpCollection[index]*pageSize)-pageSize;for(i=startItemIndex;i<maxItemIndex;i++)
{this.dcCollection[index][i].setVisible(true);}
if(startItemIndex>0)
{this.pnCollection[index][0].setVisible(true);}
else
{this.pnCollection[index][0].setVisible(false);}
if(maxItemIndex<dcIconArraySize)
{this.pnCollection[index][1].setVisible(true);}
else
{this.pnCollection[index][1].setVisible(false);}
var currentp=this.cpCollection[index]-1;var totalpag=parseInt(Math.ceil(dcIconArraySize/pageSize))-1;var widthbar=this.pageBarIcon.width-6;this.pnCollection[index][2].div.mar.style.left=parseInt(widthbar*(currentp/totalpag))+"px";}
MQDeclutter.prototype.adjustLeaderLineSurface=function()
{var returnVal=false;if(this.map.surface)
{if(this.map.GetDragOffset().x!=this.map.overlayOffsetX||this.map.GetDragOffset().y!=this.map.overlayOffsetY)
{this.map.overlayOffsetX=this.map.GetDragOffset().x;this.map.overlayOffsetY=this.map.GetDragOffset().y;if(this.map.overlaydiv)
{this.map.overlaydiv.style.left=-(this.map.SURFACE_OFFSET+this.map.overlayOffsetX)+'px';this.map.overlaydiv.style.top=-(this.map.SURFACE_OFFSET+this.map.overlayOffsetY)+'px';if(this.map.getOverlays())this.map.redrawOverlays();}
returnVal=true;}}
if(this.map.dcCanvasDiv)
{if(this.map.GetDragOffset().x!=this.map.canvasOffsetX||this.map.GetDragOffset().y!=this.map.canvasOffsetY)
{this.map.canvasOffsetX=this.map.GetDragOffset().x;this.map.canvasOffsetY=this.map.GetDragOffset().y;if(this.map.dcCanvasDiv)
{this.map.dcCanvasDiv.style.left=-(this.map.SURFACE_OFFSET+this.map.canvasOffsetX)+'px';this.map.dcCanvasDiv.style.top=-(this.map.SURFACE_OFFSET+this.map.canvasOffsetY)+'px';}
returnVal=true;}}
return returnVal;}
MQDeclutter.prototype.drawLeaderLine=function(poi)
{var xy=new Object;var safari=(getBrowserInfo().name=='safari');if(!safari)
{if(!this.map.surface)this.map.createDrawingSurface();}
else
{if(!this.map.dcCanvasDiv)this.map.createCanvas();}
if(!safari)
{if(!this.map.surface)throw('Leader line drawing surface does not exist.');}
else
{if(!this.map.dcCanvasDiv)throw('Leaderline drawing canvas does not exist.');}
if(!this.adjustLeaderLineSurface())
{var dragOffset=this.map.getDragOffset();var pnts=new Array();pnts[0]=new Object;pnts[0]=this.map.llToPix(poi.getLatLng());pnts[0].x+=(this.map.SURFACE_OFFSET);pnts[0].y+=(this.map.SURFACE_OFFSET);pnts[1]=new Object;var divOffsetX=parseInt(this.map.div1.style.left)+dragOffset.x;var divOffsetY=parseInt(this.map.div1.style.top)+dragOffset.y;if(poi.getAltStateFlag()){var iconOffsetX=poi.getAltIcon().getAnchorOffset().getX();var iconOffsetY=poi.getAltIcon().getAnchorOffset().getY();}else{var iconOffsetX=poi.getIcon().getAnchorOffset().getX();var iconOffsetY=poi.getIcon().getAnchorOffset().getY();};pnts[1].x=(parseInt(poi.element.style.left)+this.map.SURFACE_OFFSET)-iconOffsetX+divOffsetX;pnts[1].y=(parseInt(poi.element.style.top)+this.map.SURFACE_OFFSET)-iconOffsetY+divOffsetY;cpnts=new Array();if(isOverLimit(xy))
{if(!safari)
{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));}
else
{var surfaceWidth=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));var surfaceHeight=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));}
cpnts=MQClip(0,surfaceWidth,0,surfaceHeight,pnts,false);}
else
{cpnts=pnts;}
var leaderLineColor=(poi.leaderLineColor?poi.leaderLineColor:this.leaderLineColor);if(poi.leaderLineDotIcon)poi.leaderLineDotIcon.div.im.style.display='none';if(!safari)
{var s='M '+cpnts[1].x+','+cpnts[1].y+' L '+cpnts[0].x+','+cpnts[0].y;if(poi.leaderLine)poi.map.surface.remove(poi.leaderLine);if(poi.leaderLineDot)poi.map.surface.remove(poi.leaderLineDot);poi.leaderLine=this.map.surface.createPath(s).setFill(leaderLineColor).setStroke({color:leaderLineColor,width:2});poi.leaderLine.rawNode.style.zIndex=80;}
else
{this.map.dcCanvasContext.strokeStyle=leaderLineColor;this.map.dcCanvasContext.lineWidth=2;this.map.dcCanvasContext.beginPath();this.map.dcCanvasContext.moveTo(cpnts[1].x,cpnts[1].y);this.map.dcCanvasContext.lineTo(cpnts[0].x,cpnts[0].y);this.map.dcCanvasContext.stroke();}
var theMode=parseInt(this.getLeaderLineDotMode());switch(theMode){case 0:break;case 1:if(!safari)
{poi.leaderLineDot=this.map.surface.createCircle({cx:cpnts[0].x,cy:cpnts[0].y,r:3}).setFill(leaderLineColor).setStroke({color:leaderLineColor,width:1});poi.leaderLineDot.rawNode.style.zIndex=80;}
else
{this.map.dcCanvasContext.beginPath();this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,3,0,Math.PI*2,true);this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,2,0,Math.PI*2,true);this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,1,0,Math.PI*2,true);this.map.dcCanvasContext.stroke();}
break;case 2:if(poi.getLeaderLineDotImage())
{poi.leaderLineDotIcon=new MQLeaderLineDotIcon(poi.getLeaderLineDotImage(),this.map,poi);}
else if(this.getLeaderLineDotImage())
{poi.leaderLineDotIcon=new MQLeaderLineDotIcon(this.getLeaderLineDotImage(),this.map,poi);}
break;default:break;};}else{this.redrawLeaderLines();}}
MQDeclutter.prototype.redrawLeaderLines=function()
{var skippedPoi=null;if(arguments.length>0)skippedPoi=arguments[0];if(this.map.dcCanvasContext)
{this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));}
for(var i=0,x=this.map.mypois.getSize();i<x;i++)
{if(this.map.mypois.getAt(i).altStateFlag&&(this.map.mypois.getAt(i)!=skippedPoi))
{if(this.map.mypois.getAt(i).leaderLine)this.map.surface.remove(this.map.mypois.getAt(i).leaderLine);if(this.map.mypois.getAt(i).leaderLineDot)this.map.surface.remove(this.map.mypois.getAt(i).leaderLineDot);this.drawLeaderLine(this.map.mypois.getAt(i));}}}
MQDeclutter.prototype.removeLeaderLines=function()
{for(var i=0,x=this.map.mypois.getSize();i<x;i++)
{if(this.map.mypois.getAt(i).altStateFlag)
{if(this.map.mypois.getAt(i).leaderLine)this.map.surface.remove(this.map.mypois.getAt(i).leaderLine);if(this.map.mypois.getAt(i).leaderLineDot)this.map.surface.remove(this.map.mypois.getAt(i).leaderLineDot);if(this.map.mypois.getAt(i).leaderLineDotIcon)
{this.map.RemovePOI(this.map.mypois.getAt(i).leaderLineDotIcon.div);this.map.mypois.getAt(i).leaderLineDotIcon=null;}}}
if(getBrowserInfo().name=='safari')
{if(this.map.dcCanvasContext)
{this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));}}}
MQDeclutter.prototype.resetDraggedPois=function()
{var thePoi;for(var i=0,j=this.map.getPois().getSize();i<j;i++)
{thePoi=this.map.getPois().getAt(i)
theLatLngXY=this.map.llToPix(thePoi.getLatLng());if(thePoi.dragLeft!=null)
{thePoi.element.style.left=theLatLngXY.x-thePoi.dragLeft+'px';thePoi.element.style.top=theLatLngXY.y-thePoi.dragTop+'px';}}}
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');var _declutterIcon;if(poi.getAltIcon()!=poi.getIcon())
{_declutterIcon=new MQDeclutterIcon(poi.getAltIcon()._getImgSrc(poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);}
else
{_declutterIcon=this.map.mydeclutter.declutterIcon;}
if((getBrowserInfo().name=="msie"&&getBrowserInfo().version<7.0)&&MQ.utils._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQ.utils._hasPngExtention(_declutterIcon.url))
{this.div.im.src="http://img.mqcdn.com/a/a";this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_declutterIcon.url+"', sizingMethod='image') ";}else{this.div.im.src=_declutterIcon.url;}
this.div.im.style.height=_declutterIcon.height+'px';this.div.im.style.width=_declutterIcon.width+'px';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={onMouseOut:function(e)
{if(this.poi.showingInfo!=true)
{this.poi.setVisible(false);this.poi.setLevel(90);}
this.poi.onMouseOut(e);var _declutterIcon;if(this.poi.getAltIcon()!=this.poi.getIcon())
{_declutterIcon=new MQDeclutterIcon(this.poi.getAltIcon()._getImgSrc(this.poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);}
else
{_declutterIcon=this.map.mydeclutter.declutterIcon;}
if((getBrowserInfo().name=="msie"&&getBrowserInfo().version<7.0)&&MQ.utils._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQ.utils._hasPngExtention(_declutterIcon.url))
{this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_declutterIcon.url+"', sizingMethod='image') ";}
else
{this.div.im.src=_declutterIcon.url;}},onMouseOver:function(e)
{this.poi.setLevel(100);this.poi.setVisible(true);this.poi.onMouseOver(e);var _declutterIcon;if(this.poi.getAltIcon()!=this.poi.getIcon())
{_declutterIcon=new MQDeclutterIcon(this.poi.getAltIcon()._getImgSrc(this.poi.getAltIcon().getImage()),this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);}
else
{_declutterIcon=this.map.mydeclutter.declutterIcon;}
if((getBrowserInfo().name=="msie"&&getBrowserInfo().version<7.0)&&MQ.utils._hasPngExtention(this.map.mydeclutter.declutterOverIcon.url)&&MQ.utils._hasPngExtention(_declutterIcon.url))
{if(this.map.mydeclutter.declutterOverIcon)
{this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.map.mydeclutter.declutterOverIcon.url+"', sizingMethod='image') ";}}
else
{if(this.map.mydeclutter.declutterOverIcon)
{this.div.im.src=this.map.mydeclutter.declutterOverIcon.url;}}},setVisible:function(v)
{this.div.im.style.display=(v)?'block':'none';}}
function MQPageMarkIcon(bar,mark,x,y,map,index){this.map=map;this.index=index;this.div=document.createElement('div');this.div.className="pois";this.div.bar=document.createElement('img');if(getBrowserInfo().name=="msie"&&MQ.utils._hasPngExtention(bar.url))
{this.div.bar.src="http://img.mqcdn.com/a/a";this.div.bar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bar.url+"', sizingMethod='image');";}
else
{this.div.bar.src=bar.url;}
this.div.bar.style.position='absolute';this.div.bar.style.display='block';this.div.bar.style.height=bar.height;this.div.bar.style.width=bar.width;this.div.mar=document.createElement('img');if(getBrowserInfo().name=="msie"&&MQ.utils._hasPngExtention(mark.url))
{this.div.mar.src="http://img.mqcdn.com/a/a";this.div.mar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mark.url+"', sizingMethod='image');";}
else
{this.div.mar.src=mark.url;}
this.div.mar.style.position='absolute';this.div.mar.style.display='block';this.div.mar.style.height=mark.height;this.div.mar.style.width=mark.width;this.div.mar.style.left="0px";this.div.style.MozUserSelect="none";this.div.appendChild(this.div.bar);this.div.appendChild(this.div.mar);var ll=this.map.pixToLL(new MQPoint(x,y));this.map.AddPOI(ll,new PointXY(0,0),this.div);};MQPageMarkIcon.prototype={remove:function()
{this.div.bar.style.display='block';this.div.mar.style.display='block';this.div.removeChild(this.div.bar);this.div.removeChild(this.div.mar);this.div.bar=null;this.div.mar=null;this.map.RemovePOI(this.div);this.div=null;}}
function MQPrevNextIcon(ponIcon,x,y,map,isVisible,increment,index)
{this.map=map;this.increment=increment;this.index=index;this.div=document.createElement('div');this.div.className="pois";this.div.im=document.createElement('img');if(getBrowserInfo().name=="msie"&&MQ.utils._hasPngExtention(ponIcon.url))
{this.div.im.src="http://img.mqcdn.com/a/a";this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ponIcon.url+"', sizingMethod='image');";}
else
{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);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)
{this.div.im.style.display=(v)?'block':'none';},onClick:function(e)
{this.map.getDeclutter().turnPage(this.increment,this.index);},onDblClick:function(e)
{e.stop;}}
function MQDeclutterIcon(url,width,height)
{this.url=url;this.width=width;this.height=height;}
document.write('<script src="http://o.aolcdn.com/dojo/0.9.0beta/dojo/dojo.xd.js" type="text/javascript"><\/script>');