Adding Custom Javascript to Dataset Module

Is there a way to add Javascript in the Dataset Module. If there is no direct way, where in the source files can I include the following function:

    var CLASS_NAME = 'DataSetCellSpan';
    var strColorPairs = Array(
                                {'DataSetCellSpan' : 'Discharged', 'color' : 'orange'},
    function myInit()
        var divList = document.getElementsByClassName( CLASS_NAME );
        var i, n = divList.length;
        for (i=0; i<n; i++)
            curContent = divList[i].children[0].innerHTML;
            for (j=0; j<strColorPairs.length; j++)
                if (strColorPairs[j].content == curContent)
                    divList[i].style.color = strColorPairs[j].color;