var blockade = false;

function fasimaInsert(normal, thumb)
{
    var description = prompt('Kurze Beschreibung (sofern ausgefüllt wird sie unter dem Bild angezeigt):');
    if (description != null) {
        if (description.length > 0)
            description = ' title="'+ description +'"';

        if (thumb.length == 0) thumb = normal;
        return '<a class="lightThumb" href="' + normal + '" rel="lightbox[fasima]"'+ description +'><img class="lightThumb" src="' + thumb + '" alt="" /></a>';
    }
}

function fasimaDel(id)
{
    var request = new SQR.Ajax('$sqr->fasima->delete("'+ id +'")', {
        onComplete: function (handle) {
            if (handle) {
                alert(handle);
            } else {
                var imageTag = document.getElementById('fasimaImage' + id);
                imageTag.parentNode.removeChild(imageTag);
            }
        }
    });
    return true;
}