var daysInMon = new Array(31,28,31,30,31,30,31,31,30,31,30,31); 
var months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");


function sortLists(thsForm,type){
	check_no_select(thsForm);
/*
	var mnthsLeft;
	
	   dayElement = thsForm.startDay;
	   monthElement = thsForm.startMonth;
	   yearElement = thsForm.startYear;
	
		
	endYr = ((yearElement.options[yearElement.selectedIndex].value)-2000) / 4;
	   	 if ((endYr.toString()).indexOf(".") == -1){
			daysInMon[1] = 29;
			}else{
			daysInMon[1] = 28;
		 	}
	 	 
		 
		 
		 monthInd = monthElement.selectedIndex-1;
		 dayElement.options[0].text = "D";
		 dayElement.options[0].value = "D";
		
		 if (monthElement.value != "mm"){
		 
		 for (i = 2 ;i < 33 ;i++){
				if (i <= daysInMon[monthInd]){
				   dayElement.options[i-1].text = i;
				   if (i <= 9)add_zero = "0";else add_zero = "";
				   dayElement.options[i-1].value = add_zero + i.toString();
				 }else{
				   dayElement.options[i-1].text = "";
				   dayElement.options[i-1].value = "";
				 }
				
				
			}
			
			if (dayElement.options[dayElement.selectedIndex].value == ""){
			   while (dayElement.options[dayElement.selectedIndex].value == ""){
			     dayElement.selectedIndex -= 1;
			   }
			}	
		   
		   }	
		
*/		
				
}

function check_no_select(thsForm){
	//dayElement = thsForm.startDay;
	monthElement = thsForm.startMonth;
	yearElement = thsForm.startYear;
	
	if (yearElement.value == "Y"){
	  // dayElement.selectedIndex = 0;
	   monthElement.selectedIndex = 0;
	} 
	//if (monthElement.value == "M"){
	  // dayElement.selectedIndex = 0;
	//} 

}
