function yallaBox( urlAddress,params,height ) {
    if ($('#yalla-box').length < 1) {
        if (typeof(height) == "undefined") {
            var height = 400;
        }
        if (typeof(params) == "undefined") {
            var params = null;
        }
        var boxLeftSpace = ($(document).width()/2)-300;
        var boxBG = $(jQuery('<div id="yalla-box-bg" class="yalla-box-bg"><div class="yalla-box-space">&nbsp;</div></div>').css({opacity: '0.7', left: (boxLeftSpace-10)+'px', height: (height+20)+'px', top: ($(document).scrollTop()+100)+"px"}).hide());
        var box = $(jQuery('<div id="yalla-box" class="yalla-box">&nbsp;</div>').css({height: height+'px', left: boxLeftSpace+'px', top: ($(document).scrollTop()+111)+"px"}).hide());
        var boxLoader = $(jQuery('<div id="yalla-box-loader" class="yalla-box yalla-box-loader">&nbsp;</div>').css({opacity: '0.7', left: boxLeftSpace+'px', height: height+'px', top: ($(document).scrollTop()+111)+"px"}).hide());
        $('body').append(boxBG).append(box).append(boxLoader);
        $('#yalla-box-bg').show();
        $('#yalla-box').show(0,function () {
            $('#yalla-box-loader').show();
            $.ajax({
                type: 'post',
                url: urlAddress,
                data: params,
                success: function(data) {
                    $('#yalla-box-loader').hide();
                    $('#yalla-box').html(data);
                },
                dataType: 'html'
            });
        });
    }
}

function closeYallaBox() {
    $('#yalla-box').hide();
    $('#yalla-box-loader').hide();
    $('#yalla-box-bg').hide(0,function() {
        $('#yalla-box').remove();
        $('#yalla-box-bg').remove();
        $('#yalla-box-loader').remove();
    });
}
