
function fillCategory(){ 
 // this function is used to fill the category list on load

	addOption(document.form1.course, "Not Specified", "Click to Select", "");
	addOption(document.form1.course, "ETF40B Organizational (O) Level Maintenance (Military)", "ETF40B Organizational (O) Level Maintenance (Military)", "");
	addOption(document.form1.course, "ETF40B Intermediate (I) Level Maintenance (Military)", "ETF40B Intermediate (I) Level Maintenance (Military)", "");
	addOption(document.form1.course, "TF40/TF50 Level I Maintenance", "TF40/TF50 Level I Maintenance", "");
	addOption(document.form1.course, "ASE40 Level I Maintenance", "ASE40 Level I Maintenance", "");


}

function SelectSubCat(){

	
	removeAllOptions(document.form1.dates);

	if(document.form1.course.value == 'ETF40B Organizational (O) Level Maintenance (Military)'){
		addOption(document.form1.dates,"January 17 – January 21, 2011", "January 17 – January 21, 2011");
		addOption(document.form1.dates,"March 28 – April 1, 2011", "March 28 – April 1, 2011");
		addOption(document.form1.dates,"June 20 – June 24, 2011", "June 20 – June 24, 2011");
		addOption(document.form1.dates,"August 29 – September 2, 2011", "August 29 – September 2, 2011");
		addOption(document.form1.dates,"November 28 – December 2, 2011", "November 28 – December 2, 2011");		
	}

	if(document.form1.course.value == 'ETF40B Intermediate (I) Level Maintenance (Military)'){
		addOption(document.form1.dates,"January 24 – January 28, 2011", "January 24 – January 28, 2011");
	}

	if(document.form1.course.value == 'TF40/TF50 Level I Maintenance'){
		addOption(document.form1.dates,"March 14 – March 18, 2011", "March 14 – March 18, 2011");
	}

	if(document.form1.course.value == 'ASE40 Level I Maintenance'){
		addOption(document.form1.dates,"June 27 – June 29, 2011", "June 27 – June 29, 2011");
	}
	

}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

