function SysMsg(msg)
{
	this.id = PasswordGenerator(8);
	
	this.closedBox = false;
		
	this.showMsg = function (msg)
	{
		html  = '<div id="SysMsgBox_'+this.id+'" class="SysMsg" style="bottom: 0px; display:none; z-index: 999;">';
		html += '<img 	onclick="window.sysMsg[\''+this.id+'\'].checkClose();" style="position: absolute; top: 4px; right: 4px;"';
		html += ' 		src="template_image.php5?img=icons/toolbar/gif/16x16/Close.gif">';
		html += msg;
		html += '</div>';
		
		$('SysMsgContainer').innerHTML=html;
		
		
		new Effect.Parallel([
			new Effect.SlideDown("SysMsgBox_"+this.id, {}),  			
  			new Effect.Appear("SysMsgBox_"+this.id, {})
			], 
			{});
		
			
	}
	
	this.close = function ()
	{
		try
		{
				if (this.closedBox == false)	
			
				new Effect.Appear("SysMsgBox_"+this.id, {
								from: 1.0,
								to: 0.0,
								duration: 0.5,
								afterFinish: function(effect) 
								{
		        				
		        					try
		        					{
		        						$('SysMsgContainer').removeChild($(effect.element.id));
		        					
		        					}	
		        					catch (e)
		        					{
		        						throw e;
		        					}
		        				}
				});
				
				this.closedBox = true;
		}
		catch(e)
		{
			throw("EffectError: "+e);
		}
			
	}
	
	
	this.checkClose = function()
	{
		box = $('SysMsgBox_'+this.id);
		
		if (this.closedBox == false)
		 	this.close();
		
	}
	
	
	this.showMsg(msg);
	
	window.setTimeout('window.sysMsg["'+this.id+'"].checkClose();', 15000);
	
	window.sysMsg[this.id] = this;
}