var ShareLink = { legalDisclaimer: { us: 'You are about to leave Electronic Arts\' website and go to a website owned by a third party. Electronic Arts is not responsible for content on third party sites, and our privacy policy does not apply to their information collection practices. Press OK to access the linked site or press CANCEL to return to your original page.' }, setAll: function(shareLinksContainer, link) { shareLinksContainer.setStyle('display','block'); shareLinksContainer.getElement('a.facebook').setProperty('href', ShareLink.facebook.share(link)); shareLinksContainer.getElement('a.delicious').setProperty('href', ShareLink.delicious.share(link)); shareLinksContainer.getElement('a.digg').setProperty('href', ShareLink.digg.share(link)); shareLinksContainer.getElement('a.facebook').setProperty('target',''); shareLinksContainer.getElement('a.delicious').setProperty('target',''); shareLinksContainer.getElement('a.digg').setProperty('target',''); }, digg: { share: function(href) { var url = "void(window.open('http://digg.com/submit?phase=2&url="+href+"'))"; if(locale == 'us') { url = "javascript:if(confirm(\""+ShareLink.legalDisclaimer.us+"\")) { "+url+"; };"; } else { url = "javascript:" + url + ';'; } return url; } }, delicious: { share: function(href) { var url = "void(window.open('http://del.icio.us/post?v=4;url='+encodeURIComponent('"+href+"')))"; if(locale == 'us') { url = "javascript:if(confirm(\""+ShareLink.legalDisclaimer.us+"\")) { "+url+"; }"; } else { url = "javascript:" + url + ';'; } return url; } }, facebook: { share: function(href) { var url = 'http://www.facebook.com/share.php?u=' + href; return url; }, fbs_click: function() {u=location.href;t=document.title; if(locale == 'us') { if(!confirm(ShareLink.legalDisclaimer.us)) return false; } window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false;} } }