/* CopyrightTag: Copyright (c) 2004-2008 Satmetrix Systems, Inc. All Rights Reserved. */
/* $Id: utils.js,v 1.5 2008/01/08 23:54:14 build Exp $ */
/**
 *  Trims leading white space from the string
 *  Using regular expressions:
 *      ^[\s]+ - Matches one or more (+) white space characters ([\s]) at the beginning (^) or the string 
 */
var leadingWhiteSpaceRegExpr = /^[\s]+/
function TrimString(str) {
    return ( str ? str.replace(leadingWhiteSpaceRegExpr, "") : str )
}

/**
 *  Returns true if the string contains anything other than digits
 *  and decimal point
 */
function isNumericString(str) {
    return (   str 
            && typeof(str) == "string" 
            && str.length > 0 
            && !isNaN(Number(str)) );
}