function openMispAddMalwarePopup(recid) {
    filename = w2ui.grd_malware.get(recid).text
    path= w2ui.grd_malware.get(recid).path_on_disk

    if (!path) path = ""

    fullpath= ""

    if (path.endsWith("\\")){
        fullpath = path+filename
    }
    else{
        fullpath = path + "\\" + filename
    }
    hash = w2ui.grd_malware.get(recid).md5
    notes = w2ui.grd_malware.get(recid).notes

    //check what type of hash it is
    hashtype = "none"
    if(hash) {
        hashtype = "md5"
        if (hash.length == 40) hashtype = "sha1"
        if (hash.length == 64) hashtype = "sha256"
    }


    records = [ {recid:1, aurora_field_type:"Filename",misp_field_type:"filename",value:filename,comment:notes},
                {recid:2, aurora_field_type:"Fullpath",misp_field_type:"filename",value:fullpath,comment:notes},
                {recid:3, aurora_field_type:"Hash",misp_field_type:hashtype,value:hash,comment:notes},
    ]

    w2ui.grd_add_misp.records = records
    w2ui.grd_add_misp.refresh()


    w2popup.open({
        title: 'Add to MISP',
        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_add_misp);

            };
        },
        onToggle: function (event) {
            event.onComplete = function () {
                w2ui.popup_layout.resize();
            }
        }
    });
}
Prepare and open teh popup for malware misp transfer
@param recid -record id of right clicked record.