﻿function facebook_click() {
    openWin('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title), 'share_facebook', 'toolbar=0,status=0,width=626,height=436');
    return false;
}

function delicious_click() {
    openWin('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'share_delicious', 'toolbar=no,width=550,height=550'); 
    return false;
}

function digg_click(topic) {
    openWin('http://digg.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&bodytext=&media=news&topic='+encodeURIComponent(topic), 'share_digg', 'toolbar=no,width=500,height=550,scrollbars=yes,resizable=yes'); 
    return false;
}

// get around for popup blockers
function openWin(url, target, attribs) {
    var win = window.open(url, target, attribs);
    if (!win) {
        var elSWF = document.getElementById("swfBanner1");
        if (elSWF) {
            elSWF.openWindowFromSwf(url, target);
        }
        return false;
    } else {
        return true;
    }
}

