function domit() {
	if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors .length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
		anchor.target = "_blank";
		anchor.title = (anchor.title != "") ? anchor.title+" (opens in a new window)" : "opens in a new window";
		anchor.className = (anchor.className != '') ? anchor.className+' external' : 'external';
		}
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popup") {
			anchor.onclick = function() {
				var pictitle = escape(this.title.replace(" (opens in a popup window)",""));
				url = escape(this.getAttribute("href"));
				window.open('/lrgview/?picurl='+url+'&pictitle='+pictitle,'popup','width=800,height=480,resizable=yes,scrollbars=yes');
				return false;
			  }
			anchor.title = (anchor.title != "") ? anchor.title+" (opens in a popup window)" : "opens in a popup window";
		}
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "photo") {
			anchor.onclick = function() {
				var pictitle = escape(this.title.replace(" (view large image)",""));
				url = this.getAttribute("href");
				chgImg(url);
				return false;
			  }
			anchor.title = (anchor.title != "") ? anchor.title+" (view large image)" : "view large image";
		}
	}
}
