<!--

function selectAll(formName, comboName){
var i=0;

	tree_list = document.getElementById(comboName);
	for (;i<tree_list.options.length;i++) {
//	for (;i<7;i++) {

		tree_list.options[i].selected=true;
	}
	return true;
}

function treelist_add(formName, comboName, atext, avalue ){
var exists = false;
	tree_list = document.getElementById(comboName);
	for (j=0; j<tree_list.options.length; j++) {
//	for (j=0; j<7; j++) {

		if (tree_list.options[j].value == avalue) {exists=true;}
	}
	if (exists==false){
		opt = document.createElement("OPTION");
		opt.text = atext;
		opt.value = avalue;
		opt.style.backgroundColor = 'transparent';
		tree_list.options[tree_list.length] = opt;
		selectAll(formName, comboName);
	}
}

function treeitem_delete(formName, comboName) {

	tree_list = document.getElementById(comboName);

	hossz = tree_list.options.length;
	for (j=hossz-1; j>=0 ; j--) {
		if (tree_list.options[j].selected) {tree_list.remove(j)}
	}    
}

function nace_ablak_fel(formName, comboName,tablename,linkall) {

	var url = './common/popup_index4.html?form='+formName+'&list='+comboName+'&table='+tablename+'&linkall='+linkall;
	tree_window=window.open(url,"naces", "scrollbars=1, toolbar=0,location=0,directories=0,status=0,menubar=0, resizable=0, width=700, height=600");
	tree_window.moveTo(300,100);
	tree_window.focus();
}

function filter_popup(formName,comboName,formid,action,iformid) {

	var url = './details.php?mod=popup&paction=filter&form='+formName+'&list='+comboName+'&formid='+formid+'&action='+action;
	if (iformid) {
	    url += '&iformid='+iformid;
	}
	tree_window=window.open(url,"filter", "scrollbars=1, toolbar=0,location=0,directories=0,status=0,menubar=0, resizable=0, width=700, height=600");
	tree_window.moveTo(300,100);
	tree_window.focus();
}

function keyword_popup(formName, comboName,tablename,linkall) {
	var url = '../ptPortal/common/popup_index_keyword.html?form='+formName+'&list='+comboName+'&table='+tablename+'&linkall='+linkall;
	tree_window=window.open(url,"keywords", "scrollbars=1, toolbar=0,location=0,directories=0,status=0,menubar=0, resizable=0, width=700, height=600");
	tree_window.moveTo(300,100);
	tree_window.focus();
}
//-->
