  	//向select 中添加options  参数:下拉框的ID, option的最小值,option的最大值,要选中的option
  	function sele_fill(select_id,begin,end,selectoption)
  	{
  		sele_year = document.getElementById(select_id);
  		if(begin > end)
  		{
  			var ty = begin;
  			    begin=end;
  			    end = ty;
  			}
  			for(var i = begin ; i<=end ;i++)
  			{
  					var j=i.toString(10);
  					if(j.length < 2)
  					{
  						j = "0"+j;
  					} 
  				var tempoption = document.createElement("option");
  				    sele_year.appendChild(tempoption);
  				    tempoption.value=j;
  				    tempoption.innerText=j;
  			  if(i==selectoption)
  			  {
  			  	tempoption.selected=true;
  			  }	
  		 }
  		
  		}
  	//删除目标下拉框的所有option
  	function del_options(sele_id)
  	{
  		 var sele=document.getElementById(sele_id);
  		 var leng=sele.options.length
		   for(var i=0; i < leng ;i++)
			 {
			   sele.remove(0);
			 }
  	}
  	//得到目标下拉框被选中的value值并返回
  	function get_select_value( selectid )
  	{
  		return document.getElementById(selectid).value;
  	}
  	//当年月改变时,日做相应的改变.  参数:年ID,月ID,日ID
  	function change_day(y_id, m_id, d_id)
  	{
  		
  		var sele_y = get_select_value(y_id);
  		var sele_m = get_select_value(m_id);
  		var sele_d = parseInt(get_select_value(d_id));
  	  var maxday = 31;
  	  if (sele_m==4	|| sele_m==6 || sele_m==9	|| sele_m==11)
  	  {
  	  	maxday = 30;
  	  }
  	  else if(sele_m==2)
  	  {
  	     maxday=28;
  	     if(sele_y % 400==0)
  	     {
  	     	maxday=29;
  	     }
  	     else if(sele_y % 4 ==0 && sele_y % 100 !=0 )
  	     {
  	     	maxday=29;
  	     }	
  	  }
  	  del_options(d_id);
  	  sele_fill(d_id,1,maxday,sele_d);
  	}
