// -- (c) 2003 Infogate AB
// -- CVS revision: $Revision: 1.2 $


// -- Disclaimer
// -- --------------------
// -- This script may not work as intended on older browsers
// --
// -- This script is tested and verified in the following browsers
// -- Microsoft Internet Explorer 6.0
// -- Netscape 7.0


// -- Requirements
// -- --------------------
// -- None


// -- How to use
// -- --------------------
// -- Create new string object
// -- var obj = new String();
// -- 
// -- obj.trim() removes spaces in front and at end
// -- obj.isNum() returns true if no other character than '0' to '9', '.' or ',' is present, else false





// -- File identifier
var insert_DM_standard = true;
// --------------------------------------------------

// -- string.trim() function
function trimString(str) {
  str = this != window? this : str;
  return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
String.prototype.trim = trimString;
// --------------------------------------------------

// -- string.isNum() function
function isNum(str) {
	var result = true;
	str = this != window? this : str;
	for (var i = 0; i < str.length; i++) {
		var ch = str.substring(i, i + 1)
		if ((ch < "0" || "9" < ch) && ch != '.' && ch != ',') {
			result = false;
		}
	}
	return result;
}
String.prototype.isNum = isNum;
// --------------------------------------------------
