

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

	while (e = document.getElementById('gallery').getElementsByTagName ('B') [u++]) {
		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' : 'show';
			}
		}
	}
	
	while (k = document.getElementById('gallery3').getElementsByTagName ('B') [g++]) {
		if (k.className == 'switch3') {
		k.onmouseover = function () {
				var getEls = document.getElementById('gallery3').getElementsByTagName('DIV');
				for (var z=0; z<getEls.length; z++) {
				//alert(getEls.length);
				getEls[z].className=getEls[z].className.replace('show3', 'hide');
				w=getEls[z].previousSibling;
				while (w.nodeType!=1) {
					w=w.previousSibling;
					}
				w.className=w.className.replace('switch3 over', 'switch3');
				w.className=w.className.replace('switch3 off', 'switch3 over');
				}
			this.className = this.className == 'switch3' ? 'switch3 off' : 'switch3';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = this.className == 'switch3 off' ? 'show3' : 'show3';
			}
		}
	}
	
	
}
