
function hideAll()
{
	var nodeList;
	if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
		nodeList = document.all.tags["TABLE"]
	else
		nodeList = document.getElementsByTagName("TABLE");
	for (var i = 0; i < nodeList.length; i++)
		if (nodeList[i].className == "subnode")
			nodeList[i].style.display = "none";
}

function deselectAll()
{
	var nodeList;
	if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
		nodeList = document.anchors;
	else
		nodeList = document.getElementsByTagName("A");
	for (var i = 0; i < nodeList.length; i++)
		if (nodeList[i].className == "node_selected")
			nodeList[i].className = "node";
}

function showBranch(endnode)
{
	if (endnode != null && endnode.style != null && endnode.style.display != null)
		endnode.style.display = "block";
	var pnode = endnode.parentNode;
	while (pnode) {
		if (pnode.className == "subnode")
			pnode.style.display = "block";
		pnode = pnode.parentNode;
	}
	return false;
}

function TS(node)
{
//	if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
//		alert("ToggleSibling("+node.nodeName+"), className="+node.className);
	togglenode = node.nextSibling;
	if (node.className == "node_selected") {
		// Clicked already selected node
		deselectAll();
		node.className = "node_selected";
		if (togglenode != null && togglenode.style != null && togglenode.style.display != null) {
			if (togglenode.style.display == "block") {
				togglenode.style.display = "none";
			} else
				togglenode.style.display = "block";
		}
	} else {
		deselectAll();
		hideAll();
		node.className = "node_selected";
		if (togglenode != null)
			showBranch(togglenode);
		else
			showBranch(node);
	}
}

function SchTreeC(node, cattype, catid, ident, clickopen)
{
	newprosahref = schShowArticle + "?category_type="+cattype+"&category_id="+catid+"&art_event=GET_CATEGORY&art_categoryId="+catid+"&ident="+schillinglistprefix+ident+"&art_sorttype=ART_PRIORITY&art_pageId=1";
	if (clickopen)
		newprosahref += "&category_event=CLICKOPEN";
	else
		newprosahref += "&category_event=CLICKCLOSE";
	node.className = "schnodeactive";
	changeProsaHref(newprosahref);
}

function SchRTreeC(node, cattype, catid, ident, clickopen)
{
	newprosahref = schShowArticle + "?category_type="+cattype+"&art_categoryType="+cattype+"&category_id="+catid+"&art_event=GET_CATEGORY&art_categoryId="+catid+"&ident="+schillinglistprefix+ident+"&art_sorttype=ART_PRIORITY&art_pageId=1";
	if (clickopen)
		newprosahref += "&category_event=CLICKOPEN";
	else
		newprosahref += "&category_event=CLICKCLOSE";
	changeProsaHref(newprosahref);
}

function SchCourseTreeC(node, cattype, catid, ident, clickopen)
{
	newprosahref = schShowArticle + "?category_type="+cattype+"&category_id="+catid+"&art_event=GET_COURSECATEGORY&art_categoryId="+catid+"&ident="+schillinglistprefix+ident+"&art_sorttype=COURSESTART";
	if (clickopen)
        newprosahref += "&category_event=CLICKOPEN";
	else
        newprosahref += "&category_event=CLICKCLOSE";
	changeProsaHref(newprosahref);
}


function SchRTree(node, cattype, catid, ident, clickopen)
{
	newprosahref = schShowArticle + "?category_type="+cattype+"&art_categoryType="+cattype+"&category_id="+catid+"&art_event=GET_CATEGORY&art_categoryId="+catid+"&ident="+schillinglistprefix+ident+"&art_sorttype=ART_PRIORITY&art_pageId=1";
	if (clickopen)
		newprosahref += "&category_event=CLICKOPEN";
	changeProsaHref(newprosahref);
}

