
  
var makeup = {
	
	'a.mailto' : function(el) {
		el.onclick = function() {
			this.href = "mailto:" + this.title.replace(/\[at\]/, "@");
		}
	},
	
	'a.outgoing' : function(el) {
		el.onclick = function() {
			this.target = "_blank";
		}
	},
	
	'.print' : function(el) {
		el.onclick = function() {
		window.print();
		}
	},
	
	'#thumbs a' : function(el) {
		el.onclick = function() {
		theImage="/images/pictures/" + getFileName(this.firstChild.src);
		document.getElementById("mainimage").src=theImage;
		}
	}
};

Behaviour.register(makeup);

/* no frames  */
if (top != self) top.location.href = location.href;

function getFileName(theUrl) {
	urlChar=theUrl.lastIndexOf("/");
	urlLength=theUrl.length;
	theImage=theUrl.substring((urlChar+1),urlLength);
	return theImage;
}

function writeThumbs() {
var theLine="";

for (var i = 0; i < theThumbs.length; i++) {
  theLine=theLine + '<a href="javascript:;" class=""><img src="/images/thumbs/' + theThumbs[i] + '" width="100" alt="' + theThumbs[i] + '" /></a>';
   }
document.getElementById("thumbs").innerHTML=theLine;
}
