// Requires jquery

function useObjs()
{
    var resultObj = Array();
    var resultIds = "";
    var resultDescs = "";
    var resultIDArr = $("input.itemSel:checked").map (function(){ return $(this).val() });
    var count = 0;


    for(i=0 ; i < resultIDArr.length ; i++)
    {
        if(count != 0)
        {
            resultIds += ',';
            resultDescs += ', ';
        }

        resultIds   += resultIDArr[i];
        resultDescs += document.getElementById('itemDesc' + resultIDArr[i]).innerHTML;
        count++;
    }

    resultObj['ids'] = resultIds;
    resultObj['descs'] = resultDescs;
    resultObj['count'] = count;

    window.opener.manager.callBack (resultObj);
    window.close ();
}

