function sayDraugiem(title) { if (title == '') title = location.href; var domain = DOMAIN_NAME; window.open( 'http://www.draugiem.lv/say/ext/add.php?title=' + encodeURIComponent(title) + '&link=' + encodeURIComponent(location.href) + '&titlePrefix=' + encodeURIComponent(domain), '', 'location=1,status=1,scrollbars=0,resizable=0,width=600,height=400' ); return false; } function sayFacebook(title, url) { if (typeof(title) == 'undefined' || title == '') title = location.href; var domain = DOMAIN_NAME; if (typeof(url) == 'undefined' || url == '') url = location.href; title = encodeURIComponent(title); url = encodeURIComponent(url); var argv = sayFacebook.arguments; var argc = argv.length; var strSummaryUrlPart = ''; var strImageUrlPart = ''; if (argc > 2) { strSummaryUrlPart = '&p[summary]='+encodeURIComponent(argv[2]); } if (argc > 3) { strImageUrlPart = '&p[images][0]='+encodeURIComponent(argv[3]); } if (strImageUrlPart == '') { strImageUrlPart = '&p[images][0]='+encodeURIComponent('http://files.fm/img/files.fm_app_logo.png'); } var strUrl = 'http://www.facebook.com/sharer.php?s=100&p[title]='+ title +'&p[url]='+ url + strImageUrlPart + strSummaryUrlPart; window.open( strUrl, '', 'location=1,status=1,scrollbars=0,resizable=0,width=640,height=480' ); return false; } function sayTwitter(title,url) { if (title == '') title = location.href; if ( typeof(url) == 'undefined' || ! url ) { var url = location.href; } var domain = DOMAIN_NAME; window.open( 'http://twitter.com/intent/tweet?source=webclient&text=' + encodeURIComponent(domain + ': ') + encodeURIComponent(title) + '&url=' + encodeURIComponent( url ), '', 'location=1,status=1,scrollbars=0,resizable=0,width=640,height=480' ); return false; } function sayDigg(title) { if (title == '') title = location.href; var domain = DOMAIN_NAME; window.open( 'http://digg.com/submit?title=' + encodeURIComponent(domain + ': ') + encodeURIComponent(title) + '&url=' + encodeURIComponent(location.href), '', 'location=1,status=1,scrollbars=0,resizable=0,width=640,height=480' ); return false; } function sayReddit(title) { if (title == '') title = location.href; var domain = DOMAIN_NAME; window.open( 'http://www.reddit.com/submit?title=' + encodeURIComponent(domain + ': ') + encodeURIComponent(title) + '&url=' + encodeURIComponent(location.href), '', 'location=1,status=1,scrollbars=0,resizable=0,width=640,height=480' ); return false; } function sayGooglePlus(title) { window.open( 'https://plus.google.com/share?url=' + encodeURIComponent(location.href), '', 'location=1,status=1,scrollbars=0,resizable=0,width=640,height=480' ); return false; }