variables;
	string passString;
	string fldRegOBW;
	string chooseMonth[12] = "1","2","3","4","5","6","7","8","9","10","11","12";
	string chooseDay[31] = "1","2","3","4","5","6","7","8","9","10","11","12",
	"13","14","15","16","17","18","19","20","21","22","23","24","25","26","27",
	"28","29","30","31";
	string dpDil[4] = "closed","1-2 cm","3-4 cm","5+ cm";
	string dpPos[3] = "Posterior","mid","anterior";
	string dpEff[4] = "0-30%","40-50%","60-70%",">80%";
	string dpSta[4] = "-3","-2","-1","0+";
	string dpCon[3] = "firm","med","soft";
	numeric numBishop;
	numeric numToday;
	numeric numFrom;
	numeric numEDC;
	numeric numMMDD;
	numeric numTri1;
	numeric numTri2;
	numeric numType = 0;
	numeric numDType;
	numeric numLMP;
	numeric numYear;
	string chooseYear;
end;

function fxnLast;
	variables;
	string stringTemp;
	string stringTwo;
	end;
	numBishop = trunc(numBishop);
	if numBishop < 5;
	stringTemp = string(numBishop, "##");
	stringTwo = "Score = ";
	lblCheck.display = stringTwo + stringTemp;
	lblScale.display = "Unfavorable 45-50% failure rate";
	else_if numBishop < 10;
	stringTemp = "Score = " + string(numBishop, "##");
	lblCheck.display = stringTemp;
	lblScale.display = "Moderately unfavorable 10% failure rate";
	else_if numBishop > 9;
	lblCheck.display = "Score = " + string(numBishop, "##");
	lblScale.display = "Favorable 0% failure rate";
	end_if;
	numBishop = 0;
end;

function fxnProm;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if chProm.checkbox = 1;
	numBishop = numTemp - 1;
	end_if;
	call fxnLast;
end;

function fxnNul;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if chNul.checkbox = 1;
	numBishop = numTemp - 1;
	end_if;
	call fxnProm;
end;

function fxnPre;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if chPre.checkbox = 1;
	numBishop = numTemp + 1;
	end_if;
	call fxnNul;
end;

function fxnPost;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if chPost.checkbox = 1;
	numBishop = numTemp - 1;
	end_if;
	call fxnPre;
end;

function fxnDropCon;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if dropCon.display = "firm";
	numBishop = numTemp +0;
	else_if dropCon.display = "med";
	numBishop = numTemp +1;
	else_if dropCon.display = "soft";
	numBishop = numTemp +2;
	end_if;
	call fxnPost;
end;

function fxnDropSta;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if dropSta.display = "-3";
	numBishop = numTemp +0;
	else_if dropSta.display = "-2";
	numBishop = numTemp +1;
	else_if dropSta.display = "-1";
	numBishop = numTemp +2;
	else_if dropSta.display = "0+";
	numBishop = numTemp +3;
	end_if;
	call fxnDropCon;
end;

function fxnDropEff;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if dropEff.display = "0-30%";
	numBishop = numTemp + 0;
	else_if dropEff.display = "40-50%";
	numBishop = numTemp + 1;
	else_if dropEff.display = "60-70%";
	numBishop = numTemp + 2;
	else_if dropEff.display = ">80%";
	numBishop = numTemp +3;
	end_if;
	call fxnDropSta;
end;

function fxnDropPos;
	variables;
	numeric numTemp;
	end;
	numTemp = numBishop;
	if dropPos.display = "posterior";
	numBishop = numTemp + 0;
	else_if dropPos.display = "mid";
	numBishop = numTemp + 1;
	else_if dropPos.display = "anterior";
	numBishop = numTemp + 2;
	end_if;
	call fxnDropEff;
end;

function fxnDropDil;
	if dropDil.display = "closed";
	numBishop = numBishop + 0;
	else_if dropDil.display = "1-2 cm";
	numBishop = numBishop + 1;
	else_if dropDil.display = "3-4 cm";
	numBishop = numBishop + 2;
	else_if dropDil.display = "5+ cm";
	numBishop = numBishop + 3;
	end_if;
	call fxnDropPos;
end;

function fxnPVD;
	variables;
	numeric numTemp;
	end;
	numTemp = value(txtVag.display);
	numBishop = numTemp + numBishop;
	call fxnDropDil;
end;

function fxnClearBishop;
	lblCheck.display = "";
	lblScale.display = "";
end;

function fxnCalcBishop;
	call fxnPVD;
end;

function fxnBack;
	hide frmBishop;
	show frmOBWheel;
end;

function fxnNumToDate;
	variables;
	numeric numDate;
	numeric numAno;
	end;
	numDate = value(lblDay.display);
	numAno = value(lblYear.display);
	numToday = numToday + 365*numAno;
end;

function fxnNumToday;
	variables;
	numeric numTemp;
	end;
	numTemp = value(lblMonth.display);
	if numTemp = 1;
	numToday = 0 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 2;
	numToday = 31 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 3;
	numToday = 59 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 4;
	numToday = 90 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 5;
	numToday = 120 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 6;
	numToday = 151 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 7;
	numToday = 181 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 8;
	numToday = 212 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 9;
	numToday = 243 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 10;
	numToday = 273 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 11;
	numToday = 304 + value(lblDay.display);
	call fxnNumToDate;
	else_if numTemp = 12;
	numToday = 334 + value(lblDay.display);
	call fxnNumToDate;
	end_if;
end;

function fxnNumFromTwo;
	variables;
	numeric numDate;
	numeric numAno;
	end;
	numDate = value(txtDayFrm.display);
	numAno = value(txtYearFrm.display);
	numFrom = numFrom + 365*numAno;
end;

function fxnNumFrom;
	variables;
	numeric numTemp;
	end;
	numTemp = value(txtMonthFrm.display);
	if numTemp = 1;
	numFrom = 0 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 2;
	numFrom = 31 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 3;
	numFrom = 59 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 4;
	numFrom = 90 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 5;
	numFrom = 120 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 6;
	numFrom = 151 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 7;
	numFrom = 181 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 8;
	numFrom = 212 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 9;
	numFrom = 243 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 10;
	numFrom = 273 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 11;
	numFrom = 304 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	else_if numTemp = 12;
	numFrom = 334 + value(txtDayFrm.display);
	call fxnNumFromTwo;
	end_if;
end;

function fxnCalcMMDD;
	variables;
	numeric numCD;
	end;
	if numMMDD < 32;
	txtCMonthTwo.display = "01";
	txtCDayTwo.display = string(numMMDD, "##");
	else_if numMMDD < 60;
	txtCMonthTwo.display = "02";
	numCD = numMMDD - 31;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 91;
	txtCMonthTwo.display = "03";
	numCD = numMMDD - 59;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 121;
	txtCMonthTwo.display = "04";
	numCD = numMMDD - 90;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 152;
	txtCMonthTwo.display = "05";
	numCD = numMMDD - 120;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 182;
	txtCMonthTwo.display = "06";
	numCD = numMMDD - 151;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 213;
	txtCMonthTwo.display = "07";
	numCD = numMMDD - 181;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 244;
	txtCMonthTwo.display = "08";
	numCD = numMMDD - 212;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 274;
	txtCMonthTwo.display = "09";
	numCD = numMMDD - 243;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 305;
	txtCMonthTwo.display = "10";
	numCD = numMMDD - 273;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 335;
	txtCMonthTwo.display = "11";
	numCD = numMMDD - 304;
	txtCDayTwo.display = string(numCD, "##");
	else_if numMMDD < 366;
	txtCMonthTwo.display = "12";
	numCD = numMMDD - 334;
	txtCDayTwo.display = string(numCD, "##");
	end_if;
	txtCMonthTwo.hidden = 0;
	txtCDayTwo.hidden = 0;
	Label30.hidden = 0;
	Label234.hidden = 0;
end;

function fxnCalcTri1;
	variables;
	numeric numCD;
	end;
	if numTri1 < 32;
	txt1TMonth.display = "01";
	txt1TDays.display = string(numTri1, "##");
	else_if numTri1 < 60;
	txt1TMonth.display = "02";
	numCD = numTri1 - 31;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 91;
	txt1TMonth.display = "03";
	numCD = numTri1 - 59;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 121;
	txt1TMonth.display = "04";
	numCD = numTri1 - 90;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 152;
	txt1TMonth.display = "05";
	numCD = numTri1 - 120;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 182;
	txt1TMonth.display = "06";
	numCD = numTri1 - 151;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 213;
	txt1TMonth.display = "07";
	numCD = numTri1 - 181;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 244;
	txt1TMonth.display = "08";
	numCD = numTri1 - 212;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 274;
	txt1TMonth.display = "09";
	numCD = numTri1 - 243;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 305;
	txt1TMonth.display = "10";
	numCD = numTri1 - 273;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 335;
	txt1TMonth.display = "11";
	numCD = numTri1 - 304;
	txt1TDays.display = string(numCD, "##");
	else_if numTri1 < 366;
	txt1TMonth.display = "12";
	numCD = numTri1 - 334;
	txt1TDays.display = string(numCD, "##");
	end_if;
end;

function fxnCalcTri2;
	variables;
	numeric numCD;
	end;
	if numTri2 < 32;
	txt2TMonth.display = "01";
	txt2TDays.display = string(numTri2, "##");
	else_if numTri2 < 60;
	txt2TMonth.display = "02";
	numCD = numTri2 - 31;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 91;
	txt2TMonth.display = "03";
	numCD = numTri2 - 59;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 121;
	txt2TMonth.display = "04";
	numCD = numTri2 - 90;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 152;
	txt2TMonth.display = "05";
	numCD = numTri2 - 120;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 182;
	txt2TMonth.display = "06";
	numCD = numTri2 - 151;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 213;
	txt2TMonth.display = "07";
	numCD = numTri2 - 181;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 244;
	txt2TMonth.display = "08";
	numCD = numTri2 - 212;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 274;
	txt2TMonth.display = "09";
	numCD = numTri2 - 243;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 305;
	txt2TMonth.display = "10";
	numCD = numTri2 - 273;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 335;
	txt2TMonth.display = "11";
	numCD = numTri2 - 304;
	txt2TDays.display = string(numCD, "##");
	else_if numTri2 < 366;
	txt2TMonth.display = "12";
	numCD = numTri2 - 334;
	txt2TDays.display = string(numCD, "##");
	end_if;
end;

function fxnCalcEDCYear;
	variables;
	numeric numAno;
	end;
	numAno = trunc(numEDC/365);
	txtCYearTwo.display = string(numAno, "####");
	numMMDD = numEDC - 365*numAno;
	txtCYearTwo.hidden = 0;
	lblOut.display = "EDC:";
	lblOut.hidden = 0;
	call fxnCalcMMDD;
end;

function fxnCalcLMPYear;
	variables;
	numeric numAno;
	end;
	numAno = trunc(numLMP/365);
	txtCYearTwo.display = string(numAno, "####");
	numMMDD = numLMP - 365*numAno;
	lblOut.hidden = 0;
	txtCYearTwo.hidden = 0;
	lblOut.display = "LMP:";
	call fxnCalcMMDD;
end;

function fxnCalc1Tri;
	variables;
	numeric numAno;
	end;
	numTri1 = numLMP + 103;
	numAno = trunc(numTri1/365);
	numTri1 = numTri1 - 365*numAno;
	Label263.hidden = 0;
	Label273.hidden = 0;
	txt1TMonth.hidden = 0;
	txt2TMonth.hidden = 0;
	Label340.hidden = 0;
	Label350.hidden = 0;
	txt1TDays.hidden = 0;
	txt2TDays.hidden = 0;
	call fxnCalcTri1;
end;

function fxnCalc2Tri;
	variables;
	numeric numAno;
	end;
	numTri2 = numLMP + 191;
	numAno = trunc(numTri2/365);
	numTri2 = numTri2 - 365*numAno;
	call fxnCalcTri2;
end;

function fxnCalcAge;
	variables;
	numeric numAge;
	numeric numWks;
	numeric numDays;
	end;
	numAge = numToday - numLMP;
	numWks = trunc(numAge/7);
	numDays = numAge - 7*numWks;
	txtWksOut.display = string(numWks, "##");
	txtWksOut.hidden = 0;
	txtDaysOut.display = string(numDays, "##");
	txtDaysOut.hidden = 0;
	lblAgeOut.display = "Gest Age:";
	lblAgeFrom.hidden = 0;
	Label110.hidden = 0;
	Label148.hidden = 0;
end;

function fxnCalcEDCfrLMP;
	numEDC = numFrom + 280;
	numLMP = numFrom;
	lblOut.hidden = 0;
	lblOut.display = "EDC:";
	call fxnCalcEDCYear;
	call fxnCalcAge;
	call fxnCalc1Tri;
	call fxnCalc2Tri;
end;

function fxnCalcLMPfrEDC;
	numLMP = numFrom - 280;
	numEDC = numFrom;
	call fxnCalcAge;
	call fxnCalcLMPYear;
	call fxnCalc1Tri;
	call fxnCalc2Tri;
end;

function fxnCalcUS;
	variables;
	numeric numUSAge;
	end;
	numUSAge = value(txtWksIn.display)*7 + value(txtDaysIn.display);
	numLMP = numFrom - numUSAge;
	numEDC = numLMP + 280;
	lblOut.hidden = 0;
	lblOut.display = "EDC:";
	call fxnCalcAge;
	call fxnCalcEDCYear;
	call fxnCalc1Tri;
	call fxnCalc2Tri;
end;

function fxnDEDC;
	numLMP = numFrom - 280;
	numEDC = numFrom - 280 + value(txtWksIn.display)*7 + value(txtDaysIn.display);
	call fxnCalcEDCYear;
	call fxnCalc1Tri;
	call fxnCalc2Tri;
	lblOut.hidden = 1;
end;

function fxnMainCalc;
	call fxnNumToday;
	call fxnNumFrom;
	if numType = 0;
	call fxnCalcEDCfrLMP;
	else_if numType = 1;
	call fxnCalcLMPfrEDC;
	else_if numType = 2;
	call fxnCalcUS;
	else_if numType =3;
	call fxnDEDC;
	end_if;
end;

function fxnSetDates;
	if numDType = 4;
	lblMonth.display = lblChooseMonth.display;
	lblDay.display = lblChooseDay.display;
	lblYear.display = lblChooseYear.display;
	hide frmSetDate;
	show frmOBWheel;
	else;
	txtMonthFrm.display = lblChooseMonth.display;
	txtDayFrm.display = lblChooseDay.display;
	txtYearFrm.display = lblChooseYear.display;
	hide frmSetDate;
	show frmOBWheel;
	end_if;

end;

function fxnPlusYear;
	variables;
	numeric ntemp;
	end;
	ntemp = value(lblChooseYear.display);
	ntemp = ntemp + 1;
	lblChooseYear.display = string(ntemp, "####");

end;

function fxnMinusYear;
	variables;
	numeric ntemp;
	end;
	ntemp = value(lblChooseYear.display);
	ntemp = ntemp - 1;
	lblChooseYear.display = string(ntemp, "####");

end;

function fxnJan;
	lblChooseMonth.display = "01";
end;

function fxnFeb;
	lblChooseMonth.display = "02";
end;

function fxnMar;
	lblChooseMonth.display = "03";
end;

function fxnApr;
	lblChooseMonth.display = "04";
end;

function fxnMay;
	lblChooseMonth.display = "05";
end;

function fxnJun;
	lblChooseMonth.display = "06";
end;

function fxnJul;
	lblChooseMonth.display = "07";
end;

function fxnAug;
	lblChooseMonth.display = "08";
end;

function fxnSep;
	lblChooseMonth.display = "09";
end;

function fxnOct;
	lblChooseMonth.display = "10";
end;

function fxnNov;
	lblChooseMonth.display = "11";
end;

function fxnDec;
	lblChooseMonth.display = "12";
end;

function fxnOne;
	lblChooseDay.display = "01";
end;

function fxnTwo;
	lblChooseDay.display = "02";
end;

function fxnThree;
	lblChooseDay.display = "03";
end;

function fxnFour;
	lblChooseDay.display = "04";
end;

function fxnFive;
	lblChooseDay.display = "05";
end;

function fxnSix;
	lblChooseDay.display = "06";
end;

function fxnSeven;
	lblChooseDay.display = "07";
end;

function fxnEight;
	lblChooseDay.display = "08";
end;

function fxnNine;
	lblChooseDay.display = "09";
end;

function fxnTen;
	lblChooseDay.display = "10";
end;

function fxnEleven;
	lblChooseDay.display = "11";
end;

function fxnTweleve;
	lblChooseDay.display = "12";
end;

function fxnThirteen;
	lblChooseDay.display = "13";
end;

function fxnFourteen;
	lblChooseDay.display = "14";
end;

function fxnFifteen;
	lblChooseDay.display = "15";
end;

function fxnSixteen;
	lblChooseDay.display = "16";
end;

function fxnSeventeen;
	lblChooseDay.display = "17";
end;

function fxnEighteen;
	lblChooseDay.display = "18";
end;

function fxnNineteen;
	lblChooseDay.display = "19";
end;

function fxnTwenty;
	lblChooseDay.display = "20";
end;

function fxnTwentyone;
	lblChooseDay.display = "21";
end;

function fxnTwentytwo;
	lblChooseDay.display = "22";
end;

function fxnTwentythree;
	lblChooseDay.display = "23";
end;

function fxnTwentyfour;
	lblChooseDay.display = "24";
end;

function fxnTwentyfive;
	lblChooseDay.display = "25";
end;

function fxnTwentysix;
	lblChooseDay.display = "26";
end;

function fxnTwentyseven;
	lblChooseDay.display = "27";
end;

function fxnTwentyeight;
	lblChooseDay.display = "28";
end;

function fxnTwentynine;
	lblChooseDay.display = "29";
end;

function fxnThirty;
	lblChooseDay.display = "30";
end;

function fxnThirtyone;
	lblChooseDay.display = "31";
end;

function fxnSetDateIn;
	hide frmOBWheel;
	show frmSetDate;
	numDType = numType;
	if numDType = 0;
	lblsDate.display = "LMP:";
	else_if numDType = 1;
	lblsDate.display = "EDC:";
	else_if numDType = 2;
	lblsDate.display = "US Date:";
	else_if numDType = 3;
	lblsDate.display = "EDC:";
	end_if;
	lblChooseYear.display = lblYear.display;
end;

function fxnSetToday;
	hide frmOBWheel;
	show frmSetDate;
	numDType = 4;
	lblsDate.display = "Today:";
	lblChooseYear.display = lblYear.display;
end;

function fxnBishop;
	hide frmOBWheel;
	show frmBishop;
end;

function fxnDate;
	btnULMP.hidden = 0;
	btnUEDC.hidden = 0;
	btnUUS.hidden = 0;
	btnUDate.hidden = 1;
	btnUBishop.hidden = 0;
	Label29.hidden = 0;
	lblCalcFrom.display = "     EDC of";
	lblAgeFrom.hidden = 0;
	lblAgeFrom.display = "      will be";
	txtWksIn.hidden = 0;
	txtDaysIn.hidden = 0;
	Label37.hidden = 0;
	Label39.hidden = 0;
	Label40.hidden = 0;
	lblAgeOut.hidden = 1;
	txtWksOut.hidden = 1;
	txtDaysOut.hidden = 1;
	Label110.hidden = 1;
	Label148.hidden = 1;
	lblOut.hidden = 1;
	txtCMonthTwo.hidden = 1;
	txtCDayTwo.hidden = 1;
	txtCYearTwo.hidden = 1;
	Label30.hidden = 1;
	Label234.hidden = 1;
	Label263.hidden = 1;
	Label340.hidden = 1;
	Label273.hidden = 1;
	Label350.hidden = 1;
	txt1TMonth.hidden = 1;
	txt1TDays.hidden = 1;
	txt2TMonth.hidden = 1;
	txt2TDays.hidden = 1;
	numType = 3;
end;

function fxnUS;
	btnULMP.hidden = 0;
	btnUEDC.hidden = 0;
	btnUUS.hidden = 1;
	btnUDate.hidden = 0;
	btnUBishop.hidden = 0;
	Label29.hidden = 1;
	lblCalcFrom.display = "US Date:";
	lblAgeFrom.hidden = 0;
	lblAgeFrom.display = "US Age:";
	txtWksIn.hidden = 0;
	txtDaysIn.hidden = 0;
	Label37.hidden = 0;
	Label39.hidden = 0;
	Label40.hidden = 1;
	lblAgeOut.hidden = 1;
	txtWksOut.hidden = 1;
	txtDaysOut.hidden = 1;
	Label110.hidden = 1;
	Label148.hidden = 1;
	lblOut.hidden = 1;
	txtCMonthTwo.hidden = 1;
	txtCDayTwo.hidden = 1;
	txtCYearTwo.hidden = 1;
	Label30.hidden = 1;
	Label234.hidden = 1;
	Label263.hidden = 1;
	Label340.hidden = 1;
	Label273.hidden = 1;
	Label350.hidden = 1;
	txt1TMonth.hidden = 1;
	txt1TDays.hidden = 1;
	txt2TMonth.hidden = 1;
	txt2TDays.hidden = 1;
	numType = 2;
end;

function fxnEDC;
	btnULMP.hidden = 0;
	btnUEDC.hidden = 1;
	btnUUS.hidden = 0;
	btnUDate.hidden = 0;
	btnUBishop.hidden = 0;
	Label29.hidden = 1;
	lblCalcFrom.display = "EDC:";
	lblAgeFrom.hidden = 1;
	txtWksIn.hidden = 1;
	txtDaysIn.hidden = 1;
	Label37.hidden = 1;
	Label39.hidden = 1;
	Label40.hidden = 1;
	lblAgeOut.hidden = 1;
	txtWksOut.hidden = 1;
	txtDaysOut.hidden = 1;
	Label110.hidden = 1;
	Label148.hidden = 1;
	lblOut.hidden = 1;
	txtCMonthTwo.hidden = 1;
	txtCDayTwo.hidden = 1;
	txtCYearTwo.hidden = 1;
	Label30.hidden = 1;
	Label234.hidden = 1;
	Label263.hidden = 1;
	Label340.hidden = 1;
	Label273.hidden = 1;
	Label350.hidden = 1;
	txt1TMonth.hidden = 1;
	txt1TDays.hidden = 1;
	txt2TMonth.hidden = 1;
	txt2TDays.hidden = 1;
	numType = 1;
end;

function fxnLaunchPt;
	launch "OB Patients";
end;

function fxnLMP;
	btnULMP.hidden = 1;
	btnUEDC.hidden = 0;
	btnUUS.hidden = 0;
	btnUDate.hidden = 0;
	btnUBishop.hidden = 0;
	Label29.hidden = 1;
	lblCalcFrom.display = "LMP:";
	lblAgeFrom.hidden = 1;
	txtWksIn.hidden = 1;
	txtDaysIn.hidden = 1;
	Label37.hidden = 1;
	Label39.hidden = 1;
	Label40.hidden = 1;
	lblAgeOut.hidden = 1;
	txtWksOut.hidden = 1;
	txtDaysOut.hidden = 1;
	Label110.hidden = 1;
	Label148.hidden = 1;
	lblOut.hidden = 1;
	txtCMonthTwo.hidden = 1;
	txtCDayTwo.hidden = 1;
	txtCYearTwo.hidden = 1;
	Label30.hidden = 1;
	Label234.hidden = 1;
	Label263.hidden = 1;
	Label340.hidden = 1;
	Label273.hidden = 1;
	Label350.hidden = 1;
	txt1TMonth.hidden = 1;
	txt1TDays.hidden = 1;
	txt2TMonth.hidden = 1;
	txt2TDays.hidden = 1;
	numType = 0;
end;

function fxnAbout;
	hide frmOBWheel;
	show frmAbout;
end;

function fxnBackAbout;
	hide frmAbout;
	show frmOBWheel;
end;

function fxnDefault;
	lblMonth.display = string(month, "0#");
	lblDay.display = string(day, "0#");
	lblYear.display = string(year, "####");
	lblCalcFrom.display = "LMP:";
	txtMonthFrm.display = " ";
	txtDayFrm.display = " ";
	txtYearFrm.display = " ";
end;

dbfile dbRegOBW;
	field fldRegOBW;
	sync_pref none;
end;

function fxnOpenDatabases;
	open dbRegOBW, "regDBOBW";
end;

function fxnCloseDatabases;
	close dbRegOBW;
end;

function fxnPassPosition;
	lblPassPosition.display = string(bookmark, "###");
end;

function fxnReadPass;
	get_fields dbRegOBW;
	txtReg.display = fldRegOBW;
end;

function fxnSeekPass;
	seek_start dbRegOBW, 0;
	call fxnReadPass;
	call fxnPassPosition;
end;

function fxnClear;
	remove dbRegOBW;
	txtReg.display = "";
	lblReg.hidden = 1;
end;

function fxnSavePass;
	fldRegOBW = txtReg.display;
	insert dbRegOBW;
	call fxnSeekPass;
	hide frmReg;
	show frmOBWheel;
	call fxnDefault;
end;

function fxnCheckPass;
	variables;
		numeric numVar;
	end;
	numVar = value(passString);
	if numVar = 59824;
	call fxnSavePass;
	else;
	lblReg.display = "Please try again.";
	lblReg.hidden = 0;
	end_if;
end;

function fxnCheckIt;
	variables;
		numeric numVar;
	end;
	passString = left(txtReg.display,3) + right(txtReg.display,2);
	numVar = value(passString);
	if numVar = 59824;
	hide frmReg;
	show frmOBWheel;
	call fxnDefault;
	end_if;
end;

function fxnSubmit;
	passString = left(txtReg.display,3) + right(txtReg.display,2);
	call fxnCheckPass;
end;

function fxnNext;
	hide frmReg;
	show frmOBWheel;
	call fxnDefault;
end;

function startup;
	call fxnOpenDatabases;
	call fxnSeekPass;
	call fxnCheckIt;
end;

function shutdown;
	call fxnCloseDatabases;
end;
