function logout(lng) {
	result = confirm('Biztosan kijelentkezel?') 
	if (result == true)
		document.location.href = "index.php?page=logout"
}

function CheckMessage() {
	if (document.msgForm.name.value == "") {
		alert("Add meg a neved!")
		document.msgForm.name.focus()
		return false
	}	
	if (document.msgForm.email.value == "") {
		alert("Add meg az e-mail címed!")
		document.msgForm.email.focus()
		return false
	}
	ValidMail = CheckMail(document.msgForm.email.value)
	if (!ValidMail) {
		alert("A megadott e-mail cím rossz formátumú!")
		document.msgForm.email.focus()
		return false
	}
	else if (document.msgForm.message.value == "") {
		alert("Nem írtál üzenetet!")
		document.msgForm.message.focus()
		return false
	}
	else if (document.msgForm.result.value == "") {
		alert("Nem töltötted ki az ellenőrző mezőt!")
		document.msgForm.result.focus()
		return false
	}
	else return true
}

function CheckSubscribe() {
	if (document.SubscribeForm.email.value == "") {
		alert("Add meg az e-mail címed!")
		document.SubscribeForm.email.focus()
		return false
	}
	ValidMail = CheckMail(document.SubscribeForm.email.value)
	if (!ValidMail) {
		alert("A megadott e-mail cím rossz formátumú!")
		document.SubscribeForm.email.focus()
		return false
	}
	else return true
}