/*
javascript:location.href='http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description='+encodeURIComponent(document.getSelection())+'&Url='+encodeURIComponent(location.href)+'&Title='+encodeURIComponent(document.title)
javascript:(function(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');var%20furlit=window.open('http://www.furl.net/storeIt.jsp?t='+encodeURIComponent(d.title)+'&u='+escape(d.location.href)+'&r='+escape(d.referrer)+'&c='+encodeURIComponent(t),'furlit','width=475,height=540,left=75,top=20,resizable=yes');furlit.focus();})();
*/

function bookmark_page(bType) {
    switch (bType) {
        case 'browser' :
            browser_bookmark();
            break;
        case 'delicious' :
            delicious_bookmark();
            break;
        case 'blinklist' :
            blinklist_bookmark();
            break;
        case 'furl' :
            furl_bookmark();
            break;
    }
}

function browser_bookmark() {
    if (document.all  && window.external) {
        window.external.AddFavorite(location.href, document.title);
    }
    else if (window.sidebar && window.sidebar.addPanel) {
        window.sidebar.addPanel(document.title, location.href, '');
    }
}

function delicious_bookmark() {
    document.location = 'http://del.icio.us/post?url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title);
}

function blinklist_bookmark() {
    document.location = 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=' + encodeURIComponent(location.href) + '&Title=' + encodeURIComponent(document.title);
}

function furl_bookmark() {
    document.location = 'http://www.furl.net/storeIt.jsp?t=' + encodeURIComponent(document.title) + '&u=' + encodeURIComponent(location.href);
}

function show_bookmark_menu() {
    bMenu = document.getElementById('bookmark_menu_container');
    bMenu.style.visibility = 'visible';
}

function hide_bookmark_menu() {
    bMenu = document.getElementById('bookmark_menu_container');
    bMenu.style.visibility = 'hidden';
}
