﻿

// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}


addLoadEvent( function() {
	var e, i = 0;
	while (e = document.getElementsByTagName ('B') [i++]) {
		if (e.className == 'switch') {
		e.onclick = function () {
			this.className = this.className == 'switch' ? 'switch off' : 'switch';
			this.nextSibling.className = this.className == 'switch' ? 'hide' : 'show';
			}
		}
	}
} );
