function showrecentcomments(json) {
  for (var i = 0; i < numposts; i++) {
    var entry = json.feed.entry[i];
    var posttitle = "";
    var getposturl;
    if (i == json.feed.entry.length) break;
    for (var k = 0; k < entry.link.length; k++) {
      if (entry.link[k].rel == 'alternate') {
        getposturl = entry.link[k].href;
        break;
      }
    }
	var alturl = getposturl;
	   var postlink = alturl.split("?");
	   postlink = postlink[0];
	   var linktext = postlink.split("/");
	   linktext = linktext[5];
	   linktext = linktext.split(".html");
	   linktext = linktext[0];
	   var posttitle = linktext.replace(/-/g," ");
	var tempurl = getposturl;
	   var templink = tempurl.split("?showComment");
	   templink = templink[0];
	   posturl = templink;
	   posturl = posturl + '#comments';
           var authorurl = "";
	if ( entry.author[0].uri ) {
	   authorurl = entry.author[0].uri.$t;
        }
    var postdate = entry.published.$t;
	   var year = postdate.substring(0,4);
	   var month = postdate.substring(5,7);
	   var day = postdate.substring(8,10);
	   var monthnames = new Array();
	   monthnames[1] = "Jan";
	   monthnames[2] = "Feb";
	   monthnames[3] = "Mar";
	   monthnames[4] = "Apr";
	   monthnames[5] = "May";
	   monthnames[6] = "Jun";
	   monthnames[7] = "Jul";
	   monthnames[8] = "Aug";
	   monthnames[9] = "Sep";
	   monthnames[10] = "Oct";
	   monthnames[11] = "Nov";
	   monthnames[12] = "Dec";
    var postauthor = entry.author[0].name.$t;
    if ("content" in entry) {
      var postcontent = entry.content.$t;}
    else
    if ("summary" in entry) {
      var postcontent = entry.summary.$t;}
    else var postcontent = "";
    var re = /<\S[^>]*>/g; 
    postcontent = postcontent.replace(re, "");
    if (postcontent.length > numchars) postcontent = postcontent.substring(0,numchars);
    if (showcommentdate == true) document.write('On '+ monthnames[parseInt(month,10)] + ' ' + day + ' - ');
    if (authorurl != "" ) document.write('<a href="' + authorurl + '"><b>' + postauthor + '</b></a>' + ' Commented ');
    else document.write('<b>' + postauthor + '</b> Commented ');
	if (showposttitle == true) document.write('on : ' + '<a href="'+ posturl +'">' + posttitle + '</a>');
	document.write(' - "<i>'+ postcontent + '...</i>"<br/>');
	document.write('<br/>');
  }
    document.write('<div style="font-size:70%;text-align:center"><a href="http://10thbatch.via.my">http://10thbatch.via.my</a></div>')
}