
function bluebox(title, msg, element) {
	var $container=$('<div class="err_msg err_blu">');

	$container.html('<h5><span>'+title+'</span></h5><p>'+msg+'</p>').click(function() {
		$(this).hide('fade', function(e) { $(e).remove(); });
	});
	if(!element) $($container).prependTo("#alertboxes");
	else $($container).prependTo("#"+element);
}

function redbox(title, msg, element) {
	var $container=$('<div class="err_msg err_red">');

	$container.html('<h5><span>'+title+'</span></h5><p>'+msg+'</p>').click(function() {
		$(this).hide('fade', function(e) { $(e).remove(); });
	});
	if(!element) $($container).prependTo("#alertboxes");
	else $($container).prependTo("#"+element);
}

function yellowbox(title, msg, element) {
	var $container=$('<div class="err_msg err_yel">');

	$container.html('<h5><span>'+title+'</span></h5><p>'+msg+'</p>').click(function() {
		$(this).hide('fade', function(e) { $(e).remove(); });
	});
	if(!element) $($container).prependTo("#alertboxes");
	else $($container).prependTo("#"+element);
}

function greenbox(title, msg, element) {
	var $container=$('<div class="err_msg err_grn">');

	$container.html('<h5><span>'+title+'</span></h5><p>'+msg+'</p>').click(function() {
		$(this).hide('fade', function(e) { $(e).remove(); });
	});
	if(!element) $($container).prependTo("#alertboxes");
	else $($container).prependTo("#"+element);
}


