/*
 * @param element is an anchor tag
 * @param resize Resize the selector container to create room for the opened selector.
 */
function selectKVSItem(element, resize)
{
	var siblings = element.parentNode.parentNode.childNodes; // all LI elements
	for (i=0; i < siblings.length; i++) {
		siblings[i]/* LI */.firstChild/* A */.nextSibling/* DIV */.style.display = 'none';
		siblings[i]/* LI */.className = '';
	}
	element.nextSibling.style.display = '';
	if (resize) {
		KVSresizeToFit(element)
	}
	element.parentNode.className = 'act';
}

function KVSresizeToFit(element)
{
	/*var container = document.getElementById('selectorContainer');
	var containerHeight =
		(element.parentNode.offsetTop - container.offsetTop) + element.nextSibling.offsetHeight;
	container.style.height = containerHeight + "px";
	document.title = (element.parentNode.offsetTop - container.offsetTop);*/
}
function deselectAllGroups()
{
	var inputs = document.getElementsByTagName('input');
	for (var i = 0; i < inputs.length; i++) {
		if (inputs[i].type == 'checkbox') {
			inputs[i].checked = false;
		}
	}
}
function unsubscribeComplete()
{
	deselectAllGroups();
	document.forms['unsubscribe_form'].submit();
}
