
function Fillcheck()
{
	
	frm = document.form;
	alertText = '';
	
	if (frm.txtNev.value == '')
		alertText += 'Állat neve\n';
	
	if (frm.txtKor.value == '')
		alertText += 'Becsült kora\n';
	
	if (frm.txtKinek.value == '')
		alertText += 'Kinek ajánljuk\n';
		
	if (frm.txtKinekNem.value == '')
		alertText += 'Kinek nem ajánljuk\n';
		
	if (frm.txtEv.value == '' || frm.txtHonap.value == '' || frm.txtNap.value == '')
		alertText += 'Mióta él jelenlegi helyén?\n';	
	
	if (frm.cmbMenhely.value == '')
		alertText += 'Hol található?';	
		
	if (alertText == '')
	{
		document.form.submit();
	}
	else
	{
		alertText += '\n..kötelező!';
		alert(alertText);
	}
}

function ShowLine(checked)
{
	document.all.rowFajtaja.style.display = checked ? 'inline' : 'none';
}

function OpenWindow(name, target, width, height)
{
	window.open(target, name, 'width='+width+',height='+height+',resizable=yes,top=20,left=20, scrollbars=yes, toolbar=no, location=no, status=no, menubar=no, directories=no');
}

function CheckEmail(emailAddress)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return filter.test(emailAddress)
}

function GetGazdidata(id)
{
	OpenWindow('gazdidata', 'gazdidata.php?allatId='+id, 600, 600);
}
