/*A projekthez tartozó összes JS funkció gyűjtője*/

function toggleIt(node) {
	if (document.getElementById(node).style.display == "none") {
		document.getElementById(node).style.display = "block";
	} else {
		document.getElementById(node).style.display = "none";
	}
}

function popUp(url, windowName, height, width) {
	var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no");
	wnd.focus();
}

function popUpScroll(url, windowName, height, width) {
	var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes");
	wnd.focus();
}

function checkSzakertoForm() {
	if (document.forms.szakertoForm.nev.value == "" || document.forms.szakertoForm.nev.value == "az Ön neve" || document.forms.szakertoForm.email.value == "" || document.forms.szakertoForm.email.value == "az Ön e-mail címe" || document.forms.szakertoForm.kerdes.value == "" || document.forms.szakertoForm.kerdes.value == "az Ön kérdése" || document.forms.szakertoForm.code.value == "") {
		alert("Kérjük, töltse ki az űrlapot.");
		return false;
	} else if (document.forms.szakertoForm.email.value.indexOf('@') == -1 || document.forms.szakertoForm.email.value.indexOf('.') == -1) {
		alert("Nem megfelelő e-mail cím formátum.");
		return false;
	} else {
		return true;
	}
}