var vLink = new Array (), vPart = new Array ();

window.onload = Init;

function Init () {
	var vList = document.getElementById ('tabs');
	if (vList)
	    for (var i = 0; i < vList.childNodes.length; i++)
	    		if (vList.childNodes[i].nodeType == 1)
				for (var j = 0; j < vList.childNodes[i].childNodes.length; j++)
					if (vList.childNodes[i].childNodes[j].nodeType == 1) {
						vList.childNodes[i].childNodes[j].onclick = setTab;
						vLink.push (vList.childNodes[i].childNodes[j]);
						vPart.push (document.getElementById ('link' + i + 'cnt'));
					}
}

function setTab () {
	for (var i = 0; i < vLink.length; i++) {
		vLink[i].className = '';
		vPart[i].style.display = 'none';
	}
	this.className = 'act';
	for (var i = 0; i < vLink.length; i++)
		if (vLink[i].className == 'act')
			vPart[i].style.display = 'block';
	return false;
}