<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function submitForm() {
	document.belepes.submit();
	}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){
return (false);
							}
							}

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);
										}
					}
}
// -->

<!--
function check_form(reg) { // f is the form (passed using the this keyword)

if(reg.fnev.value.length < 1){
alert("Nem adtad meg a felhasználóneved.");
reg.fnev.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.fnev.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

// check the first email address ( the exclamation means "not" )
if(!check_email(reg.email.value)){
alert("Rossz az e-mail cím vagy nem adtad meg.");
reg.email.focus();
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.email.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}


if(reg.jelszo.value.length < 1){
alert("Nem adtad meg a jelszót.");
reg.jelszo.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.jelszo.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

if(reg.jelszo2.value.length < 1){
alert("Nem adtad meg a jelszót.");
reg.jelszo2.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.jelszo2.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

if(reg.jelszo.value != reg.jelszo2.value){
alert("A két jelsző nem egyezik.");
reg.jelszo.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.jelszo.style.background = "#66CCff";
reg.jelszo2.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}



if(reg.nev.value.length < 1){
alert("Nem adtad meg a neved.");
reg.nev.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.nev.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

if(reg.iranyitoszam.value.length < 1){
alert("Nem adtad meg az iranyitoszamot.");
reg.iranyitoszam.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.iranyitoszam.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

if(reg.varos.value.length < 1){
alert("Nem adtad meg a város nevét.");
reg.varos.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.varos.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}



if(reg.cim.value.length < 1){
alert("Nem adtál meg levelezési címet.");
reg.cim.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.cim.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}


if(reg.telefon.value.length < 1){
alert("Telefonszámot nem adtál meg.");
reg.telefon.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.telefon.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

// check the first email address ( the exclamation means "not" )
if(!check_email(reg.cemail.value)){
alert("Rossz az e-mail cím vagy nem adtad meg.");
reg.cemail.focus();
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.cemail.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}


if(reg.megye.value.length < 1){
alert("Válassz megyét.");
reg.megye.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.megye.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}

if(reg.orszag.value.length < 1){
alert("Válassz országot.");
reg.orszag.focus(); // put the prompt in the name field
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
reg.orszag.style.background = "#66CCff";
}
// make sure the form is not submitted
return false;
}


}
// -->
function toggle(state) {
	if(document.getElementById) {
		document.getElementById("reg").style.visibility = document.getElementById("reg").style.visibility = state;
	 }
}


function check_lst(lost) { 
	if(lost.felh_nev.value.length < 1){
	alert("Nem adtad meg a felhasználó neved.");
	lost.felh_nev.focus(); // put the prompt in the name field
	// if the browser is Netscape 6 or IE
		if(document.all || document.getElementByID){
		// change the color of text field
		lost.felh_nev.style.background = "#66CCff";
		}
	// make sure the form is not submitted
	return false;
	}

	if(!check_email(lost.email.value)){
	alert("Rossz az e-mail cím vagy nem adtad meg.");
	lost.email.focus();
	// if the browser is Netscape 6 or IE
		if(document.all || document.getElementByID){
		// change the color of text field
		lost.email.style.background = "#66CCff";
		}
	// make sure the form is not submitted
	return false;
	}

}

function check_km(keres) { 
	if(keres.minPrice.value*1000 > keres.maxPrice.value*1000){
	alert("Az értékeket nem jól adtad meg.");
	keres.minPrice.focus(); // put the prompt in the name field
	// if the browser is Netscape 6 or IE
		if(document.all || document.getElementByID){
		// change the color of text field
		keres.minPrice.style.background = "#66CCff";
		keres.maxPrice.style.background = "#66CCff";
		}
	// make sure the form is not submitted
	return false;
	}
}

function check_licit(licital) { 
	if(licital.akt_licit.value < licital.akt.value+licital.lepcso.value){
	alert("A licit lépcső nem megfelelő.");
	licital.akt_licit.focus(); // put the prompt in the name field
	// if the browser is Netscape 6 or IE
		if(document.all || document.getElementByID){
		// change the color of text field
		licital.akt_licit.style.background = "#66CCff";
		}
	// make sure the form is not submitted
	return false;
	}
}

