function oinf(url,sz,m,scroll){
   window.open(url,"_blank","width=" + sz + ",height=" + m + ",status='no',toolbar='no',titlebar='no',resizeable='no',menubar='no',scrollbars='" + scroll + "',location='no'");
   return false;
}

function submit1(){
 if (document.form1.hely.selectedIndex == 0 && document.form1.tip.selectedIndex == 0) {
   window.alert('Legalább az egyik keresési feltételt meg kell adnia!');
   return false;
  } else return true;  
}

function kitolt(h){
  document.form1.hely.selectedIndex = h;
}

function reset(tip){
  document.form1.tip.selectedIndex = 0;
  document.form1.hely.selectedIndex = 0;
  if (tip == 2){
    document.form1.helyseg.selectedIndex = 0;
    document.form1.epanyag.selectedIndex = 0;
    document.form1.itol.value = "";
    document.form1.iig.value = "";
  }  
}

function submit2(){
 var hiba = "";
 var tol = document.form1.itol.value;
 var ig = document.form1.iig.value;
 if (document.form1.hely.selectedIndex == 0 && document.form1.tip.selectedIndex == 0 && document.form1.helyseg.selectedIndex == 0) 
   hiba = "Az ingatlan jellegét vagy az ingatlan helyének valamelyik meghatározását meg kell adnia!";
 if (hiba == ""){
   if ((tol != '' && isNaN(tol)) || (ig != '' && isNaN(ig)))
     hiba = 'Az \"Irányár (tól-ig)\" mezők csak számot tartalmazhatnak!';
 }
 if (hiba == ""){
   if (tol != '' && ig != '' && Number(tol) > Number(tol))
    hiba = 'A irányár \"ig\" értéke nem lehet kisebb, mint a \"tól\" érték!';
 } 
 
 if (hiba == "") return true;
  else {
    window.alert(hiba);
	return false;
  }
}

function change1(){
  if (document.form1.hely.selectedIndex != 0) document.form1.helyseg.selectedIndex = 0;
}

function change2(){
  if (document.form1.helyseg.selectedIndex != 0) document.form1.hely.selectedIndex = 0;
}
