function errmsg(msg, lmsg){
	var dialog = $('#questinfo'); 
	dialog.empty();
	dialog.show();
	if (lmsg){
		dialog.append('<h1>' + msg + '</h1><p>');
	 	msg = lmsg;
	} else {
	 	dialog.append("<h1>An error occured!</h1><p>")
	}
	dialog.append(msg);
	dialog.append("</p>");
	dialog.append('<div class="right"><a href="" id="hideinv" class="medium green awesome">Okay</a></div>');
	$('#hideinv').click(function(){
		return function(e){
		e.preventDefault();
		dialog.empty();
		dialog.hide();
	}}());
}


