var _config_live_site='http://www.deinflirt24.de/';
var index_php='';

function site_url(url)
{
	return _config_live_site+index_php+url;
}

_config_currentDate=function(onlyDate)
{
	var date=new Date();
	
	if (!$defined(onlyDate)) time=", "+date.toLocaleTimeString();
	else time="";
	
	var title=date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear()+time;
	return title;
};

Element.Events.keyctrlenter = 
{
	base: 'keyup',
	condition: function(e)
	{
		return e.key=='enter' && e.control;
	}
};

Element.Events.keyenter = 
{
	base: 'keyup',
	condition: function(e)
	{
		return e.key=='enter';
	}
};

Element.Properties.elementProps = 
{
	set: function(props)
	{
		return this.eliminate('elementProps').store('elementProps', props);
	},

	get: function(props)
	{
		if (props) this.set(props);
		if (this.retrieve('elementProps')) return this.retrieve('elementProps');
		if (this.getProperty('elementProps'))
		{
			try 
			{
				this.store('elementProps', JSON.decode(this.getProperty('elementProps')));
			}
			catch(e)
			{
				return {};
			}
		} 
		else 
		{
			var vals = this.get('class').split(' ').filter(function(cls)
			{
				return cls.test(':');
			});
			if (!vals.length)
			{
				this.store('elementProps', {});
			} 
			else 
			{
				props = {};
				vals.each(function(cls)
				{
					var split = cls.split(':');
					if (split[1]) 
					{
						try 
						{
							props[split[0]] = JSON.decode(split[1]);
						} 
						catch(e) {}
					}
				});
				this.store('elementProps', props);
			}
		}
		return this.retrieve('elementProps');
	}
};