onload = function() {
	var e, i = 0;
	while (e = document.getElementsByTagName ('B') [i++]) {
		if (e.className == 'switch2') { // для открытых блоков
		e.onclick = function () {
			this.className = this.className == 'switch2' ? 'switch' : 'switch off';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = x.className == 'show' ? 'hide' : 'show';
			}
		}	
		
		if (e.className == 'vswitch') { // для открытых блоков
		e.onclick = function () {
			this.className = this.className == 'vswitch' ? 'vswitch2' : 'vswitch voff';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = x.className == 'show' ? 'hide' : 'show';
			}
		}	
		
		if (e.className == 'switch') {
		e.onclick = function () {
			this.className = this.className == 'switch' ? 'switch off' : 'switch';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = x.className == 'show' ? 'hide' : 'show';
			}
		}
}
}