var ccount={'1':{c:227,u:227},'2':{c:1025,u:1024},'3':{c:928,u:927},'4':{c:1017,u:1016},'5':{c:1048,u:1048},'6':{c:1076,u:1075},'7':{c:1057,u:1056},'8':{c:1033,u:1032},'9':{c:1070,u:1069},'10':{c:886,u:885},'11':{c:956,u:956},'12':{c:956,u:955},'13':{c:926,u:925},'14':{c:927,u:926},'15':{c:6705,u:6456},'17':{c:888,u:887},'18':{c:952,u:951},'19':{c:1142,u:1142},'20':{c:873,u:872},'21':{c:857,u:856},'22':{c:2209,u:2087},'23':{c:885,u:884},'24':{c:886,u:885},'25':{c:924,u:923},'26':{c:868,u:860},'27':{c:1060,u:1026},'28':{c:787,u:786},'':{}}; function ccount_display(id) { document.write(ccount[id]['c'].formatThousands('US')); } function ccount_unique(id) { document.write(ccount[id]['u'].formatThousands('US')); } Number.prototype.formatThousands = function(notation) { var n = this, separator = ""; switch (notation) { case "US": separator = ","; break; case "UK": separator = "."; break; case "FR": separator = " "; break; default: return n; } n = parseInt(n) + ""; j = (j = n.length) > 3 ? j % 3 : 0; return (j ? n.substr(0, j) + separator : "") + n.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + separator); }