	<% 
		@month_name=[]
		@month_name.push({:id => 1, :name => t(:calendar_jan)})
		@month_name.push({:id => 2, :name => t(:calendar_feb)})
		@month_name.push({:id => 3, :name => t(:calendar_mar)})
		@month_name.push({:id => 4, :name => t(:calendar_apr)})
		@month_name.push({:id => 5, :name => t(:calendar_may)})
		@month_name.push({:id => 6, :name => t(:calendar_jun)})
		@month_name.push({:id => 7, :name => t(:calendar_jul)})
		@month_name.push({:id => 8, :name => t(:calendar_aug)})
		@month_name.push({:id => 9, :name => t(:calendar_sep)})
		@month_name.push({:id => 10, :name => t(:calendar_oct)})
		@month_name.push({:id => 11, :name => t(:calendar_nov)})
		@month_name.push({:id => 12, :name => t(:calendar_dec)})
		
	%>
	<div style="width:230px;height:50px;z-index:40;position:absolute;left:10px;top:0px">
		<select id="<%= $date_picker_name %>_day" onchange="date_picker_action_<%= $date_picker_name %>()" size="1" style="position:absolute;left:0px;width:50px;top:7px;height:36px" >
			<option class="<%= $date_picker_name %>_day_row_remove" value="1">1</option>
		</select>
		<select id="<%= $date_picker_name %>_month" onchange="<%= $date_picker_name %>_build_days()" size="1" style="position:absolute;left:50px;width:100px;top:7px;height:36px" >
			<% 	@month_name.each do |item| %>
					<option value="<%= item[:id] %>"><%= item[:name] %></option>
			<% 	end %>
		</select>
		<select id="<%= $date_picker_name %>_year" onchange="<%= $date_picker_name %>_build_days()" size="1" style="position:absolute;left:150px;width:80px;top:7px;height:36px" >
			<% 	year = 2014
				while year < 2044  do %>
					<option value="<%= year %>"><%= year %> г.</option>
			<% 	year +=1
				end %>
		</select>
	</div>
	<script>
	function <%= $date_picker_name %>_build_days(){
		y=document.getElementById('<%= $date_picker_name %>_year').value
		m=document.getElementById('<%= $date_picker_name %>_month').value
		$('.<%= $date_picker_name %>_day_row_remove').remove();
		days=new Date(y, m, 0).getDate()
		x=1
		while (x < (days+1)){
			$('<option class="<%= $date_picker_name %>_day_row_remove" value="'+x+'">'+x+'</option>').appendTo($("#<%= $date_picker_name %>_day"));
			x++
		}
		date_picker_action_<%= $date_picker_name %>()
	
	}
	function <%= $date_picker_name %>_set_days(dd,mm,yyyy){
		document.getElementById('<%= $date_picker_name %>_year').value=yyyy
		document.getElementById('<%= $date_picker_name %>_month').value=mm
		<%= $date_picker_name %>_build_days()
		document.getElementById('<%= $date_picker_name %>_day').value=dd
	}
	function date_picker_action_<%= $date_picker_name %>(){
		<% if $date_picker_after_action == 1 %>
			date_picker_action_<%= $date_picker_name %>_after()
		<% end %>
	}
	</script>