/*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 checkPartnerForm() {
	if (!(document.forms.partnerForm.zip.value >= 1000 && document.forms.partnerForm.zip.value <= 9999)) {
		alert("Kérjük az irányítószámot csak számjegyekkel adja meg.");
		return false;
	} else {
		return true;
	}
}

function checkPartnerFormMain() {
	if (!(document.forms.partnerFormMain.zip.value >= 1000 && document.forms.partnerFormMain.zip.value <= 9999)) {
		alert("Kérjük az irányítószámot csak számjegyekkel adja meg.");
		return false;
	} else {
		return true;
	}
}