/*
function IB_error_msg(Error) {
	str = '';
	if(Error.messages.length) {	
		str += '<div id="failure"><p>Your changes could not be saved.</p><h3>The following problems occurred:</h3><ul>';
		$.each(Error.messages, function(i, o) {
			str += '<p>'+o+'</p>';
		});
		str += '</ul>';

		if(Error.optional.length) {
			str += '<h3>Additional Error Messages</h3><ul>';
			$.each(Error.optional, function(i, o){
				str += '<li>'+o+'</li>'
			});
			str += '</ul>';
		}
		str += '</div>';
	}
	if(str) { $("#BelowErrorNotify").before(str); }
}
*/
function IB_notify_msg(Notify) {
	// remove all notifications
	$("#Notify").remove(); 
	str = '<div id="Notify">';
	if(Notify.messages.length) {	
		$.each(Notify.messages, function(i, o) {
			str += '<p>'+o+'</p>';
		});
	}
    str += '</div>';
	$("#CBResultsHolder h2").before(str);
	IB_notify_msg_show();
}
function IB_notify_msg_show() {
	$("#Notify").slideDown(500, function() {
		$("#Notify").fadeOut(5000);
	});
}