// Java library for Date of Birth display functions 
	function date_change_day_selectbox(field_name, array_index_string)	{
		// dob_month is a drop down box created in 
		// identify the month that has been selected in the month drop down box 
		var m = document.getElementById(field_name + '_month' + array_index_string);
		theMonth = m.options[m.selectedIndex].value;

		// identify the number of days displayed in the day drop down box
		var d = document.getElementById(field_name + '_day' + array_index_string);
    theDays = d.length-1;

		// 
		if ((theMonth == 4) || (theMonth == 6) || (theMonth == 9) || (theMonth == 11))
		{ maxDays = 30; }
	  else if (theMonth == 2) 
	  { maxDays = 29; }
		else 
		{	maxDays = 31; } 
		
	  if (theDays < maxDays)  {	
  		for (i=theDays+1;i<=maxDays;i++)	{
  			var newDay =document.createElement('option');
				newDay.text=String(i);
				d.add(newDay); 	
			}
		}
		else if (theDays > maxDays)	{	
			for (i=theDays-1;i>=maxDays;i--)	{
				d.remove(i+1); 
			}
		}
	}
