function openpict(name){pictwin=window.open(name,'pictwin','statusbar=no, menubar=no, height=440, width=400. scrollbars=yes');pictwin.focus();}
function openbppict(name){pictwin=window.open('city-gallery.php?id='+name,'pictwin','statusbar=no, menubar=no, height=440, width=500. scrollbars=yes');pictwin.focus();}
function openreach(HID){pictwin=window.open('../reachus.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openreachde(HID){pictwin=window.open('../reachus_de.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openreachhu(HID){pictwin=window.open('../reachus_hu.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openprice(HID){pictwin=window.open('price.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openpricede(HID){pictwin=window.open('price_de.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openpricehu(HID){pictwin=window.open('price_hu.php?id='+HID,'pictwin','statusbar=no, menubar=no, height=500, width=650, scrollbars=yes, resizable=yes');pictwin.focus();}
function openprintpage(name){printwin=window.open(name,'printwin','statusbar=no, menubar=no, height=500, width=500. scrollbars=yes');printwin.focus();}
function nyomtat(){window.print();window.close();}
function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function wrongdays(day,month,year){month++;return((day>30&&(month==4||month==6||month==9||month==11))||(month==2&&day>daysInFebruary(year)))}
function calcdays(){Now=new Date();var DateArriv=new Date(document.Form.arry.value,document.Form.arrm.selectedIndex,document.Form.arrd.value,0,0,0,0);var DateDep=new Date(document.Form.depy.value,document.Form.depm.selectedIndex,document.Form.depd.value,0,0,0,0);DDelta=Math.round((DateDep-DateArriv)/86400000);if(DDelta<=0||DateArriv<=Now||wrongdays(document.Form.arrd.value,document.Form.arrm.selectedIndex,document.Form.arry.value)||wrongdays(document.Form.depd.value,document.Form.depm.selectedIndex,document.Form.depy.value)){DDelta="#";}
document.Form.nights.value=DDelta;}
function InitDays(){var novel1,novel2;novel1=1;novel2=1;X=new Date();X.setDate(X.getDate()+novel1);ev=X.getYear();if(!document.all)ev+=1900;ho=X.getMonth();nap=X.getDate();document.Form.arry.value=ev;document.Form.arrm.selectedIndex=ho;document.Form.arrd.value=nap;X.setDate(X.getDate()+novel2);ev=X.getYear();if(!document.all)ev+=1900;ho=X.getMonth();nap=X.getDate();document.Form.depy.value=ev;document.Form.depm.selectedIndex=ho;document.Form.depd.value=nap;calcdays();}