﻿/*

Name:           Share Inclusion
Date:           2008-05-06
Developed By:   James Butt (Fuze Thee   james.butt@fuzethree.com)
Description:    currently supports delicious, digg, stumbleupon, facebook, facebookgroup

*/


function SharePage(type, page)
{

    var url = document.location.href;
    var title = document.title;
    var window_options = 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes';

    if (type=='delicious')
    {
        window.open('http://del.icio.us/post?v=4&partner=[partner]&noui&jump=close&url='+URLEncode(url)+'&title='+URLEncode(title), 'delicious', window_options);
    }
    else if (type=='digg')
    {
        share_digg = window.open('http://www.digg.com/submit?phase=2&partner=[partner]&url='+URLEncode(url)+'&title='+URLEncode(title), 'digg', window_options);
    }
    else if (type=='stumbleupon')
    {
        share_stumbleupon = window.open('http://www.stumbleupon.com/submit?url='+URLEncode(url)+'&title='+URLEncode(title), 'stumbleupon', window_options);
    }
    else if (type=='facebook')
    {
        share_facebook = window.open('http://www.facebook.com/sharer.php?u='+URLEncode(url)+'&t='+URLEncode(title), 'facebook', window_options);
    }
    else if (type=='facebookgroup')
    {
        share_facebookgroup = window.open('http://www.facebook.com/group.php?gid=2449419416', 'facebook group', window_options);
    }

}