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;
	}
}

var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
 if (newWin != null && !newWin.closed)
   newWin.close();
 var strOptions="";
 if (strType=="console")
   strOptions="resizable,scrollbars,location,height="+
     strHeight+",width="+strWidth;
 if (strType=="fixed")
   strOptions="status,height="+
     strHeight+",width="+strWidth;
 if (strType=="elastic")
   strOptions="toolbar,menubar,scrollbars,"+
     "resizable,location,height="+
     strHeight+",width="+strWidth;
 newWin = window.open(strURL, 'newWin', strOptions);
 newWin.focus();
}

function addPopUp() {

	if (!document.getElementsByTagName){ return; }
	
	var objLinks = document.getElementsByTagName('a');
	for (var i=0; i<objLinks.length; i++) {
	
		if (objLinks[i].href.indexOf('slideshow.php') != -1) {
			objLinks[i].onclick=function(){popUp(this.href, 'fixed', 650, 900);return false;};
		}
		
	}
	
}

addEvent(window, 'load', addPopUp, false);
