// JavaScript Document function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'; html += '

You ccould also try:

'; html += '

Increasing the search Radius.

'; html += '

Clicking "Show all SubAgents" to view all Diabetes-act subAgents.

'; sidebar.innerHTML = html; return; } var bounds = new GLatLngBounds(); for (var i = 0; i < markers.length; i++){ var name = markers[i].getAttribute('name'); var address = markers[i].getAttribute('address'); var phone = markers[i].getAttribute('phone'); var fax = markers[i].getAttribute('fax'); var owners = markers[i].getAttribute('owners'); var img = markers[i].getAttribute('img'); var distance = parseFloat(markers[i].getAttribute('distance')); var point = new GLatLng(parseFloat(markers[i].getAttribute('latitude')), parseFloat(markers[i].getAttribute('longitude'))); var marker = createMarker(point, name, address, phone, fax, owners, img); map.addOverlay(marker); var sidebarEntry = createSidebarEntry(marker, distance, name, address); sidebar.appendChild(sidebarEntry); bounds.extend(point); } map.setCenter(bounds.getCenter(), (map.getBoundsZoomLevel(bounds))); //alert(bounds); }); } function createMarker(point, name, address, phone, fax, owners, img){ var marker = new GMarker(point); var html = ''; html += '' + name + '
'; html += address + '

'; if(img){ html += '

'; } if(phone){ html += 'Tel: ' + phone + '
'; } if(fax){ html += 'Fax: ' + fax + '
'; } html += '
'; if(owners){ html += 'Store Owners: ' + owners; } html += '
'; if(GEvent.addListener(marker, 'click', function(){ var opts = {maxWidth:100}; marker.openInfoWindowHtml(html, opts); })); return marker; } function createSidebarEntry(marker, distance, name, address){ var div = document.createElement('div'); var html = '' + name + ''; if(distance){ html += ' (' + distance.toFixed(1) + ' km)'; } html += '
' + address; div.innerHTML = html; div.style.cursor = 'pointer'; div.style.marginBottom = '5px'; GEvent.addDomListener(div, 'click', function() { GEvent.trigger(marker, 'click'); }); GEvent.addDomListener(div, 'mouseover', function() { div.style.backgroundColor = '#fffa73'; }); GEvent.addDomListener(div, 'mouseout', function() { div.style.backgroundColor = '#ffffff'; }); return div; } var goBlank="";