function shareToPlatform(tag, title, description, url) {
	var _title = (title == undefined) ? document.title : title;
	var _description = (description == undefined) ? '' : description;
	var _url = (url == undefined) ? document.location.href : url;
    
	if (tag == "weibo.com") {
		void((function(s, d, e) {
			try {
			} catch (e) {
			}
			var f = 'http://v.t.sina.com.cn/share/share.php?', u = _url, p = [
					'url=', e(u), '&title=', e(_title), '&appkey=' ]
					.join('');
			function a() {
				if (!window.open(
								[ f, p ].join(''),
								'mb',
								[	'toolbar=0,status=0,resizable=1,width=620,height=450,left=',
									(s.width - 620) / 2, ',top=',
									(s.height - 450) / 2 ].join('')))
								u.href = [ f, p ].join('');
			};
			if (/Firefox/.test(navigator.userAgent)) {
				setTimeout(a, 0);
			} else {
				a();
			}
		})(screen, document, encodeURIComponent));
	} else if (tag == "renren.com") {
		void((function(s, d, e) {
			if (/renren\.com/.test(_url))
				return;
		 
			var f = 'http://share.renren.com/share/buttonshare.do?link=', u = _url, l = _title, 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();
			})(screen, document, encodeURIComponent));
	} else if (tag == "kaixin001.com") {
		var kw = window.open(
								'',
								'kaixin001',
								'toolbar=no,titlebar=no,status=no,menubar=no,scrollbars=no,location:no,directories:no,width=570,height=350,left='
								+ (screen.width - 570) / 2
								+ ',top='
								+ (screen.height - 420) / 2);
		var tempForm = kw.document.createElement('form');
		function openPostWindow(url, data, name) {
			var tempForm = document.createElement('form');
			tempForm.id = 'tempForm1';
			tempForm.method = 'post';
			tempForm.action = url;
			tempForm.target = 'kaixin001';
			var hideInput = document.createElement('input');
			hideInput.type = 'hidden';
			hideInput.name = 'rcontent';
			hideInput.value = data;
			tempForm.appendChild(hideInput);
			document.body.appendChild(tempForm);
			tempForm.submit();
			document.body.removeChild(tempForm);
		}
		function add2Kaixin001() {
			var u = _url;
			var t = _title;
			var c = '' + _description;
			var iframec = '';
			var url = 'http://www.kaixin001.com/repaste/bshare.php?rtitle='
					+ encodeURIComponent(t) + '&rurl=' + encodeURIComponent(u)
					+ '&from=maxthon';
			var data = encodeURIComponent(c);
			openPostWindow(url, c, '_blank')
		}
		add2Kaixin001();
	} else if (tag == "qzone.qq.com") {
		window.open(
				'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(_url), 'qzone',
				'toolbar=0,status=0,width=900,height=550,left='
				+ (screen.width - 900) / 2 + ',top='
				+ (screen.height - 550) / 2);
	} else if (tag == "facebook.com") {
		window.open(
				'http://www.facebook.com/sharer.php?u='+ encodeURIComponent(_url) + '&t=' + encodeURIComponent(_title), 
				'sharer', 
				'toolbar=0,status=0,width=626,height=436');
	} 
	
	return false;
}
