/*
 * Copyright (c) 2008 Yahoo! Inc. All rights reserved. - version 3.5.2 
 */
_baseURL=getScriptSrc("apiloader.js");_shellURL=_baseURL+"shell.swf";_gatewaySWF=_baseURL+"gateway.swf";
function getScriptSrc(s)
{var sSrc="";var iCollection=document.getElementsByTagName("script").length;var regX=new RegExp(s,"gi");for(var i=0;i<iCollection;i++)
{sSrc=document.getElementsByTagName("script")[i].src;if(sSrc.indexOf(s)!=-1)
{sSrc=sSrc.replace(regX,"");var tmp_src=sSrc.split('?');sSrc=tmp_src[0];break;}}
return sSrc;}
function includeScript(scriptURL,type)
{if(!type)type="text/javascript";document.write("<script src=\""+_baseURL+scriptURL+"\" type=\""+type+"\" ><\/script>");}
includeScript("vbcallback.vbs","text/vbscript");function Exception(name,message)
{if(name)
this.name=name;if(message)
this.message=message;}
Exception.prototype.setName=function(name)
{this.name=name;}
Exception.prototype.getName=function()
{return this.name;}
Exception.prototype.setMessage=function(msg)
{this.message=msg;}
Exception.prototype.getMessage=function()
{return this.message;}
function FlashTag(src,width,height,version)
{if(arguments.length<4)
{throw new Exception('RequiredParameterException','You must pass in a src, width, height, and version when creating a FlashTag.');}
this.src=src;this.width=width;this.height=height;this.version=version;this.id=null;this.flashVars=null;this.flashVarsStr=null;this.genericParam=new Object();this.ie=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
FlashTag.prototype.setSource=function(src)
{this.src=src;}
FlashTag.prototype.setWidth=function(w)
{this.width=width;}
FlashTag.prototype.setHeight=function(h)
{this.h=height;}
FlashTag.prototype.setVersion=function(v)
{this.version=v;}
FlashTag.prototype.setId=function(id)
{this.id=id;}
FlashTag.prototype.setBgcolor=function(bgc)
{if(bgc.charAt(0)!='#')
{bgc='#'+bgc;}
this.genericParam['bgcolor']=bgc;}
FlashTag.prototype.addFlashVars=function(fvs)
{this.flashVarsStr=fvs;}
FlashTag.prototype.addFlashVar=function(n,v)
{if(this.flashVars==null)
{this.flashVars=new Object();}
this.flashVars[n]=v;}
FlashTag.prototype.removeFlashVar=function(n)
{if(this.flashVars!=null)
{this.flashVars[n]=null;}}
FlashTag.prototype.setSwliveconnect=function(swlc)
{this.genericParam['swliveconnect']=swlc;}
FlashTag.prototype.setPlay=function(p)
{this.genericParam['play']=p;}
FlashTag.prototype.setLoop=function(l)
{this.genericParam['loop']=l;}
FlashTag.prototype.setMenu=function(m)
{this.genericParam['menu']=m;}
FlashTag.prototype.setQuality=function(q)
{if(q!='low'&&q!='high'&&q!='autolow'&&q!='autohigh'&&q!='best')
{throw new Exception('UnsupportedValueException','Supported values are "low", "high", "autolow", "autohigh", and "best".');}
this.genericParam['quality']=q;}
FlashTag.prototype.setScale=function(sc)
{if(sc!='showall'&&sc!='noborder'&&sc!='exactfit')
{throw new Exception('UnsupportedValueException','Supported values are "showall", "noborder", and "exactfit".');}
this.genericParam['scale']=sc;}
FlashTag.prototype.setAlign=function(a)
{if(a!='l'&&a!='t'&&a!='r'&&a!='b')
{throw new Exception('UnsupportedValueException','Supported values are "l", "t", "r" and "b".');}
this.genericParam['align']=a;}
FlashTag.prototype.setSalign=function(sa)
{if(sa!='l'&&sa!='t'&&sa!='r'&&sa!='b'&&sa!='tl'&&sa!='tr'&&sa!='bl'&&sa!='br')
{throw new Exception('UnsupportedValueException','Supported values are "l", "t", "r", "b", "tl", "tr", "bl" and "br".');}
this.genericParam['salign']=sa;}
FlashTag.prototype.setWmode=function(wm)
{if(wm!='window'&&wm!='opaque'&&wm!='transparent')
{throw new Exception('UnsupportedValueException','Supported values are "window", "opaque", and "transparent".');}
this.genericParam['wmode']=wm;}
FlashTag.prototype.setBase=function(base)
{this.genericParam['base']=base;}
FlashTag.prototype.setAllowScriptAccess=function(sa)
{if(sa!='never'&&sa!='always')
{throw new Exception('UnsupportedValueException','Supported values are "never" and "always".');}
this.genericParam['allowScriptAccess']=sa;}
FlashTag.prototype.toString=function()
{var flashTag=new String();if(this.ie)
{flashTag+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';if(this.id!=null)
{flashTag+='id="'+this.id+'" ';}
flashTag+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';flashTag+='width="'+this.width+'" ';flashTag+='height="'+this.height+'">';flashTag+='<param name="movie" value="'+this.src+'"/>';for(var n in this.genericParam)
{if(this.genericParam[n]!=null)
{flashTag+='<param name="'+n+'" value="'+this.genericParam[n]+'"/>';}}
if(this.flashVars!=null)
{var fv=this.getFlashVarsAsString();if(fv.length>0)
{flashTag+='<param name="flashvars" value="'+fv+'"/>';}}
flashTag+='</object>';}
else
{flashTag+='<embed src="'+this.src+'"';flashTag+=' width="'+this.width+'"';flashTag+=' height="'+this.height+'"';flashTag+=' type="application/x-shockwave-flash"';if(this.id!=null)
{flashTag+=' name="'+this.id+'"';}
for(var n in this.genericParam)
{if(this.genericParam[n]!=null)
{flashTag+=(' '+n+'="'+this.genericParam[n]+'"');}}
if(this.flashVars!=null)
{var fv=this.getFlashVarsAsString();if(fv.length>0)
{flashTag+=' flashvars="'+fv+'"';}}
flashTag+=' pluginspage="http://www.macromedia.com/go/getflashplayer">';flashTag+='</embed>';}
return flashTag;}
FlashTag.prototype.write=function(doc)
{doc.write(this.toString());}
FlashTag.prototype.getFlashVarsAsString=function()
{var qs=new String();for(var n in this.flashVars)
{if(this.flashVars[n]!=null)
{qs+=(escape(n)+'='+escape(this.flashVars[n])+'&');}}
if(this.flashVarsStr!=null)
{return qs+this.flashVarsStr;}
return qs.substring(0,qs.length-1);}
function FlashSerializer(useCdata)
{this.useCdata=useCdata;}
FlashSerializer.prototype.serialize=function(args)
{var qs=new String();for(var i=0;i<args.length;++i)
{switch(typeof(args[i]))
{case'undefined':qs+='t'+(i)+'=undf';break;case'string':qs+='t'+(i)+'=str&d'+(i)+'='+escape(args[i]);break;case'number':qs+='t'+(i)+'=num&d'+(i)+'='+escape(args[i]);break;case'boolean':qs+='t'+(i)+'=bool&d'+(i)+'='+escape(args[i]);break;case'object':if(args[i]==null)
{qs+='t'+(i)+'=null';}
else if(args[i]instanceof Date)
{qs+='t'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());}
else
{try
{qs+='t'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));}
catch(exception)
{throw new Exception("FlashSerializationException","The following error occurred during complex object serialization: "+exception.getMessage());}}
break;default:throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");}
if(i!=(args.length-1))
{qs+='&';}}
return qs;}
FlashSerializer.prototype._serializeXML=function(obj)
{var doc=new Object();doc.xml='<fp>';try
{this._serializeNode(obj,doc,null);}
catch(exception)
{if(exception.message)
{throw new Exception("FlashSerializationException","Unable to serialize object because: "+exception.message);}
throw exception;}
doc.xml+='</fp>';return doc.xml;}
FlashSerializer.prototype._serializeNode=function(obj,doc,name)
{switch(typeof(obj))
{case'undefined':doc.xml+='<undf'+this._addName(name)+'/>';break;case'string':doc.xml+='<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';break;case'number':doc.xml+='<num'+this._addName(name)+'>'+obj+'</num>';break;case'boolean':doc.xml+='<bool'+this._addName(name)+' val="'+obj+'"/>';break;case'object':if(obj==null)
{doc.xml+='<null'+this._addName(name)+'/>';}
else if(obj instanceof Date)
{doc.xml+='<date'+this._addName(name)+'>'+obj.getTime()+'</date>';}
else if(obj instanceof Array)
{doc.xml+='<array'+this._addName(name)+'>';for(var i=0;i<obj.length;++i)
{this._serializeNode(obj[i],doc,null);}
doc.xml+='</array>';}
else
{doc.xml+='<obj'+this._addName(name)+'>';for(var n in obj)
{if(typeof(obj[n])=='function')
continue;this._serializeNode(obj[n],doc,n);}
doc.xml+='</obj>';}
break;default:throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");break;}}
FlashSerializer.prototype._addName=function(name)
{if(name!=null)
{return' name="'+name+'"';}
return'';}
FlashSerializer.prototype._escapeXml=function(str)
{if(this.useCdata)
return'<![CDATA['+str+']]>';else
return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');}
function FlashProxy(lcId,flashId,proxySwfName,callbackScope)
{FlashProxy.fpmap[lcId]=this;this.uid=lcId;this.proxySwfName=proxySwfName;this.callbackScope=callbackScope;this.flashSerializer=new FlashSerializer(false);this.q=new Array();if(navigator.appName.indexOf('Internet Explorer')!=-1&&navigator.platform.indexOf('Win')!=-1&&navigator.userAgent.indexOf('Opera')==-1)
{setUpVBCallback(flashId);}}
FlashProxy.prototype.call=function()
{if(arguments.length==0)
{throw new Exception("Flash Proxy Exception","The first argument should be the function name followed by any number of additional arguments.");}
this.q.push(arguments);if(this.q.length==1)
{this._execute(arguments);}}
FlashProxy.prototype._execute=function(args)
{var ft=new FlashTag(this.proxySwfName,1,1,'6,0,65,0');ft.addFlashVar('lcId',this.uid);ft.addFlashVar('functionName',args[0]);if(args.length>1)
{var justArgs=new Array();for(var i=1;i<args.length;++i)
{justArgs.push(args[i]);}
ft.addFlashVars(this.flashSerializer.serialize(justArgs));}
var divName='_flash_proxy_'+this.uid;if(!document.getElementById(divName))
{var newTarget=document.createElement("div");newTarget.id=divName;document.body.appendChild(newTarget);}
var target=document.getElementById(divName);target.innerHTML=ft.toString();}
FlashProxy.callJS=function(command,args)
{var argsArray=eval(args);var scope=FlashProxy.fpmap[argsArray.shift()].callbackScope;if(scope&&(command.indexOf('.')<0))
{var functionToCall=scope[command];functionToCall.apply(scope,argsArray);}
else
{var functionToCall=eval(command);functionToCall.apply(functionToCall,argsArray);}}
FlashProxy.callComplete=function(uid)
{var fp=FlashProxy.fpmap[uid];if(fp!=null)
{fp.q.shift();if(fp.q.length>0)
{fp._execute(fp.q[0]);}}}
FlashProxy.fpmap=new Object();function ObjectUtil()
{}
ObjectUtil.cleanObject=function(object)
{var cleanObject=new Object();for(var i in object)
{if(i.charAt(0)!="_")
{cleanObject[i]=object[i];}}
return cleanObject;}
ObjectUtil.instanceOf=function(oObject,fClass)
{while(oObject!=null)
{if(oObject==fClass.prototype)
return true;oObject=oObject.__proto__;}
return false;}
function SuggestedAddress()
{}
SuggestedAddress.prototype.latlon=null;SuggestedAddress.prototype.street=null;SuggestedAddress.prototype.city=null;SuggestedAddress.prototype.state=null;SuggestedAddress.prototype.zip=null;SuggestedAddress.prototype.country=null;SuggestedAddress.prototype.zoomLevel=null;SuggestedAddress.prototype.parseASObject=function(oAddress)
{this.latlon=new LatLon(oAddress.lat,oAddress.lon);this.street=oAddress.street;this.city=oAddress.city;this.state=oAddress.state;this.zip=oAddress.zip;this.country=oAddress.country;this.status=oAddress.status;this.zoomLevel=oAddress.mag;}
SuggestedAddress.prototype.toString=function()
{var s="";s+=(this.street!=null)?this.street:"";s+=(this.street!=null&&this.city!=null)?", ":"";s+=(this.city!=null)?this.city:"";s+=(s!=null&&this.state!=null)?", ":"";s+=(this.state!=null)?this.state:"";s+=(s!=null&&this.zip!=null)?" ":"";s+=(this.zip!=null)?this.zip:"";s+=(s!=null&&this.country!=null)?"; ":"";s+=(this.country!=null)?this.country:"";return s;}
function LocalSearchResults()
{this.resultsCount=0;this.totalResultsCount=0;this.searchFilters=new Array();}
LocalSearchResults.prototype.resultsCount=null;LocalSearchResults.prototype.totalResultsCount=null;LocalSearchResults.prototype.searchFilters=null;LocalSearchResults.prototype._parseASObject=function(search)
{this.resultsCount=search.resultsCount;this.totalResultsCount=search.totalResultsCount;this.searchFilters=new Array();for(var i=0;i<search.searchFilters.length;i++)
{var filter=new LocalSearchFilter();filter._parseASObject(search.searchFilters[i]);this.searchFilters.push(filter);}}
function LocalSearchFilter()
{}
LocalSearchFilter.TYPE_RATING="ratingfgc";LocalSearchFilter.TYPE_CATEGORY="ycat2gc";LocalSearchFilter.prototype.type=null;LocalSearchFilter.prototype.name=null;LocalSearchFilter.prototype.key=null;LocalSearchFilter.prototype.count=null;LocalSearchFilter.prototype._parseASObject=function(filter)
{this.type=filter.type;this.name=filter.name;this.key=filter.key;this.count=filter.count;}
function Point(nX,nY)
{this.x=nX;this.y=nY;}
Point.prototype.x=null;Point.prototype.y=null;function LatLon(latitude,longitude)
{this.lat=latitude;this.lon=longitude;this.distance=new Distance();this.latRadians=Number((this.lat/360)*(Math.PI*2));this.lonRadians=Number((this.lon/360)*(Math.PI*2));}
LatLon.prototype.getDistanceFrom=function(latlon){return this.distance.getDistance(new LatLon(this.lat,this.lon),latlon);}
LatLon.prototype.distance=null;LatLon.prototype.lat=null;LatLon.prototype.lon=null;LatLon.prototype.latRadians=null;LatLon.prototype.lonRadians=null;function LatLonRect(minLat,minLon,maxLat,maxLon)
{this.minLat=minLat;this.minLon=minLon;this.maxLat=maxLat;this.maxLon=maxLon;this.northeast=new LatLon(this.maxLat,this.minLon)
this.southeast=new LatLon(this.minLat,this.minLon)
this.southwest=new LatLon(this.minLat,this.maxLon)
this.northwest=new LatLon(this.maxLat,this.maxLon)}
LatLonRect.prototype.minLat=null;LatLonRect.prototype.minLon=null;LatLonRect.prototype.maxLat=null;LatLonRect.prototype.maxLon=null;LatLonRect.prototype.northeast=null;LatLonRect.prototype.southeast=null;LatLonRect.prototype.southwest=null;LatLonRect.prototype.northwest=null;function EventManager()
{this._aEventMap=new Array();}
EventManager.prototype._aEventMap=null;EventManager.prototype.addEventListener=function(sEventType,sFunction,oObject)
{for(var i=0;i<this._aEventMap.length;i++)
{if(this._aEventMap[i].oObject==oObject&&this._aEventMap[i].sFunction==sFunction&&this._aEventMap[i].sEventType==sEventType)
{return false;}}
var o=new Object();o.oObject=oObject;o.sFunction=sFunction;o.sEventType=sEventType;this._aEventMap[this._aEventMap.length]=o;return true;}
EventManager.prototype.removeEventListener=function(sEventType,sFunction,oObject)
{for(var i=0;i<this._aEventMap.length;i++)
{if(this._aEventMap[i].oObject==oObject&&this._aEventMap[i].sFunction&&this._aEventMap[i].sEventType==sEventType)
{this._aEventMap.splice(i,1);return true;}}
return false;}
EventManager.prototype.removeAllEventListeners=function()
{this._aEventMap=new Array();}
EventManager.prototype.dispatchYEvent=function(sEventType,oEvent)
{if(oEvent==null)oEvent=new Object();oEvent.target=this;oEvent.type=sEventType;for(var i=0;i<this._aEventMap.length;i++)
{if(this._aEventMap[i].sEventType==sEventType)
{var scope=(this._aEventMap[i].oObject)?this._aEventMap[i].oObject:this._aEventMap[i].sFunction;this._aEventMap[i].sFunction.call(scope,oEvent);}}}
function CallQueue()
{this.base=EventManager;this.base();this._queue=new Array();}
CallQueue.prototype=new EventManager;CallQueue.prototype._queue=null;CallQueue.prototype.addCall=function(sMethodName,aArgs)
{this._queue.push({methodName:sMethodName,args:aArgs});}
CallQueue.prototype.clearCallQueue=function()
{this._queue=new Array();}
CallQueue.prototype.flushCallQueue=function()
{for(var i=0;i<this._queue.length;i++)
{var call=this._queue[i];if(call.args==null)call.args=new Array();this[call.methodName].apply(this,call.args);}
this.clearCallQueue();}
function Map(sContainerId,appid,oLocation,nZoomLevel,nMapViewType,language)
{this.base=CallQueue;this.base();Map._instanceCount++;this._zoomLevel=(nZoomLevel==null)?Map.DEFAULT_ZOOM:nZoomLevel;this._mapViewType=nMapViewType||MapViews.MAP;this._language=(language==null)?"en-US":language;var uid=new Date().getTime();var swfId="map_"+Map._instanceCount;this._flashProxy=new FlashProxy(uid,swfId,_gatewaySWF,this);if(appid!="undefined"&&appid!=null)this._appid=appid;var tag=new FlashTag(_shellURL,"100%","100%",'7,0,14,0');
tag.setAllowScriptAccess("always");
tag.setId(swfId);tag.addFlashVar("lcId",uid);tag.addFlashVar("showControls","false");tag.addFlashVar("zoom",this._zoomLevel);tag.addFlashVar("mapViewType",this._mapViewType);tag.addFlashVar("language",this._language);tag.addFlashVar("appid",this._appid);tag.addFlashVar("apptype","jsf");if(oLocation instanceof LatLon)
{this._center=oLocation;tag.addFlashVar("lat",oLocation.lat);tag.addFlashVar("lon",oLocation.lon);}
else if(oLocation==null)
{this._center=Map.DEFAULT_LAT_LON;tag.addFlashVar("lat",this._center.lat);tag.addFlashVar("lon",this._center.lon);}
else
{tag.addFlashVar("address",oLocation);}
var target=document.getElementById(sContainerId);target.innerHTML=tag.toString();}
Map._instanceCount=0;Map.prototype=new CallQueue();Map.DEFAULT_LAT_LON=new LatLon(39.23225,-99.84375);Map.DEFAULT_ZOOM=14;Map.EVENT_POI_CLICKED=new String("poiMarkerClicked");Map.EVENT_SET_BOUNDS_COMPLETE=new String("setBoundsComplete");Map.EVENT_NAVIGATOR_STATE_CHANGED=new String("navigatorStateChanged");Map.EVENT_MAP_TYPE_CHANGED=new String("mapTypeChanged");Map.EVENT_CUSTOM_OVERLAY_LOADED=new String("customOverlayLoaded");Map.EVENT_CUSTOM_WIDGET_LOADED=new String("customWidgetLoaded");Map.EVENT_ONCLICK=new String("onClick");Map.EVENT_MOVE=new String("move");Map.EVENT_MAP_BASE_INITIALIZE=new String("mapBaseInitialize");Map.EVENT_TILE_LOADED=new String("tileLoaded");Map.EVENT_PAN_START=new String("panStart");Map.EVENT_PAN_STOP=new String("panStop");Map.EVENT_ZOOM_START=new String("zoomStart");Map.EVENT_ZOOM_STOP=new String("zoomStop");Map.EVENT_ZOOM_END=Map.EVENT_ZOOM_STOP;Map.EVENT_ZOOM=new String("zoom");Map.EVENT_POI_OVER=new String("poiOver");Map.EVENT_POI_OUT=new String("poiOut");Map.EVENT_POI_EXPAND=new String("poiExpand");Map.EVENT_POI_CLOSE=new String("poiClose");Map.EVENT_POLYLINE_ERROR=new String("polylineError");Map.EVENT_POLYLINE_SUCCESS=new String("polylineSuccess");Map.EVENT_OVERLAY_GEOCODE_SUCCESS=new String("overlayGeocodeSuccess");Map.EVENT_OVERLAY_GEOCODE_ERROR=new String("overlayGeocodeError");Map.EVENT_MAP_GEOCODE_SUCCESS=new String("mapGeocodeSuccess");Map.EVENT_MAP_GEOCODE_ERROR=new String("mapGeocodeError");Map.EVENT_MARKER_GEOCODE_ERROR=new String("markerGeocodeError");Map.EVENT_MARKER_GEOCODE_SUCCESS=new String("markerGeocodeSuccess");Map.EVENT_INITIALIZE=new String("initialize");Map.EVENT_TOOL_ADDED=new String("toolAdded");Map.EVENT_TOOL_REMOVED=new String("toolRemoved");Map.EVENT_TOOL_CHANGE=new String("toolChange");Map.EVENT_WAYPOINTMARKER_ADDED=new String("waypointMarkerAdded");Map.EVENT_MARKER_DRAG_START=new String("markerDragStart");Map.EVENT_MARKER_DRAG_STOP=new String("markerDragStop");Map.EVENT_MARKER_DRAG=new String("markerDrag");Map.prototype._center=new LatLon();Map.prototype._zoomLevel=-1;Map.prototype._bounds=new Object();Map.prototype._flashProxy=null;Map.prototype._activeToolId=-1;Map.prototype._appid="MMTest";Map.prototype._initialized=false;Map.prototype._tools=null;Map.prototype.setCenterByLatLon=function(latlon,nPanDuration)
{if(!this.canCall("setCenterByLatLon",arguments))return;this._flashProxy.call('setCenterByLatLon',latlon,nPanDuration);}
Map.prototype.setCenterByLatLonAndZoom=function(latlon,nZoomLevel,pDuration)
{if(!this.canCall("setCenterByLatLonAndZoom",arguments))return;this._flashProxy.call('setCenterByLatLonAndZoom',latlon,nZoomLevel,pDuration);}
Map.prototype.setCenterByPointDelta=function(delta,nPanDuration)
{this._flashProxy.call('setCenterByPointDelta',delta,nPanDuration);}
Map.prototype.setCenterByAddress=function(sAddress,nPanDuration)
{if(!this.canCall("setCenterByAddress",arguments))return;this._flashProxy.call('setCenterByAddress',sAddress,nPanDuration);}
Map.prototype.setCenterByAddressAndZoom=function(sAddress,nZoomLevel,pDuration)
{if(!this.canCall("setCenterByAddressAndZoom",arguments))return;this._flashProxy.call('setCenterByAddressAndZoom',sAddress,nZoomLevel,pDuration);}
Map.prototype.getCenter=function()
{return this._center;}
Map.prototype.setAppID=function(arg)
{this._appid=arg;}
Map.prototype.getAppID=function()
{return this._appid;}
Map.prototype.setZoomLevel=function(nZoomLevel)
{if(!this.canCall("setZoomLevel",arguments))return;this._zoomLevel=nZoomLevel;this._flashProxy.call('setZoomLevel',nZoomLevel);}
Map.prototype.setMapViewType=function(nMapViewType)
{if(!this.canCall("setMapViewType",arguments))return;this._mapViewType=String(nMapViewType);this._flashProxy.call('setMapViewType',this._mapViewType);}
Map.prototype.setLocale=function(language)
{if(!this.canCall("setLocale",arguments))return;this._language=String(language);this._flashProxy.call('setLocale',this._language);}
Map.prototype.getLocale=function()
{return this._language;}
Map.prototype.getSupportedLocales=function()
{return new Array(Languages.it_IT,Languages.es_ES,Languages.de_DE,Languages.en_GB,Languages.en_US,Languages.en_IN,Languages.fr_CA,Languages.fr_FR);}
Map.prototype.getMapConfig=function(){return this.mapConfig;}
Map.prototype.setMapConfig=function(config){if(!this.canCall("setMapConfig",arguments))return;this.mapConfig=config;this._flashProxy.call("setMapConfig",config);}
Map.prototype.getCurrentMapViewType=function()
{return this._mapViewType;}
Map.prototype.getMapViewTypes=function()
{return new Array(MapViews.MAP,MapViews.HYBRID,MapViews.SATELLITE);}
Map.prototype.getZoomLevel=function()
{return Number(this._zoomLevel);}
Map.prototype.getBounds=function()
{return this._bounds;}
Map.prototype.getBoundsReturn=function(bounds)
{this._bounds=bounds;return this._bounds;}
Map.prototype.setBounds=function(bounds)
{if(!this.canCall("setBounds",arguments))return;this._flashProxy.call('setBounds',bounds);}
Map.prototype.addWidget=function(widget)
{if(!this.canCall("addWidget",arguments))return;widget.initWidget(this);this._flashProxy.call('addWidget',ObjectUtil.cleanObject(widget));}
Map.prototype.removeWidget=function(widget)
{if(!this.canCall("removeWidget",arguments))return;this._flashProxy.call('removeWidgetByActionScriptId',widget.actionScriptId);}
Map.prototype._setWidgetActionScriptId=function(javaScriptId,actionScriptId)
{var w=Widget.getWidgetByJavaScriptId(javaScriptId.toString());w.setActionScriptId(actionScriptId);}
Map.prototype.addOverlay=function(overlay)
{if(!this.canCall("addOverlay",arguments))return;overlay.initOverlay(this);this._flashProxy.call('addOverlay',ObjectUtil.cleanObject(overlay));}
Map.prototype._setOverlayActionScriptId=function(javaScriptId,actionScriptId)
{var o=Overlay.getOverlayByJavaScriptId(javaScriptId.toString());o.setActionScriptId(actionScriptId);}
Map.prototype.removeOverlay=function(overlay)
{if(!this.canCall("removeOverlay",arguments))return;this._flashProxy.call('removeOverlay',overlay.actionScriptId);}
Map.prototype.removeAllOverlays=function()
{if(!this.canCall("removeAllOverlays",arguments))return;this._flashProxy.call('removeAllOverlays');}
Map.prototype.addTool=function(tool,bActive)
{if(!this.canCall("addTool",arguments))return;tool.initTool(this);this._flashProxy.call('addTool',ObjectUtil.cleanObject(tool),bActive);}
Map.prototype.removeTool=function(tool)
{if(!this.canCall("removeTool",arguments))return;this._flashProxy.call('removeToolByActionScriptId',tool.actionScriptId);}
Map.prototype.setActiveTool=function(tool)
{if(!this.canCall("setActiveTool",arguments))return;this._flashProxy.call('setActiveToolByActionScriptId',tool.actionScriptId);}
Map.prototype.getActiveTool=function()
{if(this._activeToolId==-1)return null;return Tool.getToolByJavaScriptId(this._activeToolId);}
Map.prototype._setToolActionScriptId=function(javaScriptId,actionScriptId)
{var t=Tool.getToolByJavaScriptId(javaScriptId.toString());t.setActionScriptId(actionScriptId);}
Map.prototype.addMarkerByLatLon=function(marker,latlon)
{if(!this.canCall("addMarkerByLatLon",arguments))return;marker.initMarker(this);this._flashProxy.call('addMarkerByLatLon',ObjectUtil.cleanObject(marker),latlon);}
Map.prototype.addMarkerByAddress=function(marker,address)
{if(!this.canCall("addMarkerByAddress",arguments))return;marker.initMarker(this);this._flashProxy.call('addMarkerByAddress',ObjectUtil.cleanObject(marker),address);}
Map.prototype._setMarkerActionScriptId=function(javaScriptId,actionScriptId)
{var m=Marker.getMarkerByJavaScriptId(javaScriptId);m.setActionScriptId(actionScriptId);}
Map.prototype.removeMarker=function(marker)
{if(!this.canCall("removeMarker",arguments))return;this._flashProxy.call('removeMarkerByActionScriptId',marker.actionScriptId);}
Map.prototype.removeAllMarkers=function()
{if(!this.canCall("removeAllMarkers",arguments))return;this._flashProxy.call('removeAllMarkers');}
Map.prototype.isInitialized=function()
{return(this._initialized==true);}
Map.prototype.enableKeyboardShortcuts=function(bEnabled)
{if(!this.canCall("enableKeyboardShortcuts",arguments))return;this._flashProxy.call('enableKeyboardShortcuts',bEnabled);}
Map.prototype.canCall=function(sMethodName,aArgs)
{if(this.isInitialized())
{return true;}
else
{this.addCall(sMethodName,aArgs);return false;}}
Map.prototype.dispatchMoveEvent=function(oEvent)
{this._center=new LatLon(oEvent.center.y,oEvent.center.x);this._bounds=oEvent.bounds;this.dispatchYEvent(Map.EVENT_MOVE,oEvent);}
Map.prototype.dispatchMapBaseInitEvent=function(oEvent)
{this._center=new LatLon(oEvent.center.y,oEvent.center.x);this._bounds=oEvent.bounds;this.dispatchYEvent(Map.EVENT_MAP_BASE_INITIALIZE,oEvent);}
Map.prototype.dispatchTileLoadedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_TILE_LOADED,oEvent);}
Map.prototype.dispatchPanToolDragStartEvent=function(toolId)
{var tool=Tool.getToolByJavaScriptId(toolId);tool.dispatchYEvent(PanTool.EVENT_DRAG_START);}
Map.prototype.dispatchPanToolDragStopEvent=function(toolId)
{var tool=Tool.getToolByJavaScriptId(toolId);tool.dispatchYEvent(PanTool.EVENT_DRAG_STOP);}
Map.prototype.dispatchPanStartEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_PAN_START,oEvent);}
Map.prototype.dispatchPanStopEvent=function(oEvent)
{this._zoomLevel=oEvent.zoomLevel;this._bounds=oEvent.bounds;this.dispatchYEvent(Map.EVENT_PAN_STOP,oEvent);}
Map.prototype.dispatchZoomStartEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_ZOOM_START,oEvent);}
Map.prototype.dispatchZoomStopEvent=function(oEvent)
{this._zoomLevel=oEvent.endZoomLevel;this._bounds=oEvent.bounds;this.dispatchYEvent(Map.EVENT_ZOOM_STOP,oEvent);}
Map.prototype.dispatchZoomEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_ZOOM,oEvent);}
Map.prototype.dispatchTypeChangeEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_TYPE_CHANGE,new Object());}
Map.prototype.dispatchCustomSWFMarkerEvent=function(javaScriptId,oEvent)
{var marker=Marker.getMarkerByJavaScriptId(javaScriptId);marker.dispatchYEvent(oEvent.type,oEvent);}
Map.prototype.dispatchCustomSWFOverlayEvent=function(javaScriptId,oEvent)
{var overlay=Overlay.getOverlayByJavaScriptId(javaScriptId);overlay.dispatchYEvent(oEvent.type,oEvent);}
Map.prototype.dispatchLocalSearchSuccessEvent=function(javaScriptId,oEvent)
{var result=new LocalSearchResults();result._parseASObject(oEvent.localSearchResults);var overlay=Overlay.getOverlayByJavaScriptId(javaScriptId);overlay.localSearchResults=result;overlay.dispatchYEvent(oEvent.type,{localSearchResults:result});}
Map.prototype.dispatchLocalSearchErrorEvent=function(javaScriptId,oEvent)
{var overlay=Overlay.getOverlayByJavaScriptId(javaScriptId);overlay.dispatchYEvent(oEvent.type);}
Map.prototype.dispatchMapGeocodeError=function(oEvent)
{var addresses=oEvent.suggestedAddresses;var cleanAddresses=new Array();if(addresses!=null)
{for(var i=0;i<addresses.length;i++)
{var address=new SuggestedAddress();address.parseASObject(addresses[i]);cleanAddresses.push(address);}}
this.dispatchYEvent(Map.EVENT_MAP_GEOCODE_ERROR,{suggestedAddresses:cleanAddresses,originalAddress:oEvent.originalAddress,message:oEvent.message});}
Map.prototype.dispatchMapGeocodeSuccess=function(oEvent)
{var suggestedZoom=oEvent.suggestedZoom;this.dispatchYEvent(Map.EVENT_MAP_GEOCODE_SUCCESS,{suggestedZoom:suggestedZoom,latlon:oEvent.latlon});}
Map.prototype.dispatchOverlayGeocodeError=function(oEvent)
{this.dispatchYEvent(Map.EVENT_OVERLAY_GEOCODE_ERROR);}
Map.prototype.dispatchOverlayGeocodeSuccess=function(oEvent)
{this.dispatchYEvent(Map.EVENT_OVERLAY_GEOCODE_SUCCESS);}
Map.prototype.dispatchMapTilesLoadedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_MAPTILES_LOADED);}
Map.prototype.dispatchPoiOver=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POI_OVER,oEvent);}
Map.prototype.dispatchPoiOut=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POI_OUT,oEvent);}
Map.prototype.dispatchPoiExpand=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POI_EXPAND,oEvent);}
Map.prototype.dispatchPoiClose=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POI_CLOSE,oEvent);}
Map.prototype.dispatchMarkerGeocodeSuccess=function(oEvent)
{this.dispatchYEvent(Map.EVENT_MARKER_GEOCODE_SUCCESS,{marker:Marker.getMarkerByJavaScriptId(oEvent.markerId),latlon:oEvent.latlon});}
Map.prototype.dispatchMarkerGeocodeError=function(oEvent)
{var marker=Marker.getMarkerByJavaScriptId(oEvent.markerId);var addresses=oEvent.suggestedAddresses;var cleanAddresses=new Array();if(addresses)
{for(var i=0;i<addresses.length;i++)
{var address=new SuggestedAddress();address.parseASObject(addresses[i]);cleanAddresses.push(address);}}
this.dispatchYEvent(Map.EVENT_MARKER_GEOCODE_ERROR,{marker:marker,suggestedAddresses:cleanAddresses,originalAddress:oEvent.originalAddress});}
Map.prototype.dispatchMapInitializedEvent=function(oEvent)
{this._center=new LatLon(oEvent.center.y,oEvent.center.x);this._bounds=new LatLonRect(oEvent.bounds.minLat,oEvent.bounds.minLon,oEvent.bounds.maxLat,oEvent.bounds.maxLon);this._zoomLevel=oEvent.zoomLevel;this._initialized=true;this.flushCallQueue();this.dispatchYEvent(Map.EVENT_INITIALIZE,{center:this._center,bounds:this._bounds,zoomLevel:this._zoomLevel});}
Map.prototype.dispatchToolAddedEvent=function(oEvent)
{var tool=Tool.getToolByJavaScriptId(oEvent.toolId);this.dispatchYEvent(Map.EVENT_TOOL_ADDED,{tool:tool});}
Map.prototype.dispatchToolChangeEvent=function(oEvent)
{var tool=Tool.getToolByJavaScriptId(oEvent.toolId);this.dispatchYEvent(Map.EVENT_TOOL_CHANGE,{tool:tool});this._activeToolId=oEvent.toolId;}
Map.prototype.dispatchToolRemovedEvent=function(oEvent)
{var tool=Tool.getToolByJavaScriptId(oEvent.toolId);this.dispatchYEvent(Map.EVENT_TOOL_REMOVED,{tool:tool});}
Map.prototype.dispatchPolylineError=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POLYLINE_ERROR,oEvent);}
Map.prototype.dispatchPolylineSuccess=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POLYLINE_SUCCESS,oEvent);}
Map.prototype.dispatchPoiMarkerClickedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_POI_CLICKED,oEvent);}
Map.prototype.dispatchSetBoundsCompleteEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_SET_BOUNDS_COMPLETE,oEvent);}
Map.prototype.dispatchNavigatorStateChangedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_NAVIGATOR_STATE_CHANGED,oEvent);}
Map.prototype.dispatchMapTypeChangedEvent=function(oEvent)
{this._mapViewType=oEvent.view;this.dispatchYEvent(Map.EVENT_MAP_TYPE_CHANGED,oEvent);}
Map.prototype.dispatchCustomOverlayLoadedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_CUSTOM_OVERLAY_LOADED,oEvent);}
Map.prototype.dispatchCustomWidgetLoadedEvent=function(oEvent)
{this.dispatchYEvent(Map.CUSTOM_WIDGET_LOADED,oEvent);}
Map.prototype.dispatchOnClickEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_ONCLICK,oEvent);}
Map.prototype.dispatchWaypointMarkerAddedEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_WAYPOINTMARKER_ADDED,oEvent);}
Map.prototype.dispatchCustomSWFToolLoadedEvent=function(toolId,oEvent)
{var tool=Tool.getToolByJavaScriptId(toolId);tool.dispatchYEvent(CustomSWFTool.EVENT_LOADED,oEvent);}
Map.prototype.dispatchMarkerDragStartEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_MARKER_DRAG_START,oEvent);}
Map.prototype.dispatchMarkerDragStopEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_MARKER_DRAG_STOP,oEvent);}
Map.prototype.dispatchMarkerDragEvent=function(oEvent)
{this.dispatchYEvent(Map.EVENT_MARKER_DRAG,oEvent);}
var MapViews={};MapViews.MAP=new String("map");MapViews.HYBRID=new String("hybrid");MapViews.SATELLITE=new String("satellite");function Marker()
{this.base=CallQueue;this.base.call(this);this.javaScriptId=Marker._instanceCount++;Marker._javaScriptIdMap[this.javaScriptId.toString()]=this;}
Marker.prototype=new CallQueue();Marker.TYPE_POI="poi";Marker.TYPE_WAYPOINT="waypoint";Marker.TYPE_CUSTOM_SWF="customSWF";Marker.TYPE_CUSTOM_IMAGE="customImage";Marker.EVENT_INTIALIZE="markerInitialize";Marker.prototype.markerType="";Marker.prototype.javaScriptId=null;Marker.prototype.actionScriptId=null;Marker.prototype._map=null;Marker.prototype._draggable=false;Marker.prototype._visible=true;Marker.prototype._initialized=false;Marker._instanceCount=0;Marker._javaScriptIdMap=new Array();Marker.getMarkerByJavaScriptId=function(sJavaScriptId)
{return Marker._javaScriptIdMap[sJavaScriptId.toString()];}
Marker.prototype.initMarker=function(map)
{this._map=map;}
Marker.prototype.setActionScriptId=function(actionScriptId)
{this.actionScriptId=actionScriptId;this._initialized=true;this.flushCallQueue();this.dispatchYEvent(Marker.EVENT_INITIALIZE);}
Marker.prototype.isInitialized=function()
{return this._initialized;}
Marker.prototype.canCall=function(sMethodName,aArgs)
{if(this.isInitialized())
{return true;}
else
{this.addCall(sMethodName,aArgs);return false;}}
Marker.prototype.show=function()
{if(!this.canCall("show"))return;this._visible=true;this._map._flashProxy.call("showMarker",this.actionScriptId);}
Marker.prototype.hide=function()
{if(!this.canCall("hide"))return;this._visible=false;this._map._flashProxy.call("hideMarker",this.actionScriptId);}
Marker.prototype.isVisible=function()
{return this._visible;}
Marker.prototype.getMarkerType=function()
{return this.markerType;}
Marker.prototype.getJavaScriptId=function()
{return this.javaScriptId;}
Marker.prototype.getActionScriptId=function()
{return this.actionScriptId;}
Marker.prototype.setDraggable=function(drg){if(!this.canCall("setDraggable",arguments))return;this._draggable=drg;this._map._flashProxy.call("setMarkerDraggable",this.actionScriptId,this._draggable);}
Marker.prototype.getDraggable=function(){return this._draggable;}
Marker.prototype.moveToLatLon=function(latlon){if(!this.canCall("moveToLatLon",arguments))return;alert(latlon.lat+" "+latlon.lon);this._map._flashProxy.call("markerMoveByLatLon",this.actionScriptId,latlon);}
function CustomPOIMarker(sIndex,sTitle,sDescription,nMarkerColor,nStrokeColor)
{this.base=Marker;this.base();this.index=sIndex;this.title=sTitle;this.description=sDescription;this.markerColor=nMarkerColor;this.strokeColor=nStrokeColor;}
CustomPOIMarker.prototype=new Marker;CustomPOIMarker.prototype.index="";CustomPOIMarker.prototype.title="";CustomPOIMarker.prototype.description="";CustomPOIMarker.prototype.markerColor=0x999900;CustomPOIMarker.prototype.markerColor=0xFFFFFF;CustomPOIMarker.prototype.markerType=Marker.TYPE_POI;CustomPOIMarker.prototype.open=function()
{if(!this.canCall("open"))return;this._map._flashProxy.call("openMarker",this.actionScriptId,this.markerColor);}
CustomPOIMarker.prototype.expand=function()
{if(!this.canCall("expand"))return;this._map._flashProxy.call("expandMarker",this.actionScriptId,this.markerColor);}
CustomPOIMarker.prototype.close=function()
{if(!this.canCall("close"))return;this._map._flashProxy.call("closeMarker",this.actionScriptId,this.markerColor);}
function WaypointMarker(sWaypointIndex)
{this.base=Marker;this.base();if(sWaypointIndex)
this.waypointIndex=sWaypointIndex;}
WaypointMarker.prototype=new Marker;WaypointMarker.prototype.waypointIndex="";WaypointMarker.prototype.markerType=Marker.TYPE_WAYPOINT;WaypointMarker.prototype.setWaypointIndex=function(sWaypointIndex)
{if(!this.canCall("setWaypointIndex",arguments))return;this._map._flashProxy.call("setWaypointMarkerIndex",this.actionScriptId,this.waypointIndex);this.waypointIndex=sWaypointIndex;}
WaypointMarker.prototype.getWaypointIndex=function()
{return this.waypointIndex;}
function CustomSWFMarker(sUrl)
{this.url=sUrl;this.base=Marker;this.base();}
CustomSWFMarker.prototype=new Marker;CustomSWFMarker.prototype.markerType=Marker.TYPE_CUSTOM_SWF;CustomSWFMarker.prototype.url="";CustomSWFMarker.prototype.getURL=function()
{return this.url;}
CustomSWFMarker.prototype.callCustomMethod=function(sMethodName,aMethodArgs)
{if(!this.canCall("callCustomMethod",arguments))return;this._map._flashProxy.call("callCustomMarkerMethod",this.actionScriptId,sMethodName,aMethodArgs);}
CustomSWFMarker.prototype.addEventListener=function(sEventType,sFunction,oObject)
{if(!this.canCall("addEventListener",arguments))return;this._map._flashProxy.call("addCustomSWFMarkerEventListener",this.actionScriptId,sEventType);EventManager.prototype.addEventListener.call(this,sEventType,sFunction,oObject);}
function CustomImageMarker(sURL)
{this.url=sURL;this.base=Marker;this.base();}
CustomImageMarker.prototype=new Marker;CustomImageMarker.prototype.markerType=Marker.TYPE_CUSTOM_IMAGE;CustomImageMarker.prototype.url="";CustomImageMarker.prototype.getURL=function()
{return this.url;}
function Overlay()
{this.base=CallQueue;this.base();this.javaScriptId=Overlay._instanceCount++;Overlay._javaScriptIdMap[this.javaScriptId.toString()]=this;this._visible=true;}
Overlay.prototype=new CallQueue;Overlay.TYPE_TRAFFIC="traffic";Overlay.TYPE_CUSTOM_SWF="customSWF";Overlay.TYPE_LOCAL_SEARCH="localSearch";Overlay.TYPE_GEO_RSS="geoRSS";Overlay.TYPE_POLYLINE="polyline";Overlay.EVENT_INITIALIZE="overlayInitialize";Overlay.prototype.overlayType="";Overlay.prototype.javaScriptId=null;Overlay.prototype.actionScriptId=null;Overlay.prototype._map=null;Overlay.prototype._visible=false;Overlay.prototype._initialized=false;Overlay._instanceCount=0;Overlay._javaScriptIdMap=new Array();Overlay.getOverlayByJavaScriptId=function(sJavaScriptId)
{var ret=Overlay._javaScriptIdMap[sJavaScriptId];return ret;}
Overlay.prototype.initOverlay=function(map)
{this._map=map;}
Overlay.prototype.setActionScriptId=function(actionScriptId)
{this.actionScriptId=actionScriptId;this._initialized=true;this.flushCallQueue();this.dispatchYEvent(Overlay.EVENT_INITIALIZE);}
Overlay.prototype.canCall=function(sMethodName,aArgs)
{if(this.isInitialized())
{return true;}
else
{this.addCall(sMethodName,aArgs);return false;}}
Overlay.prototype.isInitialized=function()
{return this._initialized;}
Overlay.prototype.show=function()
{if(!this.canCall("show"))return;this._visible=true;this._map._flashProxy.call("showOverlay",this.actionScriptId);}
Overlay.prototype.hide=function()
{if(!this.canCall("hide"))return;this._visible=false;this._map._flashProxy.call("hideOverlay",this.actionScriptId);}
Overlay.prototype.isVisible=function()
{return this._visible;}
Overlay.prototype.getMarkerType=function()
{return this.markerType;}
Overlay.prototype.getJavaScriptId=function()
{return this.javaScriptId;}
Overlay.prototype.getActionScriptId=function()
{return this.actionScriptId;}
function TrafficOverlay()
{this.base=Overlay;this.base();}
TrafficOverlay.prototype=new Overlay;TrafficOverlay.prototype.overlayType=Overlay.TYPE_TRAFFIC;function LocalSearchOverlay()
{this.base=Overlay;this.base();}
LocalSearchOverlay.EVENT_SEARCH_SUCCESS="searchSuccess";LocalSearchOverlay.EVENT_SEARCH_ERROR="searchError";LocalSearchOverlay.EVENT_API_SEARCH_SUCCESS="apiSearchSuccess";LocalSearchOverlay.EVENT_WIDGET_ADDED="widgetAdded";LocalSearchOverlay.prototype=new Overlay;LocalSearchOverlay.prototype.localSearchResults=null;LocalSearchOverlay.prototype.overlayType=Overlay.TYPE_LOCAL_SEARCH;LocalSearchOverlay.prototype.search=function(sSearchTerms,latlon,nStartIndex,nResults,nRadius,sCategoryFilter,sRatingFilter,source,apiKey,returnAsLocalSearch)
{if(!this.canCall("search",arguments))return;this._map._flashProxy.call("localSearchOverlaySearch",this.actionScriptId,sSearchTerms,latlon,nStartIndex,nResults,nRadius,sCategoryFilter,sRatingFilter,source,apiKey,returnAsLocalSearch);}
LocalSearchOverlay.prototype.addLocalSearchWidget=function(){if(!this.canCall("addLocalSearchWidget",arguments))return;this._map._flashProxy.call("localSearchOverlayShowWidget",this.actionScriptId);}
LocalSearchOverlay.prototype.removeLocalSearchWidget=function(){if(!this.canCall("removeLocalSearchWidget",arguments))return;this._map._flashProxy.call("localSearchOverlayRemoveWidget",this.actionScriptId);}
LocalSearchOverlay.prototype.setMutipleSearches=function(allowMultipleSearches){if(!this.canCall("setMutipleSearches",arguments))return;this._map._flashProxy.call("localSearchOverlaySetMultipleSearches",this.actionScriptId,allowMultipleSearches);}
LocalSearchOverlay.prototype.clear=function()
{this.localSearchResults=null;if(!this.canCall("clear"))return;this._map._flashProxy.call("localSearchOverlayClear",this.actionScriptId);}
function CustomSWFOverlay(sURL)
{this.url=sURL;this.base=Overlay;this.base();}
CustomSWFOverlay.prototype=new Overlay;CustomSWFOverlay.prototype.overlayType=Overlay.TYPE_CUSTOM_SWF;CustomSWFOverlay.prototype.url=null;CustomSWFOverlay.prototype.callCustomMethod=function(sMethodName,aMethodArgs)
{if(!this.canCall("callCustomMethod",arguments))return;this._map._flashProxy.call("callCustomSWFOverlayMethod",this.actionScriptId,sMethodName,aMethodArgs);}
CustomSWFOverlay.prototype.addEventListener=function(sEventType,sFunction,oObject)
{if(!this.canCall("addEventListener",arguments))return;this._map._flashProxy.call("addCustomSWFOverlayEventListener",this.actionScriptId,sEventType);EventManager.prototype.addEventListener.call(this,sEventType,sFunction,oObject);}
function GeoRSSOverlay(_url,_updateMap)
{this.base=Overlay;this.base();this.url=_url;this.updateMap=_updateMap;}
GeoRSSOverlay.prototype=new Overlay;GeoRSSOverlay.prototype.overlayType=Overlay.TYPE_GEO_RSS;GeoRSSOverlay.prototype.url=null;GeoRSSOverlay.prototype.updateMap=null;function PolylineOverlay(args)
{this.base=Overlay;this.base();this.url=args;}
PolylineOverlay.prototype=new Overlay;PolylineOverlay.EVENT_POLYLINE_SUCCESS=new String("polylineSuccess");PolylineOverlay.EVENT_POLYLINE_ERROR=new String("polylineError");PolylineOverlay.MOVE=new String("move");PolylineOverlay.DRAW=new String("draw");PolylineOverlay.prototype.overlayType=Overlay.TYPE_POLYLINE;PolylineOverlay.prototype.url=null;PolylineOverlay.prototype.setUrl=function(data)
{if(!this.canCall("setUrl",arguments))return;this.url=data;this._map._flashProxy.call("setPolylineUrl",this.actionScriptId,data);}
PolylineOverlay.prototype.getUrl=function()
{return this.url;}
PolylineOverlay.prototype.dataProvider=null;PolylineOverlay.prototype.setDataProvider=function(data)
{if(!this.canCall("setDataProvider",arguments))return;this.dataProvider=data;this._map._flashProxy.call("setPolylineDataProvider",this.actionScriptId,data);}
PolylineOverlay.prototype.getDataProvider=function()
{return this.dataProvider;}
function Widget()
{this.base=CallQueue;this.base();this._visible=true;this.javaScriptId=Widget._instanceCount++;Widget._javaScriptIdMap[this.javaScriptId.toString()]=this;}
Widget.prototype=new CallQueue;Widget.TYPE_NAVIGATOR="navigator";Widget.TYPE_SATELLITE_CONTROL="satelliteControl";Widget.TYPE_TOOL_BAR="toolBar";Widget.TYPE_CUSTOM_SWF="customswf";Widget.TYPE_ZOOM_CONTROL="zoomControl";Widget.EVENT_INITIALIZE="widgetInitialize";Widget._instanceCount=0;Widget._javaScriptIdMap=new Array();Widget.getWidgetByJavaScriptId=function(nJavaScriptId)
{return Widget._javaScriptIdMap[nJavaScriptId.toString()];}
Widget.prototype._initialized=false;Widget.prototype.widgetType="";Widget.prototype.javaScriptId=null;Widget.prototype.actionScriptId=null;Widget.prototype._map=null;Widget.prototype.initWidget=function(map)
{this._map=map;}
Widget.prototype.setActionScriptId=function(actionScriptId)
{this.actionScriptId=actionScriptId;this._initialized=true;this.flushCallQueue();this.dispatchYEvent(Tool.EVENT_INITIALIZE);}
Widget.prototype.canCall=function(sMethodName,aArgs)
{if(this.isInitialized())
{return true;}
else
{this.addCall(sMethodName,aArgs);return false;}}
Widget.prototype.isInitialized=function()
{return this._initialized;}
Widget.prototype.show=function()
{if(!this.canCall("show"))return;this._visible=true;this._map._flashProxy.call("showWidget",this.actionScriptId);}
Widget.prototype.hide=function()
{if(!this.canCall("hide"))return;this._visible=false;this._map._flashProxy.call("hideWidget",this.actionScriptId);}
Widget.prototype.isVisible=function()
{return this._visible;}
Widget.prototype.getWidgetType=function()
{return this.widgetType;}
function ToolBarWidget()
{this.base=Widget;this.base();}
ToolBarWidget.prototype=new Widget;ToolBarWidget.prototype.widgetType=Widget.TYPE_TOOL_BAR;ToolBarWidget.prototype.open=function()
{if(!this.canCall("open"))return;this._map._flashProxy.call("openToolBarWidget",this.actionScriptId);}
ToolBarWidget.prototype.close=function()
{if(!this.canCall("close"))return;this._map._flashProxy.call("closeToolBarWidget",this.actionScriptId);}
ToolBarWidget.prototype.move=function(x,y)
{if(!this.canCall("move",arguments))return;this._map._flashProxy.call("moveToolBarWidget",this.actionScriptId,x,y);}
NavigatorWidget.CLOSED="closed";NavigatorWidget.OPEN="open";function NavigatorWidget(iState)
{this.initialState=iState;this.base=Widget;this.base();}
NavigatorWidget.prototype=new Widget;NavigatorWidget.prototype.widgetType=Widget.TYPE_NAVIGATOR;NavigatorWidget.prototype.initialState="";NavigatorWidget.prototype.open=function()
{if(!this.canCall("open"))return;this._map._flashProxy.call("openNavigatorWidget",this.actionScriptId);}
NavigatorWidget.prototype.close=function()
{if(!this.canCall("close"))return;this._map._flashProxy.call("closeNavigatorWidget",this.actionScriptId);}
NavigatorWidget.prototype.move=function(x,y)
{if(!this.canCall("move",arguments))return;this._map._flashProxy.call("moveNavigatorWidget",this.actionScriptId,x,y);}
SatelliteControlWidget.HORIZONTAL="horizontal";SatelliteControlWidget.VERTICAL="vertical";function SatelliteControlWidget(position)
{this.position=position;this.base=Widget;this.base();}
SatelliteControlWidget.prototype=new Widget;SatelliteControlWidget.prototype.widgetType=Widget.TYPE_SATELLITE_CONTROL;SatelliteControlWidget.prototype.position="";SatelliteControlWidget.prototype.move=function(x,y)
{if(!this.canCall("move",arguments))return;this._map._flashProxy.call("moveSatelliteWidget",this.actionScriptId,x,y);}
SatelliteControlWidget.prototype.redraw=function(orientation)
{if(!this.canCall("redraw",arguments))return;this._map._flashProxy.call("redrawSatelliteWidget",this.actionScriptId,orientation);}
function Tool()
{this.base=CallQueue;this.base();this._visible=true;this.javaScriptId=Tool._instanceCount++;Tool._javaScriptIdMap[this.javaScriptId.toString()]=this;}
Tool.prototype=new CallQueue();Tool.TYPE_PAN="pan";Tool.TYPE_CUSTOM_SWF="customSWF";Tool.TYPE_EDGE="edge";Tool.EVENT_INITIALIZE="toolInitialize";Tool._instanceCount=0;Tool._javaScriptIdMap=new Array();Tool.prototype._initialized=false;Tool.prototype.toolType="";Tool.prototype.javaScriptId=null;Tool.prototype.actionScriptId=null;Tool.prototype._map=null;Tool.prototype.initTool=function(map)
{this._map=map;}
Tool.prototype.setActionScriptId=function(actionScriptId)
{this.actionScriptId=actionScriptId;this._initialized=true;this.dispatchYEvent(Tool.EVENT_INITIALIZE);}
Tool.prototype.isInitialized=function()
{return this._initialized;}
Tool.getToolByJavaScriptId=function(nJavaScriptId)
{return Tool._javaScriptIdMap[nJavaScriptId.toString()];}
Tool.prototype.getToolType=function()
{return this.toolType;}
Tool.prototype.canCall=function(sMethodName,aArgs)
{if(this.isInitialized())
{return true;}
else
{this.addCall(sMethodName,aArgs);return false;}}
function PanTool()
{this.base=Tool;this.base();}
PanTool.prototype=new Tool();PanTool.EVENT_DRAG_START=new String("dragStart");PanTool.EVENT_DRAG_STOP=new String("dragStop");PanTool.prototype.toolType=Tool.TYPE_PAN;function CustomSWFTool(sUrl,sIconUrl)
{this.base=Tool;this.base();this.url=sUrl;this.iconUrl=sIconUrl;}
CustomSWFTool.prototype=new Tool;CustomSWFTool.EVENT_LOADED=new String("loaded");CustomSWFTool.prototype.toolType=Tool.TYPE_CUSTOM_SWF;CustomSWFTool.prototype.url=null;CustomSWFTool.prototype.iconUrl=null;function EdgePan()
{this.base=Tool;this.base();}
EdgePan.prototype=new Tool();EdgePan.prototype.toolType=Tool.TYPE_EDGE;function CustomSWFWidget(sURL,position)
{this.url=sURL;this.base=Widget;this.base();}
CustomSWFWidget.prototype=new Widget;CustomSWFWidget.prototype.widgetType=Widget.TYPE_CUSTOM_SWF;CustomSWFOverlay.prototype.url=null;CustomSWFWidget.prototype.callCustomMethod=function(sMethodName,aMethodArgs)
{if(!this.canCall("callCustomMethod",arguments))return;this._map._flashProxy.call("callCustomSWFWidgetMethod",this.actionScriptId,sMethodName,aMethodArgs);}
CustomSWFWidget.prototype.move=function(x,y)
{if(!this.canCall("move",arguments))return;this._map._flashProxy.call("moveCustomSWFWidget",this.actionScriptId,x,y);}
var Languages={};Languages.IT=new String("IT");Languages.it_IT=new String("it-IT");Languages.ES=new String("ES");Languages.es_ES=new String("es-ES");Languages.DE=new String("DE");Languages.de_DE=new String("de-DE");Languages.en_GB=new String("en-GB");Languages.en_US=new String("en-US");Languages.en_IN=new String("en-IN");Languages.CF=new String("CF");Languages.fr_CA=new String("fr-CA");Languages.FR=new String("FR");Languages.fr_FR=new String("fr-FR");function ZoomBarWidget()
{this.base=Widget;this.base();}
ZoomBarWidget.prototype=new Widget;ZoomBarWidget.prototype.widgetType=Widget.TYPE_ZOOM_CONTROL;ZoomBarWidget.prototype.move=function(x,y)
{if(!this.canCall("move",arguments))return;this._map._flashProxy.call("moveZoomControl",this.actionScriptId,x,y);}
function Distance(){}
Distance.prototype.pointOne;Distance.prototype.pointTwo;Distance.prototype.point_one;Distance.prototype.point_two;Distance.prototype._dist=new Object();Distance.prototype.getDistance=function(point_one,point_two){if(!point_one||!point_two)return null;this.pointOne=this.point_two=point_one;this.pointTwo=this.point_two=point_two;var lat1=this.pointOne.lat*0.017453293;var lon1=this.pointOne.lon*0.017453293;var lat2=this.pointTwo.lat*0.017453293;var lon2=this.pointTwo.lon*0.017453293;var dlon=lon2-lon1;var dlat=lat2-lat1;var a=Math.pow(Math.sin(dlat/2),2)+Math.cos(lat1)*Math.cos(lat2)*Math.pow(Math.sin(dlon/2),2);var c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));this._dist={km:6378.135*c,mi:3963.189*c,nmi:3443.917*c};return this._dist;}