document.getElementsByClass = function(className) {
	var		allObj, retObj = new Array(), j=0;
	allObj = document.getElementsByTagName ? document.getElementsByTagName("*") : document.all ? document.all : 0;
	if(allObj!=0)
		for(i=0; i<allObj.length; i++)
			if(allObj[i].className==className)
				retObj[j++]=allObj[i];
	return retObj;
}

function handlePopup() {
	window.open(this.href,"popup","scrollbars=1,resizable=yes,height="+popupheight+",width="+popupwidth);
	return false;
}

function init_popups() {
	var popups = document.getElementsByClass("popup");
	for ( x=0;x<popups.length;x++ ) {
		popups[x].onclick = handlePopup;
	}
}
popupwidth=800;
popupheight=500;

window.onload = function() { init_popups() }