
var map;var copyrightTimer=null;var windowTip=null;var tipTimer;var mapTimer;var mapTimeoutCount;var mapToWait=0;var mapoptions;var currentShopData;var markerList={};var mapfilter={};var nofollowme=false;var mapurl='';var mapshopid='';var mapresult=null;var geocoder=null;var maprname='';var maplock=false;var mapdefaultcenter;var map_image_path="/images/map/";var map_popup_append="";var lastAjaxShopData=[];function onload_google()
{initialize();window.onunload=GUnload;}
if(window.GMap2!='undefined'&&$("GoogleMapComponent")){onload_google();}else{onContent(onload_google);}
function zoomfit(data,fit)
{var x,y,z;if(data.length>1)
{var maxLat=0.0;var maxLong=0.0;var minLat=500.0;var minLong=500.0;for(var i=data.length-1;i>=0;i--)
{if(data[i]["lat"]>0&&data[i]["long"]>0)
{maxLat=Math.max(maxLat,data[i]["lat"]);maxLong=Math.max(maxLong,data[i]["long"]);minLat=Math.min(minLat,data[i]["lat"]);minLong=Math.min(minLong,data[i]["long"]);}}
x=minLat+(maxLat-minLat)/2;y=minLong+(maxLong-minLong)/2;z=map.getBoundsZoomLevel(new GLatLngBounds(new GLatLng(minLat,minLong),new GLatLng(maxLat,maxLong)))
z=Math.min(z,18);}else if(data.length==1){x=parseFloat(data[0]["lat"]);y=parseFloat(data[0]["long"]);z=17;}else{z=mapdefaultcenter[2];x=mapdefaultcenter[0];y=mapdefaultcenter[1];}
map.setCenter(new GLatLng(x,y),z);}
function initialize()
{var mapblock=$("GoogleMapComponent");if(!mapblock){setTimeout(initialize,100);return;}
if(window.getShopListValues){currentShopData=getShopListValues();for(var i=currentShopData.length-1;i>=0;i--){if(currentShopData[i]['lat'])break;}
if(i<0)currentShopData=[];}else{currentShopData=[];}
if(window.getMapImagePath){map_image_path=getMapImagePath();}
if(window.getMapPopupAppend){map_popup_append=getMapPopupAppend();}
if(window.getMapXYZ){mapdefaultcenter=getMapXYZ();}else{mapdefaultcenter=[22.365316,114.131470,10];}
if(currentShopData.length==0&&mapblock.getAttribute("hideIfNoData"))return;mapblock.style.display="block";map=new GMap2(mapblock);if(!map.isStatic)copyrightTimer=window.setInterval('makeCopyrightSmaller()',150);var sections=document.location.toString().split('?');var hasupdate=0;var loc={};mapurl=sections[0];if(sections[1]){var queries=sections[1].split('&');var mapform=$('mapform');var query;if(document.location.toString().toLowerCase().indexOf('maptype=1')>0){for(var i=0,e=queries.length;i<e;i++){var part=queries[i].split('=');switch(query=part[0].toLowerCase()){case'dishes_id':case'amenity_id':case'cuisine_id':case'promotionid':case'price':if(mapform&&part[1]){mapform[query].value=part[1];hasupdate=1;}
break;case'inputstrrest':var textform=$('textform');if(textform)maprname=textform.rname.value=unescape(part[1]);hasupdate=1;break;case'x':case'y':case'z':loc[query]=parseFloat(part[1]);hasupdate=1;break;}}}}
if(loc.x&&loc.y&&loc.z){map.setCenter(new GLatLng(loc.x,loc.y),loc.z);}else{window.zoomfit(currentShopData,1);}
if(mapblock.getAttribute("followme")){window.followMe();var fm=$("GoogleMapFollowme");if(fm)fm.style.display="block";fm=null;}
if(mapblock.getAttribute("mapUrl")){GEvent.addListener(map,"click",function(){window.open($("GoogleMapComponent").getAttribute("mapUrl"),'_self');});}
window.mapoptions={marker:mapblock.getAttribute("marker")||0,popup:mapblock.getAttribute("popup")||0,onready:mapblock.getAttribute("onready"),timeout:mapblock.getAttribute("timeout")||2};if(!hasupdate){updateFeaturedMarkers();}
showAllMarkers(currentShopData,mapoptions);if(hasupdate){resetNearbyMarkers();}
if(mapblock.getAttribute("control")=='large')
map.addControl(new GLargeMapControl());else if(mapblock.getAttribute("control")=='small')
map.addControl(new GSmallMapControl());if(mapblock.getAttribute("dragging")=='no')
map.disableDragging();if(mapblock.getAttribute("minimap")=='yes'){map.addControl(new GOverviewMapControl(new GSize(200,170)));}
var _e;if(_e=$('Map_ZoomIn')){fixPng(_e);_e.onclick=function(){map&&(map.zoomIn());}
_e.style.display='inline';_e=null;}
if(_e=$('Map_ZoomOut')){fixPng(_e);_e.onclick=function(){map&&(map.zoomOut());}
_e.style.display='inline';_e=null;}
if(mapblock.getAttribute("typecontrol")){map.addControl(new GMapTypeControl());}
if(mapoptions.onready){eval(mapoptions.onready+";");}
if(mapblock.getAttribute("autorefresh")){GEvent.addListener(map,"moveend",function(){startMapWait(window.mapoptions.timeout,'請選定地圖範圍');});GEvent.addListener(map,"zoomend",function(){startMapWait(window.mapoptions.timeout,'請選定地圖範圍');});}
GEvent.addListener(map,"movestart",function(){hideWindowTip();});mapblock=null;}
function startMapWait(wait,msg)
{if(windowTip)hideWindowTip();if(mapresult&&mapresult.bounds.containsBounds(map.getBounds()))wait=0;mapToWait=wait;mapTimeoutCount=0;if(mapTimer)window.clearTimeout(mapTimer);showMsg(msg,1);showButton();mapWait();}
function stopMapWait()
{showMsg("",2);hideButton();if(mapTimer)window.clearTimeout(mapTimer);mapTimer=0;}
function mapWait()
{mapTimer=0;if(mapTimeoutCount==mapToWait){resetNearbyMarkers();}else{showMsg('('+(mapToWait-mapTimeoutCount)+')',2);mapTimeoutCount++
mapTimer=window.setTimeout(mapWait,1000);}}
function makeCopyrightSmaller()
{if(map.isLoaded())
{for(var i=0;i<map.getContainer().childNodes.length;++i)
{if(map.getContainer().childNodes[i].innerHTML.indexOf(String.fromCharCode(169))!==-1)
{map.getContainer().childNodes[i].style.fontSize='7px';window.clearInterval(copyrightTimer);break;}}}}
function showMsg(html,blk)
{var msg=$('msg'+blk);if(msg){if(html.constructor==String)msg.innerHTML=html;else{msg.innerHTML='';DOM.ac(msg,html);}
return true;}else{return false;}}
function showButton()
{var el=$('resetbutton');if(el)el.style.display='inline';}
function hideButton()
{var el=$('resetbutton');if(el)el.style.display='none';}
function showAllMarkers(data,options)
{var markerGroups={};var getcs=function(lat,lng)
{return''+Math.round(lat*32768)+Math.round(lng*32768);}
for(var i=0;i<data.length;i++){if(markerList[data[i].id])continue;if(data[i].lat>0&&data[i]['long']>0){var xy=getcs(data[i].lat,data[i]['long']);if(markerGroups[xy]){markerGroups[xy].push(data[i]);}else{markerGroups[xy]=[data[i]];}}}
for(var i in markerGroups){updateGroupMarker(markerGroups[i],options);}}
function showResultMsg(count,total,filters)
{if(!count){if(mapfilter.cuisineid||mapfilter.dishid||mapfilter.amenityid||mapfilter.price||mapfilter.name){if(mapfilter.name)
showMsg('此地圖範圍沒有符合條件的餐廳。請重新輸入餐廳名稱或按「重置」開始新的地圖搜尋。',1);else
showMsg('此地圖範圍沒有符合條件的餐廳。請使用上方「篩選餐廳」功能選擇其他過濾條件。',1);}else{showMsg('此地圖範圍沒有符合條件的餐廳。',1);}}else{var xy=map.getCenter();var z=map.getZoom();var size=map.getSize();var part2=["&x=",xy.lat(),"&y=",xy.lng(),"&z=",z,"&wxh=",size.width,"x",size.height].join('');var tosr1=['<a href="/restaurant/sr1.htm?nearby=1&status=10',filters||'',part2,'"><img align="absmiddle" src="',map_image_path,'map_listmode.gif" border="0"/></a>'].join('');if(total>count){showMsg("共"+total+"間餐廳。正顯示最多好評的"+count+"間。您可使用上方「篩選餐廳」功能進一步搜尋。"+tosr1,1);}else if(count<10){showMsg('共找到'+count+'間餐廳。'+tosr1,1);}else{showMsg('共找到'+count+'間餐廳。您可使用上方「篩選餐廳」功能進一步搜尋。'+tosr1,1);}}}
function showMarkers(req,bounds,filters)
{var response=req.responseText||"";lastAjaxShopData=[];var total=0;if(response.charAt(0)=='['){eval('lastAjaxShopData = '+response+';');var totalobj=lastAjaxShopData.shift();total=totalobj&&(totalobj.total);showResultMsg(lastAjaxShopData.length,total,filters);if(total==lastAjaxShopData.length){mapresult={bounds:bounds,filters:filters,count:lastAjaxShopData.length}}else{mapresult=false;}}else{mapresult=false;return;}
var options2={marker:1,popup:mapoptions.popup,markerUrl:1};if(currentShopData.length>0&&lastAjaxShopData.length>0){for(var i=0;i<currentShopData.length;i++){for(var j=0;j<lastAjaxShopData.length;j++){if(lastAjaxShopData[j].id==currentShopData[i].id){Array.remove(lastAjaxShopData,j);break;}}}}
showAllMarkers(lastAjaxShopData,options2);}
function createGroupMarkerForMap(group,point,options)
{var iconP=new GIcon();iconP.shadow="";if(options.marker==1){if(group.length==1){iconP.image=map_image_path+"GoogleMap_icon_s.png";iconP.iconSize=new GSize(15,15);iconP.iconAnchor=new GPoint(8,15);}else{iconP.image=map_image_path+"GoogleMap_icon_more_s.png";iconP.iconSize=new GSize(18,18);iconP.iconAnchor=new GPoint(10,18);}}else if(options.marker==3){if(group.length==1){iconP.image=map_image_path+group[0].label+".png";iconP.shadow=map_image_path+"shadow.png";iconP.shadowSize=new GSize(45,45);iconP.iconSize=new GSize(34,45);}else{iconP.image=map_image_path+"GoogleMap_icon_more.png";iconP.iconSize=new GSize(48,48);}
iconP.iconAnchor=new GPoint(22,37.5);}else if(options.marker==4){if(group.length==1){iconP.image=map_image_path+"Special_"+group[0].label+".png";}else{iconP.image=map_image_path+"Special_plus.png";}
iconP.iconSize=new GSize(41,45);iconP.iconAnchor=new GPoint(21,45);}else{if(group.length==1){iconP.image=map_image_path+"GoogleMap_icon.png";iconP.iconSize=new GSize(45,45);iconP.iconAnchor=new GPoint(22,45);}else{iconP.image=map_image_path+"GoogleMap_icon_more.png";iconP.iconSize=new GSize(48,48);iconP.iconAnchor=new GPoint(24,48);}}
var markerOptions={icon:iconP,autoPan:false};if(group.length>1){markerOptions.title='此地點共有'+group.length+'間餐廳。';}else{markerOptions.title=group[0].name;}
var marker=new GMarker(point,markerOptions);if(options.popup){var message=[];if(markerOptions.title&&group.length>1){message=message.concat([markerOptions.title,'<br/><br/>']);}
if(group.length>2)message.push('<div class="mappopup_multi" id="mappopup_multi">');for(var i=0;i<group.length;i++){if(i>0){message.push('<div style="clear:both"></div><hr/><div style="clear:both"></div>');}
var data=group[i];if(data.photo){message=message.concat(['<div class="RestPhoto"><img src="',data.photo,'" width="150" height="100" border="0" /></div>']);}
message=message.concat(['<span class="RestName">',(options.marker==3||options.marker==4)?'<img align="absmiddle" src="'+map_image_path+'bullet/'+data.label+'.gif" />':'','<a href="',data.url,'">',data.name,'</a></span><br /><span class="RestAddress">地址 : ',data.addr]);if(data.phone!=''){message=message.concat(['<br />電話 : ',data.phone,'</span>']);}
if(data.categories.length>0){message=message.concat(['<br />類別 : ',data.categories.join(", ")]);}
message=message.concat(['<br /><strong>',data.smile,'</strong> <img src="/images/hface_ss.gif" width="17" height="16" align="absmiddle" /> vs <strong>',data.cry,'</strong> <img src="/images/sface_ss.gif" align="absmiddle" />']);if(options.popup!='hidebutton'){message=message.concat(['<button style="width:70px;margin-left:10px;" onclick="window.open(\'',data.url,'\')">詳情 >></button>']);}
if(map_popup_append)message.push(map_popup_append);message.push('<br/>');}
if(group.length>2)message.push('</div>');var html=message.join('');GEvent.addListener(marker,"mouseover",function(){showMouseOver(html,point);});GEvent.addListener(marker,"mouseout",function(){hideMouseOver("delay");});message=null;}
if(options.markerUrl&&group.length==1){GEvent.addListener(marker,"dblclick",function(){window.open("/restaurant/sr2.htm?shopid="+group[0].id);});}else{GEvent.addListener(marker,"dblclick",function(){hideWindowTip();map.setCenter(point,18);});}
GEvent.addListener(marker,"click",function(){lockWindowTip(marker);});return marker;}
function updateGroupMarker(group,options)
{var point=new GLatLng(group[0]['lat'],group[0]['long']);var marker=createGroupMarkerForMap(group,point,options);for(var i=0;i<group.length;i++){if(group[i].id)markerList[group[i].id]=marker;}
map.addOverlay(marker);}
function popupMarker(label,notmove){if(map&&markerList&&markerList[label]){if(!map.getBounds().containsLatLng(markerList[label].getLatLng())){if(!notmove){map.setCenter(markerList[label].getLatLng());}else{return false;}}
GEvent&&GEvent.trigger(markerList[label],"mouseover");}
return true;}
if(ua.ie&&ua.ie<7){var _selectHidden=0;var hideFormSelects=function(){var mapform=$('mapform');if(mapform){(function(e){e.style.visibility='hidden';}).apply2all(DOM.fc(mapform,'select'));_selectHidden=1;}};var showFormSelects=function(){if(!_selectHidden)return;var mapform=$('mapform');if(mapform){(function(e){e.style.visibility='visible';}).apply2all(DOM.fc(mapform,'select'));_selectHidden=0;}};}else{var hideFormSelects=function(){}
var showFormSelects=function(){}}
function showNearbyMarkers(shopid)
{mapshopid=shopid=shopid||mapshopid;if(maprname){var mapform=$('mapform');mapfilter={name:maprname,region:mapform['region'].value};}else{var mapform=$('mapform');if(mapform){mapfilter={region:mapform['region'].value,cuisineid:mapform['cuisine_id'].value,dishid:mapform['dishes_id'].value,amenityid:mapform['amenity_id'].value,price:mapform['price'].value,themeid:mapform['theme_id'].value,promotionid:mapform['promotionid']&&mapform['promotionid'].value,channelid:mapform['channel_id']&&mapform['channel_id'].value}}}
var bounds=map.getBounds();var xy=map.getCenter();var z=map.getZoom();var size=map.getSize();var part1=["&x=",xy.lat(),"&y=",xy.lng(),"&z=",z,"&wxh=",size.width,"x",size.height].join('');var part2=["&shopid=",shopid||'',"&cuisine_id=",mapfilter.cuisineid||'',"&dishes_id=",mapfilter.dishid||'',"&amenity_id=",mapfilter.amenityid||'',"&theme_id=",mapfilter.themeid||'',"&region=",mapfilter.region||'',"&promotionid=",mapfilter.promotionid||'',"&price=",mapfilter.price||'',"&inputstrrest=",escape(mapfilter.name||'')].join('');if(mapfilter.channelid)part2+='&channel_id='+mapfilter.channelid;if(mapresult&&(mapresult.filters==part2)&&mapresult.bounds.containsBounds(bounds)){return false;}
var page="/service/GetNearbyRestaurants.htm";new Ajax.Request(page,{method:'post',postBody:part1+part2,onComplete:function(req){showMarkers(req,bounds,part2);}});return part2;}
function resetNearbyMarkers(shopid)
{stopMapWait();var filters=showNearbyMarkers(shopid);var mapLink=$('maplink');if(mapLink){var xy=map.getCenter();var z=map.getZoom();if(mapLink){var part2=["&x=",xy.lat(),"&y=",xy.lng(),"&z=",z].join('');mapLink.href=mapurl+'?mapType=1'+(filters||mapresult.filters||'')+part2;}}
if(filters==false){var c=0;var bounds=map.getBounds();for(var i=0,e=lastAjaxShopData.length;i<e;i++){var latlng=new GLatLng(lastAjaxShopData[i].lat,lastAjaxShopData[i]['lng']);if(bounds.containsLatLng(latlng))c++;}
showResultMsg(c,c,mapresult.filters);return;}
map.clearOverlays();for(var i in markerList){markerList[i]=null;}
markerList={};for(i=0;i<currentShopData.length;i++)
updateGroupMarker([currentShopData[i]],mapoptions);updateFeaturedMarkers();showMsg("請稍後，正等候結果 ...",1);}
function updateFeaturedMarkers()
{if(window.featuredMarkers){var options={marker:4,popup:1};showAllMarkers(featuredMarkers,options);}}
function setMapFilter(key,value)
{}
function lockWindowTip(marker)
{hideWindowTip();GEvent.trigger(marker,'mouseover');var close=$('PopUpClose');close.style.display='block';close.onclick=hideWindowTip;maplock=true;return false;}
function showMouseOver(tipHTML,point)
{if(maplock)return;hideMouseOver("fast");if(windowTip==null||windowTip=='')
{windowTip=document.createElement('div');windowTip.id="windowTip";windowTip.style.padding="0";windowTip.style.margin="0";windowTip.style.zIndex=9999;windowTip.style.position="absolute";windowTip.onmouseout=function(e){hideMouseOver("delay");};windowTip.style.display="none";document.body.appendChild(windowTip);}
windowTip.style.display="none";var container=map.getContainer();var divPos=map.fromLatLngToContainerPixel(point);var mapPos=DOM.getXY(container);var tipLeft=divPos.x+mapPos[0];var tipTop=divPos.y+mapPos[1];var html;var startY=tipTop-110;if(tipLeft-mapPos[0]<container.offsetWidth/2&&tipLeft+440<DOM.getViewportWidth()||tipLeft-440<10){html='<div id="PopUpPointerAnchor"><img src="'+map_image_path+'popup_arrow.gif"></div><div id="PopUpPointer"><div class="RestContent"><img id="PopUpClose" src="'+map_image_path+'searchboxcross.gif" />'+tipHTML+'</div></div>';windowTip.style.left=tipLeft+"px";windowTip.style.top=startY+"px";}else{html='<div id="PopUpPointerAnchorRe"><img src="'+map_image_path+'popup_arrowRe.gif"></div><div id="PopUpPointerRe"><div class="RestContent"><img id="PopUpClose" src="'+map_image_path+'searchboxcross.gif"/>'+tipHTML+'</div></div>';windowTip.style.left=tipLeft-440+"px";windowTip.style.top=startY+"px";}
windowTip.innerHTML=html;windowTip.style.display="block";divPos.y<110?hideFormSelects():showFormSelects();var e=$('mappopup_multi');e&&(e.scrollTop=0);var floatDiv=$("GoogleMapDiv");if(floatDiv){var divPos=DOM.getXY(floatDiv);windowTip.mkOffset=startY-divPos[1];}}
function hideWindowTip()
{if(!windowTip)return;windowTip.style.display="none";windowTip.mkOffset=0;if(tipTimer){window.clearTimeout(tipTimer);tipTimer=0;}
windowTip.onmouseover=null;if(maplock){maplock=false;var close=$('PopUpClose');close.onclick=null;close.style.display='none';}
showFormSelects();}
function hideMouseOver(type)
{if(maplock)return;if(windowTip!=null)
{if(type=='fast')
{hideWindowTip();}
else
{if(tipTimer)window.clearTimeout(tipTimer);tipTimer=window.setTimeout(hideWindowTip,500);windowTip.onmouseover=function(e){if(tipTimer){window.clearTimeout(tipTimer);tipTimer=0;}
this.onmouseover=null;};}}}
function followMe()
{var lastPY=-1;var _followme=function(){if(nofollowme){window.onscroll='';return;}
var pY=document.documentElement.scrollTop||document.body.scrollTop;if(pY!=lastPY){window.setTimeout(_followme,300);window.onscroll='';lastPY=pY;return;}
var floatDiv=$("GoogleMapDiv");var divPos=DOM.getXY(floatDiv);var startY=divPos[1]-parseInt(floatDiv.style.marginTop||0);var lastsh=parseInt(floatDiv.style.marginTop||0);var mT=floatDiv.getAttribute('marginTop');var h=Math.max(mT||Math.floor((document.documentElement.clientHeight-floatDiv.offsetHeight)/2),0);var mh=document.body.clientHeight-320-floatDiv.offsetHeight;var sh=Math.min(pY+h,mh)-startY;var dy=.15*(sh-lastsh);if(dy>0)dy=Math.ceil(dy);else dy=Math.floor(dy);sh=lastsh+dy;sh=sh>0?sh:0;floatDiv.style.marginTop=sh+"px";if(windowTip&&windowTip.mkOffset){windowTip.style.top=startY+sh+windowTip.mkOffset+"px";}
if(lastsh!=sh){window.setTimeout(_followme,20);lastsh=sh;window.onscroll='';}else{window.onscroll=_followme;}}
window.onscroll=_followme;_followme();}
function followmeswitch(off)
{if(!off){nofollowme=false;followMe();}else{nofollowme=true;}}
function setCenter(latitude,longitude,zoom)
{map.setCenter(new GLatLng(latitude,longitude),zoom);}
function setPosition(elementObj)
{if(elementObj.options){var selectedMark=elementObj.options[elementObj.selectedIndex];}else{var selectedMark=elementObj;}
if(selectedMark.getAttribute('lat')){setCenter(parseFloat(selectedMark.getAttribute('lat')),parseFloat(selectedMark.getAttribute('lng')),parseInt(selectedMark.getAttribute('zoom')));}else{zoomfit([]);}}
function updateLandmark(el)
{var value=el.value;var parent=$("landmarkList");var selects=DOM.fc(parent,'select');var options=DOM.fc(selects[0],'option',{lng:true});for(var i=1,e=options.length;i<e;i++)DOM.rn(options[i]);var options=DOM.fc(selects[1],'option',{lng:true});var j=0;for(var i=0,e=options.length;i<e;i++)
{if(value%1000==999){if(options[i].value>=(value-value%1000)&&options[i].value<value){selects[0].appendChild(options[i].cloneNode(true));j++;}}else{if(value==options[i].value)
{selects[0].appendChild(options[i].cloneNode(true));j++;}}}
var dt=el.options[el.selectedIndex];var first=selects[0].options[0];first.text=first.value+'('+j+')';first.setAttribute('lat',dt.getAttribute('lat'));first.setAttribute('lng',dt.getAttribute('lng'));first.setAttribute('zoom',dt.getAttribute('zoom'));selects[0].disabled=(j==0);selects[0].selectedIndex=0;}
function gotoAddress(addr,cname)
{maprname=(cname||'').trim();var mapform=$('mapform');if(mapform)mapform.style.display=maprname?'none':'block';if(addr){geocoder=geocoder||new GClientGeocoder();if(mapform.region.value==0){geocoder.setBaseCountryCode('hk');addr=addr+" ,hongkong";}
else if(mapform.region.value==1){geocoder.setBaseCountryCode('mo');}
else if(mapform.region.value==2){geocoder.setBaseCountryCode('cn');}
else{geocoder.setBaseCountryCode('hk');}
geocoder.getLocations(addr,function(result){if(result.Status.code==200){for(var i=0,e=result.Placemark.length;i<e;i++){var p0=result.Placemark[i];if(!p0.AddressDetails||!p0.AddressDetails.Country)continue;if(mapform.region.value==1&&p0.AddressDetails.Country.CountryNameCode!='MO'){continue;}else if(mapform.region.value==2&&p0.AddressDetails.Country.CountryNameCode!='CN'){continue;}else if(p0.AddressDetails.Country.CountryNameCode!='HK'){continue;}
var zoom=Math.floor(p0.AddressDetails.Accuracy/2)+14;map.setCenter(new GLatLng(p0.Point.coordinates[1],p0.Point.coordinates[0]),zoom);return;}}
var text=(DOM.ctn('找不到地址:'+addr));showMsg(text,1);return;});}else{resetNearbyMarkers(mapshopid);}
return false;}
function tabmouseover(id){var id=document.getElementById(id);id.style.float='left';id.style.marginTop='0px';}
function tabmouseout(id){var id=document.getElementById(id);id.style.float='left';id.style.marginTop='-39px';}