Get one script to cycle through multiple variables
<p>I have a page that rates the top 15 websites one the web (from Alexa), and it uses javascript to write the new ratings, but this is very inefficient. There are 6 variables for each rating. And it writes one code block for each rating, using the variables. Is there a way to just make it use one code block to write all 15 of the ratings? Here is some code:</p>

<pre><code>var topID1 = 1;
var topWidth1 = 100;
var topPageURL1 = 'www.google.com'
var topPageTitle1 = 'Google';
var topRate1 = rateStar9;
var topMargin1 = 0;

$('#topSites1').html('&lt;div class="meter-wrap" style="margin-top: ' + topMargin1 + 'px;"&gt;&lt;div class="meter-value" style="background-color: ' + topSitesBack + '; width: ' + topWidth1 + '%;"&gt;&lt;div class="meter-text"&gt;&lt;span class="toplist"&gt;&lt;span class="topnum"&gt;' + topID1 + '. &lt;/span&gt;&lt;span class="favico" id="ico1"&gt;&lt;img src="img/blank.gif" style="width:16px;height:16px;"&gt;&lt;/img&gt;&lt;/span&gt;&lt;a href="http://' + topPageURL1 + '/"&gt;' + topPageTitle1 + '&lt;/a&gt;&lt;span class="rating" style="width: ' + topRate1 + 'px;"&gt;&lt;img src="img/blank.gif" style="width:100%;height:16px;"&gt;&lt;/img&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');
$('#ico1').css('background', 'url(' + topPageFavicon + topPageURL1 + ') no-repeat');
</code></pre>

<p>(repeat both 15 times)</p>
