// Beautiful Beta Javascript Library
// -------------------------------------------
// Version: 1.04
// Date: 2006-12-21
//Website: http://release-revolution.blogspot.com/
//Credits:Credits for the logic of this module goes to HANS of http://beautifulbeta.blogspot.com/
// -------------------------------------------

function showsbtext(id,index) {
var bookmarktext=document.getElementById(id);
var sbValues= new Array();
  sbValues[0] = 'Bookmark this post<a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[1] = 'Add to <strong>StumpleUpon</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[2] = 'Add to <strong>Diigo</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[3] = 'Add to <strong>Digg</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[4] = 'Add to <strong>Delicious</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[5] = 'Add to <strong>Blinklist</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[6] = 'Add to <strong>Yahoo Web</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[7] = 'Add to <strong>Furl</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[8] = 'Add to <strong>Technorati</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[9] = 'Add to <strong>Simpy</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[10] = 'Add to <strong>Spurl</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[11] = 'Add to <strong>Reddit</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[12] = 'Add to <strong>Google</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[13] = 'Add to <strong>Blogmarks</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[14] = 'Add to <strong>Zapface</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[15] = 'Add to <strong>Scoopeo</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[16] = 'Add to <strong>wikio.com</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[17] = 'Add to <strong>Bluegger</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[18] = 'Add to <strong>Blogmemes</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[19] = 'Add to <strong>Pioche</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[20] = 'Add to <strong>Fuzz</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[21] = 'Add to <strong>Tapemoi</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[22] = 'Add to <strong>Wikio.fr</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[23] = 'Add to <strong>Diggons</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[24] = 'Add to <strong>Nuouz</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[25] = 'Add to <strong>Netvibes</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[26] = 'Add to <strong>Additious</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[27] = 'Add to <strong>Facebook</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[28] = 'Add to <strong>MySpace</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[29] = 'Add to <strong>Tumblr</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[30] = 'Add to <strong>TwitThis</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[31] = 'Add to <strong>Gmiix</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[32] = 'Add to <strong>Delirious</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[33] = 'Add to <strong>Live</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[34] = 'Add to <strong>Faves</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[35] = 'Add to <strong>Sphinn</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[36] = 'Add to <strong>Mixx</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[37] = 'Add to <strong>Propeller</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[38] = 'Add to <strong>Blogasty</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[39] = 'Add to <strong>Viadeo</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[40] = 'Add to <strong>PsychoRing</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[41] = 'Add to <strong>Newswine</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[42] = 'Add to <strong>Slashdot</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[43] = 'Add to <strong>eSocialWeb</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[44] = 'Add to <strong>Folkd</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';
  sbValues[45] = 'Add to <strong>TUTMarks</strong><a STYLE="text-decoration:none"  href="http://release-revolution.blogspot.com">:</a>';

document.getElementById(bookmarktext.id).innerHTML = sbValues[index];
}

function getPostTitle(fullpath) {
var splitinput = fullpath.split("/");
var lastpart = splitinput[5];
var linktext = lastpart.split(".html");
var postlink = fullpath.split("#");
var outputstring = linktext[0].replace(/-/g," ");
outputstring = "\"" + outputstring + "\"";
outputstring = outputstring.link(postlink[0]);
document.write(outputstring);
return;
}

function getCommentLink(clink) {
var splitinput = clink.split("#");
var commentlink = splitinput[0];
commentlink = commentlink.concat("#comment-",splitinput[1]);
var outputstring = "(more)";
outputstring= outputstring.link(commentlink);
document.write(outputstring);
}

function showrecentcomments(json) {
  for (var i = 0; i < numcomments; i++) {
    var entry = json.feed.entry[i];
    var alturl;

    if (i == json.feed.entry.length) break;
    for (var k = 0; k < entry.link.length; k++) {
      if (entry.link[k].rel == 'alternate') {
        alturl = entry.link[k].href;
        break;
      }
    }
   alturl = alturl.replace("#", "#comment-");
   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," ");
   posttitle = posttitle.link(postlink);
   var commentdate = entry.published.$t;
   var cdyear = commentdate.substring(0,4);
   var cdmonth = commentdate.substring(5,7);
   var cdday = commentdate.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 comment = entry.content.$t;
   var re = /<\S[^>]*>/g; 
   comment = comment.replace(re, "");
   if (showcommentdate == true) document.write('On ' + monthnames[parseInt(cdmonth,10)] + ' ' + cdday + ' ');
   document.write('<a STYLE="text-decoration:none"  href="' + alturl + '">' + entry.author[0].name.$t + '</a> commented');
   if (showposttitle == true) document.write(' on ' + posttitle);
   document.write(':<br/>');
   if (comment.length < numchars)
         document.write('<i>' + comment + '</i><br/><br/>');
   else
         document.write('<i>'+ comment.substring(0, numchars) + '...</i><br/><br/>');
  }
}

