﻿// wwwins Share

function wshare(m, sid, type, dt, loc, artist) {
  var u = 'http://www.hvsop.cn/artistry/mixingmusic.aspx?sid=' + sid;
  var t = '', c = '';  
  if (type == 1)
  {
    t = '我们' + dt + '一起去看' + artist + '在' + loc + '的演出吧！感受现场劲爆炫酷音乐，还有机会获得轩尼诗VSOP特饮哦！了解更多轩尼诗炫音之乐活动详情请登陆http://www.hvsop.cn或在新浪微博关注@HennessyArtistry';
    c = t;
  }
  else if (type == 2)
  {
    t = '我找到啦！' + artist + dt + '在' + loc + '轩尼诗炫音之乐派对的现场表演，超级 high！还有很多花絮！快看这里http://www.hvsop.cn或在新浪微博关注@HennessyArtistry';
    c = t;  
  }
	// var t = 'Hennessy V.S.O.P';
	// var c = 'Hennessy V.S.O.P';
	if (m == 1) rr(screen, document, encodeURIComponent, u);
	else if (m == 2) ow('http://www.kaixin001.com/repaste/share.php?rtitle=' + encodeURI(t) + '&rurl=' + encodeURI(u) + '&rcontent=' + encodeURIComponent(c), '分享', 600, 450);
	else if (m == 3) toT(screen, document, encodeURIComponent, c, u, '', t, u, null);
	else if (m == 4) ow('http://apps.hi.baidu.com/share/?url=' + encodeURI(u) + '&title=' + encodeURI(t) + '&content=' + encodeURI(c), '分享', 800, 550);
}
function ow(u, t, w, h ) {
	var s = 'toolbar=no,scrollbars=no,width=' + w + ',height=' + h + ',left=' + (window.screen.width - w) / 2 + ',top=' + (window.screen.height - h) / 2 + ',status=no,resizable=yes';
	window.open(u, t, s);
}
function toT(s, d, e, r, l, pic, t, z, c) {
	var f = 'http://v.t.sina.com.cn/share/share.php?', u = z || d, p = ['url=', e(u), '&title=', e(t), '&source=', e(r), '&sourceUrl=', e(l), '&content=', c || 'gb2312', '&pic=', e(pic)].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();
}
function rr(s, d, e, url) {
	if (/renren\.com/.test(d.location)) return;
	var f = 'http://share.renren.com/share/buttonshare?link=', u = url, l = 'VSOP', 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();
}

