
// QQ空间 reqUrl:本页面地址，title:本页面文字
function QQZone(reqUrl, title, desc, summary, pics) {
    var url = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + encodeURIComponent(reqUrl) + "&title=" + encodeURIComponent(title)+"&desc="+encodeURIComponent(desc)+"&summary="+encodeURIComponent(summary)+"&pics="+encodeURIComponent(pics);
    top.window.open(url, "_blank");
}
// 新浪微博
function WBXinLang(reqUrl, title, pics) {
    var url = "http://service.weibo.com/share/share.php?url=" + encodeURIComponent(reqUrl) + "&title=" + encodeURIComponent(title) +"&pic="+encodeURIComponent(pics);
    top.window.open(url, "_blank");
}
// QQ好友
function QQFriends(reqUrl, title, desc, summary, pics) {
    var url = "http://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(reqUrl) + "&title=" + encodeURIComponent(title)+"&desc="+encodeURIComponent(desc)+"&summary="+encodeURIComponent(summary)+"&pics="+encodeURIComponent(pics);;
    top.window.open(url, "_blank");
}

function share(dest, sharePageURL, shareTitle, shareDesc, shareSummary, sharePic){
	  switch(dest){
	    case 'qz':
	      QQZone(sharePageURL, shareTitle, shareDesc, shareSummary, sharePic);
	      break;
	    case 'wb':
	      WBXinLang(sharePageURL, shareDesc, sharePic);
	      break;
	    case 'qq':
	      QQFriends(sharePageURL, shareTitle, shareDesc, shareSummary, sharePic);
	      break;
	    case 'wx':
	      
	  }	
}