function createTA_POISummary(ta_pois, pois, props) {

	var width="275";

	var container = document.getElementById('ta_poi_summary');

	if (container) {

	container.style.visibility = 'visible';

	var h = '';

	var bgcolor="#ffffff";

	for (var j = 0; j < props.length; j++) {

		h += '<table cellspcing="0" cellpadding="0" width="' + width + '" style="text-align: left; font-size: 12px; font-family: verdana; background: #000000;">';

		h += '<tr id="' + j + '" onMouseOver="hideAll(); document.getElementById(\'LISTING_\' + this.id).style.visibility = \'visible\';" style="background: #f0f0f0"><td align="center" colspan="3" class="ta_poi_small"><b>Distance from<br>' + cleanString(props[j].getAttribute('L_LISTINGADDR1')) + '</b></td></tr></table>';

		h += '<table width="' + width + '" cellspacing="1" cellpadding="2" id="myTable' + j + '" style="text-align: left; font-size: 12px; font-family: verdana; background: #000000;">';

	
		h += '<thead style="cursor: pointer;"><tr style="background: #c0c0c0"><td></td><td align="center" class="ta_poi_small">Name</td><td align="center" class="ta_poi_small">Distance (in miles)</td></thead>';
 
		h += '<tbody>';

		var r ="r1";

		for (var i = 0; i < ta_pois.length; i++) {
			
			h += '<tr id="' + i + '" onMouseOver="hideAll();  document.getElementById(\'TA_POI_\' + this.id).style.visibility = \'visible\';" style="background: #f0f0f0">';

			h += '<td><span class="ta_poi_small"><img src="' + icons + cleanString(ta_pois[i].getAttribute('icon')) + '.png" width="15"></span></td>';

			h += '<td><span class="ta_poi_small">' + cleanString(ta_pois[i].getAttribute('STD_NAME')) + '</span></td>';

			h += '<td><span class="ta_poi_small">' + distance(ta_pois[i].getAttribute('LAT'), ta_pois[i].getAttribute('LON'), props[j].getAttribute('LL_RES_LAT'), props[j].getAttribute('LL_RES_LONG')) + '</span></td>';

			h += '</tr>';
	
		}

		for (var i = 0; i < pois.length; i++) {

                        h += '<tr id="' + i + '" onMouseOver="hideAll();  document.getElementById(\'POI_\' + this.id).style.visibility = \'visible\';" bgcolor="' + bgcolor + '">';

                        h += '<td><span class="ta_poi_small"><img src="images/' + cleanString(pois[i].getAttribute('ds_icon')) + '" width="15"></span></td>';

                        h += '<td><span class="ta_poi_small">' + cleanString(pois[i].getAttribute('ds_text1')) + '</span></td>';

                        h += '<td><span class="ta_poi_small">' + distance(pois[i].getAttribute('ds_lat'), pois[i].getAttribute('ds_long'), props[j].getAttribute('LL_RES_LAT'), props[j].getAttribute('LL_RES_LONG')) + '</span></td>';

                        h += '</tr>';

		}

		h += '</tbody>';
	
		h += '</table><br><br>';
	
	}

	container.style.visibility = 'visible';
	container.innerHTML = h;

		for (var i =0; i < props.length; i++) {
			var myTable = document.getElementById('myTable' + i);
			var t = new SortableTable(myTable, 100);
			if (t.tbody[0].rows[1]) {
				t.sort(t.thead[0].rows[0].cells[2]);
			}
		}
	}
}

function clearTA_POISummary() {

	var s = document.getElementById('ta_poi_summary');

	if (s) {
		s.style.visibility = 'hidden';
	}
}


