function isDigit(chr) {
    if ((chr < "0") || (chr > "9")) return false;
    return true;
}
function isDigits(value, length) {
    if (!value || value.length != length) return false;
    for (var i = 0; i < length; i++)
        if (!isDigit(value.charAt(i))) return false;
    return true;
}
function trim(stringToTrim) {
    return stringToTrim.replace(/ /g," ").replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
    return stringToTrim.replace(/ /g," ").replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
    return stringToTrim.replace(/ /g," ").replace(/\s+$/,"");
}
function isValidEmail(email){
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) return true;
    return false;
}
function price2float(value){
    return parseFloat(value.replace(/,/,''))
}