﻿/*
	Szakértői rendszer js függvényei
	(cSuwwi)
*/

function selectSzaki(th) {
	
	if (th == "-") return false;
	
	var arr = th.split(";");
	var num = arr[0]-1;
	selObj = document.question.szaki;
	selObj.options[num].selected = true;
	document.question.temakor.value = arr[1];
}

function processQuestion () {
	
	if (document.question.tema.value == '-') return false;
	document.question.szakerto.value = document.question.szaki.value;
}

function tabs(id) {
	
	var ulroot = id.parentNode;
	var root = id.parentNode.parentNode;
	root.className = (ulroot.className == "szakertoink") ? 'ful' : 'ful kerdsel';
		
	if (ulroot.className == "szakertoink")
	{
		root.parentNode.getElementsByTagName("div")[0].style.display = 'block';
		root.parentNode.getElementsByTagName("div")[1].style.display = 'none';
	}
	else
	{
		root.parentNode.getElementsByTagName("div")[0].style.display = 'none';
		root.parentNode.getElementsByTagName("div")[1].style.display = 'block';
	}
}
