function preloadPopups() {
  elements = document.getElementsByTagName('a');
  for (i=0; i<elements.length; i++) {
	link_href = elements[i].href;
	link_target = elements[i].target;
	dot_position = link_href.lastIndexOf('.');
	if (dot_position!=-1 && link_target=='_blank') {
	  link_type = link_href.substring(dot_position+1).toLowerCase();
	  q_position = link_type.lastIndexOf('?');
	  if (q_position!=-1) {
		link_type = link_type.substring(0, q_position);
	  }
	  if (link_type=='jpg' || link_type=='gif' || link_type=='jpeg' || link_type=='png') {
		elements[i].onclick = function popupImage() {
		  newWindow = window.open("", "popupWindow", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150");
		  if (this.alt) img_title = this.alt;
		  else if (this.title) img_title = this.title;
		  else img_title = '';
		  newWindow.document.open();
		  newWindow.document.write("<html>\n<head>\n  <title>"+img_title+"</title>\n  <meta http-equiv=\"content-type\" content=\"text/html; charset=windows-2151\" />\n</head>\n<body style=\"margin: 0px;\" onload=\"var j=0; if (navigator.appName != 'Netscape') j = 4; if (document.images[0]) window.resizeTo(document.images[0].width+8+j, document.images[0].height+51); self.focus();\"><img src=\""+this.href+"\" alt=\""+img_title+"\""+(img_title ? " title=\" "+img_title+" \"" : "")+" border=\"0\" /></body>\n</html>");
		  newWindow.document.close();
		  return false;
		}
	  }
	}
  }
}