	function showHide(shID) {
    if (document.getElementById(shID)) {
        if (document.getElementById(shID+'-show').style.display != 'none') {
            document.getElementById(shID+'-show').style.display = 'none';
            document.getElementById(shID).style.display = 'block';
        }
        else {
            document.getElementById(shID+'-show').style.display = 'inline';
            document.getElementById(shID).style.display = 'none';
        }
    }
}
initLabels();

/*
 * This function takes a single argument: the name of the function
 * that you want to execute when the page loads
 *
 * Written by Simon Willison (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();
		}
	}
}

/* 
 *  set focus on label click.  
 *  http://particletree.com/features/10-tips-to-a-better-form/
 */
function initLabels() {
    labels = document.getElementsByTagName("label");
    for(i = 0; i < labels.length; i++) {
        addEvent(labels[i], "click", labelFocus);
    }
}
function labelFocus() {
    new Field.focus(this.getAttribute('for'));
}
