Index: /trunk/src/map/inc/node_info.php
===================================================================
--- /trunk/src/map/inc/node_info.php	(revision 7733)
+++ /trunk/src/map/inc/node_info.php	(revision 7734)
@@ -1,56 +1,116 @@
 <?php
-$view = "";
-
 if(isset($_GET['view']))
 {
+	setcookie("view", $_GET['view']); 
 	$view = $_GET['view'];
 }
 else
 {
-	$view = "gebruiker";
+	if(isset($_COOKIE['view']))
+	{
+		$view = $_COOKIE['view'];
+	}
+	else
+		$view = "gebruiker";
 }
 
-if($view == "beheerder")
+//TYPES van nodes. 'cluster' is een cluster node. 'single' is een individuele node.
+if(!isset($_GET['type']))
 {
 	echo <<<EOF
-	<div id="nodeinfo">
-		<h1>Nodenaam</h1>
-		<h2>
-		Locatie: Oude Adeweg Leiderdorp <br/>
-		Meer info: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		
-		BEHEERDERSVIEW
-		</h2>
-	</div>
-	<div id="timestamp">
-		Laatste update: 15:42 <br/>
-		Do 25 maart
-	</div>
+		<div id="nodeinfo">
+			<b>Mouse over</b> een node voor meer informatie.<br/><br/>
+			<b>Klik</b> op een node om deze te selecteren.<br/><br/>
+			Gebruik de <b>zoekfunctie</b> om de een specifieke node te zoeken.
+		</div>
+		<div id="timestamp">
+			Laatste update: 15:42 <br/>
+			Do 25 maart
+		</div>
 EOF;
+	
 }
-elseif($view == "gebruiker")
+elseif($_GET['type'] == "single")
 {
-	echo <<<EOF
-	<div id="nodeinfo">
-		<h1>Nodenaam</h1>
-		<h2>
-		Locatie: Oude Adeweg Leiderdorp <br/>
-		Meer info: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		>>>>>>: <br/>
-		
-		GEBRUIKERSVIEW
-		</h2>
-	</div>
-	<div id="timestamp">
-		Laatste update: 15:42 <br/>
-		Do 25 maart
-	</div>
+	if($view == "beheerder")
+	{
+		echo <<<EOF
+		<div id="nodeinfo">
+			<h1>Nodenaam</h1>
+			<h2>
+			Locatie: Oude Adeweg Leiderdorp <br/>
+			Meer info: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			
+			BEHEERDERSVIEW
+			</h2>
+		</div>
+		<div id="timestamp">
+			Laatste update: 15:42 <br/>
+			Do 25 maart
+		</div>
 EOF;
-}
+	}
+	elseif($view == "gebruiker")
+	{
+		echo <<<EOF
+		<div id="nodeinfo">
+			<h1>Nodenaam</h1>
+			<h2>
+			Locatie: Oude Adeweg Leiderdorp <br/>
+			Meer info: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			>>>>>>: <br/>
+			
+			GEBRUIKERSVIEW
+			</h2>
+		</div>
+		<div id="timestamp">
+			Laatste update: 15:42 <br/>
+			Do 25 maart
+		</div>
+EOF;
+	}
+}	
+elseif($_GET['type'] == "cluster")
+{
+	if($view == "beheerder")
+	{
+		echo <<<EOF
+		<div id="nodeinfo">
+			<h1>Nodes:</h1>
+			<h2>
+			Lijst met nodes in deze cluster<br/>
+			
+			BEHEERDERSVIEW
+			</h2>
+		</div>
+		<div id="timestamp">
+			Laatste update: 15:42 <br/>
+			Do 25 maart
+		</div>
+EOF;
+	}
+	elseif($view == "gebruiker")
+	{
+		echo <<<EOF
+		<div id="nodeinfo">
+			<h1>Nodes:</h1>
+			<h2>
+			Lijst met nodes in deze cluster<br/>
+			
+			GEBRUIKERSVIEW
+			</h2>
+		</div>
+		<div id="timestamp">
+			Laatste update: 15:42 <br/>
+			Do 25 maart
+		</div>
+EOF;
+	}
+}	
Index: /trunk/src/map/inc/nodemapWL.js
===================================================================
--- /trunk/src/map/inc/nodemapWL.js	(revision 7733)
+++ /trunk/src/map/inc/nodemapWL.js	(revision 7734)
@@ -4,70 +4,109 @@
 var marker_hash = {};
 var markerArray = new Array();
+var xmlhttp;
+var targetDiv = "infotop";
 
-	//This function is called from index.php
-	function initialize_map() {
-	  //We will only do this function if the browser is compatible
-  	  if (GBrowserIsCompatible()) {
-	    //Adding the google map into the div called #mapcanvas
-        map = new GMap2(document.getElementById("mapcanvas"));
-		//Center the map on Leiden
-        map.setCenter(new GLatLng(52.162687, 4.493294), 11); 
-        map.setUIToDefault();
-		
-		//Go through the array 'markers' (Declared in index.php) and add a marker for each marker stored in the array using our addMarker function
-		for (var i=0; i<markers.length; i++) {
-            var current = markers[i];
-            var marker  = addMarker(current, i);
-            marker_hash[current.id] = {marker : marker};
-        }
-		
-		var markerClusterer = new MarkerClusterer(map, markerArray);
-  	  }
-	} 
-	
-	//This function will contain the displaying and not displaying of nodes on the map
-	function toggleMyKml() {
-	
+//This function is called from index.php
+function initialize_map() {
+	//We will only do this function if the browser is compatible
+	if (GBrowserIsCompatible()) {
+	//Adding the google map into the div called #mapcanvas
+	map = new GMap2(document.getElementById("mapcanvas"));
+	//Center the map on Leiden
+	map.setCenter(new GLatLng(52.162687, 4.493294), 11); 
+	map.setUIToDefault();
+
+	//Go through the array 'markers' (Declared in index.php) and add a marker for each marker stored in the array using our addMarker function
+	for (var i=0; i<markers.length; i++) {
+		var current = markers[i];
+		var marker  = addMarker(current, i);
+		marker_hash[current.id] = {marker : marker};
 	}
 	
-	//This function adds a marker with an object from our 'marker'array defined in index.php
-	function addMarker(current, i) {
-	  var id = current.id;
-      var marker  = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: id});
-	  //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map
-      GEvent.addListener(marker, 'mouseover', function() {
-	  mouseOver(current.id, current.name[0]);
-      });
-	  markerArray[i] = marker;
-      return marker;
-    }
+	var markerClusterer = new MarkerClusterer(map, markerArray);
+  }
+} 
+
+//This function will contain the displaying and not displaying of nodes on the map
+function toggleMyKml() {
+
+}
+
+//This function adds a marker with an object from our 'marker'array defined in index.php
+function addMarker(current, i) {
+	var id = current.id;
+	var marker  = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: id});
+	//Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map
+	GEvent.addListener(marker, 'mouseover', function() {
+	mouseOver(current.id, current.name[0]);
+	});
+	markerArray[i] = marker;
+	return marker;
+}
+
+//Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node.
+function mouseOver(id, name)
+{
+	//this.obj = document.getElementById("infotop");
+	loadXMLDoc("inc/node_info.php?type=single")
+	//We will replace this function with a httprequest to a php file in the future
 	
-	//Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node.
-	function mouseOver(id, name)
-	{
-		//For now we only post the id(We made ourself in kmlHandler) and the name of the node
-		this.obj = document.getElementById("infotop");
-		obj.innerHTML = id+" - "+name;
-		//We will replace this function with a httprequest to a php file in the future
-		
-		
-		/*
-		*Hieronder verdergaan met dekking
-		*/
+	
+	/*
+	*Hieronder verdergaan met dekking
+	*/
+}
+
+//Our mouseover function for Cluster nodes. 'markers' is an array containing all markers within the cluster
+function mouseOverCluster(markers)
+{
+	var markerTitles = new Array;
+	for(var i=0; i<markers.length; i++) {
+		markerTitles.push(markers[i].marker.getTitle());
 	}
 	
-	//Our mouseover function for Cluster nodes. 'markers' is an array containing all markers within the cluster
-	function mouseOverCluster(markers)
-	{
-		var markerTitles = new Array;
-		this.obj = document.getElementById("infotop");
-		for(var i=0; i<markers.length; i++) {
-			markerTitles.push(markers[i].marker.getTitle()+"<br/>");
-		}
-		obj.innerHTML = markerTitles;
-		
-		/*
-		*Hieronder verdergaan met dekking
-		*/
-	}
+	loadXMLDoc("inc/node_info.php?type=cluster")
+	/*
+	*Hieronder verdergaan met dekking
+	*/
+}
 
+
+//Code from w3schools. http://www.w3schools.com/dom/dom_http.asp
+function loadXMLDoc(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_Change;
+  xmlhttp.open("GET",url,true);
+  xmlhttp.send(null);
+  }
+else
+  {
+  alert("Your browser does not support XMLHTTP.");
+  }
+}
+
+function state_Change()
+{
+if (xmlhttp.readyState==4)
+  {// 4 = "loaded"
+  if (xmlhttp.status==200)
+    {// 200 = "OK"
+    document.getElementById(targetDiv).innerHTML=xmlhttp.responseText;
+    }
+  else
+    {
+    alert("Problem retrieving data:" + xmlhttp.statusText);
+    }
+  }
+}
