<!--{if $action == 'big'}-->
<script type="text/javascript" src="{$_config[siteurl]}include/javascript/favorite.js"></script>
<script type="text/javascript">
var mymap = 'viewmap_big';
</script>
<div id="body">
<div class="link_path">
    <a href="{$_config[siteurl]}">首页</a>&nbsp;&raquo;&nbsp;<a href="{$MOD[url]}cate.php?cd=$pcd">$_panels[$pcd]</a>&nbsp;&raquo;&nbsp;<a href="{$MOD[url]}shop.php?shopid=$shop[sid]">$shop[shopname]</a>&nbsp;&raquo;&nbsp;地图位置
</div>
<div id="left">
    <div class="mainrail rail-border-1">
        <h1 class="rail-h-1 rail-h-bg-1">$shop[shopname]</h1>
        <ul class="rail-list">
            <li>地址：$shop[address]</li>
            <li>电话：$shop[tel1]&nbsp;$shop[tel2]</li>
            <li><a href="{$MOD[url]}post.php?action=newreview&shopid=$shop[sid]">添加点评</a></li>
            <li><a href="javascript:;" onclick="addfavorite($shop[sid]);">加入收藏</a></li>
            <li><a href="{$MOD[url]}shop.php?shopid=$shop[sid]">查看更多介绍和点评</a></li>
        </ul>
    </div>
</div>
<div id="right">
    <div id="viewmap_big" class="rail-border-3"></div> 
</div>
</div>
<!--{else}-->
<script type="text/javascript">
var mymap = 'viewmap_small';
</script>
<div id="viewmap_small"></div>
<div id="body">
<!--{/if}-->

<script type="text/javascript" language="javascript" src=" http://api.51ditu.com/js/maps.js"></script>
<script type="text/javascript" language="javascript">
var maps = new LTMaps( mymap ); 

<!--{if $action == 'big'}-->
var point = new LTPoint( '$shop[mappoint][0]', '$shop[mappoint][1]' );
var shop = '$shop[shopname]';
var control = new LTStandMapControl();
<!--{else}-->
if( parent.lng && parent.lat && parent.shopname) {
    var point = new LTPoint( parent.lng, parent.lat );
    var shop = parent.shopname;
}
var control = new LTStandMapControl( 2 );
<!--{/if}-->

maps.addControl( control );
if( point ) {
	maps.centerAndZoom( point, 0 );
	var marker = new LTMarker( point );
	maps.addOverLay( marker );

    var maptxt = new LTMapText( point );
    maptxt.setLabel( shop );
    maps.addOverLay( maptxt );

} else {
    var point = new LTPoint($_default_mappoint[0], $_default_mappoint[1]);
	maps.cityNameAndZoom( point , 3 ); 

}
</script>
