function showBox(id)
{

    var maxHeight = $(document).height();
    var maxWidth = $(window).width();

    $('#' + id).css({'width': maxWidth, 'height': maxHeight});
    $('#' + id).fadeIn(100);

    var boxPosLeft = (maxWidth - $('#' + id + ' #box').width())/2;
    var boxPosTop = window.scrollY + 150;


    $('#' + id + ' #box').css({'left': boxPosLeft, 'top': boxPosTop});
    $('#' + id + ' #box').fadeIn(400);
    
    $('#' + id + ' #mask').click(function(){
        closeBox(id);
    });

}

function closeBox(id)
{
    $('#' + id).fadeOut(500);
    $('#' + id + ' #box').fadeOut(500);
}
