function calc_edc(lmp_form) {
	monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
	if (!parseInt(lmp_form.date.value,10) || lmp_form.date.value>31) {
		alert("Please check the date value [" + lmp_form.date.value + "]");
		lmp_form.date.focus();
		lmp_form.date.select();
		return false;
		}
	if (!parseInt(lmp_form.month.value,10) || lmp_form.month.value>12) {
		alert("Please check the month value [" + lmp_form.month.value + "]");
		lmp_form.month.focus();
		lmp_form.date.select();
		return false;
		}
	now= new Date();
	now.setHours(15);
	var thisyear= now.getFullYear();
	lmp = new Date(thisyear,lmp_form.month.value-1,lmp_form.date.value,12,0,0);
	if (lmp.getTime() > now.getTime()) lmp.setFullYear(lmp.getFullYear() -1);
	edc = new Date();
	edc.setTime(lmp.getTime() + 280 * 24* 60* 60* 1000);
	//	
	// alert("LMP is " + lmp);
	alert("Your expected date of confinement is " + monName[edc.getMonth()] + " " + 
		edc.getDate() + ", " + edc.getFullYear());
	return false
	}