	  function replaceFormFields(what,text,by) {
	      for (var i=0; i<what.elements.length;i++) {
	          if (what.elements[i].type == 'text' || what.elements[i].type == 'textarea')
	              what.elements[i].value = replace(what.elements[i].value,text,by);
	      }
	  }
	
	  function replace(string,text,by) {
	    var strLength = string.length, txtLength = text.length;
	    if ((strLength == 0) || (txtLength == 0)) return string;
	
	    var i = string.indexOf(text);
	    if ((!i) && (text != string.substring(0,txtLength))) return string;
	    if (i == -1) return string;
	
	    var newstr = string.substring(0,i) + by;
	
	    if (i+txtLength < strLength)
	        newstr += replace(string.substring(i+txtLength,strLength),text,by);
	
	    return newstr;
	  }
	
	  function replaceFormFields(what,text,by) {
	      for (var i=0; i<what.elements.length;i++) {
	          if (what.elements[i].name.indexOf('text') != -1)
	              what.elements[i].value = replace(what.elements[i].value,text,by);
	      }
	  }
	
	  function validate(theform, form_no_name, form_no_email, form_no_person_num, form_errors) {
	    errors='';
	    if(!theform.nev.value) {
	      errors+=form_no_name+'\n';
	    }
	    if(!theform.email.value) {
	      errors+=form_no_email+'\n';
	    }
/*	    if(theform.arrival.value>theform.departure.value) {
 *	      errors+='<? echo $GLOBALS['lang']['form_arrive_depart_error']; ?>\n'
 *	    }
*/	    if((theform.felnott.value+theform.gyerek1.value+theform.gyerek2.value)==0) {
	      errors+=form_no_person_num+'\n';
	    }
	    if(errors) {
	      alert(form_errors+'\n\n'+errors);
	    } else {
	      replaceFormFields(theform,'õ','ö');
	      replaceFormFields(theform,'Õ','Ö');
	      replaceFormFields(theform,'û','ü');
	      replaceFormFields(theform,'Û','Ü');
	    }
	    document.is_valid=(errors=='');
	  }