I don't know what the purpose, but in your unselect function
you seem to be doing a lot of unneccesary string creation and indexOf testing, e.g.:
sCtrl = new String(oCtrl);
sCtrlTmp = '|' + sCtrl; //ensures the string has at least one character to avoid errors.
if (sCtrlTmp.indexOf('cTree_') > 0) { document.getElementById(sCtrl).style.color = '#000000'; }
if (sCtrlTmp.indexOf('msTree_') > 0) { document.getElementById(sCtrl).style.color = '#507FC7'; }
An approach that might be a lot faster would be to simply set (or add) an attribute say, "selected='true'" on any element that has been selected and then you can simply iterate the nodelist looking for elements with the correct attribute and perform your style.visibility change, instead of creating a whole new set of objects
[[ sCtrl = new String(oCtrl);
sCtrlTmp = '|' + sCtrl; //ensures the string
]]
for every node just so you can perform your test. In other words, perform whatever test you need on the DOM objects that are already there, don't create new ones.
(use the getAttribute and setAttribute methods)