<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Silicon Valley Venture Capital" 
                description="Map of recent Silicon Valley venture capital deals"
                author="silicontap.com"
                author_email="info@silicontap.com" 
                screenshot = "http://www.silicontap.com/images/maplet.jpg"
                thumbnail = "http://www.silicontap.com/images/maplet_thumb.jpg"
                author_location = "Westlake Village, California"
                author_affiliation = "SOCALTECH LLC"
                title_url = "http://www.silicontap.com"
                height="150">
<Require feature="sharedmap"/>
</ModulePrefs>
<Content type="html"><![CDATA[
<a href="http://www.silicontap.com"><img src="http://www.silicontap.com/images/silicontap.gif" border="0"></a><br>
<H3>Recent Silicon Valley Venture Capital Deals</H3>
Click on the icons to see details of the funding (date, amount), or to see a complete profile of the company on <a href="http://www.silicontap.com">silicontap.com</a>.
<script>
    var map = new GMap2();
    map.setCenter(new GLatLng(37.58,-122.18),9);
    
    var baseIcon = new GIcon();
    baseIcon.image = "http://www.google.com/mapfiles/marker.png";
    baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
    baseIcon.iconSize = new GSize(12, 20);
    baseIcon.shadowSize = new GSize(22, 20);
    baseIcon.iconAnchor = new GPoint(6, 20);
    baseIcon.infoWindowAnchor = new GPoint(5,20);


    function createMarker(point, infotext, round, amount, funddate, id) {
      var letter = String.fromCharCode("A".charCodeAt(0) + (round - 1));
      if (round == 0) letter = "";
      var icon1 = new GIcon(baseIcon);
      icon1.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
      var marker = new GMarker(point, icon1);
      GEvent.addListener(marker, "click", function() {
          var textline = "<b>" + infotext + "</b><br><small>Funding amount: $" + amount +
           "M<br>Date: " + funddate + 
           "<br><a href=\"http://www.silicontap.com/search/?words=" + infotext + "\">Search news</a><br><a href=\"http://www.silicontap.com/intelligence/?id=" + id + "\">Profile</a> (subscription)</small>";
          marker.openInfoWindowHtml(textline);
      });
     return marker;
   }

var url = "http://www.silicontap.com/map/getmap2.pl?round=1000";
_IG_FetchXmlContent(url, function(response) {
  var points = response.getElementsByTagName("marker");

  for (var i = 0; i < points.length; i++) {
    var point = points.item(i);
    var lat  = point.getAttribute("lat");
    var lng  = point.getAttribute("lng");
    var amount = point.getAttribute("amount");
    var funddate = point.getAttribute("date");
    var round = point.getAttribute("round");
    var id = point.getAttribute("id");
    var latlng = new GLatLng(lat, lng);

    if (point.firstChild) {
      var info = point.firstChild.nodeValue;
      var marker = createMarker(latlng, info, round, amount, funddate, id);
      map.addOverlay(marker);
    }
  }

});


</script>

]]></Content>
</Module>
