var str_last = document.title.indexOf('_');
if (str_last < 0) {
    str_last = document.title.indexOf('-');
}
var st = document.title;
if (str_last > 0) {
    st = document.title.substring(0, str_last);
}
function renren(s, d, e ,t) {
        if (/renren\.com/.test(d.location))return;
        var f = 'http://share.renren.com/share/buttonshare.do?link=',u = d.location,l = st,p = [e(u),'&title=',e(l)].join('');

        function a() {
            if (!window.open([f,p].join(''), 'xnshare', ['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width - 626) / 2,',top=',(s.height - 436) / 2].join('')))
                u.href = [f,p].join('');
        };
        if (/Firefox/.test(navigator.userAgent))
            setTimeout(a, 0);
        else
            a();
    }
function kaixin(ct){
    var d = document;
    t = d.selection ? (d.selection.type != 'None' ? d.selection.createRange().text : '') : (d.getSelection ? d.getSelection() : '');
    //console.info(escape(d.location.href));
    var kaixin = window.open('http://www.kaixin001.com/repaste/share.php?&rurl=' + escape(d.location.href) + '&rtitle=' + escape(st) + '&rcontent=' + escape(ct), 'kaixin');
    kaixin.focus();
}
function sina(s, d, e, r, l, p, t, z, c) {
        var f = 'http://v.t.sina.com.cn/share/share.php?appkey=',u = z || d.location,p = ['&url=',e(u),'&title=',e(t || st),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c || 'gb2312','&pic=',e(p || '')].join('');

        function a() {
            if (!window.open([f,p].join(''), 'mb', ['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width - 440) / 2,',top=',(s.height - 430) / 2].join('')))
                u.href = [f,p].join('');
        };
        if (/Firefox/.test(navigator.userAgent))setTimeout(a, 0); else a();
}
