function addEvent(elm,listener,fn){
	try{
		elm.addEventListener(listener,fn,false);
	}catch(e){
		elm.attachEvent("on"+listener,fn);
	}
}

addEvent(window,"load",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 += '';
}
}
};

function winOpen(url) {
window.open(
url,
'popup',
'width=870,height=750,scrollbars=1,resizable=1'
);

return false;
};

