var Messenger = 
{
	autohide: null,mtimeout:4000,
	error: function(message)
	{
		dn = 'pageErrorMsg';d  = $('pageErrorMsg');
		if( d != null )
		{
			location.href = "#top";d.innerHTML = "<li>" + message + "</li>";$('messengeContainer').show();
			new Effect.Appear(dn, {duration: 0.3});new Effect.Highlight(dn);
			if (this.autohide != null) {clearTimeout(this.autohide);}
			this.autohide = setTimeout(Messenger.fadeError.bind(this), this.mtimeout);
		}
	},
	notice: function(message, mt)
	{
		dn = 'pageMsg';d  = $('pageMsg');
		if(isNaN(mt)){mt=this.mtimeout;}
		mto = parseInt(mt);
		if( d != null )
		{
			d.innerHTML = "<li>" + message + "</li>";$('messengeContainer').show();
			new Effect.Appear(dn, {duration: 0.3});new Effect.Highlight(dn);
			if (this.autohide != null) {clearTimeout(this.autohide);}
			this.autohide = setTimeout(Messenger.fadeNotice.bind(this), mto);
		}
	},
	noticewithoutfade: function(message){dn='pageMsg';d=$('pageMsg');if(d!=null){location.href = "#top";d.innerHTML = "<li>" + message + "</li>";$('messengeContainer').show();new Effect.Appear(dn,{duration: 0.3});new Effect.Highlight(dn);}},
	noticewithoutfade_alt:function(message){dn='pageMsgAlt';d=$('pageMsgAlt');if(d!=null){location.href = "#msgalt";location.href = "#msgalt";d.innerHTML = "<li>" + message + "</li>";$('messengeContainerAlt').show();new Effect.Appear(dn,{duration: 0.3});new Effect.Highlight(dn);}},
    fadeNotice: function(){dn='pageMsg';d=$('pageMsg');new Effect.Fade(dn,{duration: 0.3});$('messengeContainer').hide();},
	fadeError: function(){dn='pageErrorMsg';d=$('pageErrorMsg');new Effect.Fade(dn,{duration: 0.3});$('messengeContainer').hide();}
}
