﻿    function copyContentsOf(objectID) {
        var tr = document.body.createTextRange();
        var tbl = document.getElementById(objectID);

        tr.moveToElementText(tbl);
        tr.select();
        tr.execCommand("copy");
        
        //remove highlighting of selected object
        //assumes there's an element on the page with id 'emptySpan'
        tbl = document.getElementById('emptySpan');
        tr.moveToElementText(tbl);
        tr.select();
        
        alert('The data requested has been copied to your computer\'s clipboard.  You may now open a program such as Microsoft Excel, right-click on the destination cell and select "Paste".');
    }

