$ = function(id) { return document.getElementById(id); };

pixshow = {	img: [],
	preload: function() {
		if( document.images ) {
			this.img[0] = new Image();
			this.img[0].src = 'images/pic0.jpg'; 
			this.img[1] = new Image();
			this.img[1].src = 'images/pic1.jpg'; 
			this.img[2] = new Image();
			this.img[2].src = 'images/pic2.jpg'; 
			this.img[3] = new Image();
			this.img[3].src = 'images/pic3.jpg'; 
			this.img[4] = new Image();
			this.img[4].src = 'images/pic4.jpg'; 
		}
	},

	displaypic: function(idx) {
	 if( idx < 5 )
		$('bigimg').src = this.img[idx].src;
	}
};

load = function() {
	pixshow.preload();
	imgtags = $('thumbs').getElementsByTagName('img');
	for( var i = 0; i < imgtags.length; ++i )
		imgtags[i].onmouseover = function(e) { e = e || event;
			var tgt = e.target || e.srcElement;
			pixshow.displaypic(tgt.getAttribute('num'));
		};
};

