window.onload=autoPOP;

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 += '(Popup)';
		}
		if (x[i].getAttribute('className') == 'popup2' || x[i].getAttribute('class') == 'popup2')
		{
			x[i].onclick = function () {
			return winOpen2(this.href)
			}
			x[i].title += '(Popup2)';
		}
		if (x[i].getAttribute('className') == 'popup3' || x[i].getAttribute('class') == 'popup3')
		{
			x[i].onclick = function () {
			return winOpen3(this.href)
			}
			x[i].title += '(Popup3)';
		}
	}
};
function winOpen(url) {
	window.open(
		url,
		'popup',
		'width=620,height=728,scrollbars=1,resizable=1'
	);

	return false;
};
function winOpen2(url) {
	window.open(
		url,
		'popup2',
		'width=720,height=760,scrollbars=1,resizable=1'
	);

	return false;
};
function winOpen3(url) {
	window.open(
		url,
		'popup3',
		'width=720,height=550,scrollbars=1,resizable=1'
	);

	return false;
};

