I really don't know why your doing what your doing maybe if you could explain what your trying to accomplish we could help. Right now you should be aware that in
function fnSelect(objId) only the "else if" section executes never if(document.selection)
And in function fnDeSelect() it's only the "else if" that executes.
Evolution - The non-random survival of random variants.