/**
 * Function to use when sharing an article on facebook
 *
 * This function will point the facebook bot to a page that contains some meta tags and a link tag
 * to an image if there is an image.
 *
 * @param int article_id Id of an article
 * @return boolean
 */
function facebook_article_share(article_id) {
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent('http://www.vg.no/linkdeling/facebook.php?artid=' + article_id), 'sharer', 'toolbar=0,status=0,width=626,height=436');

    return false;
}

/**
 * Function that enables the user to share a link on nettby.no
 *
 * @param string title
 * @param string url
 * @param string description
 * @return boolean
 */
function nettby_link_share(title, url, description) {
    nettby_link_share_window = window.open('http://www.nettby.no/user/edit_link.php?name=' + escape(title) + '&url=' + escape(url) + '&description=' + escape(description), 'edit_link', 'scrollbars=no,width=450,height=430');

    return false;
}
