function JSON() {}

JSON.rightTrim = function(str) {
	return str.replace(/\s+$/, '');
}
            
JSON.parseJSON = function(json_string) { //replace with true JSON parser that doesn't use eval()
	json_string = JSON.rightTrim(json_string);
	if (json_string != "") {
		if (json_string[0] == "{" && json_string[json_string.length-1] == "}") {
			return eval("("+json_string+")");
		} else if (json_string[0] == "[" && json_string[json_string.length-1] == "]") {
			return eval("("+json_string+")");
		} else {
		}
	}
}

