/**
*	Show status message at the right-top
*	@param string Message
*	@param int Message type: 1 = ok, 2 = warning, 3 = error [default = 3]
*	@param int Timeout in seconds until message hides [default = 3]
*/
function showStatus(msg /*, type, hideTimeout*/) {
	var type = arguments[1] || 3;
	var timer = typeof arguments[2] == 'undefined' ? 3 : arguments[2];
	var c;
	switch (type) {
		case 1: c = 'msg-status-ok'; break;
		case 2: c = 'msg-status-warning'; break;
		case 3:	c = 'msg-status-error'; break;
	}
	$('msg-status-content').className = c;
	$('msg-status-text').update(msg);
	$('msg-status-content').show();
	if (showStatus.__hideTimer) clearTimeout(showStatus.__hideTimer);
	if (timer) showStatus.__hideTimer = setTimeout(function() { $('msg-status-content').hide(); }, timer*1000);
}
showStatus.__hideTimer = null;

/**
*	Hide status message
*/
function hideStatus() {
	$('msg-status-content').hide();
}