function parse_errors(errors) {
	for (var field in errors) {
		for (var thing in errors[field]) {
			if (!($('#' + field + '_' + thing).length > 0)) {
				alert('An unhandled error occured. The error returned was ' + errors[field][thing]);
			}
					
			$('body').append('<div id="e'+field+'_'+thing+'" class="floatError tooltip" style="display: block; width: auto; position: absolute; left: 0px; top: 0px;">'+ errors[field][thing] +'&nbsp;<img src="/img/001_05.png" class="close" /></div>');
			
			$('.floatError').css({
				'outline': 'none',
				'-moz-border-radius': '3px',
				'background-color': '#fff799',
				'border': '1px solid #999',
				'padding': '2px',
				'padding-right': '18px',
				opacity: 1,
				'color': '#000'
			});
			
			$('.close').css({
				width: '16px',
				height: '16px',
				position: 'absolute',
				top: '0px',
				right: '0px',
				cursor: 'pointer'
			});
			
			$('.close').click(function() {
				$(this).parent().hide();
			});
			
			var $field = $('#' + field + '_' + thing);
			var $error = $('#e' + field + '_' + thing);
			
			$error.css({
				left: $field.offset().left + $field.outerWidth(true) + 5,
				top: $field.offset().top-($error.outerHeight(true) / 2) + ($field.outerHeight(true) / 2)
			});
			
			if ($error.offset().left > ($('body').width()/3)*2) {
				$error.css({
					left: $field.offset().left - $error.outerWidth(true) - 5
				});
			}
			
			$('#' + field + '_' + thing).css('background-color', '#fff799');
			
			$('#' + field + '_' + thing).change(function() {
				$(this).css('background-color', '#ffffff');
				$(this).css('color', '#000000');
				$('#e' + $(this).attr('id')).hide();
			});
		}
	}
}
