title: How to show stars inside a Google Map callout box?
body: <p><strong>Expected</strong>: See 1-5 stars in Google Maps callout box<br>
  <strong>Actual</strong>: Page blinks and shows only a long list of stars on the top of the page.  </p>
  
  <p>I suspect I shouldn't be using document.write?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
  
      &lt;script type="text/javascript"&gt;
  
      //some Google Maps API code
  
           function showstar(x)
         {
          var i = 0;
          while (i &lt; x)
          {
           document.write("&lt;img src=\"img/star.gif\" width=\"15\" height=\"15\" /&gt;");
           i++;
          }
         }
  
         var html = "Review stars: " showstar(star)
  
         GEvent.addListener(marker, 'click', function() {
            marker.openInfoWindowHtml(html);
            });
            return marker;
          }
  
        &lt;/script&gt;
      &lt;/head&gt;
  
        &lt;body onload="load()" onunload="GUnload()"&gt;
          &lt;div id="map" style="width: 700px; height: 500px"&gt;&lt;/div&gt;
        &lt;/body&gt;
  
      &lt;/html&gt;
  </code></pre>