// Removes leading whitespaces
				function LTrim( value ){var re = /\s*((\S+\s*)*)/;return value.replace(re, "$1");}
				// Removes ending whitespaces
				function RTrim( value ){var re = /((\s*\S+)*)\s*/;return value.replace(re, "$1");}
				// Removes leading and ending whitespaces
				function trim( value ) {return LTrim(RTrim(value));}
	function unsetError(json){
			if (typeof(json)=='object'){
				for(key in json){
					$('#error_'+json[key]).html('');
					$('#'+json[key]).attr('class','');
				}
			}
		}
		
		function setError(json){
			if (typeof(json)=='object'){
				error = true;
				for(key in json){
					$('#error_'+key).html(json[key]);
					$('#'+key).attr('class','errored');
				}
			}
		}
