function fnPopulateCategory() {
	if (GBrowserIsCompatible()) {

		// check to see if the category has an override zoom specified
		if (arCategory[categorySelected][2]) {
			inZoom = arCategory[categorySelected][2];
		} else {
			inZoom = defaultZoom;
		}
		
		URLicon = "images/icons/" + arCategory[categorySelected][1] +  ".png";


		// setup the map
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(51.502, -0.02), inZoom);
		map.enableDoubleClickZoom();
		map.enableContinuousZoom();

		// choose the correct color coded marker
		var icon = new GIcon();
		icon.image = URLicon;
		icon.shadow = "images/icons/shadow.png";
		icon.iconSize = new GSize(12, 20);
		icon.shadowSize = new GSize(22, 20);
		icon.iconAnchor = new GPoint(6, 20);
		icon.infoWindowAnchor = new GPoint(5, 1);

		// build name and description from array
		for (var i=0; i<arItems[categorySelected].length; i++) {

			var elementSelected = i;

			// collate date for map infoWindow
			var name = arItems[categorySelected][elementSelected][0];
			var latitude = arItems[categorySelected][elementSelected]["latitude"];
			var longitude = arItems[categorySelected][elementSelected]["longitude"];
			var URLicon = "images/markers/" + arCategory[categorySelected][1] +  ".png";

			// build flattened strings from description array
			var stDescription = "";

			// add the featured image and link if present
			if (arItems[categorySelected][elementSelected]["id"]) {
				stDescription = '<div style="width:175px; float:left; margin-top:5px;"><p style="line-height: 100%; cursor:pointer;"><a href="food/'+arItems[categorySelected][elementSelected]["id"]+'.htm" style="color:#666; font-weight:bold; text-decoration:none; font-family:Verdana, Arial, Helvetica, sans-serif; padding:0;"><span style="display:block; width:161px; height:75px; background: #CCC url(images/thm_video.gif); margin-bottom:0;"><img alt="" src="images/restaurant/'+arItems[categorySelected][elementSelected]["id"]+'.jpg" style="border:0; padding:1px; margin:0;" /></span><span style="display:block; font-size:80%; background: #EEE; width: 155px; margin:0; padding:2px; text-align: center; border: 1px solid #999; border-top:0;" class="videoLink">click for details</span></a></p></div>';
			}

			stDescription = stDescription + '<div style="width:150px; float:left; padding-top:10px;">';
			for (var j=0; j<arItems[categorySelected][elementSelected]["arDescription"].length; j++) {
				stDescription = stDescription + '<p style="margin:0; padding:0;">' + arItems[categorySelected][elementSelected]["arDescription"][j] + '</p>';
			}
			
			// add phone number if possible
			if (arItems[categorySelected][elementSelected]["telephone"]) {
				stDescription = stDescription + '<p style="margin:5px 0 0 0; padding:0;">' + arItems[categorySelected][elementSelected]["telephone"]+'</p>';
			}
			
			// add web detail if flagged as possible on this category
			if (arCategory[categorySelected][3] && arItems[categorySelected][elementSelected]["web"]) {
				stDescription = stDescription + '<p style="margin:0; padding:5px 0 0 0; font-size: 80%;"><a href="http://'+arItems[categorySelected][elementSelected]["web"]+'" style="cursor:pointer;">'+arItems[categorySelected][elementSelected]["web"]+'</a></p>';
			}

			stDescription = stDescription + '</div>';



			// create a wider infowindow if featured content
			if (arItems[categorySelected][elementSelected]["id"]) {
				var stContent = '<div style="width:325px;" class="ItemInfoWindow"><h3 style="margin:0 0 2px 0; padding:0; width:auto;">'+name+'</h3>'+stDescription+'</div>'
			} else {
				var stContent = '<div style="width:150px;" class="ItemInfoWindow"><h3 style="margin:0 0 2px 0; padding:0; width:auto;">'+name+'</h3>'+stDescription+'</div>'
			}

			var point = new GLatLng(latitude,longitude);
			map.addOverlay(createMarker(point, icon, stContent));
			
		}
	}
}
