function setDate(sourceIn){
	//Given a pointer to a series of Div Input elements, take their pieces
	//and assemble them into a formatted string to put in the sourceIn element
	//Output in a particular database format
	//MySQL date-time format, for example Y-m-d H:i:s
	//private var formatStr=dbDateTimeFormat;
	var outputStr=new String();
	var dbDateTimeFormat='Y-m-d h:i:s';
	outputStr=dbDateTimeFormat;
	//formatstr is a PHP format string for datetime
	var year;
	var month;
	var day;
	var dayint;
	year=document.getElementById(sourceIn+'_year').value;
	month=document.getElementById(sourceIn+'_month').value;
	day=document.getElementById(sourceIn+'_day').value;
	dayint=0+parseInt(day);
	if (dayint<10){
		day="0"+(dayint);
	}
	var outstr;
	outstr=outputStr.replace('Y',year);
	outstr=outstr.replace('d',day);
	outstr=outstr.replace('m',month);
	outstr=outstr.replace('h','12');
	outstr=outstr.replace('i','01');
	outstr=outstr.replace('s','00');
	document.getElementById(sourceIn).value=outstr;
}	

