var state = 'none';
var expand = '/js/popdown/expand.gif';
var collapse = '/js/popdown/collapse.gif';

function popdown(layer_ref,imageid) {
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "state = document.all." + layer_ref + ".style.display");
	}
        
	if (document.layers) { //IS NETSCAPE 4 or below
		state = document.layers[layer_ref].display;
	}
	if (document.getElementById &&!document.all) {
		hza = document.getElementById(layer_ref);
		state = hza.style.display;
	}
        if (state == 'block') {
		state = 'none';
	} else {
		state = 'block';
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById &&!document.all) {
		hza = document.getElementById(layer_ref);
		hza.style.display = state;
	}
        
	if (state == 'block') {
		document.images[imageid].src = collapse; //"weblib/images/arrow-open.png";
	} else {
		document.images[imageid].src = expand; //"weblib/images/arrow-closed.png";
	}
}
