function openImportPopup(fields,content,import_fieldset) {

    records = []

    firstline = CSVtoArrayEasy(content[0]) //need that for mapping and can?t use it for the editable items as w2ui will mess with it


    for(var i=0; i<fields.length;i++){
        records.push({recid:records.length+1, csv:"", grid:fields[i],fieldname:import_fieldset[i]})
    }


    w2ui.grd_import_mapping.getColumn('csv').editable.items = CSVtoArray(content[0])
    w2ui.grd_import_mapping.records = records
    w2ui.grd_import_mapping.refresh()


    w2popup.open({
        title: 'Import Mapping',
        width: 550,
        height: 400,
        showMax: true,
        body: '<div id="main"></div>',
        onOpen: function (event) {
            event.onComplete = function () {
                $('#w2ui-popup #main').w2render('popup_layout')
                //render grid into form
                w2ui.popup_layout.content('main', w2ui.grd_import_mapping);
            };
        },
        onToggle: function (event) {
            event.onComplete = function () {
                w2ui.popup_layout.resize();
            }
        }
    });
}
Prepare and open the popup for import column mapping
@param recid -record id of right clicked record.