/******************************************************************************'
*  Author:      Dominick Blanchette
*
*  Function(s): sTrim, sLTrim, sRTrim
*
*  Usage:       trims a string from the left and/or from the right and
*               return the result
*
*  Parameters:  the parameter is the same for the 3 functions
*
*               sToTrim -> string to process
*
*   Note: Netscape 2.0 compliant!
*
*******************************************************************************/
function sLTrim ( sToTrim )
{
    var nInd = 0;
    while ( sToTrim.charAt(nInd) == " " )
    {
        nInd++;
    }
    return (sToTrim.substring(nInd,sToTrim.length));
}

function sRTrim ( sToTrim )
{
    var nInd = sToTrim.length - 1;
    while ( sToTrim.charAt(nInd) == " " )
    {
        nInd--;
    }
    return (sToTrim.substring(0,nInd + 1));
}

function sTrim ( sToTrim )
{
    var sTemp = "";
    sTemp = sLTrim(sToTrim);
    sTemp = sRTrim(sTemp);
    return (sTemp);
}