share42.js 1.52 KB
/*
 * http://share42.com
 * Date: 09.04.2011
 * (c) 2011, Dimox
 */
function share42(f,u,t,m1,m2){if(!u)u=location.href;if(!t)t=document.title;u=encodeURIComponent(u);t=encodeURIComponent(t);if(!m1)m1=150;if(!m2)m2=20;document.write('<div id="share42">');var s=new Array('"http://www.blogger.com/blog_this.pyra?t&u='+u+'&n='+t+'" title="Îïóáëèêîâàòü â Blogger.com"','"http://www.facebook.com/sharer.php?u='+u+'&t='+t+'" title="Ïîäåëèòüñÿ â Facebook"','"http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+u+'&title='+t+'" title="Ñîõðàíèòü çàêëàäêó â Google"','"http://www.linkedin.com/shareArticle?mini=true&url='+u+'&title='+t+'" title="Äîáàâèòü â Linkedin"','"http://www.livejournal.com/update.bml?event='+u+'&subject='+t+'" title="Îïóáëèêîâàòü â LiveJournal"','"http://twitter.com/share?text='+t+'&url='+u+'" title="Äîáàâèòü â Twitter"','"#" onclick="window.open(\'http://vkontakte.ru/share.php?url='+u+'\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=200, top=200, width=554, height=421, toolbar=0, status=0\');return false" title="Ïîäåëèòüñÿ Â Êîíòàêòå"');for(i=0;i<s.length;i++)document.write('<a rel="nofollow" style="display:block;width:32px;height:32px;margin:0 0 6px;background:url('+f+'icons.png) -'+32*i+'px 0" href='+s[i]+' target="_blank"></a>');document.write('</div>');window.onload=function(){var p=document.getElementById('share42');function m(){var top=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(top+m2<m1){p.style.top=m1-top+'px';}else{p.style.top=m2+'px';}}m();window.onscroll=m;}}