	function ShowBus(xs,ys,img){
		szoveg="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+xs+",height="+ys+",left="+((screen.width/2)-(xs/2))+",top="+((screen.height/2)-(ys/2));
		preview = window.open("", "preview", szoveg);
		preview.document.open();
		preview.document.write("<html><head>");
		preview.document.write("<title>Autóbuszaink</title>");
		preview.document.write("</head><body topmargin=0 leftmargin=0 bgcolor=ffffff text=000000 onblur='javascript:self.close();'>");
		preview.document.write("<form><center>");
		preview.document.write("<a href='javascript:self.close()'><img hspace=0 border=0 vspace=0 height=" + ys +" width=" + xs + " src='" + img + "'></a>");
		preview.document.write("</center>");
		preview.document.write("</body></html>");
		preview.document.close();
	}

	function ShowKulonjaratBus(xs,ys,img){
		szoveg="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+xs+",height="+ys+",left="+((screen.width/2)-(xs/2))+",top="+((screen.height/2)-(ys/2));
		preview = window.open("", "preview", szoveg);
		preview.document.open();
		preview.document.write("<html><head>");
		preview.document.write('<base href="'+document.location.href+'"/>');
		preview.document.write("<title>Különjárati autóbuszaink</title>");
		preview.document.write("</head><body topmargin=0 leftmargin=0 bgcolor=ffffff text=000000 onblur='javascript:self.close();'>");
		preview.document.write("<form><center>");
		preview.document.write("<a href='javascript:self.close()'><img hspace=0 border=0 vspace=0 height=" + ys +" width=" + xs + " src='" + img + "'></a>");
		preview.document.write("</center>");
		preview.document.write("</body></html>");
		preview.document.close();
  }

  function domestic_find() {
  var error = null;
      Element.removeClassName('honnan_label', 'error');
      Element.removeClassName('hova_label', 'error');
      Element.removeClassName('startdate_label', 'error');
      Element.removeClassName('stopdate_label', 'error');            
      if(!document.getElementById('honnan').value) {
          Element.addClassName('honnan_label', 'error');
          error++;
      }
      if(!document.getElementById('hova').value) {
          Element.addClassName('hova_label', 'error');
          error++;
      }
      /*
      if(!document.getElementById('startdate').value) {
          Element.addClassName('startdate_label', 'error');
          error++;
      }
      if(document.getElementById('retur_radio').checked && !document.getElementById('stopdate').value) {
          Element.addClassName('stopdate_label', 'error');
          error++;
      }
      */
      if(!error) {
          document.getElementById('hova').value = document.getElementById('hova').value.toUpperCase();
          document.getElementById('honnan').value = document.getElementById('honnan').value.toUpperCase();
          document.domestic_indexform.submit();
      }
  }

  function changetab(i, lang) {
      if(i==1) {
          document.getElementById('act').className='domestic_active';
          if(lang == 'en') {
              document.getElementById('ina').className='international_inactive_en';            
              $('tudnivalok_en').update('<a href="/en/showtravcond_hu.php?belfold=1" onclick="OpenPopup(\'/en/showtravcond_hu.php?belfold=1\', 600, 400); return false;">booking guide</a>');
          }
          else {
              document.getElementById('ina').className='international_inactive';
              $('tudnivalok').update('<a href="/showtravcond_hu.php?belfold=1" onclick="OpenPopup(\'/showtravcond_hu.php?belfold=1\', 600, 400); return false;">tudnivalók</a>');
          }
          document.getElementById('domestic').style.display='';
          document.getElementById('international').style.display='none';
      }
      else {
          document.getElementById('act').className='domestic_inactive';
          if(lang == 'en') {
              document.getElementById('ina').className='international_active_en';
              $('tudnivalok_en').update('<a href="/en/showtravcond_hu.php" onclick="OpenPopup(\'/en/showtravcond_hu.php\', 600, 400); return false;">booking guide</a>');
          }
          else {
              document.getElementById('ina').className='international_active';
              $('tudnivalok').update('<a href="/showtravcond_hu.php" onclick="OpenPopup(\'/showtravcond_hu.php\', 600, 400); return false;">tudnivalók</a>');
          }
          document.getElementById('international').style.display='';
          document.getElementById('domestic').style.display='none';
      }
  return false;        
  }
  

	function display_image(xs,ys,pwd){
		szoveg="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+ys+",height="+xs;
		preview = window.open("", "preview", szoveg);
		preview.document.open();
		preview.document.write("<html><head>");
		preview.document.write("<title>Volánbusz</title>");
		preview.document.write("</head><body topmargin=0 leftmargin=0 bgcolor=ffffff text=000000 onblur='javascript:self.close();'>");
		preview.document.write("<form><center>");
		preview.document.write("<img hspace=0 vspace=0 height=" + xs +" width=" + ys + " src='" + pwd + "'>");
		preview.document.write("</center>");
		preview.document.write("</body></html>");
		preview.document.close();
	}
 
	function ShowPopUp(tpl, width, height, lng){
		var Wwidth = width != undefined ? width : 600;
		var Wheight = height != undefined ? height : 300;
		var lng = lng != undefined ? '&lng=en' : '';
		winDetails=window.open('/showpopup.php?template='+tpl+lng,'details','width='+Wwidth+',height='+Wheight+',left='+((screen.width/2)-(Wwidth/2))+',top='+((screen.height/2)-(Wheight/2))+',toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,dependent=yes');
		winDetails.focus()
	}

  function OpenPopup(url, Wwidth, Wheight) {
    winPopup=window.open(url,'details','width='+Wwidth+',height='+Wheight+',left='+((screen.width/2)-(Wwidth/2))+',top='+((screen.height/2)-(Wheight/2))+',toolbar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes,dependent=yes');
    winPopup.focus()
  }