i12="tile23.mqcdn.com";i11="tile22.mqcdn.com";i10="tile24.mqcdn.com";h22="btilelog.access.mapquest.com";mqz=Array;g21="tile21.mqcdn.com";c38=new mqz(g21,i11,i12,i10);b30=new mqz(g21,i11,i12,i10);b11=new mqz(g21,i11,i12,i10);c17=g21;c20=h22; var Prototype={Version:'1.5.0_rc0',ScriptFragment:'(?:)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}} var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}} var Abstract=new Object();Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];} return destination;} 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;}} Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}} Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){return __method.call(object,event||window.event);}} Object.extend(Number.prototype,{toColorPart:function(){var digits=this.toString(16);if(this<16)return'0'+digits;return digits;},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;}});var Try={these:function(){var returnValue;for(var i=0;i0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||'').toString();source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return this;},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?div.childNodes[0].nodeValue:'';},toQueryParams:function(){var pairs=this.match(/^\??(.*)$/)[1].split('&');return pairs.inject({},function(params,pairString){var pair=pairString.split('=');params[pair[0]]=pair[1];return params;});},toArray:function(){return this.split('');},camelize:function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i=result) result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||valueb?1:0;}).pluck('value');},toArray:function(){return this.collect(Prototype.K);},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));});},inspect:function(){return'#';}} 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';}} function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;} ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;do{iterator(value);value=value.succ();}while(this.include(value));},include:function(value){if(value=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}} Ajax.Request=Class.create();Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&¶meters.length>0) this.url+=(this.url.match(/\?/)?'&':'?')+parameters;Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10);} this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=='post'?body:null);}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version',Prototype.Version,'Accept','text/javascript, text/html, application/xml, text/xml, */*'];if(this.options.method=='post'){requestHeaders.push('Content-type',this.options.contentType);if(this.transport.overrideMimeType) requestHeaders.push('Connection','close');} if(this.options.requestHeaders) requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);for(var i=0;i'+this.content+'';return $A(div.childNodes[0].childNodes[0].childNodes);}} var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.setStartBefore(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element);}).bind(this));}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true);},insertContent:function(fragments){fragments.reverse(false).each((function(fragment){this.element.insertBefore(fragment,this.element.firstChild);}).bind(this));}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.appendChild(fragment);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element.nextSibling);}).bind(this));}});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(this.toArray().concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set(this.select(function(className){return className!=classNameToRemove;}).join(' '));},toString:function(){return this.toArray().join(' ');}} Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(expression){this.params={classNames:[]};this.expression=expression.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function abort(message){throw'Parse error in selector: '+message;} if(this.expression=='')abort('empty expression');var params=this.params,expr=this.expression,match,modifier,clause,rest;while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){params.attributes=params.attributes||[];params.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||''});expr=match[1];} if(expr=='*')return this.params.wildcard=true;while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){modifier=match[1],clause=match[2],rest=match[3];switch(modifier){case'#':params.id=clause;break;case'.':params.classNames.push(clause);break;case'':case undefined:params.tagName=clause.toUpperCase();break;default:abort(expr.inspect());} expr=rest;} if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){var params=this.params,conditions=[],clause;if(params.wildcard) conditions.push('true');if(clause=params.id) conditions.push('element.id == '+clause.inspect());if(clause=params.tagName) conditions.push('element.tagName.toUpperCase() == '+clause.inspect());if((clause=params.classNames).length>0) for(var i=0;i=0){opt=element.options[index];value=opt.value||opt.text;} return[element.name,value];},selectMany:function(element){var value=[];for(var i=0;i=this.offset[1]&&y=this.offset[0]&&x=this.offset[1]&&this.ycomp=this.offset[0]&&this.xcompf25)return;};};function d22(f_0,f_1){var y=(f_0+a4)*(b43/f_1);var b33=ak_1(y/c44);return b33;};function d43(f_0,f_1){var y=(f_0+a4)*(b43/f_1);var b33=ak_1(y/c44);return (y-b33*c44);};function f20(f_0,f_1,f_2){var y=f_0*c44+f_1;var c23=y/(b43/f_2)-a4;c23=ak_1(c23*b0)/a50;return c23;};function f14(f_0,f_1){var x=(f_0+a34)*(c32/f_1);var b25=ak_1(x/c44);return b25;};function f32(f_0,f_1){var x=(f_0+a34)*(c32/f_1);var b25=ak_1(x/c44);return (x-b25*c44);};function d8(f_0,f_1,f_2){var x=f_0*c44+f_1;var c15=x/(c32/f_2)-a34;c15=ak_1(c15*b0)/a50;while(c15>a34)c15-=a15;while(c15<-a34)c15+=a15;return c15;};function d47(f_0){var b17=new PointXY(0,0);while(f_0){b17.x+=f_0.offsetLeft;b17.y+=f_0.offsetTop;f_0=f_0.offsetParent;};return b17;};function f24(f_0){return f_0+ai_3;};function f19(f_0,f_1,f_2,f_3,f_4,f_5){var c5;c5=document.createElement(h11);c5.src=f_0;c5.galleryimg=g43;c5.lt=f_1;c5.tp=f_2;var c50=c5.style;c50.width=f24(f_3);c50.height=f24(f_4);c50.position=ai_7;c50.left=f24(f_1);c50.top=f24(f_2);c50.zIndex=f_5;c50.MozUserSelect=ai_5;c50.border=i7;c50.display=ai_6;c5.unselectable=h9;c5.onselectstart=function(){return false;};c5.oncontextmenu=function(){return false;};return c5;};Object.prototype.eventCallback=function(f_0){var c21=this;return function(event){if(!event)event=window.event;c21[f_0](event);};};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.e40=f_8;this.e14=c9+aj;if(this.parent.f13){this.mag=new Image();this.mag.image=f19(b22,f_2,f_3,f_8,f_8,0);this.div.d42.appendChild(this.mag.image);}if(this.parent.d49){this.mah=new Image();this.mah.image=f19(b22,f_2,f_3,f_8,f_8,0);this.div.d6.appendChild(this.mah.image);}if(this.parent.d29){this.mai=new Image();this.mai.image=f19(b22,f_2,f_3,f_8,f_8,0);this.div.d15.appendChild(this.mai.image);}this.d13(f_2,f_3,f_4,f_5,f_6,f_7);};Tile.prototype={d13:function(f_0,f_1,f_2,f_3,f_4,f_5){var c1=ak_1(f_2/b1);var b7=ak_1(f_3/b1);this.lt=f_0;this.tp=f_1;this.x=f_2;this.y=f_3;while(f_2<0)f_2+=b14[f_5];while(f_2>=b14[f_5])f_2-=b14[f_5];c1=ak_1(f_2/b1);b7=ak_1(f_3/b1);if(this.parent.f13){this.e28=ak_8+c38[f_2%c38.length]+h26+f_4+g29+b7+g29+(f_3-b7*b1)+g29+c1+g29+(f_2-c1*b1)+ai_1;this.mag.image.src=this.e28;this.mag.image.lt=this.lt;this.mag.image.tp=this.tp;this.mag.image.style.left=f24(this.lt);this.mag.image.style.top=f24(this.tp);}if(this.parent.d49){this.e28=ak_8+b11[f_2%b11.length]+h27+f_4+g29+b7+g29+(f_3-b7*b1)+g29+c1+g29+(f_2-c1*b1)+ai_2;this.mah.image.src=this.e28;this.mah.image.lt=this.lt;this.mah.image.tp=this.tp;this.mah.image.style.left=f24(this.lt);this.mah.image.style.top=f24(this.tp);}if(this.parent.d29){this.e28=ak_8+b30[f_2%b30.length]+h32+f_4+g29+b7+g29+(f_3-b7*b1)+g29+c1+g29+(f_2-c1*b1)+ai_1;this.mai.image.src=this.e28;this.mai.image.lt=this.lt;this.mai.image.tp=this.tp;this.mai.image.style.left=f24(this.lt);this.mai.image.style.top=f24(this.tp);}},e6:function(){if(this.parent.f13){if(!this.mag){this.mag=new Image();this.mag.image=f19(b22,this.lt,this.tp,this.e40,this.e40,0);this.div.d42.appendChild(this.mag.image);}this.mag.image.src=this.e14;}if(this.parent.d49){if(!this.mah){this.mah=new Image();this.mah.image=f19(b22,this.lt,this.tp,this.e40,this.e40,0);this.div.d6.appendChild(this.mah.image);}this.mah.image.src=this.e14;}if(this.parent.d29){if(!this.mai){this.mai=new Image();this.mai.image=f19(b22,this.lt,this.tp,this.e40,this.e40,0);this.div.d15.appendChild(this.mai.image);}this.mai.image.src=this.e14;}}};function Map(f_0,f_1,f_2,f_3){this.f13=true;this.d49=false;this.d29=false;this.f11=false;this.d20=ag;this.d45="mag";if(f_3==ah){this.d49=true;this.f13=false;this.d20=f_3;this.d45="mah";}if(f_3==ai){this.d49=true;this.d29=true;this.f13=false;this.d20=f_3;this.d45="mai";}var ak_17=this;window.onunload=function(){ak_17.d5(true);};document.body.onunload=function(){ak_17.d5(true);};this.parent=f_0;this.e44=(f_1>a37)?a37:ak_1(f_1);this.f1=c49[this.e44];if(!this.parent.style.height||ak_1(this.parent.style.height)a49)this.width=a49;if(this.height>a49)this.height=a49;this.f2=c44;this.f30=f_2.lat;this.e21=f_2.lng;this.d31=this.f30;this.e39=this.e21;this.d48=ak_3(this.height/this.f2)+2;this.e7=ak_3(this.width/this.f2)+2;this.e29=false;this.d7=false;this.e23=false;this.d28=null;this.f31=null;this.d46=EVENT_NONE;this.f22=-1;this.e38=g49;this.e22=g49;this.e37=b6;this.e19=b6;this.e31=b6;this.e36=b6;this.e18=b6;this.e30=b6;this.d44=b6;this.f3=false;this.e48=false;this.div=document.createElement(h30);this.div.id=h1;this.div.lt=0;this.div.tp=0;this.div.style.position=ai_7;this.div.style.top=h36;this.div.style.left=h36;this.parent.style.overflow=g36;this.parent.style.background=h34;this.parent.style.position=g18;this.parent.style.top=h36;this.parent.style.left=h36;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;this.parent.appendChild(this.div);Event.observe(document,i6,this.eventCallback(h16));Event.observe(document,g32,this.eventCallback(h48));Event.observe(document,g20,this.eventCallback(h39));Event.observe(this.parent,g35,this.eventCallback(h23));Event.observe(this.parent,g33,this.eventCallback(h12));this.f21(EVENT_DBLCLICK,OPER_RECENTER);this.e13=document.createElement(g12);this.e13.id=g34;this.e13.src=b22;this.e13.onload=function(){ak_17.d38();};this.e13.onselectstart=function(){return false;};this.e13.oncontextmenu=function(){return false;};this.e13.style.MozUserSelect=ai_5;this.e13.unselectable=h9;this.e13.style.zIndex=5;this.e13.style.display=ai_5;this.e13.style.position=ai_7;this.e13.style.opacity=h17;this.e13.style.filter=i0;this.div.appendChild(this.e13);this.e1=document.createElement(g40);this.e1.type=h15;this.e1.media=g37;var c30=g11;if(this.e1.styleSheet){this.e1.styleSheet.cssText=c30;}else{var b27=document.createTextNode(c30);this.e1.appendChild(b27);}document.body.appendChild(this.e1);this.e14=document.createElement(g12);this.e14.src=c9+aj;this.e14.unselectable=h9;this.e14.style.MozUserSelect=ai_5;this.e14.style.display=ai_5;this.parent.appendChild(this.e14);this.f0=document.createElement(g12);this.f0.src=b22;this.f0.unselectable=h9;this.f0.style.MozUserSelect=ai_5;this.f0.style.display=ai_5;this.parent.appendChild(this.f0);this.d14=document.createElement(g12);this.d14.src=b22;this.d14.unselectable=h9;this.d14.style.MozUserSelect=ai_5;this.d14.style.display=ai_5;this.parent.appendChild(this.d14);this.d41=document.createElement(g12);this.d41.src=b22;this.d41.unselectable=h9;this.d41.style.MozUserSelect=ai_5;this.d41.style.display=ai_5;this.parent.appendChild(this.d41);this.e24=new mqz(5);this.e24[0]=document.createElement(g12);this.e24[0].style.MozUserSelect=ai_5;this.e24[0].unselectable=h9;this.e24[0].corner=0;this.e24[0].offset=new PointXY(0,0);this.e24[0].style.position=ai_7;this.e24[0].style.display=ai_6;this.e24[0].style.zIndex=a30;this.e24[0].src=c9+g50;this.e24[0].width=h0;this.e24[0].height=h29;this.d34(this.e24[0]);this.parent.appendChild(this.e24[0]);this.e24[1]=document.createElement(g12);this.e24[1].style.MozUserSelect=ai_5;this.e24[1].unselectable=h9;this.e24[1].corner=1;this.e24[1].offset=new PointXY(0,0);this.e24[1].style.position=ai_7;this.e24[1].style.display=ai_6;this.e24[1].style.zIndex=a30;this.e24[1].src=ak_8+c17+ai_4+this.e44+ai_1;this.e24[1].width=h37;this.e24[1].height=g22;this.d34(this.e24[1]);this.parent.appendChild(this.e24[1]);this.e24[2]=document.createElement(g12);this.e24[2].style.MozUserSelect=ai_5;this.e24[2].unselectable=h9;this.e24[2].corner=2;this.e24[2].offset=new PointXY(0,0);this.e24[2].style.position=ai_7;this.e24[2].style.display=ai_6;this.e24[2].style.zIndex=a30;this.e24[2].src=c9+i9;this.e24[2].width=i2;this.e24[2].height=g15;this.d34(this.e24[2]);this.parent.appendChild(this.e24[2]);this.e24[LOGO_MAP_COPY]=document.createElement(g12);this.e24[LOGO_MAP_COPY].style.MozUserSelect=ai_5;this.e24[LOGO_MAP_COPY].unselectable=h9;this.e24[LOGO_MAP_COPY].corner=3;this.e24[LOGO_MAP_COPY].offset=new PointXY(0,0);this.e24[LOGO_MAP_COPY].style.position=ai_7;this.e24[LOGO_MAP_COPY].style.display=(this.d20!=ah)?ai_6:ai_5;this.e24[LOGO_MAP_COPY].style.zIndex=a30;this.e24[LOGO_MAP_COPY].width=g26;this.e24[LOGO_MAP_COPY].height=g15;this.e24[LOGO_MAP_COPY].src=c9+c33[1];this.d34(this.e24[LOGO_MAP_COPY]);this.parent.appendChild(this.e24[LOGO_MAP_COPY]);this.e24[LOGO_SAT_COPY]=document.createElement(g12);this.e24[LOGO_SAT_COPY].style.MozUserSelect=ai_5;this.e24[LOGO_SAT_COPY].unselectable=h9;this.e24[LOGO_SAT_COPY].corner=3;this.e24[LOGO_SAT_COPY].offset=new PointXY(0,-a43);this.e24[LOGO_SAT_COPY].style.position=ai_7;this.e24[LOGO_SAT_COPY].style.display=(this.d20!=ag)?ai_6:ai_5;this.e24[LOGO_SAT_COPY].style.zIndex=a30;this.e24[LOGO_SAT_COPY].src=c9+h41;this.e24[LOGO_SAT_COPY].width=h24;this.e24[LOGO_SAT_COPY].height=g15;this.d34(this.e24[LOGO_SAT_COPY]);this.parent.appendChild(this.e24[LOGO_SAT_COPY]);this.f36=this.div.attachEvent?c9+i8:h47;this.f49=this.div.attachEvent?c9+h49:h2;this.f40=this.f36;this.div.style.cursor=this.f40;this.e14.style.cursor=this.f49;this.div.d42=document.createElement(h30);this.div.d42.id=h3;this.div.d42.lt=0;this.div.d42.tp=0;this.div.d42.style.position=ai_7;this.div.d42.style.top=h36;this.div.d42.style.left=h36;this.div.appendChild(this.div.d42);this.div.d6=document.createElement(h30);this.div.d6.id=h28;this.div.d6.lt=0;this.div.d6.tp=0;this.div.d6.style.position=ai_7;this.div.d6.style.top=h36;this.div.d6.style.left=h36;this.div.appendChild(this.div.d6);this.div.d15=document.createElement(h30);this.div.d15.id=h33;this.div.d15.lt=0;this.div.d15.tp=0;this.div.d15.style.position=ai_7;this.div.d15.style.top=h36;this.div.d15.style.left=h36;this.div.appendChild(this.div.d15);this.div.e46=document.createElement(h30);this.div.e46.id=h5;this.div.e46.lt=0;this.div.e46.tp=0;this.div.e46.style.position=ai_7;this.div.e46.style.top=h36;this.div.e46.style.left=h36;this.div.e46.style.cursor=g46;this.div.e46.style.zIndex=9;this.div.e46.UNSELECTABLE=h25;this.div.appendChild(this.div.e46);this.e45();};Map.prototype={e45:function(){this.d31=this.f30;this.e39=this.e21;this.g5=f14(this.e21,this.f1);this.g3=d22(this.f30,this.f1);this.g6=f32(this.e21,this.f1);this.g4=this.f2-d43(this.f30,this.f1);this.f37=ak_4(this.g6);this.g9=ak_4(this.g4);this.g1=ak_1(this.width/2)-this.f37;this.f50=ak_1(this.height/2)-this.g9;this.f39=0;this.f38=0;while(this.g1<0){this.g1+=this.f2;this.f39--;this.g5++;};while(this.f50<0){this.f50+=this.f2;this.f38--;this.g3--;};while(this.g1>2*this.f2){this.g1-=this.f2;this.f39++;this.g5--;};while(this.f50>2*this.f2){this.f50-=this.f2;this.f38++;this.g3++;};this.f48=this.g1;this.f47=this.f50;while(this.f48>this.f2)this.f48-=this.f2;while(this.f47>this.f2)this.f47-=this.f2;this.f42=0;this.f41=0;this.g8=0;this.g7=0;this.g2=0;this.g0=0;this.f44=0;this.f43=0;this.f46=0;this.f45=0;this.d44=0;this.div.lt=0;this.div.tp=0;this.div.style.left=this.div.lt+ai_3;this.div.style.top=this.div.tp+ai_3;if(this.d28==null){this.d28=new mqz(this.e7);for(var a=0;ab6){this.f0.src=ak_8+c20+g23+(ak_1(this.e37*b0)/a50)+g27+(ak_1(this.e36*b0)/a50)+h50+this.f1+h8+this.d31+g25+this.e39+h20+Key+g47+ak_4(ak_5()*a0);this.e37=b6;this.e36=b6;}if(this.d49&&this.e19>b6){this.d14.src=ak_8+c20+h7+(ak_1(this.e19*b0)/a50)+g27+(ak_1(this.e18*b0)/a50)+h50+this.f1+h8+this.d31+g25+this.e39+h20+Key+g47+ak_4(ak_5()*a0);this.e19=b6;this.e18=b6;}if(this.d29&&this.e31>b6){this.d41.src=ak_8+c20+g14+(ak_1(this.e31*b0)/a50)+g27+(ak_1(this.e30*b0)/a50)+h50+this.f1+h8+this.d31+g25+this.e39+h20+Key+g47+ak_4(ak_5()*a0);this.e31=b6;this.e30=b6;}this.f44=0;this.f43=0;if(f_0!=null&&f_0==true)pause(a26);},e50:function(){var b37=d22(this.f31.ul.lat,this.f1);var b40=f14(this.f31.ul.lng,this.f1);var c18=d22(this.f31.lr.lat,this.f1);var c19=f14(this.f31.lr.lng,this.f1);this.f28=-1;this.d10=2;var b21=this.d28[0][0];var c14=this.d28[this.e7-1][this.d48-1];if(b40>b21.x&&b37c14.y){this.f28=0;this.d10=-1;b21=this.d28[b40-b21.x][b21.y-b37];c14=this.d28[this.e7-1-(c14.x-c19)][this.d48-1-(c18-c14.y)];}var c10=f20(b21.y+this.f28*-1,a23,this.f1);var b39=d8(b21.x-1+this.f28*1,a23,this.f1);var d0=f20(c14.y-1+this.f28*1,a23,this.f1);var c31=d8(c14.x+this.f28*-1,a23,this.f1);var b23=(1+(c14.x+this.f28*-1)-(b21.x+this.f28*1))*this.f2;var c8=(1+(b21.y+this.f28*-1)-(c14.y+this.f28*1))*this.f2;this.g2=0;this.g0=0;if(this.e44<3&&b39>b6&&this.e21this.f31.lr.lng)||(c31this.f31.ul.lat)||(c100){var c0=(c10+d0)/a31;var b44=(b39+c31)/a31;this.e13.src=this.e38+g42+this.e22+g17+c0+h31+b44+h31+(b23/a8)+h31+(c8/a8)+h31+this.f1+h43+g47+ak_4(ak_5()*a0);}else{this.e13.src=this.e38+g39+c10+h40+b39+h45+d0+g48+c31+h38+b23+g45+c8+h46+this.f1+g47+ak_4(ak_5()*a0);}}},d38:function(){this.e13.style.display=ai_6;},d3:function(f_0,f_1){this.f3=true;if(f_0!=0||f_1!=0)this.HandleMove(h14);this.f42+=f_0;this.f41+=f_1;this.g8+=f_0;this.g7+=f_1;this.f46+=f_0;this.f45+=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 b28=b6;while(this.g8+this.f48>c44){this.d28.unshift(this.d28.pop());for(var b=0;bc44){for(var a=0;a1*b14[this.e44]*this.f2){this.f42-=b14[this.e44]*this.f2;}if(this.f42<-1*b14[this.e44]*this.f2){this.f42+=b14[this.e44]*this.f2;}if(b28>b6){b28=b28/((this.e7-2)*(this.d48-2)*9);if(this.f13)this.e37+=b28;if(this.d49)this.e19+=b28;if(this.d29)this.e31+=b28;}if(ak_6(this.f43)>4||ak_6(this.f44)>4){this.d5();}if(this.f11&&(this.d10>0)&&(this.g0>=this.d10||this.g0<=this.d10*-1||this.g2>=this.d10||this.g2<=this.d10*-1)){this.e13.src=b22;this.e13.style.display=ai_5;this.e50();}},ak_18:function(f_0,f_1,f_2,f_3,f_4,f_5,f_6){var e4=f_4/f_5;var f9=ak_1(e4*f_2)-f_0;var f7=ak_1(e4*f_3)-f_1;this.d3(f9,f7);f_0+=f9;f_1+=f7;f_4++;if(f_4<=f_5){ak_17=this;setTimeout(h44+f_0+g31+f_1+g31+f_2+g31+f_3+g31+f_4+g31+f_5+g31+f_6+h13,f_6);}else{this.e23=false;this.f3=false;this.HandleMove(g28);}},e25:function(f_0){if(this.e5==null)return false;while(f_0!=null&&f_0!=this.parent){for(var i=0;i=b5);if(this.f13&&d4){this.e36+=b4;this.d44=0;};if(this.d49&&d4){this.e18+=b4;this.d44=0;};if(this.d29&&d4){this.e30+=b4;this.d44=0;};}this.d7=false;this.e48=false;if(this.f3){this.f3=false;this.HandleMove(g28);}},ak_12:function(event){this.div.style.cursor=this.f40;},ak_13:function(event){if(this.e23||this.e29)return;if(this.e25(Event.element(event)))return;var e8=d47(this.parent);this.f40=this.f49;this.div.style.cursor=this.f40;var f16=event.clientX-e8.x;var f15=event.clientY-e8.y;this.e49=this.f46;this.e47=this.f45;this.d18=f16;this.d17=f15;this.d7=true;this.f35=true;this.e48=true;Event.stop(event);},ak_11:function(event){if(!event.relatedTarget&&!event.toElement)this.ak_10(event);},ak_14:function(event){this.d39(event,true);},dg_1:function(event){this.d39(event,false);},d39:function(event,f_0){if(this.d7||this.e23||(!this.f35&&f_0))return;this.f35=false;this.div.style.cursor=i1;var e8=d47(this.parent);var f16=(event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-e8.x;var f15=(event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-e8.y;if(this.f22==OPER_RECENTER||this.e44==a37){this.SlideMapToPoint(new PointXY(f16,f15));}else{var d50=this.GetXYToLL(new PointXY(f16,f15));this.SetCenterLatLngZoomLevel(d50,this.e44+1);}this.div.style.cursor=this.f40;},d19:function(event){if(this.d7)return;if(event.wheelDelta>0&&this.e441){this.ZoomOut();}},d11:function(event){if(this.d7)return;key=event.which?event.which:event.keyCode;if(key==a48&&this.e441){this.ZoomOut();}},ZoomOut:function(){this.SetZoomLevel(this.e44-1);},ZoomIn:function(){this.SetZoomLevel(this.e44+1);},SetZoomLevel:function(f_0){f_0=ak_1(f_0);if(f_0<1||f_0>a37||this.d7||this.e23||f_0==this.e44)return;var d50=this.GetCenterLatLng();this.d5();this.f30=d50.lat;this.e21=d50.lng;this.e44=f_0;this.f1=c49[this.e44];this.e45();},GetZoomLevel:function(){return this.e44;},SlideMapByOffset:function(f_0){if(this.e23)return;this.HandleMove(g30);this.e23=true;ak_17=this;setTimeout(i4+f_0.x+g31+f_0.y+h4+b31+g31+c36+h13,c36);var e15=ak_6(f_0.x);var e33=ak_6(f_0.y);this.d44+=((e15*e33)+((this.width-e15)*e33)+((this.height-e33)*e15));var d4=((this.d44/(this.width*this.height))>=b5);if(this.f13&&d4){this.e36+=b4;this.d44=0;};if(this.d49&&d4){this.e18+=b4;this.d44=0;};if(this.d29&&d4){this.e30+=b4;this.d44=0;};},SlideMapToPoint:function(f_0){if(this.e23)return;this.HandleMove(g30);var e43=ak_1(this.width/2)-f_0.x;var e42=ak_1(this.height/2)-f_0.y;this.e23=true;ak_17=this;setTimeout(i4+e43+g31+e42+h4+b31+g31+c36+h13,c36);var e15=ak_6(e43);var e33=ak_6(e42);this.d44+=((e15*e33)+((this.width-e15)*e33)+((this.height-e33)*e15));var d4=((this.d44/(this.width*this.height))>=b5);if(this.f13&&d4){this.e36+=b4;this.d44=0;};if(this.d49&&d4){this.e18+=b4;this.d44=0;};if(this.d29&&d4){this.e30+=b4;this.d44=0;};},PanNorth:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouth:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},PanEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)));},PanWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)));},PanNorthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouthWest:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)-ak_1(this.width*(f_0/b2)),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},PanNorthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)-ak_1(this.height*(f_0/b2))));},PanSouthEast:function(f_0){this.SlideMapToPoint(new PointXY(ak_1(this.width/2)+ak_1(this.width*(f_0/b2)),ak_1(this.height/2)+ak_1(this.height*(f_0/b2))));},SetCenterLatLng:function(f_0){this.f30=ak_1(f_0.lat*b0)/a50;this.e21=ak_1(f_0.lng*b0)/a50;this.d5();this.e45();},SetCenterLatLngZoomLevel:function(f_0,f_1){f_1=ak_1(f_1);this.f30=ak_1(f_0.lat*b0)/a50;this.e21=ak_1(f_0.lng*b0)/a50;if(f_1<1)f_1=1;if(f_1>a37)f_1=a37;this.e44=f_1;this.f1=c49[f_1];this.d5();this.e45();},SetCenterXY:function(f_0){var e43=ak_1(this.width/2)-f_0.x;var e42=ak_1(this.height/2)-f_0.y;this.f30=f20(this.g3-this.f38,this.f2-this.g4+this.f41+e42,this.f1);this.e21=d8(this.g5+this.f39,this.g6+this.f42-e43,this.f1);this.d5();this.e45();},GetCenterLatLng:function(){var ll=new PointLL(0,0);ll.lat=f20(this.g3-this.f38,this.f2-this.g4+this.f41,this.f1);ll.lng=d8(this.g5+this.f39,this.g6-this.f42,this.f1);return ll;},GetLLToXY:function(f_0){var f33=new PointXY(0,0);var f5=f14(f_0.lng,this.f1);var f4=d22(f_0.lat,this.f1);var e35=f32(f_0.lng,this.f1);var e34=this.f2-d43(f_0.lat,this.f1);f33.x=ak_1(this.width/2)-((this.g5+this.f39-f5)*this.f2)-(this.g6-this.f42-e35);f33.y=ak_1(this.height/2)+((this.g3-this.f38-f4)*this.f2)-(this.g4-this.f41-e34);f33.x=ak_1(f33.x);f33.y=ak_1(f33.y);return f33;},GetXYToLL:function(f_0){var e43=ak_1(this.width/2)-f_0.x;var e42=ak_1(this.height/2)-f_0.y;var ll=new PointLL(b6,b6);ll.lat=f20(this.g3-this.f38,this.f2-this.g4+this.f41+e42,this.f1);ll.lng=d8(this.g5+this.f39,this.g6-this.f42-e43,this.f1);return ll;},ResizeMap:function(f_0){if(f_0.width==this.width&&f_0.height==this.height)return;var d50=this.GetCenterLatLng();this.width=ak_1(f_0.width);this.height=ak_1(f_0.height);if(this.width>a49)this.width=a49;if(this.height>a49)this.height=a49;this.f30=d50.lat;this.e21=d50.lng;this.d48=ak_3(this.height/this.f2)+2;this.e7=ak_3(this.width/this.f2)+2;this.d7=false;this.e23=false;this.parent.style.width=this.width+ai_3;this.parent.style.height=this.height+ai_3;for(i=0;ithis.f31.lr.lng){var f12=this.f31.ul.lng;this.f31.ul.lng=this.f31.lr.lng;this.f31.lr.lng=f12;}this.f11=true;if(f_3==null||f_3==false){this.e50();}else{if(f_4==null)f_4=false;if(f_5==null)f_5=1;if(f_6==null)f_6=a37;this.BestFitRoute(f_4,f_5,f_6);}},RemoveRouteHighlight:function(){this.e13.src=b22;this.f11=false;this.f31=null;this.e13.style.display=ai_5;},AddPOI:function(f_0,f_1,f_2){if(this.e5==null)this.e5=new mqz();var f33=this.GetLLToXY(f_0);f_2.ll=f_0;f_2.offset=f_1;f_2.style.position=ai_7;f_2.style.zIndex=9;f_2.style.left=(f33.x+f_1.x-this.f42)+ai_3;f_2.style.top=(f33.y+f_1.y-this.f41)+ai_3;f_2.oncontextmenu=function(){return false;};this.e5.push(f_2);this.div.e46.appendChild(f_2);},UpdatePOI:function(f_0,f_1,f_2){if(this.e5==null)return;var e20=false;for(var i=0;ia41){e44=1;}else{e44=f_2+1;}}if(f_3==null){f6=a37;}else{f_3=ak_1(f_3);if(f_3<1||f_3>a37){f6=a37;}else{f6=f_3;}if(f6e9.ul.lat)e9.ul.lat=d37.lat;if(d37.lnge9.lr.lng)e9.lr.lng=d37.lng;}this.BestFit(e9,f_0,f_1,f_2);},BestFitRoute:function(f_0,f_1,f_2){if(this.f31){if(f_0==null)f_0=false;if(f_1==null)f_1=1;if(f_2==null)f_2=a37;this.BestFit(this.f31,f_0,f_1,f_2);}},GetTileMode:function(){return this.d20;},SetTileMode:function(f_0){if(f_0==ag||f_0==ah||f_0==ai&&(this.d20!=f_0)){this.d5();this.f13=false;this.d49=false;this.d29=false;this.div.d42.style.display=ai_5;this.div.d6.style.display=ai_5;this.div.d15.style.display=ai_5;if(f_0==ag){this.f13=true;this.div.d42.style.display=ai_6;this.e24[LOGO_MAP_COPY].style.display=ai_6;this.e24[LOGO_SAT_COPY].style.display=ai_5;this.d45="mag";}if(f_0==ah){this.d49=true;this.div.d6.style.display=ai_6;this.e24[LOGO_MAP_COPY].style.display=ai_5;this.e24[LOGO_SAT_COPY].style.display=ai_6;this.d45="mah";}if(f_0==ai){this.d49=true;this.d29=true;this.div.d6.style.display=ai_6;this.div.d15.style.display=ai_6;this.e24[LOGO_MAP_COPY].style.display=ai_6;this.e24[LOGO_SAT_COPY].style.display=ai_6;this.d45="mai";}this.d20=f_0;var d50=this.GetCenterLatLng();this.f30=d50.lat;this.e21=d50.lng;this.e45();}},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.e24[f_0].corner=f_1;this.e24[f_0].offset=f_2;this.d34(this.e24[f_0]);}},GetLogoPlacement:function(f_0){f_0=ak_1(f_0);if(f_0>=0&&f_0<=LOGO_SAT_COPY){var e0=new Object();e0.corner=this.e24[f_0].corner;e0.offset=new PointXY(this.e24[f_0].offset.x,this.e24[f_0].offset.y);return e0;}},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.f21(f_0,f_1);}},DisableDragging:function(f_0){this.e29=(f_0==true);},GetDraggingState:function(){return this.e29;},GetLatitudeDegreesPerPixel:function(f_0){return (b43/f_0);},GetLongitudeDegreesPerPixel:function(f_0){return (c32/f_0);},HandleMove:function(){}};document.write(""); 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;i0) {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;j0) {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";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()+">"+this.x+""+this.y+"";};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()+">"+this.lat+""+this.lng+"";};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;}; Object.extend(Event,{trigger:function(element,event,fakeEvent) {element=$(element);fakeEvent=fakeEvent||{type:event};this.observers.each(function(cache) {if(cache[0]==element&&cache[1]==event) cache[2].call(element,fakeEvent);});}});function MQTKObjectCollection(max){var m_items=new Array();var m_maxItems=max||-1;this.add=function(obj){if(m_maxItems!=-1&&m_items.length==max)return;m_items.push(obj);return m_items.length;} this.getSize=function(){return m_items.length;} this.getAt=function(iIndex){return m_items[iIndex];} this.remove=function(iIndex){return m_items.splice(iIndex,1);} this.removeAll=function(){m_items=null;m_items=new Array();} this.contains=function(item){for(var count=0;countthis.ul.lat)this.ul.lat=mqLatLng.lat;if(mqLatLng.lngthis.lr.lng)this.lr.lng=mqLatLng.lng;} MQRectXY.prototype=RectXY.prototype;MQRectXY.prototype.constructor=MQRectXY;function MQRectXY(ulPoint,lrPoint) {if(ulPoint==null)ulPoint=new MQPoint(0,0);if(lrPoint==null)lrPoint=new MQPoint(0,0);RectXY.call(this,ulPoint,lrPoint);} MQRectXY.prototype.setUpperLeft=function(mqPoint) {this.ul=new MQPoint(mqPoint.getX(),mqPoint.getY());} MQRectXY.prototype.setLowerRight=function(mqPoint) {this.lr=new MQPoint(mqPoint.getX(),mqPoint.getY());} MQRectXY.prototype.getUpperLeft=function() {return new MQPoint(this.ul.x,this.ul.y);} MQRectXY.prototype.getLowerRight=function() {return new MQPoint(this.lr.x,this.lr.y);} MQSize.prototype=Size.prototype;MQSize.prototype.constructor=MQSize;function MQSize(w,h) {if(w==null)w=0;if(h==null)h=0;Size.call(this,w,h);} MQSize.prototype.getWidth=function(){return this.width;} MQSize.prototype.getHeight=function(){return this.height;} MQSize.prototype.setWidth=function(w){this.width=parseInt(w);} MQSize.prototype.setHeight=function(h){this.height=parseInt(h);} MQSize.prototype.toString=function() {return this.height+","+this.width;} function isSupportedBrowser() {browser=getBrowserInfo();switch(browser.name) {case"msie":if(browser.version>=6)return true;return false;break;case"firefox":if(browser.version>1.5)return true;return false;break;case"netscape":return false;break;case"opera":return false;break;case"safari":if(browser.version>=2)return true;return false;break;} return true;} function getBrowserInfo() {browser=new Object();browser.name=browser.version=browser.os="unknown";var userAgent=navigator.userAgent.toLowerCase();var browserListArray=new Array("firefox","msie","netscape","opera","safari");var osListArray=new Array("linux","mac","windows","x11");for(var i=0,n=browserListArray.length;i0) {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;i0) {browser.os=osListArray[i];}} return browser;} function getBrowserSize() {size=new MQSize(0,0);if(document.body.scrollHeight>document.body.offsetHeight) {size.width=document.body.scrollWidth;size.height=document.body.scrollHeight;} else {size.width=document.body.offsetWidth;size.height=document.body.offsetHeight;} if(document.body.clientWidth) {size.width=document.body.clientWidth;size.height=document.body.clientHeight;} else {size.width=document.body.offsetWidth;size.height=document.body.offsetHeight;} if(document.documentElement.clientWidth) {size.width=document.documentElement.clientWidth;size.height=document.documentElement.clientHeight;} if(self.innerWidth) {size.width=self.innerWidth;size.height=self.innerHeight;} return size;} MQ=new Object();MQ.utils={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;i0) {for(var i=(obj.childNodes.length-1);i>=0;i--) {obj.removeChild(obj.childNodes[i]);}}},centreElement:function(element) {element.style.left=(MQ.browser.size().width-element.offsetWidth)/2+"px";element.style.top=(MQ.browser.size().height-element.offsetHeight)/2+"px";},getTop:function(element) {var top=0;while(element){top+=parseInt(element.offsetTop);element=element.offsetParent;} return(top);},isMouseLeaveOrEnter:function(e,handler) {if(e.type!='mouseout'&&e.type!='mouseover')return false;var reltg=e.relatedTarget?e.relatedTarget:e.type=='mouseout'?e.toElement:e.fromElement;while(reltg&&reltg!=handler)reltg=reltg.parentNode;return(reltg!=handler);}} MQTileMap.prototype=Map.prototype;MQTileMap.prototype.constructor=MQTileMap;function MQTileMap(parent,scale,mqLatLng,mtype) {this.div1=document.createElement("div");this.div1.style.width=parent.style.width;this.div1.style.height=parent.style.height;parent.style.position="relative";this.parent2=parent;this.controls=[];this.mypois=new MQPoiCollection();parent.appendChild(this.div1);this.iwparent=document.createElement("div");if(scale==null)scale=1;if(mqLatLng==null)mqLatLng=new MQLatLng(38.134557,-98.4375);Map.call(this,this.div1,scale,mqLatLng,mtype);this.SetClickOperation(EVENT_DBLCLICK,OPER_RECENTER);this.infowindow=new MQInfoWindow(this);this.infoWindowTitle=null;this.infoWindowContent=null;this.rolloverwindow=new MQRolloverWindow(this);this.rolloversEnabled=true;Event.observe(this.div1,"click",this.eventCallback("onClick"));this.savedCenter=null;this.savedZoomLevel=null;this.savedMapType=null;this.saveState();} MQTileMap.prototype._getParentOffset=function(element) {var ptOffset=new MQPoint(0,0);while(element) {ptOffset.x+=element.offsetLeft;ptOffset.y+=element.offsetTop;element=element.offsetParent;} return ptOffset;} MQTileMap.prototype.onClick=function(e) {var ptOffset=this._getParentOffset(this.parent);var cx=e.clientX-ptOffset.x;var cy=e.clientY-ptOffset.y;e.xy=new MQPoint(cx,cy);e.ll=this.pixToLL(e.xy);MQEventManager.trigger(this,"click",e);} MQTileMap.prototype.onZoomEnd=function(e) {MQEventManager.trigger(this,"zoomend",e);} MQTileMap.prototype.onMapTypeChanged=function(e) {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.onInfoWindowOpen=function(e) {MQEventManager.trigger(this,"infowindowopen",e);} MQTileMap.prototype.onInfoWindowClose=function(e) {MQEventManager.trigger(this,"infowindowclose",e);} MQTileMap.prototype.onMoveStart=function(e) {MQEventManager.trigger(this,"movestart",e);} MQTileMap.prototype.onMove=function(e) {MQEventManager.trigger(this,"move",e);} MQTileMap.prototype.onMoveEnd=function(e) {MQEventManager.trigger(this,"moveend",e);} MQTileMap.prototype.HandleMove=function() {if(arguments.length==1) {var e=new MQEvent();var movePhase=arguments[0];if(movePhase=="move")this.onMove(e);else if(movePhase=="movestart")this.onMoveStart(e);else if(movePhase=="moveend")this.onMoveEnd(e);}} MQTileMap.prototype.addControl=function(control,position) {control.initialize(this);this.controls[control.type]=control;var style=control.elem.style;if(position!=null) control.position=position;this.parent2.appendChild(control.elem);this.placeControl(control);style.display="block";} MQTileMap.prototype.removeControl=function(control) {this.parent2.removeChild(control.elem);} MQTileMap.prototype.updateZoom=function(which) {if(this.controls[CONTROL_PANZOOM]!=null){if(which=="on"){this.controls[CONTROL_PANZOOM].selectZoom(this.getZoomLevel());}else{this.controls[CONTROL_PANZOOM].unselectZoom(this.getZoomLevel());}}} MQTileMap.prototype.placeControl=function(control) {var pos=control.getPosition();var mapCorner=pos.getMapCorner();var left;var top;if(mapCorner==MQMapCorner.TOP_LEFT) {left=0;top=0;} else if(mapCorner==MQMapCorner.TOP_RIGHT) {left=this.width-control.getWidth();top=0;pos.offsetSize.width*=-1;} else if(mapCorner==MQMapCorner.BOTTOM_LEFT) {left=0;top=this.height-control.getHeight();pos.offsetSize.height*=-1;} else if(mapCorner==MQMapCorner.BOTTOM_RIGHT) {left=this.width-control.getWidth();top=this.height-control.getHeight();pos.offsetSize.width*=-1;pos.offsetSize.height*=-1;} left+=pos.offsetSize.width;top+=pos.offsetSize.height;control.elem.style.left=left+"px";control.elem.style.top=top+"px";} MQTileMap.prototype.setLogoPlacement=function(mapLogo,mapCornerPlacement) {var mapCorner=mapCornerPlacement.getMapCorner();var offsetWidth=Math.abs(mapCornerPlacement.getOffsetSize().getWidth());var offsetHeight=Math.abs(mapCornerPlacement.getOffsetSize().getHeight());var leftOffset=0;var topOffset=0;if(mapCorner==MQMapCorner.TOP_LEFT) {leftOffset=offsetWidth;topOffset=offsetHeight;} else if(mapCorner==MQMapCorner.TOP_RIGHT) {leftOffset=(-offsetWidth);topOffset=offsetHeight;} else if(mapCorner==MQMapCorner.BOTTOM_LEFT) {leftOffset=offsetWidth;topOffset=(-offsetHeight);} else if(mapCorner==MQMapCorner.BOTTOM_RIGHT) {leftOffset=(-offsetWidth);topOffset=(-offsetHeight);} else {return;} this.SetLogoPlacement(mapLogo,mapCorner,new MQPoint(leftOffset,topOffset));} MQTileMap.prototype.addPoi=function(mqPoi) {if(this.mypois.contains(mqPoi))return;this.AddPOI(mqPoi.getLatLng(),mqPoi.getIcon().getAnchorOffset(),mqPoi.getElement());this.mypois.add(mqPoi);var e=new MQEvent();e.poi=mqPoi;this.onPoiAdded(e);mqPoi.redrawLabel();mqPoi.map=this;} MQTileMap.prototype.removePoi=function(mqPoi) {this.RemovePOI(mqPoi.element);this.mypois.removeItem(mqPoi);var e=new MQEvent();mqPoi.onRemoved(e);e.poi=mqPoi;this.onPoiRemoved(e);mqPoi.map=null;} MQTileMap.prototype.removeAllPois=function() {while(this.mypois.getSize()>0) {this.removePoi(this.mypois.getAt(0));} this.onMapCleared(new MQEvent());} MQTileMap.prototype.replacePois=function(mypois) {this.removeAllPois();for(i=0;i-100&&pnt.getX()-100&&pnt.getY()"+title+"";this.infoWindowTitle=container;} MQTileMap.prototype.setInfoContentHTML=function(content) {var container=document.createElement("div");container.innerHTML="
"+content+"
";this.infoWindowContent=container;} MQTileMap.prototype.setInfoTitleElement=function(titleContainer) {this.infoWindowTitle=titleContainer;} MQTileMap.prototype.setInfoContentElement=function(contentContainer) {this.infoWindowContent=contentContainer;} MQTileMap.prototype.openInfoWindow=function(mqPoint) {if(this.iwparent.parentNode) {this.RemovePOI(this.iwparent);} this.AddPOI(this.pixToLL(mqPoint),new MQPoint(0,0),this.iwparent);this.iwparent.appendChild(this.infowindow.popup);this.infowindow.modify(mqPoint,this.infoWindowTitle,this.infoWindowContent,new MQPoint(-7,-14));this.infowindow.setOpenerAndShow(this);this.onInfoWindowOpen(new MQEvent());} MQTileMap.prototype.setRolloversEnabled=function(benable) {this.rolloversEnabled=benable;} MQTileMap.prototype.getRolloversEnabled=function() {return this.rolloversEnabled;} MQTileMap.prototype.enableDragging=function(benable) {this.DisableDragging(!benable);} MQTileMap.prototype.getDragEnabled=function() {return!this.GetDraggingState();} MQTileMap.prototype.getPois=function() {return this.mypois;} MQTileMap.prototype.getSize=function() {return new MQSize(this.div1.style.width,this.div1.style.height);} MQTileMap.prototype.setSize=function(mqSize) {this.ResizeMap(mqSize);} MQTileMap.prototype.getRectFromMapstate=function(mqmapstate) {try{var exist=new MQMapState();exist=null;}catch(e) {throw"The JSAPI must be included to use this function.";return;} if(mqmapstate==null)return;var cLat=parseFloat(mqmapstate.getCenter().getLatitude());var cLng=parseFloat(mqmapstate.getCenter().getLongitude());var heightpx=mqmapstate.getHeightPixels();var widthpx=mqmapstate.getWidthPixels();var scale=mqmapstate.getMapScale();var deltaLat=(heightpx/2)/this.GetLatitudeDegreesPerPixel(scale);var deltaLng=(widthpx/2)/this.GetLongitudeDegreesPerPixel(scale);deltaLat=parseInt(deltaLat*1000000.0)/1000000.0;deltaLng=parseInt(deltaLng*1000000.0)/1000000.0;var ul=new MQLatLng(cLat+deltaLat,cLng-deltaLng);var lr=new MQLatLng(cLat-deltaLat,cLng+deltaLng);return new MQRectLL(ul,lr);} MQTileMap.prototype.addRouteHighlight=function(rectll,mapserverurl,sessionid,bestfit) {var prevZoom=this.getZoomLevel();this.updateZoom("off");this.AddRouteHighlight(rectll,mapserverurl,sessionid,bestfit);this.updateZoom("on");var e=new MQEvent();e.prevZoom=prevZoom;e.zoom=this.getZoomLevel();this.onZoomEnd(e);} MQTileMap.prototype.getBounds=function() {var ulLL=this.pixToLL(new MQPoint(0,0));var lrLL=this.pixToLL(new MQPoint(this.div1.style.width,this.div1.style.height));return new MQRectLL(ulLL,lrLL);} MQTileMap.prototype.restoreState=function() {this.setCenter(this.savedCenter);this.setZoomLevel(this.savedZoomLevel);this.setMapType(this.savedMapType);} MQTileMap.prototype.saveState=function() {this.savedCenter=this.getCenter();this.savedZoomLevel=this.getZoomLevel();this.savedMapType=this.getMapType();} MQTileMap.prototype.removeRouteHighlight=function() {this.RemoveRouteHighlight();} PAN_NORTH=0;PAN_SOUTH=1;PAN_EAST=2;PAN_WEST=3;function MQControl() {} MQControl.prototype.initialize=function(map) {this.map=map;} MQControl.prototype.getPosition=function() {return this.position;} MQControl.prototype.getHeight=function() {return this.getHeightInternal(this.elem);} MQControl.prototype.getHeightInternal=function(parent) {var children=parent.childNodes;var height=0;for(var i=0;i0&&children[i].style.overflow!="hidden"){childHeight=this.getHeightInternal(children[i]);if(childHeight>height)height=childHeight;} if(children[i].offsetHeight>height)height=children[i].offsetHeight;} return height;} MQControl.prototype.getWidth=function() {return this.getWidthInternal(this.elem);} MQControl.prototype.getWidthInternal=function(parent) {var children=parent.childNodes;var width=0;for(var i=0;i0&&children[i].style.overflow!="hidden"){childWidth=this.getWidthInternal(children[i]);if(childWidth>width)width=childWidth;} if(children[i].offsetWidth>width)width=children[i].offsetWidth;} return width;} function MQLargeZoomControl() {browser=getBrowserInfo();this.pan=new Array();this.zoombar=new Array();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(5,30));this.elem=document.createElement("div");this.elem.style.position="absolute";this.elem.style.overflow="visible";temp=document.createElement("div");temp.className="map-controls-bg screen";this.elem.appendChild(temp);temp1=document.createElement("div");temp1.className="map-compass-wrapper";temp.appendChild(temp1);temp1=document.createElement("div");temp1.className="map-zoom";temp.appendChild(temp1);temp1=document.createElement("div");temp1.className="map-revert";temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-compass-wrapper";temp.appendChild(temp1);temp2=document.createElement("div");temp2.className="map-compass";temp1.appendChild(temp2);temp3=document.createElement("img");temp3.border=0;if(browser.name=="msie") {temp3.src="http://img.mqcdn.com/a/a";temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqmaptiled/map-compassrose.png', sizingMethod='image')";}else{temp3.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";} temp3.alt="compass rose";temp3.className="";temp2.appendChild(temp3);this.compassrose=temp3;temp3=document.createElement("img");temp3.border=0;temp3.src="http://img.mqcdn.com/a/a";temp3.className="map-compass-links";temp3.alt="Pan or recenter the map";temp3.useMap="#mq-zoomcontrol-linkmap";temp3.title="Pan or recenter the map";temp2.appendChild(temp3);temp3=document.createElement("map");temp3.name="mq-zoomcontrol-linkmap";temp3.id="mq-zoomcontrol-linkmap";temp2.appendChild(temp3);temp4=document.createElement("area");temp4.shape="poly";temp4.coords="14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21";temp4.href="#center";temp4.title="Fit to Screen";temp4.alt="Fit to Screen";temp3.appendChild(temp4);temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,1,29,12";temp4.href="#north";temp4.title="Pan North";temp4.alt="Pan North";temp3.appendChild(temp4);this.pan[PAN_NORTH]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="27,13,40,28";temp4.href="#east";temp4.title="Pan East";temp4.alt="Pan East";temp3.appendChild(temp4);this.pan[PAN_EAST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="1,13,14,28";temp4.href="#west";temp4.title="Pan West";temp4.alt="Pan West";temp3.appendChild(temp4);this.pan[PAN_WEST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,29,29,40";temp4.href="#south";temp4.title="Pan South";temp4.alt="Pan South";temp3.appendChild(temp4);this.pan[PAN_SOUTH]=temp4;temp1=document.createElement("li");temp1.className="map-zoom";temp.appendChild(temp1);temp2=document.createElement("div");temp2.className="io map-zoom-in";temp1.appendChild(temp2);this.zoomin=document.createElement("img");this.zoomin.alt="Zoom In";this.zoomin.title="Zoom In";this.zoomin.border=0;if(browser.name=="msie") {this.zoomin.src="http://img.mqcdn.com/a/a";this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";}else{this.zoomin.src="http://img.mqcdn.com/mqtoolkit/z-in.png";} temp2.appendChild(this.zoomin);for(var i=16;i>0;i--) {this.zoombar[i]=document.createElement("img");this.zoombar[i].alt="Zoom to level "+i;this.zoombar[i].title="Zoom to level "+i;this.zoombar[i].border=0;this.zoombar[i].style.display="block";if(browser.name=="msie") {this.zoombar[i].src="http://img.mqcdn.com/a/a";f="http://img.mqcdn.com/mqtoolkit/z-"+i+".png";this.zoombar[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"', sizingMethod='image')";}else{this.zoombar[i].src="http://img.mqcdn.com/mqtoolkit/z-"+i+".png";} temp1.appendChild(this.zoombar[i]);} temp2=document.createElement("div");temp2.className="io map-zoom-out";temp1.appendChild(temp2);this.zoomout=document.createElement("img");this.zoomout.alt="Zoom Out";this.zoomout.title="Zoom Out";this.zoomout.border=0;if(browser.name=="msie") {this.zoomout.src="http://img.mqcdn.com/a/a";this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";}else{this.zoomout.src="http://img.mqcdn.com/mqtoolkit/z-out.png";} temp2.appendChild(this.zoomout);} MQLargeZoomControl.prototype=new MQControl();MQLargeZoomControl.prototype.constructor=MQLargeZoomControl;MQLargeZoomControl.prototype.initialize=function(map) {this.map=map;this.type=CONTROL_PANZOOM;this.selectZoom(this.map.GetZoomLevel());for(var i=0;i<4;i++) {Event.observe(this.pan[i],'click',this.eventCallback("eventmonitor"));Event.observe(this.pan[i],'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.pan[i],'mouseout',this.eventCallback("eventmonitor"));} Event.observe(this.zoomin,'click',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'click',this.eventCallback("eventmonitor"));Event.observe(this.zoomin,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.zoomin,'mouseout',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'mouseout',this.eventCallback("eventmonitor"));for(var i=1;i<17;i++) {Event.observe(this.zoombar[i],'click',this.eventCallback("eventmonitor"));Event.observe(this.zoombar[i],'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.zoombar[i],'mouseout',this.eventCallback("eventmonitor"));}} MQLargeZoomControl.prototype.eventmonitor=function(evt) {if(Event.element(evt)==this.pan[PAN_NORTH])eventId="n";if(Event.element(evt)==this.pan[PAN_SOUTH])eventId="s";if(Event.element(evt)==this.pan[PAN_EAST])eventId="e";if(Event.element(evt)==this.pan[PAN_WEST])eventId="w";if(Event.element(evt)==this.zoomin)eventId="in";if(Event.element(evt)==this.zoomout)eventId="out";for(var i=1;i<17;i++) {if(Event.element(evt)==this.zoombar[i])eventId=i;} switch(evt.type) {case"click":switch(eventId) {case"in":if(this.map.getZoomLevel()<16) this.map.zoomIn();break;case"out":this.map.zoomOut();break;case"n":this.map.PanNorth(50);break;case"s":this.map.PanSouth(50);break;case"e":this.map.PanEast(50);break;case"w":this.map.PanWest(50);break;default:this.map.setZoomLevel(eventId);break;} break;case"mouseover":switch(eventId) {case"in":case"out":Event.element(evt).addClassName("o");break;case"n":this.compassrose.className="n";break;case"s":this.compassrose.className="s";break;case"e":this.compassrose.className="e";break;case"w":this.compassrose.className="w";break;default:this.selectZoom(eventId);} break;case"mouseout":switch(eventId) {case"in":case"out":Event.element(evt).removeClassName("o");break;case"n":case"s":case"e":case"w":this.compassrose.className="";break;default:if(parseFloat(eventId)!=this.map.GetZoomLevel()) {this.unselectZoom(eventId);} break;} break;}} MQLargeZoomControl.prototype.selectZoom=function(level) {this.zoombar[level].src="http://img.mqcdn.com/mqmaptiled/z-on.png";} MQLargeZoomControl.prototype.unselectZoom=function(level) {this.zoombar[level].src="http://img.mqcdn.com/mqmaptiled/z-"+level+".png";} MQLargeZoomControl.prototype.getHeight=function() {return 304;} MQLargeZoomControl.prototype.getWidth=function() {return 50;} function MQPanControl() {browser=getBrowserInfo();this.pans=new Array();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(0,30));this.elem=document.createElement("div");this.elem.style.position="absolute";this.elem.style.overflow="visible";temp=document.createElement("div");temp.className="map-controls-bg screen";this.elem.appendChild(temp);temp1=document.createElement("div");temp1.className="map-box-wrapper";temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-box-wrapper";temp.appendChild(temp1);temp2=document.createElement("div");temp2.className="map-compass";temp1.appendChild(temp2);temp3=document.createElement("img");temp3.border=0;if(browser.name=="msie") {temp3.src="http://img.mqcdn.com/a/a";temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/map-compassrose.png', sizingMethod='image')";}else{temp3.src="http://img.mqcdn.com/mqtoolkit/map-compassrose.png";} temp3.alt="compass rose";temp3.className="";temp2.appendChild(temp3);this.compassrose=temp3;temp3=document.createElement("img");temp3.border=0;temp3.src="http://img.mqcdn.com/a/a";temp3.className="map-compass-links";temp3.alt="Pan or recenter the map";temp3.useMap="#mq-pancontrol-linkmap";temp3.title="Pan or recenter the map";temp2.appendChild(temp3);temp3=document.createElement("map");temp3.id="mq-pancontrol-linkmap";temp3.name="mq-pancontrol-linkmap";temp2.appendChild(temp3);temp4=document.createElement("area");temp4.shape="poly";temp4.coords="14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21";temp4.href="#center";temp4.title="Fit to Screen";temp4.alt="Fit to Screen";temp3.appendChild(temp4);temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,1,29,12";temp4.href="#north";temp4.title="Pan North";temp4.alt="Pan North";temp3.appendChild(temp4);this.pans[PAN_NORTH]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="27,13,40,28";temp4.href="#east";temp4.title="Pan East";temp4.alt="Pan East";temp3.appendChild(temp4);this.pans[PAN_EAST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="1,13,14,28";temp4.href="#west";temp4.title="Pan West";temp4.alt="Pan West";temp3.appendChild(temp4);this.pans[PAN_WEST]=temp4;temp4=document.createElement("area");temp4.shape="rect";temp4.coords="11,29,29,40";temp4.href="#south";temp4.title="Pan South";temp4.alt="Pan South";temp3.appendChild(temp4);this.pans[PAN_SOUTH]=temp4;} MQPanControl.prototype=new MQControl();MQPanControl.prototype.constructor=MQPanControl;MQPanControl.prototype.initialize=function(map) {this.map=map;this.type=CONTROL_PAN;for(var i=0;i<4;i++) {Event.observe(this.pans[i],'click',this.eventCallback("eventmonitors"));Event.observe(this.pans[i],'mouseover',this.eventCallback("eventmonitors"));Event.observe(this.pans[i],'mouseout',this.eventCallback("eventmonitors"));}} MQPanControl.prototype.eventmonitors=function(evt) {if(Event.element(evt)==this.pans[PAN_NORTH])eventId="n";if(Event.element(evt)==this.pans[PAN_SOUTH])eventId="s";if(Event.element(evt)==this.pans[PAN_EAST])eventId="e";if(Event.element(evt)==this.pans[PAN_WEST])eventId="w";switch(evt.type) {case"click":switch(eventId) {case"n":this.map.PanNorth(50);break;case"s":this.map.PanSouth(50);break;case"e":this.map.PanEast(50);break;case"w":this.map.PanWest(50);break;} break;case"mouseover":switch(eventId) {case"n":this.compassrose.className="n";break;case"s":this.compassrose.className="s";break;case"e":this.compassrose.className="e";break;case"w":this.compassrose.className="w";break;} break;case"mouseout":this.compassrose.className="";break;}} MQPanControl.prototype.getHeight=function() {return 52;} MQPanControl.prototype.getWidth=function() {return 54;} function MQZoomControl() {browser=getBrowserInfo();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_LEFT,new MQSize(0,30));this.elem=document.createElement("div");this.elem.style.position="absolute";this.elem.style.overflow="visible";temp=document.createElement("div");temp.className="map-controls-bg screen";temp.style.width="60px";this.elem.appendChild(temp);temp1=document.createElement("div");temp1.className="map-zoombox-wrapper";temp1.style.width="60px";temp.appendChild(temp1);temp=document.createElement("ul");temp.className="map-controls screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-zoom";temp1.style.width="60px";temp1.style.height="50px";temp.appendChild(temp1);temp2=document.createElement("div");temp2.style.position="absolute";temp2.style.left="6px";temp2.style.top="8px";temp2.style.width="22px";temp2.className="io map-zoom-in";temp1.appendChild(temp2);this.zoomin=document.createElement("img");this.zoomin.alt="Zoom In";this.zoomin.title="Zoom In";this.zoomin.border=0;if(browser.name=="msie") {this.zoomin.src="http://img.mqcdn.com/a/a";this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";}else{this.zoomin.src="http://img.mqcdn.com/mqtoolkit/z-in.png";} temp2.appendChild(this.zoomin);temp2=document.createElement("div");temp2.style.position="absolute";temp2.style.left="29px";temp2.style.top="6px";temp2.style.width="22px";temp2.className="io map-zoom-out";temp1.appendChild(temp2);this.zoomout=document.createElement("img");this.zoomout.alt="Zoom Out";this.zoomout.title="Zoom Out";this.zoomout.border=0;if(browser.name=="msie") {this.zoomout.src="http://img.mqcdn.com/a/a";this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";}else{this.zoomout.src="http://img.mqcdn.com/mqtoolkit/z-out.png";} temp2.appendChild(this.zoomout);} MQZoomControl.prototype=new MQControl();MQZoomControl.prototype.constructor=MQZoomControl;MQZoomControl.prototype.initialize=function(map) {this.map=map;this.type=CONTROL_ZOOM;Event.observe(this.zoomin,'click',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'click',this.eventCallback("eventmonitor"));Event.observe(this.zoomin,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.zoomin,'mouseout',this.eventCallback("eventmonitor"));Event.observe(this.zoomout,'mouseout',this.eventCallback("eventmonitor"));} MQZoomControl.prototype.eventmonitor=function(evt) {if(Event.element(evt)==this.zoomin)eventId="in";if(Event.element(evt)==this.zoomout)eventId="out";switch(evt.type) {case"click":switch(eventId) {case"in":if(this.map.getZoomLevel()<16) this.map.zoomIn();break;case"out":this.map.zoomOut();break;default:this.map.setZoomLevel(eventId);break;} break;case"mouseover":switch(eventId) {case"in":case"out":Event.element(evt).addClassName("o");break;default:Event.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-on.png";} break;case"mouseout":switch(eventId) {case"in":case"out":Event.element(evt).removeClassName("o");break;default:if(parseFloat(eventId)!=this.map.getZoomLevel()) {Event.element(evt).src="http://img.mqcdn.com/mqmaptiled/z-"+eventId+".png";}} break;}} MQZoomControl.prototype.getHeight=function() {return 55;} MQZoomControl.prototype.getWidth=function() {return 66;} function MQViewControl() {browser=getBrowserInfo();this.map=null;this.position=new MQMapCornerPlacement(MQMapCorner.TOP_RIGHT,new MQSize(150,0));this.elem=document.createElement("div");this.elem.style.position="absolute";this.elem.style.overflow="visible";temp=document.createElement("ul");temp.className="map-view screen";this.elem.appendChild(temp);temp1=document.createElement("li");temp1.className="map-view-street";temp.appendChild(temp1);this.streetview=document.createElement("img");this.streetview.className="";this.streetview.border=0;if(browser.name=="msie") {this.streetview.src="http://img.mqcdn.com/a/a";this.streetview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png', sizingMethod='image')";}else{this.streetview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-street-view.png";} this.streetview.alt="View Street Map";this.streetview.title="View Street Map";temp1.appendChild(this.streetview);temp1=document.createElement("li");temp1.className="map-view-aerial";temp.appendChild(temp1);this.aerialview=document.createElement("img");this.aerialview.className="";this.aerialview.border=0;if(browser.name=="msie") {this.aerialview.src="http://img.mqcdn.com/a/a";this.aerialview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png', sizingMethod='image')";}else{this.aerialview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-aerial-view.png";} this.aerialview.alt="View Aerial Image";this.aerialview.title="View Aerial Image";temp1.appendChild(this.aerialview);temp1=document.createElement("li");temp1.className="map-view-hybrid";temp.appendChild(temp1);this.hybridview=document.createElement("img");this.hybridview.className="";this.hybridview.border=0;if(browser.name=="msie") {this.hybridview.src="http://img.mqcdn.com/a/a";this.hybridview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png', sizingMethod='image')";}else{this.hybridview.src="http://img.mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png";} this.hybridview.alt="View Hybrid Map";this.hybridview.title="View Hybrid Map";temp1.appendChild(this.hybridview);} MQViewControl.prototype=new MQControl();MQViewControl.prototype.constructor=MQViewControl;MQViewControl.prototype.initialize=function(map) {this.map=map;this.type=CONTROL_TYPE;Event.observe(this.streetview,'click',this.eventCallback("eventmonitor"));Event.observe(this.streetview,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.streetview,'mouseout',this.eventCallback("eventmonitor"));Event.observe(this.aerialview,'click',this.eventCallback("eventmonitor"));Event.observe(this.aerialview,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.aerialview,'mouseout',this.eventCallback("eventmonitor"));Event.observe(this.hybridview,'click',this.eventCallback("eventmonitor"));Event.observe(this.hybridview,'mouseover',this.eventCallback("eventmonitor"));Event.observe(this.hybridview,'mouseout',this.eventCallback("eventmonitor"));if(this.map.getMapType()=="map")this.streetview.addClassName("a");if(this.map.getMapType()=="sat")this.aerialview.addClassName("a");if(this.map.getMapType()=="hyb")this.hybridview.addClassName("a");} MQViewControl.prototype.eventmonitor=function(evt) {switch(evt.type) {case"click":if(Event.element(evt)==this.streetview)this.selectMode("street");if(Event.element(evt)==this.aerialview)this.selectMode("aerial");if(Event.element(evt)==this.hybridview)this.selectMode("hybrid");break;case"mouseover":Event.element(evt).addClassName("o");break;case"mouseout":Event.element(evt).removeClassName("o");break;}} MQViewControl.prototype.updateControl=function(mtype) {switch(mtype) {case"map":this.aerialview.removeClassName("a");this.hybridview.removeClassName("a");this.streetview.addClassName("a");break;case"sat":this.hybridview.removeClassName("a");this.streetview.removeClassName("a");this.aerialview.addClassName("a");break;case"hyb":this.aerialview.removeClassName("a");this.streetview.removeClassName("a");this.hybridview.addClassName("a");break;}} MQViewControl.prototype.selectMode=function(mode) {var mtype=this.map.getMapType();var newMT="noChange";if(mode=="street"&&mtype!="map") {newMT="map";} if(mode=="aerial"&&mtype!="sat") {newMT="sat";} if(mode=="hybrid"&&mtype!="hyb") {newMT="hyb";} if(newMT!="noChange") {this.map.setMapType(newMT);}} MQViewControl.prototype.getHeight=function() {return 26;} MQViewControl.prototype.getWidth=function() {return 220;} MQPoiCollection.prototype=new MQTKObjectCollection();MQPoiCollection.prototype.constructor=MQPoiCollection;function MQPoiCollection() {MQTKObjectCollection.call(this);} MQPoiCollection.prototype.append=function(mqPoiCollection) {for(i=0;i"+title+"";this.rolloverContent=container;} MQPoi.prototype.setInfoContentHTML=function(content) {var container=document.createElement("div");container.innerHTML="
"+content+"
";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;} function MQInfoWindow(map) {this.map=map;this.enabled=true;this.point=null;this.title=null;this.content=null;this.offset=null;this.maxwidth=null;this.opener=null;this.artUrl="http://img.mqcdn.com/mqtoolkit/";this.popup=document.createElement("div");this.popup.id="popupcontainer";this.popup.className="mqpoipopup";this.popup.currentElement=null;this.popup.oncontextmenu=function(){return false;};var str="";str+="
";str+="
    ";str+="
    ";this.popup.innerHTML=str;this.popup.style.position="absolute";this.popup.style.visibility="hidden";document.body.appendChild(this.popup);var poiclose=this.popup.childNodes[0];Event.observe(poiclose,"click",this.eventCallback("clickClose"));this.popup.content=this.popup.childNodes[2].childNodes[0].childNodes[0];if(getBrowserInfo().name=='msie') {if(parseFloat(getBrowserInfo().version)<7.0){$("popupcenter").style.height="4px";}else{$("popupcenter").style.height="100%";} $("popuptop").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-top.png', sizingMethod='scale')";$("popupcenter").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-center.png', sizingMethod='scale')";$("popupbottom").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"popup-bottom-left.png', sizingMethod='scale')";} else {$("popuptop").style.background="transparent url("+this.artUrl+"popup-top.png) no-repeat left";$("popupcenter").style.background="transparent url("+this.artUrl+"popup-center.png) left";$("popupbottom").style.background="transparent url("+this.artUrl+"popup-bottom-left.png) no-repeat left";}} MQInfoWindow.prototype.onOpen=function(e) {MQEventManager.trigger(this,"opened",e);} MQInfoWindow.prototype.onClose=function(e) {MQEventManager.trigger(this,"closed",e);} MQInfoWindow.prototype.onClickedClosed=function(e) {MQEventManager.trigger(this,"clickedclosed",e);} MQInfoWindow.prototype.clickClose=function(evt) {this.hide();this.onClickedClosed(evt);} MQInfoWindow.prototype.hide=function() {if(!this.isHidden()) {if(this.popup.style.visibility!="hidden")this.popup.style.visibility="hidden";if(this.opener!=null) {this.opener.onInfoWindowClose(new MQEvent());this.opener=null;} this.onClose(new MQEvent());}} MQInfoWindow.prototype.setOpenerAndShow=function(opener) {this.show();this.opener=opener;} MQInfoWindow.prototype.show=function() {if(!this.isHidden())this.hide();var offsetY=this.offset.y;var offsetHeight=this.popup.offsetHeight-17;var offsetX=this.offset.x;var offsetWidth=27;this.popup.style.top=(offsetY-offsetHeight)+"px";this.popup.style.left=(offsetX-offsetWidth)+"px";this.popup.style.visibility="visible";this.avoidPopupCollisions(this.popup);this.onOpen(new MQEvent());} MQInfoWindow.prototype.isHidden=function() {return(this.popup.style.visibility=="hidden");} MQInfoWindow.prototype.modify=function(point,title,content,offset) {if(point)this.point=point;if(title)this.title=title;if(content)this.content=content;this.offset=new PointXY(0,0);if(offset)this.offset=offset;this.popup.style.position="absolute";this.popup.style.zIndex=9;this.popup.content.innerHTML="
    "+this.title.innerHTML+"
    "+this.content.innerHTML+"
    ";} MQInfoWindow.prototype.getMaxWidth=function() {return this.maxWidth;} MQInfoWindow.prototype.setMaxWidth=function(width) {this.maxWidth=width;} MQInfoWindow.prototype.getPointLL=function() {return this.map.GetXYToLL(this.point);} MQInfoWindow.prototype.getPointXY=function() {return this.point;} MQInfoWindow.prototype.getPixelOffset=function() {return this.offset;} MQInfoWindow.prototype.avoidPopupCollisions=function(popup){var collisionInfo=this.getCollisionInfo(popup);if(collisionInfo.panX!=0||collisionInfo.panY!=0){this.map.SlideMapByOffset(new PointXY(collisionInfo.panX,collisionInfo.panY));}} MQInfoWindow.prototype.getCollisionInfo=function(element) {var mapElement=this.map.parent;var collisionInfo={panX:0,panY:0};var mapLftTop=MQ.utils.getOffsetLftTop(mapElement);var elemPos=Position.cumulativeOffset(element);var leftTopPad=10;elemPos[0]=elemPos[0]-mapLftTop.left-leftTopPad;elemPos[1]=elemPos[1]-mapLftTop.top-leftTopPad;var compassDims={width:37,height:300} var viewBtnDims={width:139,height:15} var leftBound=(elemPos[0]mapElement.clientWidth-viewBtnDims.width&&elemPos[1]0&&element.clientHeight>0){if(elemPos[0]mapElement.clientWidth){collisionInfo.panX=-1*(element.clientWidth+elemPos[0]+leftTopPad-mapElement.clientWidth);} if(elemPos[1]mapElement.clientHeight){collisionInfo.panY=mapElement.clientHeight-elemPos[1]-element.clientHeight;}} return collisionInfo;} function MQRolloverWindow(map) {this.map=map;this.enabled=true;this.point=null;this.title=null;this.content=null;this.offset=new MQPoint(0,0);this.opener=null;this.maxwidth=null;this.artUrl="http://img.mqcdn.com/mqtoolkit/";this.minipopup=document.createElement("div");this.minipopup.id="minipopup";this.minipopup.className="mqminipopup";this.minipopup.currentElement=null;this.minipopup.oncontextmenu=function(){return false;};if(getBrowserInfo().name!="msie"){this.minipopup.style.background="url("+this.artUrl+"rollover-left.png) left";} if(getBrowserInfo().name=="msie") {this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.artUrl+"rollover-left.png', sizingMethod='scale')";} else {this.minipopup.style.background="";this.minipopup.style.background="url("+this.artUrl+"rollover-left.png) left";} document.body.appendChild(this.minipopup);this.minipopup.style.position="absolute";this.minipopup.style.visibility="hidden";} MQRolloverWindow.prototype.onOpen=function(e) {MQEventManager.trigger(this,"opened",e);} MQRolloverWindow.prototype.onClose=function(e) {MQEventManager.trigger(this,"closed",e);} MQRolloverWindow.prototype.hide=function(evt) {if(!this.isHidden()) {if(this.minipopup.style.visibility!="hidden")this.minipopup.style.visibility="hidden";if(this.opener!=null) {this.opener.onRolloverClose(new MQEvent());this.opener=null;} this.onClose(new MQEvent());}} MQRolloverWindow.prototype.setOpenerAndShow=function(opener) {this.opener=opener;this.show();} MQRolloverWindow.prototype.show=function() {if(!this.isHidden())this.hide();var offsetY=this.offset.y;var offsetHeight=this.minipopup.offsetHeight-13;var offsetX=this.offset.x;var offsetWidth=25;this.minipopup.style.top=(offsetY-offsetHeight)+"px";this.minipopup.style.left=(offsetX-offsetWidth)+"px";this.minipopup.style.visibility="visible";this.onOpen(new MQEvent());} MQRolloverWindow.prototype.isHidden=function() {return(this.minipopup.style.visibility=="hidden");} MQRolloverWindow.prototype.modify=function(point,content,offset) {if(point)this.point=point;if(content)this.content=content;if(offset)this.offset=offset;this.minipopup.style.position="absolute";this.minipopup.style.zIndex=9;this.minipopup.innerHTML="
    "+this.content.innerHTML+"
    ";} MQRolloverWindow.prototype.getMaxWidth=function() {return this.maxWidth;} MQRolloverWindow.prototype.setMaxWidth=function(width) {this.maxWidth=width;} MQRolloverWindow.prototype.getPointLL=function() {return this.map.GetXYToLL(this.point);} MQRolloverWindow.prototype.getPointXY=function() {return this.point;} MQRolloverWindow.prototype.getPixelOffset=function() {return this.offset;} function MQEvent() {this.type="event";} var MQEventManager=new function() {this.addListener=function(source,eventType,handler,target) {if(!this.observers)this.observers=[];if(target==null)target=source;this.observers.push([source,eventType,handler,target]);} this.removeListener=function(source,eventType,handler,target) {if(this.observers) {if(target==null)target=source;this.observers.each(function(cache){if(cache[0]==source&&cache[1]==eventType&&cache[2]==handler&&cache[3]==target) this.observers.pop(cache);});}} this.clearListeners=function(source,eventType) {if(this.observers) {this.observers.each(function(cache){if(cache[0]==source){if(eventType&&cache[1]!=eventType)return;this.observers.pop(cache);}});}} 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);});}}}