/**
 * @copyright Copyright &copy; 2006, NetArt
 */

 
var popups =
{
	init: function()
	{
		var links = document.getElementsByTagName('a');
		for(var i=0; i<links.length; i++)
		{
			if ((links[i].className + '').match(/^popup/i))
			{
				//this.decorate(links[i]);
				links[i].onclick = this.popup;
			}
		}

		return true;
	},

	popup: function()
	{
		try {
			window.open(this.href, '_blank', 'width=600, height=500, left=0, top=10, scrollbars=yes, resizable=yes');
		}

		catch(e){}
		return false;
	},

	load: function()
	{
		var obj = this;
		window.onload = function()
		{
			obj.init();
		}
	},
	
	decorate: function(element)
	{
		var param = element.className.replace(/^popup\_/g,'');
		var pos = element.href.indexOf('/',8)
		var before = element.href.substring(0, pos);
		var after = element.href.substring(pos + 1);

		element.href = before + '/' + param + '/' + after;
	}	
	
};


popups.load();