﻿var u = location.href;
var t = document.title;
function fb() { window.open('https://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t)); return false; }
function fb1(url, tit) { location.href = 'https://www.facebook.com/sharer.php?u=' + encodeURIComponent(url) + '&t=' + encodeURIComponent(tit); return false; }
function fb2(url, tit) { window.open('https://www.facebook.com/sharer.php?u=' + encodeURIComponent(url) + '&t=' + encodeURIComponent(tit)); return false; }
function Plurk(){window.open('https://www.plurk.com/?qualifier=shares&status=' + encodeURIComponent(t) + ' ' + encodeURIComponent(u));return false;}
function PlurkMobile() {window.open('https://www.plurk.com/m?content=' + encodeURIComponent(t) + ' ' + encodeURIComponent(u));return false;}
function Twitter() {window.open('https://twitter.com/home/?status=' + encodeURIComponent(t) + ' ' + encodeURIComponent(u));return false;}
function Google() {window.open('https://plus.google.com/share?url='+ encodeURIComponent(u));return false;}
function Line() { location.href = 'https://line.naver.jp/R/msg/text/?' + encodeURIComponent(t) + '%0D%0A' + encodeURIComponent(u); return false; }

function LineText(c) {location.href = 'https://line.naver.jp/R/msg/text/?' + encodeURIComponent(c);return false;}
function LineText_Wrap(c, WrapChar) {
  var str = GetLineText(c, WrapChar);
    location.href = 'https://line.naver.jp/R/msg/text/?' + str;    return false;
}
function LineText_Wrap1(c, WrapChar) {
  var str = GetLineText(c, WrapChar);
  window.open('https://line.naver.jp/R/msg/text/?' + str); return false;
}

function LineTextURL(c, WrapChar, url) {
  var str = GetLineText(c, WrapChar);
  var url = 'https://lineit.line.me/share/ui?url=' + encodeURIComponent(url) + '&text=' + str;
  location.href = url; return false;
}
function LineTextURL1(c, WrapChar, url) {
  var str = GetLineText(c, WrapChar);
  var url = 'https://lineit.line.me/share/ui?url=' + encodeURIComponent(url) + '&text=' + str;
  window.open(url); return false;
}

function GetLineText(c, WrapChar) {
  var str = "";
  if (c != null && c.length > 0) {
    var arrTemp = c.split(WrapChar);
    if (arrTemp.length > 0) { for (i = 0; i < arrTemp.length; i++) { str += encodeURIComponent(arrTemp[i]) + '%0D%0A'; } }
    else { str = encodeURIComponent(c); }
  }
  return str;
}