var childageclassname="hotelchildrenages";var hotelschildrenclassname="hotelchildren";function showWidgetLayer(a){if(a.length>0){document.getElementById(a).style.display=""}}function hideWidgetLayer(a){if(a.length>0){document.getElementById(a).style.display="none"}}function change_child(c,g,h,k,b){var f=h.split("|");var d=c.options.selectedIndex;hideWidgetLayer(g);if(CountChildren(k)>0){showWidgetLayer(g)}for(i=0;i<f.length;i++){hideWidgetLayer(f[i]);ResetIndex(document.getElementById(f[i]));var e=i+1;var a=$get(b+"_ctl0"+e+"_valHotelsChildAge");ValidatorEnable(a,false);if(i<=d-1&&d!=0){showWidgetLayer(f[i]);ValidatorEnable(a,true)}}}function change_div(b,n,c,h,g){var o=c.split("|");var k=h.split("|");var a=g.split("|");var f=b.options.selectedIndex;for(i=0;i<o.length;i++){showWidgetLayer(o[i]);if(i>f){var m=i*3;var d=document.getElementById(o[i]).getElementsByTagName("select");for(j=0;j<d.length;j++){ResetIndex(d[j]);if(d[j].className.indexOf(childageclassname)>-1){hideWidgetLayer(d[j].id);try{ValidatorEnable($get(k[m]),false)}catch(l){}m++}}hideWidgetLayer(o[i]);try{ValidatorEnable($get(a[i]),false)}catch(l){}}}}function CountChildren(a){var c=0;var b=document.getElementById(a).getElementsByTagName("select");for(j=0;j<b.length;j++){if(b[j].className.indexOf(hotelschildrenclassname)>-1&&b[j].selectedIndex>=1){c+=1}}return c}function CheckTotalInRoom(c,e,h){var d=document.getElementById(c);var a=document.getElementById(e);var g=document.getElementById(h);var k=d.options[d.options.selectedIndex].value;var f=a.options[a.options.selectedIndex].value;var b=(parseInt(k)+parseInt(f));g.value=b.toString()}function ResetIndex(b){try{b.selectedIndex=0}catch(a){}}function openhotelwindow(a){window.location=a}function ValidateChildAge(c,b){var a=document.getElementById(c.controltovalidate);if(a.options[a.selectedIndex].value=="-1"){b.IsValid=false}else{b.IsValid=true}};