Minimal HTML markup with unobtrusive javascript that degrades nicely when browser javascript is turned off or non-existent.
function prepareLinks() {
if (!document.getElementsByTagName) return false;
var links = document.getElementsByTagName("a");
for (var i=0; i<links.length; i++) {
if (links[i].className.match("popup")) {
links[i].onclick = function() {
popUp(this.getAttribute("href"));
return false;
}
}
}
}
function popUp (winURL) {
window.open(winURL,"popup","width=300,height=400");
}