This property returns the index of the character in the edit field of where the
currently selected text ends. If there is no selection the property returns 0.
function DoesEditHaveSelection(editBx)
{
var hasSel = false;
if (editBx)
{
var startPos = editBx.selectionStart;
var endPos = editBx.selectionEnd;
hasSel = (startPos == 0) && (endPos == 0);
}
return hasSel;
}