﻿var editorconfig = { "width": 0, "height": 0, "title": "", "subtitle": "", "closeaction": "", "controlid": "", "content": "", "bottombuttons": "" };

function showLightbox(edtcfg, level) {
    var data = {"editorconfig": edtcfg};
    var result = '';
    result = TrimPath.parseTemplate(view_editlightbox).process(data);
    switch (level) {
        case 1:
            $('#V2editControl').html(result);
            $('#V2editBackground').show();
            $('#V2editControl').show();
            centerObject('V2editControl');
            break;
        case 2:
            $('#V2editControl2').html(result);
            $('#V2editBackground2').show();
            $('#V2editControl2').show();
            centerObject('V2editControl2');
            break;
        case 3:
            $('#V2editControl3').html(result);
            $('#V2editBackground3').show();
            $('#V2editControl3').show();
            centerObject('V2editControl3');
            break;                        
    }
}

function hideLightbox(level) {
    switch (level) 
    {
        case 1:
            $('#V2editControl').html("");
            $('#V2editBackground').hide();
            $('#V2editControl').hide();
            break;
        case 2:
            $('#V2editControl2').html("");
            $('#V2editBackground2').hide();
            $('#V2editControl2').hide();
        case 3:
            $('#V2editControl3').html("");
            $('#V2editBackground3').hide();
            $('#V2editControl3').hide();            
    }
}