<?xml version="1.0" encoding="UTF-8"?><Module>
<ModulePrefs title="Send Map Markers to Nokia GPS"
             description="Helps you push a Google Map marker into your Nokia GPS Landmarks (POIs). Tested with Nokia 6110 Navigator and N95."
             author="Julian Szemere"
             author_email="jules+marker2gps@jules.com.au"
             author_affiliation=""
             author_location="Melbourne Australia"
             screenshot="http://jules.com.au/marker2gps/screenshot.png"
             thumbnail="http://jules.com.au/marker2gps/thumbnail.png"
             height="190">
  <Require feature="sharedmap"/>
</ModulePrefs>
<Content type="html"><![CDATA[

<div id="status">
	<p id="help">
	This tool helps you send a location marker (eg: <img src="http://www.google.com/intl/en_au/mapfiles/marker.png" valign="middle" /> or <img valign="middle" src="http://www.google.com/intl/en_ALL/mapfiles/arrow-white.png" />) to your
	maps-equipped Nokia phone.  It uses the LMX format which you can save in your Landmarks.<br /><br />
	<strong>First, click on a marker.</strong></p>

	<form action="http://jules.com.au" method="post" id="pointform" style="display: none";>

		<label>Name this landmark:</label>
		<input type="text" name="name" id="txtName" />

		<label>Category:</label>
		<select name="idCategory" id="idCategory">
<option value="3000">Accommodation</option><option value="6000">Business</option><option value="9000">Communication</option><option value="12000">Educational Institute</option><option value="15000">Entertainment</option><option value="18000">Food &amp; Beverage</option><option value="21000">Geographical Area</option><option value="24000">Outdoor activities</option><option value="27000">People</option><option value="30000">Public service</option><option value="33000">Religious places</option><option value="36000">Shopping</option><option value="39000">Sightseeing</option><option value="42000">Sports</option><option value="45000">Transport</option>	</select>



		<p><input type="button" value="Send to my phone ..." id="btnSendtophone" /></p>

		<input type="hidden" name="lng" id="txtLng" /><input type="hidden" name="lat" id="txtLat" />
		
		<p>&nbsp;</p>
	</form>
</div>

<script>
	var map = new GMap2();

	map.closeInfoWindow();

	function updateCoords(e, a)
	{
		map.getInfoWindowAsync(function (iw)
		{
			if (iw)
			{
				iw.getPointAsync(function (pnt) {

					document.getElementById('help').style.display = 'none';
					document.getElementById('pointform').style.display = '';

					document.getElementById('txtLng').value = 	pnt.lng();
					document.getElementById('txtLat').value = 	pnt.lat();
					
					document.getElementById('txtName').focus();

				});
			}
		});

	}
	
	function hideCoords()
	{
		document.getElementById('help').style.display = '';
		document.getElementById('pointform').style.display = 'none';
	}

	function sendToPhone()
	{
		var newwin = window.open("http://jules.com.au/marker2gps/?lon="+document.getElementById('txtLng').value+"&lat="+document.getElementById('txtLat').value+"&name="+encodeURIComponent(document.getElementById('txtName').value)+"&cat="+encodeURIComponent(document.getElementById('idCategory').value), 'ctxhelp', 'height=400,width=605,scrollbars=1,resizable=1,status=0');

	}

	//GEvent.addListener(map, "click", updateCoords);
	GEvent.addListener(map, "infowindowopen", updateCoords);
	GEvent.addListener(map, "infowindowclose", hideCoords);

	GEvent.addDomListener(document.getElementById('btnSendtophone'), "click", sendToPhone);



</script>

<style type="text/css">
	form label
	{
		font-weight: bold;
		display: block;
		margin-top: 8px;
	}
	
	form
	{
		width: 270px;
		
		background: transparent url(http://jules.com.au/marker2gps/nokia-map.png) no-repeat top right;
	}
</style>

]]></Content>
</Module>
