Index: trunk/src/map/inc/nodemapWL.js
===================================================================
--- trunk/src/map/inc/nodemapWL.js	(revision 7802)
+++ trunk/src/map/inc/nodemapWL.js	(revision 7805)
@@ -14,4 +14,5 @@
 //This function is called from index.php
 function initialize_map() {
+	suggestMarkers("");
 	//We will only do this function if the browser is compatible
 	if (GBrowserIsCompatible()) {
@@ -270,5 +271,5 @@
 
 //Code from w3schools. http://www.w3schools.com/dom/dom_http.asp
-function loadXMLDoc(url)
+function loadXMLDoc(url, targetDiv)
 {
 xmlhttp=null;
@@ -283,5 +284,5 @@
 if (xmlhttp!=null)
   {
-  xmlhttp.onreadystatechange=state_Change;
+  xmlhttp.onreadystatechange=state_Change();
   xmlhttp.open("GET",url,true);
   xmlhttp.send(null);
@@ -308,4 +309,42 @@
 }
 
+function loadSuggest(url)
+{
+xmlhttp=null;
+if (window.XMLHttpRequest)
+  {// code for Firefox, Opera, IE7, etc.
+  xmlhttp=new XMLHttpRequest();
+  }
+else if (window.ActiveXObject)
+  {// code for IE6, IE5
+  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
+  }
+if (xmlhttp!=null)
+  {
+  xmlhttp.onreadystatechange=state_ChangeSuggest;
+  xmlhttp.open("GET",url,true);
+  xmlhttp.send(null);
+  }
+else
+  {
+  alert("Your browser does not support XMLHTTP.");
+  }
+}
+
+function state_ChangeSuggest()
+{
+if (xmlhttp.readyState==4)
+  {// 4 = "loaded"
+  if (xmlhttp.status==200)
+    {// 200 = "OK"
+    document.getElementById("searchlist").innerHTML=xmlhttp.responseText;
+    }
+  else
+    {
+    alert("Problem retrieving data:" + xmlhttp.statusText);
+    }
+  }
+}
+
 function toggleGoogleSearchMap()
 {
@@ -330,6 +369,11 @@
 }
 
-
-
-
-
+function suggestMarkers(value)
+{
+	loadSuggest("inc/suggestions.php?value="+value);
+}
+
+
+
+
+
Index: trunk/src/map/inc/search_node.php
===================================================================
--- trunk/src/map/inc/search_node.php	(revision 7805)
+++ trunk/src/map/inc/search_node.php	(revision 7805)
@@ -0,0 +1,15 @@
+<?php
+function searchNodes()
+{
+?>
+<!-- This contains the searchbox of the searchtool, and the send button for it -->
+<div id="searchbox">
+	<form>
+	<input type="text" name="naam" size="18" maxlength="30" onkeyup="suggestMarkers(this.value)"><input type="button" name="knop" value=" > ">
+	</form>
+</div>
+<!-- This contains the list of nodes, in future the searchbox will make it possible to filter this list -->
+<?php
+}
+
+?>
Index: trunk/src/map/inc/suggestions.php
===================================================================
--- trunk/src/map/inc/suggestions.php	(revision 7805)
+++ trunk/src/map/inc/suggestions.php	(revision 7805)
@@ -0,0 +1,58 @@
+<?php
+require_once("../../config.php");
+require_once($config['root']."/map/inc/kmlHandler.php");
+
+$markers = get_node_array($config['kml_file']);
+$suggested_markers = array();
+
+if(isset($_GET['value']))
+{
+	$typed_value = $_GET['value'];
+}
+else
+{
+	$typed_value = "";
+}
+
+foreach($markers as $marker)
+{
+	$markernames[] = (string)$marker['name'];
+}
+
+if (strlen($typed_value) > 0)
+  {
+  for($i=0; $i<count($markernames); $i++)
+    {
+	$hint= "";
+    if (strtolower($typed_value)==strtolower(substr($markernames[$i],0,strlen($typed_value))))
+      {
+
+        $suggested_markers[]=$markernames[$i];
+     }
+   }
+ }
+ 
+if ($suggested_markers == null)
+{
+	if (strlen($typed_value) > 0)
+	{
+		$suggested_markers[] = "Geen suggesties";
+	}
+	else
+	{
+		$suggested_markers = $markernames;
+	}
+}
+
+echo "<select multiple>";
+foreach($suggested_markers as $name)
+{
+	$name = (string)$name;
+	echo "<option value='{$name}'>{$name}</option>";
+}
+echo "</select>";
+
+?>
+
+
+	
Index: trunk/src/map/index.php
===================================================================
--- trunk/src/map/index.php	(revision 7802)
+++ trunk/src/map/index.php	(revision 7805)
@@ -1,6 +1,7 @@
 <?php 
-require_once("inc/kmlHandler.php");
 require_once("../config.php");
-require_once("inc/node_info_start.php");
+require_once($config['root']."/map/inc/kmlHandler.php");
+require_once($config['root']."/map/inc/node_info_start.php");
+require_once($config['root']."/map/inc/search_node.php");
 
 #getting array from kmlHandler
@@ -29,5 +30,5 @@
 
 <!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
-<script>
+<script type="text/javascript">
 var markers = <?php echo json_encode($markers); ?>;
 </script>
@@ -44,4 +45,5 @@
 <!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
 <script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
+
 </head>
 <body>
@@ -63,24 +65,7 @@
 		<!-- Bottom information space -->
 		<div id="infobottom">
-			<!-- This contains the searchbox of the searchtool, and the send button for it -->
-			<div id="searchbox">
-				<form>
-				<input type="text" name="naam" size="18" maxlength="30"><input type="button" name="knop" value=" > ">
-				</form>
-			</div>
-			<!-- This contains the list of nodes, in future the searchbox will make it possible to filter this list -->
+			<?php searchNodes(); ?>
 			<div id="searchlist">
-				<select multiple>
-					<option value="node1">Node 1 Leiden</option>
-					<option value="node2">Node 2 Leiden</option>
-					<option value="node3">Node 3 Leiden</option>
-					<option value="node4">Node 4 Leiden</option>
-					<option value="node5">Node 5 Leiden</option>
-					<option value="node6">Node 6 Leiden</option>
-					<option value="node7">Node 7 Leiden</option>
-					<option value="node8">Node 8 Leiden</option>
-					<option value="node9">Node 9 Leiden</option>
-					<option value="node10">Node 10 Leiden</option>
-				</select>
+				
 			</div>
 		</div>
