

	var map;

    function initialize(lat,long) {
      	if (GBrowserIsCompatible()) {       
        	map = new GMap2(document.getElementById("map_canvas"));
        	map.setCenter(new GLatLng(lat, long), 1, G_HYBRID_MAP);       
        	map.setUIToDefault();
      	}
    }
    
    function addPoint(clientLatitude,clientLongitude,clientName,clientCity,clientState,
    	clientCountry,clientIndustry,clientUrl,clientId,quote,sig) {

			var point = new GLatLng(clientLatitude,clientLongitude);

		    var iconDBDOC = new GIcon(); 
			if (quote == '') {
			    iconDBDOC.image = 'images/pushpin-blue.png';
		    	iconDBDOC.iconSize = new GSize(12, 20);
			}
			else {
			    iconDBDOC.image = 'images/testimonials.gif';
		    	iconDBDOC.iconSize = new GSize(20, 20);
			}
		    iconDBDOC.iconAnchor = new GPoint(11, 30);
		    iconDBDOC.infoWindowAnchor = new GPoint(20, 0);


			/// TODO -- Set the icon image/color here
			var options = { 
				title: clientName,
				clickable: true,
				icon: iconDBDOC
			};
			
			var marker = new GMarker(point,options);			
			
			map.addOverlay(marker);

			// Adding a click event to the marker
	
			var temp = new Array();
			temp = clientName.split(' - ');
			if (temp.length == 2) {
				clientName = temp[0] + ', ' + temp[1];
			}
			else {
				temp = clientName.split('- ');
				if (temp.length == 2) {
					clientName = temp[0] + ', ' + temp[1];
				}
			}
			
			var clientLocation = '';
			if (clientState) {
				clientLocation = clientCity + ', ' +clientState + ', ' + clientCountry;
			}
			else {
				clientLocation = clientCity +  ', ' + clientCountry;
			}

			var clientTitle = '';
			if (clientUrl) {
				clientTitle = '<b><a href=\"' +clientUrl+ '\" target=\"_blank\">' + clientName + '</a></b>';
			}
			else {
				clientTitle = '<b>' + clientName + '</b>';
			}
	
			if (quote == '') {

			marker.bindInfoWindowHtml('<html><head><title>TITLE</title>'
				+ '</head>' 
				+ '<body>'
				+ '<table class=noborder><tr><td>'
				+ '<img src=\"images/dbdoc-computer.gif\" width=50>'
				+ '</td><td>'
//				+ '<b><a href=\"' +clientUrl+ '\" target=\"_blank\">' + clientName + '</a></b><br>'
				+ clientTitle + '<br>'
// TEMP adds CLIENTID	+ '<b><a href=\"' +clientUrl+ '\" target=\"_blank\">' + clientId + ': ' + clientName + '</a></b><br>'
				+ clientLocation + '<br>'
				+ 'Industry: ' + clientIndustry + '<br>'
				+ '</td>'
				+ '</tr></table>'
				+ '</body></html>');
				
			}
			else {
			marker.bindInfoWindowHtml('<html><head><title>TITLE</title>'
				+ '</head>' 
				+ '<body>'
				+ '<table class=noborder><tr><td>'
				+ '<img src=\"images/dbdoc-computer.gif\" width=50>'
				+ '</td><td>'
//				+ '<b><a href=\"' +clientUrl+ '\" target=\"_blank\">' + clientName + '</a></b><br>'
				+ clientTitle + '<br>'
// TEMP adds CLIENTID	+ '<b><a href=\"' +clientUrl+ '\" target=\"_blank\">' + clientId + ': ' + clientName + '</a></b><br>'
				+ clientLocation + '<br>'
				+ 'Industry: ' + clientIndustry + '<br>'
				+ '<table class=noborder width=200><tr>'
				+ '<td><p class=map-quote>'
				+ quote
				+ '</p><p class=map-sig>'
				+ sig 
				+ '</p></td>'
				+ '</tr></table>' 
				+ '</td>'
				+ '</tr></table>'
				+ '</body></html>');
			}

    }
    
    

