//Checks if string contains only numeric cheracters
function isNumeric(value) {
    var thisText = new String(value);
    if(isEmpty(thisText)) {
		return false;
	}
    var len = thisText.length;
    for(var i=0; i<len; i++) {
        var rs = new RegExp("\\d");
        var chr = thisText.charAt(i);
        var it = chr.search(rs);
        if(it < 0) {
            return false;
        }
    }
    return true;
}

//Returns true if value is empty, ignoring spaces
function isEmpty(value) {
	var val = new String(value);
    if(parseInt(val.search("\\S")) == -1) {
        return true;
    } else {
        return false;
    }
}

