function setupSelection(json,id)
{
    for(var i=0; i<json.length;i++)
    {
        var z = document.createElement("option");
        z.setAttribute("value", i);
        var t = document.createTextNode(json[i].val);
        z.appendChild(t);
        document.getElementById(id).appendChild(z);
    }
}

function getSelected(id)
{
    var sel = desiteAPI.getSelectedElements();
    document.getElementById(id).innerHTML = sel.length;
    __selectedDTM__ = sel;
}