<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Language" content="en-us">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="pragma" content="no-cache">
	<meta name="revisit-after" content="3 days">
	<meta name="robot" content="All">
	<meta name="Description" content="{$lang.description}">
	<meta name="Keywords" content="{$lang.keywords}">
	<title>{$lang.main_title}</title>
	<link href="{$site_root}/{$style}" rel="stylesheet" type="text/css">
</head>
<body {if $settings.map_type eq 'google'}onload="initialize()" onunload="GUnload()"{/if} dir="{$default_ltr}">
<div style="padding: 5px 10px">
<table width="100%" cellspacing=0 cellpadding=0>
<tr valign=top>
{if $settings.map_type eq 'ovi'}
<script src="http://api.maps.ovi.com/jsl.js" type="text/javascript" charset="utf-8"></script>
{elseif $settings.map_type eq 'google'}
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$settings.google_app_id}" type="text/javascript"></script>
    <script type="text/javascript">
    {literal}
    function initialize() {
		var map = new GMap2(document.getElementById("mapContainer"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
		map.setCenter(new GLatLng({/literal}{$lat}, {$lon}{literal}), 10);
    }
    {/literal}
    </script>
{/if}
	<td colspan="2" align="{$default_left}">
<div id="mapContainer" style="height: 450px; width: 800px;"></div>
{if $settings.map_type eq 'ovi'}
 <script type="text/javascript">
    {literal}
    ovi.mapsapi.util.ApplicationContext.set({"appId": "{/literal}{$settings.ovi_appId}{literal}", "authenticationToken": "{/literal}{$settings.ovi_token}{literal}"});
    var map = new ovi.mapsapi.map.Display(document.getElementById("mapContainer"), {
            components: [ 
                //behavior collection
                new ovi.mapsapi.map.component.Behavior(),
                new ovi.mapsapi.map.component.ZoomBar(),
                new ovi.mapsapi.map.component.Overview(),
                new ovi.mapsapi.map.component.TypeSelector(),
                new ovi.mapsapi.map.component.ScaleBar()
                 ],
            zoomLevel: 10,
            center: [{/literal}{$lat}, {$lon}{literal}]
        });
    //remove zoom.MouseWheel behavior for better page scrolling experience
    map.removeComponent(map.getComponentById("zoom.MouseWheel"));
    
    //create a marker and add it to the map
    var marker = new ovi.mapsapi.map.StandardMarker([{/literal}{$lat}, {$lon}{literal}], {
        text: "Hi!", //small label
        draggable: true  //the marker is marked to be draggable
    });
    map.objects.add(marker);
    {/literal}
    </script>
{/if}
	</td>
</tr>
<tr><td height="30%">&nbsp;</td></tr>
</table>
</div>
</body>
</html>