ACMS.Dispatch._static2dynamic=function(elm){function parseQuery(query){var s=query.split("&"),data={},i=0,iz=s.length,param,key,value;for(;i<iz;i++){param=s[i].split("=");if(param[0]!==void 0){key=param[0];value=decodeURIComponent(param[1]!==void 0?param.slice(1).join("="):key);data[key]=data[key]?Array.prototype.concat(data[key],value):value}}return data}var query=parseQuery(elm.src.replace(/^[^?]*\?/,""));var msgs=elm.alt.split("[[:split:]]");var w_and_h=query.size.split("x"),width=w_and_h[0]||
null,height=w_and_h[1]||null;var $div=$($.parseHTML('<div class="'+elm.className+'"></div>')).css({width:width+"px",height:height+"px",overflow:"hidden"});$(elm).replaceWith($div);var centerLatLng=query.center.split(","),GInfoWin=new google.maps.InfoWindow,GMap=new google.maps.Map($div[0],{zoom:parseInt(query.zoom,10),center:new google.maps.LatLng(centerLatLng[0],centerLatLng[1]),mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:false,styles:ACMS.Config.s2dStyle}),markerCollectionStack=[],msgI;
if("string"===typeof query.markers)query.markers=[query.markers];$.each(query.markers,function(){var params=this.split("|"),i=0,iz=params.length,markerCollection={icon:null,optAry:[]};if(!params.length)return true;for(;i<iz;i++)if(0===params[i].indexOf("icon:"))markerCollection.icon={icon:params[i].slice(5),shadow:new google.maps.MarkerImage(ACMS.Config.s2dPinShadowImg,new google.maps.Size(59,32),new google.maps.Point(0,0))};else{var latLng=params[i].split(",");if(!latLng[0].length)continue;markerCollection.optAry.push({position:new google.maps.LatLng(latLng[0],
latLng[1]),map:GMap})}markerCollectionStack.push(markerCollection)});msgI=0;$.each(markerCollectionStack,function(){var i=0,iz=this.optAry.length,markerOption;for(;i<iz;i++){markerOption=this.optAry[i];if(this.icon)$.extend(markerOption,this.icon);var GMarker=new google.maps.Marker(markerOption);if(msgs[msgI]!==void 0&&180<=width)(function(GMarker,msg){if(msg)google.maps.event.addListener(GMarker,"click",function(){GInfoWin.setOptions({content:msg});GInfoWin.open(GMap,GMarker)})})(GMarker,msgs[msgI].replace(/\[\[:quot:\]\]/igm,
'"').replace(/\[\[:lt:\]\]/igm,"<").replace(/\[\[:gt:\]\]/igm,">").replace(/\[\[:amp:\]\]/igm,"&"));msgI++}})};
