﻿function closeEmailFriendsLiteBox()
{
    var efLitebox = $('#emailFriendLiteBox');
    
    if (efLitebox)
    {
        efLitebox.css('display','none');
        $("BODY").css("overflow", "auto");
        $("HTML").css("overflow", "auto");    
        return false;
    }
    else
        return true;
}

function resizeEmailFriendsWindow() {
    var windowHeight = $(window).height();
    $("#emailFriendLiteBox .black-bg").height(windowHeight);
    $("#emailFriendLiteBox .black-bg").css("width", $(window).width());
    $("#emailFriendLiteBox").css("width", $(window).width());
    windowHeight = windowHeight-60;
    $("#emailFriendLiteBox .lb-holder").css("max-height", windowHeight);
}    

function showEmailFriends(){
    if (jQuery.browser.safari) { var posY = window.pageYOffset } else { var posY = document.documentElement.scrollTop }
    $('#emailFriendLiteBox').css('display','block');
    $('#emailFriendLiteBox').css('top', posY);
    $("BODY").css("overflow", "hidden");
    $("HTML").css("overflow", "hidden");

    InitializeEmailFriends();   
    
    return false;
}  
