/**
* javascript for menus on selectors choice
*
*/

showdiv = function(layer_ref) {
    state = 'block';
    showhide(layer_ref, state);
};

    hidediv = function(layer_ref) {
	state = 'none';
	showhide(layer_ref,state);
    } 

    showhide = function(layer_ref, state) {
	hza = document.getElementById(layer_ref);
	hza.style.display = state;
    }

    hide_all = function() {
	var divs = Array('events','podcasts','about','links');
	for ( var ii = 0; ii < divs.length; ii ++ ) {
            hidediv(divs[ii]);
	}
    }    

    show_links = function() {
	hide_all();
	showdiv('links');
    }
    show_events = function() {
	hide_all();
	showdiv('events');
    }

    show_music = function() {
	hide_all();
	showdiv('podcasts');
    }

    show_about = function() {
	hide_all();
	showdiv('about');
    }

    addLoadEvent = function(func) { 
	var oldonload = window.onload; 
	if (typeof window.onload != 'function') { 
	    window.onload = func; 
	} else { 
	    window.onload = function() { 
		if (oldonload) { 
		    oldonload(); 
		} 
		func(); 
	    } 
	} 
    } 
