// NAVIGATION
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("tantargyak");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}


//Image rollover

	function move_in(img_name,img_src) {
	document[img_name].src=img_src;
	}

	function move_out(img_name,img_src) {
	document[img_name].src=img_src;
	}

function hide_element(id) {
	if (document.getElementById(id)) {
		MainID = document.getElementById(id);
		MainID.style.display = 'none';
	}
}

function show_element(id) {
	if (document.getElementById(id)) {
		MainID = document.getElementById(id);
		MainID.style.display = '';
	}
}

function change(id,pre, visiblename){
	     if (!pre) pre = 'SubjectMenu';
	     if (!visiblename) visiblename = 'block';
	     if (document.getElementById(pre+id)) {
	     	MainID = document.getElementById(pre+id);
		     if(MainID.style.display == 'none') {
		          MainID.style.display = '';
		     }
		     else {
		          MainID.style.display = 'none';
		     }
	     }
	}

function searchboxchange(selected, magantanarid, tanfolyamid, forditokid) {
	HideSubjectSearch(magantanarid); 
	HideSubjectSearch(tanfolyamid);
	HideSubjectSearch(forditokid);
	change(selected,'SubjectSearch');
	if (selected==magantanarid) {
		show_element('row_magantanar_level');
		show_element('row_on_line');
		show_element('row_lesson_at');
	} else {
		hide_element('row_magantanar_level');
		hide_element('row_on_line');
		hide_element('row_lesson_at');
	}
}

function HideSubjectSearch(id, pre) {
	if (!pre) pre = 'SubjectSearch';
	if (document.getElementById(pre+id)) {
		MainID = document.getElementById(pre+id);
		MainID.style.display = "none";
	}
}

function ShowSubjectSearch(id, pre) {
	if (!pre) pre = 'SubjectSearch';
	if (document.getElementById(pre+id)) {
		MainID = document.getElementById(pre+id);
		MainID.style.display = "block";
	}
}

