var	m_tbl=new Array(12);m_tbl[0]=31;m_tbl[1]=28;m_tbl[2]=31;m_tbl[3]=30;m_tbl[4]=31;m_tbl[5]=30;m_tbl[6]=31;m_tbl[7]=31;m_tbl[8]=30;m_tbl[9]=31;m_tbl[10]=30;m_tbl[11]=31;var	m_name_tbl=new Array(12);var todayDate=new Date();var todayYear=todayDate.getYear();if(todayYear<1000){todayYear+=1900;}
var todayMonth=todayDate.getMonth()+1;var todayDay=todayDate.getDate()+1;function generationYm(year,month){while(document.airForm.SMM.options.length>0){menuLength=document.airForm.SMM.options.length;for(creaCnt=0;creaCnt<menuLength;creaCnt++){document.airForm.SMM.options[creaCnt]=null;}}
setStayMonth=month;for(i=1;i<8;i++){if(setStayMonth<=9){setStayMonthValue="0"+setStayMonth;}
else{setStayMonthValue=setStayMonth;}
document.airForm.SMM.options[i]=new Option(year+'年'+setStayMonth,year+'/'+setStayMonthValue+'/01');document.airForm.SMM.options[i].disabled=false;setStayMonth++;if(setStayMonth==13){setStayMonth=1;year=year+1;}}}
function generationDay(month){while(document.airForm.SDD.options.length>0){menuLength=document.airForm.SDD.options.length;for(creaCnt=0;creaCnt<menuLength;creaCnt++){document.airForm.SDD.options[creaCnt]=null;}}
for(i=1;i<m_tbl[month-1]+1;i++){document.airForm.SDD.options[i]=new Option(i,i);document.airForm.SDD.options[i].disabled=false;}}
function setDefDate(){leapYear(todayYear);generationYm(todayYear,todayMonth);generationDay(todayMonth);todayp_month=todayYear+'/'+todayMonth+'/01';}
function leapYear(year){if(year%4==0){if(year%100==0){if(((year/100)%4)==0){m_tbl[1]=29;}
else{m_tbl[1]=28;}}
else{m_tbl[1]=29;}}
else{m_tbl[1]=28;}}
function setting(){p_monthDate=document.airForm.SMM.options[document.airForm.SMM.options.selectedIndex].value;a=p_monthDate.split("/");year=a[0];month=a[1];leapYear(year);generationDay(month);}
function openWindow(){window.open("/air/sr/air_carender.html","name","width=550,height=290");}
function submitFunc(){tempp_month=document.airForm.SMM.value;tempp_monthSplit=tempp_month.split('/');document.airForm.SMM.options[document.airForm.SMM.options.selectedIndex].value=tempp_monthSplit[1];}
