var temp = document.frmbook.id_arrivee; function update_cmb(x, vid_arrivee) { for (m = temp.options.length - 1; m > 0; m--) { temp.options[m]=null; } if (0 == x) { temp.options[0] = new Option("Arrivée", ""); } else { for (i = 0; i < group[x].length; i++) { temp.options[i] = new Option(group[x][i].text, group[x][i].value); } } temp.options[0].selected = true; if(vid_arrivee != undefined && vid_arrivee != "") { for(var i=0; i < temp.options.length; i++) { if(temp.options[i].value==vid_arrivee) { temp.options[i].selected = true; break; } } } } function getannee(isret) { aa = '2010'; aa = parseInt(aa); if(isret) { if(parseInt('7')>document.frmbook.Mois_Retour.options.selectedIndex+1) aa = aa + 1; else { if(parseInt('7')==document.frmbook.Mois_Retour.options.selectedIndex+1 && parseInt('30')>document.frmbook.Jour_Retour.options.selectedIndex+1) aa = aa +1; } } else { if(parseInt('7')>document.frmbook.Mois_Aller.options.selectedIndex+1) aa = aa + 1; else { if(parseInt('7')==document.frmbook.Mois_Aller.options.selectedIndex+1 && parseInt('30')>document.frmbook.Jour_Aller.options.selectedIndex+1) aa = aa +1; } } return aa; }