/* ========================================= */
/* include as well utils.js                  */
/* see CommonJS class in CetLib project      */
/* ========================================= */
function TEXTRANGE_GetWordFromPoint (clientX, clientY)
//       ~~~~~~~~~~~~~~~~~~~~~~~~~~
{  
  try
  {    
    var oRange = document.body.createTextRange();    
    oRange.moveToPoint(clientX, clientY);        
    oRange.expand('word');        
    if (oRange.text.charAt(oRange.text.length-1) == " ")
      oRange.moveEnd("character", -1)
      
    return oRange;
  }
  catch(e)
  {
    return null;
  }
  
}
//--------------------------------------------------

/*
other functions needed for the suspended activity of dragging something to between words or lines:

function TEXTRANGE_GetLineFromPoint (clientX, clientY)
function TEXTRANGE_GetNextWord (oRange)
function TEXTRANGE_GetPrevWord (oRange)
function TEXTRANGE_GetNextLine (oRange)
function TEXTRANGE_GetPrevLine (oRange)
function TEXTRANGE_GetHCenter (oRange)
function TEXTRANGE_GetVCenter (oRange)

*/
