function execute(){

	fillRegMonth();
	fillRegYear();

}

function fillRegMonth(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list2.Month, "01", "January", "");
addOption(document.drop_list2.Month, "02", "February", "");
addOption(document.drop_list2.Month, "03", "March", "");
addOption(document.drop_list2.Month, "04", "April", "");
addOption(document.drop_list2.Month, "05", "May", "");
addOption(document.drop_list2.Month, "06", "June", "");
addOption(document.drop_list2.Month, "07", "July", "");
addOption(document.drop_list2.Month, "08", "August", "");
addOption(document.drop_list2.Month, "09", "September", "");
addOption(document.drop_list2.Month, "10", "October", "");
addOption(document.drop_list2.Month, "11", "November", "");
addOption(document.drop_list2.Month, "12", "December", "");
}

function fillRegYear(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list2.Year, "1996", "1996", "");
addOption(document.drop_list2.Year, "1995", "1995", "");
addOption(document.drop_list2.Year, "1994", "1994", "");
addOption(document.drop_list2.Year, "1993", "1993", "");
addOption(document.drop_list2.Year, "1992", "1992", "");
addOption(document.drop_list2.Year, "1991", "1991", "");
addOption(document.drop_list2.Year, "1990", "1990", "");
addOption(document.drop_list2.Year, "1989", "1989", "");
addOption(document.drop_list2.Year, "1988", "1988", "");
addOption(document.drop_list2.Year, "1987", "1987", "");
addOption(document.drop_list2.Year, "1986", "1986", "");
addOption(document.drop_list2.Year, "1985", "1985", "");
addOption(document.drop_list2.Year, "1984", "1984", "");
addOption(document.drop_list2.Year, "1983", "1983", "");
addOption(document.drop_list2.Year, "1982", "1982", "");
addOption(document.drop_list2.Year, "1981", "1981", "");
addOption(document.drop_list2.Year, "1980", "1980", "");
addOption(document.drop_list2.Year, "1979", "1979", "");
addOption(document.drop_list2.Year, "1978", "1978", "");
addOption(document.drop_list2.Year, "1977", "1977", "");
addOption(document.drop_list2.Year, "1976", "1976", "");
addOption(document.drop_list2.Year, "1975", "1975", "");
addOption(document.drop_list2.Year, "1974", "1974", "");
addOption(document.drop_list2.Year, "1973", "1973", "");
addOption(document.drop_list2.Year, "1972", "1972", "");
addOption(document.drop_list2.Year, "1971", "1971", "");
addOption(document.drop_list2.Year, "1970", "1970", "");
addOption(document.drop_list2.Year, "1969", "1969", "");
addOption(document.drop_list2.Year, "1968", "1968", "");
addOption(document.drop_list2.Year, "1967", "1967", "");
addOption(document.drop_list2.Year, "1966", "1966", "");
addOption(document.drop_list2.Year, "1965", "1965", "");
addOption(document.drop_list2.Year, "1964", "1964", "");
addOption(document.drop_list2.Year, "1963", "1963", "");
addOption(document.drop_list2.Year, "1962", "1962", "");
addOption(document.drop_list2.Year, "1961", "1961", "");
addOption(document.drop_list2.Year, "1960", "1960", "");
addOption(document.drop_list2.Year, "1959", "1959", "");
addOption(document.drop_list2.Year, "1958", "1958", "");
addOption(document.drop_list2.Year, "1957", "1957", "");
addOption(document.drop_list2.Year, "1956", "1956", "");
addOption(document.drop_list2.Year, "1955", "1955", "");
addOption(document.drop_list2.Year, "1954", "1954", "");
addOption(document.drop_list2.Year, "1953", "1953", "");
addOption(document.drop_list2.Year, "1952", "1952", "");
addOption(document.drop_list2.Year, "1951", "1951", "");
addOption(document.drop_list2.Year, "1950", "1950", "");
}




function SelectDay2(){
	
removeAllOptions(document.drop_list2.Day);
addOption(document.drop_list2.Day, "", "Day", "");

var leapyear = 0;

for(var y=1996; y >= 1900; y=y-4){
	if(document.drop_list2.Year.value == y){
		leapyear = 1;
		break;
	}
	else{
		leapyear = 0;	
	}
}



	if(leapyear == 1){
		if(document.drop_list2.Month.value == '02'){
			var february = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29");
			for(var m=0; m < february.length; ++m){
				addOption(document.drop_list2.Day, february[m], february[m]);
			}
		}
	}
	

	if(leapyear == 0){
		if(document.drop_list2.Month.value == '02'){
				var february = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28");
			for(var m=0; m < february.length; ++m){
					addOption(document.drop_list2.Day, february[m], february[m]);
			}
		}
	}

	if(document.drop_list2.Month.value == '01'){
			var january = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < january.length; ++m){
			addOption(document.drop_list2.Day, january[m], january[m]);
		}
	}
	if(document.drop_list2.Month.value == '03'){
			var march = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < march.length; ++m){
			addOption(document.drop_list2.Day, march[m], march[m]);
		}
	}
	if(document.drop_list2.Month.value == '04'){
			var april = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30");
		for(var m=0; m < april.length; ++m){
			addOption(document.drop_list2.Day, april[m], april[m]);
		}
	}
	if(document.drop_list2.Month.value == '05'){
			var may = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < may.length; ++m){
			addOption(document.drop_list2.Day, may[m], may[m]);
		}
	}
	if(document.drop_list2.Month.value == '06'){
			var june = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30");
		for(var m=0; m < june.length; ++m){
			addOption(document.drop_list2.Day, june[m], june[m]);
		}
	}
	if(document.drop_list2.Month.value == '07'){
			var july = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < july.length; ++m){
			addOption(document.drop_list2.Day, july[m], july[m]);
		}
	}
	if(document.drop_list2.Month.value == '08'){
			var august = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < august.length; ++m){
			addOption(document.drop_list2.Day, august[m], august[m]);
		}
	}
	if(document.drop_list2.Month.value == '09'){
			var september = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30");
		for(var m=0; m < september.length; ++m){
			addOption(document.drop_list2.Day, september[m], september[m]);
		}
	}
	if(document.drop_list2.Month.value == '10'){
			var october = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < october.length; ++m){
			addOption(document.drop_list2.Day, october[m], october[m]);
		}
	}
	if(document.drop_list2.Month.value == '11'){
			var november = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30");
		for(var m=0; m < november.length; ++m){
			addOption(document.drop_list2.Day, november[m], november[m]);
		}
	}
	if(document.drop_list2.Month.value == '12'){
			var december = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
		for(var m=0; m < december.length; ++m){
			addOption(document.drop_list2.Day, december[m], december[m]);
		}
	}
}




////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
}
