function gotoFacebook(){ var fbLink = "http://www.facebook.com/sharer.php?u=" + location.href; window.open(fbLink); //, '_blank', 'width: 350px, height=400px'); } function gotoTwitter(text){ var tit = titleRebuild(text); var fbLink = "http://twitter.com/share?url=" + location.href + "&text=" + tit;//encodeURIComponent(title); window.open(fbLink, '_blank', 'width: 350px, height=400px'); } function gotoLinkedIn(text,summary){ var tit = titleRebuild(text); var sum = titleRebuild(summary); var fbLink = "http://www.linkedin.com/shareArticle?mini=true&url=" + location.href + "&title=" + tit+"&summary=" +sum;//encodeURIComponent(title); window.open(fbLink, '_blank', 'width: 350px, height=400px'); } function titleRebuild(title){ var tit; if(navigator.appName == "Microsoft Internet Explorer"){ tit = encodeURIComponent(title); } else if(navigator.userAgent.indexOf("Safari") != -1){ tit = encodeURIComponent(title); } else if(navigator.userAgent.indexOf("Opera") != -1){ tit = encodeURIComponent(title); } else{ tit = title; } return tit; }