function ShareCode(server_url, server_icon_url,text){
    var title = encodeURIComponent(encodeURI(document.title));
    var url = encodeURIComponent(location.href);

if(navigator.appName.indexOf("Explorer")>-1)
var title=encodeURIComponent(document.getElementById("ssjg").innerText);
else
var title=encodeURIComponent(document.getElementById("ssjg").textContent);


    server_url = server_url.replace("{title}",title);
    server_url = server_url.replace("{url}",url);
    return "<a href=\"#\" onclick=\"javascript:window.open('" 
    + server_url 
    +"',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\');\" style=\"\" mce_style=\" color:#000000;text-decoration:none;font-size:12px;font-weight:normal\"><SPAN style=\"\" mce_style=\"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 2px; CURSOR: pointer; PADDING-TOP: 5px\">"
	+"<IMG height=\"18\" alt=\""
    + text + "\" src=\""+server_icon_url+"\" mce_src=\""
    + server_icon_url 
    + "\" align=absMiddle border=0>&nbsp;" 
    + text + "</SPAN></a>";
}

function ShareCodeqq(server_url, server_icon_url,text){


   var title = encodeURIComponent(document.title);
   var url = encodeURIComponent(location.href);

if(navigator.appName.indexOf("Explorer")>-1)
var title=encodeURIComponent(document.getElementById("ssjg").innerText);
else
var title=encodeURIComponent(document.getElementById("ssjg").textContent);

    server_url = server_url.replace("{title}",title);
    server_url = server_url.replace("{url}",url);
    return "<a href=\"#\" onclick=\"javascript:window.open('" 
    + server_url 
    +"',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\');\" style=\"\" mce_style=\" color:#000000;text-decoration:none;font-size:12px;font-weight:normal\"><SPAN style=\"\" mce_style=\"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 2px; CURSOR: pointer; PADDING-TOP: 5px\">"
	+"<IMG height=\"18\" alt=\""
    + text + "\" src=\""+server_icon_url+"\" mce_src=\""
    + server_icon_url 
    + "\" align=absMiddle border=0>&nbsp;" 
    + text + "</SPAN></a>";
}

function WriteSNS()
{
    document.writeln("<div id=\"socialbookmark\">");
    document.writeln(ShareCodeqq("http://share.v.t.qq.com/index.php?c=share&a=index&title={title}&url={url}",
    "http://v.t.qq.com/share/images/s/weiboicon16.png",
    "转帖腾讯微博"));

    document.writeln(ShareCode("http://v.t.sina.com.cn/share/share.php?title={title}&url={url}",
    "http://t.sina.com.cn/favicon.ico",
    "转发到新浪微博"));
        
    document.writeln(ShareCode("http://www.douban.com/recommend/?url={url}&title={title}",
    "http://t.douban.com/favicon.ico",
    "推荐到豆瓣"));
    
    document.writeln(ShareCode("http://apps.hi.baidu.com/share/?title={title}&url={url}",
    "http://www.baidu.com/favicon.ico",
    "转帖到百度空间"));
    
    
    document.writeln(ShareCode("http://www.kaixin001.com/repaste/share.php?rtitle={title}&rurl={url}",
    "http://img1.kaixin001.com.cn/i/favicon.ico",
    "转贴到开心网"));
    
    document.writeln(ShareCode("http://share.renren.com/share/buttonshare.do?title={title}&link={url}",
    "http://s.xnimg.cn/favicon-rr.ico?ver=3",
    "转帖到人人网"));
    
    document.writeln("</div>");
};
