onload = function() {
	var e, i = 0;
	while (e = document.getElementById('tabs').getElementsByTagName ('DIV') [i++]) {
		if (e.className == 'tabon' || e.className == 'taboff') {
		e.onclick = function () {
			var getEls = document.getElementsByTagName('DIV');
				for (var z=0; z<getEls.length; z++) {
				getEls[z].className=getEls[z].className.replace('show', 'hide');
				getEls[z].className=getEls[z].className.replace('tabon', 'taboff');
				}
			this.className = 'tabon';
			var max = this.getAttribute('name');
			document.getElementById(max).className = "show";
			}
		}
	}
}
