function writeFlash(message) {
	var flashMessage = $('#flashMessage');
	if (flashMessage.length == 0) {
		$('#content').prepend('<div class="widget flash"><div id="flashMessage" class="message">'+message+'</div></div>');
	} else {
		flashMessage.html(message);
	}

}
function hideFlash() {
	$('#flash').hide();
}


/**
 * Function : print_r()
 */
/*
function print_r(arr,depth) {
	if (depth == undefined) depth = 2;
	if (depth = 0) return '';
	var intend = "";
	for (var i=1;i<depth;i++) intend += "      ";
	if(typeof(arr) == 'object') { //Array/Hashes/Objects
		dumped_text = intend+"Object [\n";
		for(var item in arr) {
			var value = arr[item];
			if (typeof(value) == 'function')
				dumped_text += intend+"      '" + item + "' => \"function()\"\n";
			else
				dumped_text += intend+"      '" + item + "' => (" + typeof(value) + ") \"" + print_r(value,depth-1) + "\"\n";
		}
		dumped_text += intend+"]\n";
	} else { //Stings/Chars/Numbers etc.
		dumped_text = intend+arr;
	}
	return dumped_text;
}
*/
function print_r(variable) {
	var txt = typeof(variable)+":\n";
	for (var i in variable) {
		txt = txt+"  "+i+": "+(typeof(variable[i]) == 'function' ? 'function()' : variable[i])+"\n";
	}
	alert(txt);
}

var CKEDITOR;
