﻿function CreateBookmarkLink() {
    title = document.title;
    url = location.href;
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(title, url, "");
    } else if (window.external) { // IE Favorite
        window.external.AddFavorite(url, title);
    } else if (window.opera && window.print) { // Opera Hotlist
        return true;
    }
}

function ShareInFacebook() {
    title = document.title;
    url = location.href;
    encodedUrl = encodeURIComponent(url);
    encodedTitle = encodeURIComponent(title);
    fbSharerUrl = "http://www.facebook.com/sharer.php?u=" + encodedUrl + "&t=" + encodedTitle;
    newWindow = open(fbSharerUrl, "FBShareWindow");
}

function fullScreen() {
    //window.open(location.href, '', 'fullscreen=yes,scrollbars=1');
    window.open(location.href + '&printpage=true', '', 'fullscreen=yes,scrollbars=1');
}

function createSendLinkForm(selector, width, height) {
    $(selector).click(function() {
        $.facebox("<iframe src='" + $(this).attr("href") + "' frameborder='0' scrolling='no' width='" + width + "' height='" + height + "' marginwidth='0' marginheight='0' />");
        return false;
    });
}

