postids = ["999", "1000", "1001", "1005", "1008", ""]; counts = ["1", "3", "4", "1", "2", ""]; start = 0; end = 6; function commentCounter (postid) { for (i = start; i < end; i++) { if (postids[i] == postid) { document.write (counts[i]); return } } document.write ("0"); return } tbpostids = ["993", "1003", ""]; tbcounts = ["309", "2", ""]; tbstart = 0; tbend = 3; function trackbackCounter (postid) { for (i = tbstart; i < tbend; i++) { if (tbpostids[i] == postid) { document.write (tbcounts[i]); return } } document.write ("0"); return }