
function changePartnerBox()
{
	var obj = document.getElementById("container_partnerbox");
	var disp = 	obj.getAttribute("style");

	if (disp == "" || disp == null) obj.setAttribute("style", "display: none");
	else obj.setAttribute("style", "");

	obj = document.getElementById("container_receptkereso");
	disp = 	obj.getAttribute("style");

	if (disp == "" || disp == null) obj.setAttribute("style", "display: none");
	else obj.setAttribute("style", "");
}

function lapajanlo()
{
	var link = document.getElementsByTagName('base')[0].href
		+ "index.php?page=ajanlo&action=form&href=" + document.location;
	window.open(link, "_blank",
		'width=504,height=404,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=1');
	return false;
}

function switchPage(nr)
{
	var i = 1;
	var obj;
	while (obj = document.getElementById("cpage_"+i)) {
		if (i == nr) obj.style.display = 'block';
		else  obj.style.display = 'none';
		i++;
	}

	var lnk = document.location.href;

	if (lnk.indexOf("#cikktop") > 0) lnk = document.location.href;
	else lnk = document.location.href + "#cikktop";

	document.getElementById("cpagea_"+nr).href = lnk;
	return true;
}

function check_regisztracio()
{
	var obj = document.forms["regisztracio"].elements;

	if (obj["reg[nev]"].value == "") {
		alert("Kérem adja meg a nevét!");
		return false;
	}
	if (obj["reg[username]"].value == "") {
		alert("Kérem adja meg a felhasználói nevet!");
		return false;
	}
	if (obj["reg[email]"].value == "") {
		alert("Kérem adja meg az email címét!");
		return false;
	}
	if (obj["reg[password]"].value == "") {
		alert("Kérem adja meg a jelszavát!");
		return false;
	}
	if (obj["reg[password]"].value != obj["password2"].value) {
		alert("Nem egyezik meg a két jelszó!");
		return false;
	}
	return true;
}

function picPopup(picpath)
{
	var link = document.getElementsByTagName('base')[0].href;
	window.open(
		link+
		"/jsext/tiny_mce/plugins/imanager/scripts/popup.php?url="+picpath+
		"&clTxt=Click on image to close window","Image",
		"width=500, height=300, scrollbars=no, toolbar=no, location=no, status=no, "+
		"resizable=yes, screenX=100, screenY=100");
	return false;
}