// JavaScript for collapsing areas

function toggleCollapse(widget,id)
{
	if (typeof widget != "object")
		widget = document.getElementById(widget)
	var box = document.getElementById(id)
	if (!box)
		return false;
	if (box.style.display == 'none') {
		box.style.display = 'block';
		if (widget)
			widget.src = '/images/icon-minus.png';
	} else {
		box.style.display = 'none';
		if (widget)
			widget.src = '/images/icon-plus.png';
	}
}
		
function highlight(widget,base)
{
	if (typeof widget != "object")
	{
		widget = document.getElementById(widget)
		if (!widget)
			return false;
	}
	widget.className = base + '_highlight';
}

function unhighlight(widget,base)
{
        if (typeof widget != "object")  
        {
                widget = document.getElementById(widget)
                if (!widget)
                        return false;
        }
        widget.className = base;
}

