//CFG ////////////////////////////////////////////////////////
hightlight = 1;				//href megjelölése (0/1)
hightlightBc = '#fdf403';	//megjelölés színe (#ffffff/white)
//PRG ////////////////////////////////////////////////////////
function onKey() {
	if(0) { //V2.0 -> elvetett project
		//alert('SZÓ: ' + document.getElementById('keywords_input').value + '\nTÖMB: ' + jsCatArrName[document.getElementById('cat').value]);
		keyWord = document.getElementById('keywords_input').value;
		catWord = jsCatArrName[document.getElementById('cat').value];
		catWordSplit = catWord.split(', ');
		//document.getElementById('jsConsole').innerHTML = '-- load: JS-CONSOLE<hr>';
		for(i = 0; i < catWordSplit.length; i++) {
			if(catWordSplit[i] != '') {
				document.getElementById('jsConsole').innerHTML += ' - Ellenőriz: ' + catWordSplit[i] + '<br>';
				if(catWordSplit[i] + ',' == keyWord) {
					document.getElementById('jsConsole').innerHTML += ' - Megjelöl: ' + catWordSplit[i] + '<br>';
					//alert('BEJELÖL: ' + catWordSplit[i] + ',');
				}
			}
		}
	}
}
function inOut(sid,text) {
	input = 1;
	output = 0;
	stepnull = 0;
	stepabsolutnull = 0;
	inputForm = document.getElementById('keywords_input').value;
	inputFormSplit = inputForm.split(', ');
	//Ellenőriz
	if(inputFormSplit.length == 1) {
		stepabsolutnull = 1;
	}
	for(x = 0; x < inputFormSplit.length; x++) {
		if(inputFormSplit[x] == text) {
			input = 0;
			output = 1;
			if(x == 0) {
				stepnull = 1;
			}
		}
	}
	//Betesz
	if(input == 1) {
		if(inputForm) {
			coma = ', ';
		} else {
			coma = ''
		}
		document.getElementById('keywords_input').value = inputForm + coma + text;
		if(hightlight == 1) {
			document.getElementById(sid).style.backgroundColor = hightlightBc;
		}
	}
	//Kivesz
	if(output == 1) {
		if(stepabsolutnull == 1) {
			coma0 = '';
			coma1 = '';
		} else {
			if(stepnull == 1) {
				coma0 = '';
				coma1 = ', ';
			} else {
				coma0 = ', ';
				coma1 = '';
			}
		}
		document.getElementById('keywords_input').value = inputForm.replace(coma0 + text + coma1,'');
		if(hightlight == 1) {
			document.getElementById(sid).style.backgroundColor = '';
		}
	}
}