// Adds popup behaviour to any image with class=popup
//popup.htm must be present on the server for it to work
function setpops() {
var x = document.getElementsByTagName('a');
for (var i=0;i<x.length;i++) {
	if (x[i].getAttribute('type') == 'popup') {
		x[i].onclick = function () {
			PopupPic(this.href); return false;
		}
		x[i].title += ' (Popup)';
	}
}
}

function PopupPic(sPicURL) {
     window.open( "popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200");
}

window.onload=setpops;

