// Отображение/скрытие объекта
function popup(id) 
{
	var itm = null;
	if (document.getElementById) {
		itm = document.getElementById(id);
	} else if (document.all){
		itm = document.all[id];
	} else if (document.layers){
		itm = document.layers[id];
	}	
	if (!itm) {
	// do nothing
	}
	else if (itm.style) {
		if (itm.style.display == "none") { itm.style.display = ""; }
		else { itm.style.display = "none"; }
	}
	else { itm.visibility = "show"; }
}

function popup_all () 
{
	var ids = document.getElementById("list").getAttribute("list").split(", ");
	var link = document.getElementById("link");
	if (link.firstChild.nodeValue == "описание ролей") {
		link.firstChild.nodeValue = "список ролей";
	} else {
		link.firstChild.nodeValue = "описание ролей";
	}
	for (var i = 0; i < ids.length; i++) {
		popup ('r' + ids[i]);
	}
}