
onload = function() {
	var e, i = 0;
	if(document.getElementById('gallery'))
	while (e = document.getElementById('gallery').getElementsByTagName ('B') [i++]) {
		if (e.className == 'switch') {
		e.onmouseover = function () {
				var getEls = document.getElementById('gallery').getElementsByTagName('DIV');
				for (var z=0; z<getEls.length; z++) {
				getEls[z].className=getEls[z].className.replace('show', 'hide');
				w=getEls[z].previousSibling;
				while (w.nodeType!=1) {
					w=w.previousSibling;
					}
				w.className=w.className.replace('switch over', 'switch');
				w.className=w.className.replace('switch off', 'switch over');
				}
			this.className = this.className == 'switch' ? 'switch off' : 'switch';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = this.className == 'switch off' ? 'show' : 'hide';
			}
		}
	}
}
