//cross-browser event handling for IE5+, NS6+ and Mozilla/Gecko
  //By Scott Andrew 
function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture); 
		return true; 
	} else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn); 
		return r; 
	} else {
		elm['on' + evType] = fn;
	}
} 
function windowLinks() {
	if (!document.getElementsByTagName)
		return;
	var all_links = document.getElementsByTagName('a');
	for (var i = 0; i<all_links.length; i++) {
		var link = all_links[i];
		if (link.className && (' ' + link.className + ' ').indexOf(' window ') != -1) {
			link.href = "javascript:nph_open_window('" + link.href + "', 'nph_window', 'width=400,height=400,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes')"
		}
	}
}
function nph_open_window(url, name, feature) {
	var new_window = window.open(url, name, feature);
	new_window.focus();
}
addEvent(window, 'load', windowLinks, false);