function autoPOP()
{
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++)
	{
		if (x[i].getAttribute('className') == 'popup' || x[i].getAttribute('class') == 'popup')
		{
			x[i].onclick = function () {
			return winOpen(this.href)
			}
			x[i].title += '';
		}
	}
	
};

function winOpen(url) {
	window.open(
		url,
		'popup',
		'width=560,height=600,scrollbars=1,resizable=1'
	);

	return false;
};

function addEvent ( elem, event, func ) {

	if ( elem.addEventListener ) {
		elem.addEventListener( event, func, false );
	} else {
		elem.attachEvent( 'on'+event, func );
	}
}

addEvent(
	window,
	'load',
	function () {
		autoPOP();
	}
);