function fAddListItem(strDate) {
	var dl=document.testForm.dateList;
	dl.options[dl.options.length]=new Option(strDate,strDate);
}
function fRemoveListItem(strDate) {
	var dl=document.testForm.dateList;
	for (var i=0;i<dl.options.length;i++)
		if (strDate==dl.options[i].value) break;
	dl.options[i]=null;
}
// param strDate has a format of yyyy/mm/dd, you may modify this format in function fDateString in the plugins1.js

function submitByDates(fm) {	// construct the selected dates in the hidden form field allSelected
	fm.allSelected.value="";
	for (var i=0; i<fm.dateList.length; i++) {
		if (i>0) fm.allSelected.value+=",";
		fm.allSelected.value+=fm.dateList.options[i].value;
	}
	fm.submit(); 
}

function fInitAgenda() {
	// the following presets the date range selected
	with (gfFlat) {
		fAddRange(gToday[0],gToday[1],5,false);
		fAddRange(gToday[0],gToday[1],10,true);
		fAddRange(gToday[0],gToday[1],15,false);
		fAddRange(gToday[0],gToday[1],16,false);
		fRepaint();
	}
}
