<!--



javascript:window.history.forward(1);


//-->

function doWeHaveIt(state){
  if (state == "") 
    return;
	if (((state) !== "Utah") && ((state) !== "Texas") && ((state) !== "California") && ((state) !== "Florida") && ((state) !== "New York") && ((state) !== "Arizona") && ((state) !== "Colorado") && ((state) !== "Georgia") && ((state) !== "Illinois") && ((state) !== "Indiana") && ((state) !== "Kentucky") && ((state) !== "Maryland") && ((state) !== "Michigan") && ((state) !== "New Jersey") && ((state) !== "North Carolina") && ((state) !== "Oregon") && ((state) !== "Virginia") && ((state) !== "Washington") && ((state) !== "Missouri") && ((state) !== "Alabama") && ((state) !== "Alaska") && ((state) !== "Arkansas") && ((state) !== "Connecticut") && ((state) !== "Hawaii")  && ((state) !== "Maine") && ((state) !== "Kansas") && ((state) !== "Iowa") && ((state) !== "Idaho") && ((state) !== "Massachusetts") && ((state) !== "Minnesota") && ((state) !== "Mississippi") && ((state) !== "Montana") && ((state) !== "Nebraska") && ((state) !== "Nevada") && ((state) !== "New Hampshire") && ((state) !== "New Mexico") && ((state) !== "North Dakota") && ((state) !== "Ohio") && ((state) !== "Oklahoma") && ((state) !== "Pennsylvania") && ((state) !== "Rhode Island") && ((state) !== "South Carolina") && ((state) !== "Tennessee") && ((state) !== "Vermont") && ((state) !== "Wisconsin") && ((state) !== "Wyoming") && ((state) !== "South Dakota")){
	alert("We're sorry but we do not currently have a last will and testament form for " + (state) + " available.  We are working hard to create wills for every state and " + (state)+", should be available within the next 30 days.  if you would like to be notified when we have a will available for " +(state)+", please send us a message by filling out the following form.");
	
	location.href='contactus.cfm?miss=1&state='+(state);
  
	}
	}
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;

var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;

Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];

// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
	if ((p_month == null) && (p_year == null))	return;

	if (p_WinCal == null)
		this.gWinCal = ggWinCal;
	else
		this.gWinCal = p_WinCal;
	
	if (p_month == null) {
		this.gMonthName = null;
		this.gMonth = null;
		this.gYearly = true;
	} else {
		this.gMonthName = Calendar.get_month(p_month);
		this.gMonth = new Number(p_month);
		this.gYearly = false;
	}

	this.gYear = p_year;
	this.gFormat = p_format;
	this.gBGColor = "white";
	this.gFGColor = "black";
	this.gTextColor = "black";
	this.gHeaderColor = "black";
	this.gReturnItem = p_item;
}

Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;

function Calendar_get_month(monthNo) {
	return Calendar.Months[monthNo];
}

function Calendar_get_daysofmonth(monthNo, p_year) {
	/* 
	Check for leap year ..
	1.Years evenly divisible by four are normally leap years, except for... 
	2.Years also evenly divisible by 100 are not leap years, except for... 
	3.Years also evenly divisible by 400 are leap years. 
	*/
	if ((p_year % 4) == 0) {
		if ((p_year % 100) == 0 && (p_year % 400) != 0)
			return Calendar.DOMonth[monthNo];
	
		return Calendar.lDOMonth[monthNo];
	} else
		return Calendar.DOMonth[monthNo];
}

function Calendar_calc_month_year(p_Month, p_Year, incr) {
	/* 
	Will return an 1-D array with 1st element being the calculated month 
	and second being the calculated year 
	after applying the month increment/decrement as specified by 'incr' parameter.
	'incr' will normally have 1/-1 to navigate thru the months.
	*/
	var ret_arr = new Array();
	
	if (incr == -1) {
		// B A C K W A R D
		if (p_Month == 0) {
			ret_arr[0] = 11;
			ret_arr[1] = parseInt(p_Year) - 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) - 1;
			ret_arr[1] = parseInt(p_Year);
		}
	} else if (incr == 1) {
		// F O R W A R D
		if (p_Month == 11) {
			ret_arr[0] = 0;
			ret_arr[1] = parseInt(p_Year) + 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) + 1;
			ret_arr[1] = parseInt(p_Year);
		}
	}
	
	return ret_arr;
}

function Calendar_print() {
	ggWinCal.print();
}

function Calendar_calc_month_year(p_Month, p_Year, incr) {
	/* 
	Will return an 1-D array with 1st element being the calculated month 
	and second being the calculated year 
	after applying the month increment/decrement as specified by 'incr' parameter.
	'incr' will normally have 1/-1 to navigate thru the months.
	*/
	var ret_arr = new Array();
	
	if (incr == -1) {
		// B A C K W A R D
		if (p_Month == 0) {
			ret_arr[0] = 11;
			ret_arr[1] = parseInt(p_Year) - 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) - 1;
			ret_arr[1] = parseInt(p_Year);
		}
	} else if (incr == 1) {
		// F O R W A R D
		if (p_Month == 11) {
			ret_arr[0] = 0;
			ret_arr[1] = parseInt(p_Year) + 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) + 1;
			ret_arr[1] = parseInt(p_Year);
		}
	}
	
	return ret_arr;
}

// This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists.
new Calendar();

Calendar.prototype.getMonthlyCalendarCode = function() {
	var vCode = "";
	var vHeader_Code = "";
	var vData_Code = "";
	
	// Begin Table Drawing code here..
	vCode = vCode + "<TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\">";
	
	vHeader_Code = this.cal_header();
	vData_Code = this.cal_data();
	vCode = vCode + vHeader_Code + vData_Code;
	
	vCode = vCode + "</TABLE>";
	
	return vCode;
}

Calendar.prototype.show = function() {
	var vCode = "";
	
	this.gWinCal.document.open();

	// Setup the page...
	this.wwrite("<html>");
	this.wwrite("<head><title>Calendar</title>");
	this.wwrite("</head>");

	this.wwrite("<body " + 
		"link=\"" + this.gLinkColor + "\" " + 
		"vlink=\"" + this.gLinkColor + "\" " +
		"alink=\"" + this.gLinkColor + "\" " +
		"text=\"" + this.gTextColor + "\">");
	this.wwriteA("<FONT FACE='" + fontface + "' SIZE=2><B>");
	this.wwriteA(this.gMonthName + " " + this.gYear);
	this.wwriteA("</B><BR>");

	// Show navigation buttons
	var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
	var prevMM = prevMMYYYY[0];
	var prevYYYY = prevMMYYYY[1];

	var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
	var nextMM = nextMMYYYY[0];
	var nextYYYY = nextMMYYYY[1];
	
	this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
		");" +
		"\"><<<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\"><<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\">><\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
		");" +
		"\">>><\/A>]</TD></TR></TABLE><BR>");

	// Get the complete calendar code for the month..
	vCode = this.getMonthlyCalendarCode();
	this.wwrite(vCode);

	this.wwrite("</font></body></html>");
	this.gWinCal.document.close();
}

Calendar.prototype.showY = function() {
	var vCode = "";
	var i;
	var vr, vc, vx, vy;		// Row, Column, X-coord, Y-coord
	var vxf = 285;			// X-Factor
	var vyf = 200;			// Y-Factor
	var vxm = 10;			// X-margin
	var vym;				// Y-margin
	if (isIE)	vym = 75;
	else if (isNav)	vym = 25;
	
	this.gWinCal.document.open();

	this.wwrite("<html>");
	this.wwrite("<head><title>Calendar</title>");
	this.wwrite("<style type='text/css'>\n<!--");
	for (i=0; i<12; i++) {
		vc = i % 3;
		if (i>=0 && i<= 2)	vr = 0;
		if (i>=3 && i<= 5)	vr = 1;
		if (i>=6 && i<= 8)	vr = 2;
		if (i>=9 && i<= 11)	vr = 3;
		
		vx = parseInt(vxf * vc) + vxm;
		vy = parseInt(vyf * vr) + vym;

		this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}");
	}
	this.wwrite("-->\n</style>");
	this.wwrite("</head>");

	this.wwrite("<body " + 
		"link=\"" + this.gLinkColor + "\" " + 
		"vlink=\"" + this.gLinkColor + "\" " +
		"alink=\"" + this.gLinkColor + "\" " +
		"text=\"" + this.gTextColor + "\">");
	this.wwrite("<FONT FACE='" + fontface + "' SIZE=2><B>");
	this.wwrite("Year : " + this.gYear);
	this.wwrite("</B><BR>");

	// Show navigation buttons
	var prevYYYY = parseInt(this.gYear) - 1;
	var nextYYYY = parseInt(this.gYear) + 1;
	
	this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\">>><\/A>]</TD></TR></TABLE><BR>");

	// Get the complete calendar code for each month..
	var j;
	for (i=11; i>=0; i--) {
		if (isIE)
			this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
		else if (isNav)
			this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");

		this.gMonth = i;
		this.gMonthName = Calendar.get_month(this.gMonth);
		vCode = this.getMonthlyCalendarCode();
		this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>");
		this.wwrite(vCode);

		if (isIE)
			this.wwrite("</DIV>");
		else if (isNav)
			this.wwrite("</LAYER>");
	}

	this.wwrite("</font><BR></body></html>");
	this.gWinCal.document.close();
}

Calendar.prototype.wwrite = function(wtext) {
	this.gWinCal.document.writeln(wtext);
}

Calendar.prototype.wwriteA = function(wtext) {
	this.gWinCal.document.write(wtext);
}

Calendar.prototype.cal_header = function() {
	var vCode = "";
	
	vCode = vCode + "<TR>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='16%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
	vCode = vCode + "</TR>";
	
	return vCode;
}

Calendar.prototype.cal_data = function() {
	var vDate = new Date();
	vDate.setDate(1);
	vDate.setMonth(this.gMonth);
	vDate.setFullYear(this.gYear);

	var vFirstDay=vDate.getDay();
	var vDay=1;
	var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
	var vOnLastDay=0;
	var vCode = "";

	/*
	Get day for the 1st of the requested month/year..
	Place as many blank cells before the 1st day of the month as necessary. 
	*/

	vCode = vCode + "<TR>";
	for (i=0; i<vFirstDay; i++) {
		vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT SIZE='2' FACE='" + fontface + "'> </FONT></TD>";
	}

	// Write rest of the 1st week
	for (j=vFirstDay; j<7; j++) {
		vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" + 
			"<A HREF='#' " + 
				"onClick=\"self.opener.document." + this.gReturnItem + ".value='" + 
				this.format_data(vDay) + 
				"';window.close();\">" + 
				this.format_day(vDay) + 
			"</A>" + 
			"</FONT></TD>";
		vDay=vDay + 1;
	}
	vCode = vCode + "</TR>";

	// Write the rest of the weeks
	for (k=2; k<7; k++) {
		vCode = vCode + "<TR>";

		for (j=0; j<7; j++) {
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" + 
				"<A HREF='#' " + 
					"onClick=\"self.opener.document." + this.gReturnItem + ".value='" + 
					this.format_data(vDay) + 
					"';window.close();\">" + 
				this.format_day(vDay) + 
				"</A>" + 
				"</FONT></TD>";
			vDay=vDay + 1;

			if (vDay > vLastDay) {
				vOnLastDay = 1;
				break;
			}
		}

		if (j == 6)
			vCode = vCode + "</TR>";
		if (vOnLastDay == 1)
			break;
	}
	
	// Fill up the rest of last week with proper blanks, so that we get proper square blocks
	for (m=1; m<(7-j); m++) {
		if (this.gYearly)
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + 
			"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'> </FONT></TD>";
		else
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + 
			"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>";
	}
	
	return vCode;
}

Calendar.prototype.format_day = function(vday) {
	var vNowDay = gNow.getDate();
	var vNowMonth = gNow.getMonth();
	var vNowYear = gNow.getFullYear();

	if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear)
		return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>");
	else
		return (vday);
}

Calendar.prototype.write_weekend_string = function(vday) {
	var i;

	// Return special formatting for the weekend day.
	for (i=0; i<weekend.length; i++) {
		if (vday == weekend[i])
			return (" BGCOLOR=\"" + weekendColor + "\"");
	}
	
	return "";
}

Calendar.prototype.format_data = function(p_day) {
	var vData;
	var vMonth = 1 + this.gMonth;
	vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
	var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
	var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
	var vY4 = new String(this.gYear);
	var vY2 = new String(this.gYear.substr(2,2));
	var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;

	switch (this.gFormat) {
		case "MM\/DD\/YYYY" :
			vData = vMonth + "\/" + vDD + "\/" + vY4;
			break;
		case "MM\/DD\/YY" :
			vData = vMonth + "\/" + vDD + "\/" + vY2;
			break;
		case "MM-DD-YYYY" :
			vData = vMonth + "-" + vDD + "-" + vY4;
			break;
		case "MM-DD-YY" :
			vData = vMonth + "-" + vDD + "-" + vY2;
			break;

		case "DD\/MON\/YYYY" :
			vData = vDD + "\/" + vMon + "\/" + vY4;
			break;
		case "DD\/MON\/YY" :
			vData = vDD + "\/" + vMon + "\/" + vY2;
			break;
		case "DD-MON-YYYY" :
			vData = vDD + "-" + vMon + "-" + vY4;
			break;
		case "DD-MON-YY" :
			vData = vDD + "-" + vMon + "-" + vY2;
			break;

		case "DD\/MONTH\/YYYY" :
			vData = vDD + "\/" + vFMon + "\/" + vY4;
			break;
		case "DD\/MONTH\/YY" :
			vData = vDD + "\/" + vFMon + "\/" + vY2;
			break;
		case "DD-MONTH-YYYY" :
			vData = vDD + "-" + vFMon + "-" + vY4;
			break;
		case "DD-MONTH-YY" :
			vData = vDD + "-" + vFMon + "-" + vY2;
			break;

		case "DD\/MM\/YYYY" :
			vData = vDD + "\/" + vMonth + "\/" + vY4;
			break;
		case "DD\/MM\/YY" :
			vData = vDD + "\/" + vMonth + "\/" + vY2;
			break;
		case "DD-MM-YYYY" :
			vData = vDD + "-" + vMonth + "-" + vY4;
			break;
		case "DD-MM-YY" :
			vData = vDD + "-" + vMonth + "-" + vY2;
			break;

		default :
			vData = vMonth + "\/" + vDD + "\/" + vY4;
	}

	return vData;
}

function Build(p_item, p_month, p_year, p_format) {
	var p_WinCal = ggWinCal;
	gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);

	// Customize your Calendar here..
	gCal.gBGColor="white";
	gCal.gLinkColor="black";
	gCal.gTextColor="black";
	gCal.gHeaderColor="darkgreen";

	// Choose appropriate show function
	if (gCal.gYearly)	gCal.showY();
	else	gCal.show();
}

function show_calendar() {
	/* 
		p_month : 0-11 for Jan-Dec; 12 for All Months.
		p_year	: 4-digit year
		p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
		p_item	: Return Item.
	*/

	p_item = arguments[0];
	if (arguments[1] == null)
		p_month = new String(gNow.getMonth());
	else
		p_month = arguments[1];
	if (arguments[2] == "" || arguments[2] == null)
		p_year = new String(gNow.getFullYear().toString());
	else
		p_year = arguments[2];
	if (arguments[3] == null)
		p_format = "MM/DD/YYYY";
	else
		p_format = arguments[3];

	vWinCal = window.open("", "Calendar", 
		"width=250,height=250,status=no,resizable=no,top=200,left=200");
	vWinCal.opener = self;
	ggWinCal = vWinCal;

	Build(p_item, p_month, p_year, p_format);
}
/*
Yearly Calendar Code Starts here
*/
function show_yearly_calendar(p_item, p_year, p_format) {
	// Load the defaults..
	if (p_year == null || p_year == "")
		p_year = new String(gNow.getFullYear().toString());
	if (p_format == null || p_format == "")
		p_format = "MM/DD/YYYY";

	var vWinCal = window.open("", "Calendar", "scrollbars=yes");
	vWinCal.opener = self;
	ggWinCal = vWinCal;

	Build(p_item, null, p_year, p_format);
}


//end calender stuff




















































//start date checker stuff















var tokPat=new RegExp("^month_strict|month|Month|MONTH|yyyy|YYYY|mins|MINS|mon_strict|ampm|AMPM|mon|Mon|MON|min|MIN|dd|DD|mm|MM|yy|YY|hh|HH|ss|SS|m|M|d|D|y|Y|h|H|s|S");

// lowerMonArr is used to map months to their numeric values.

var lowerMonArr={jan:1, feb:2, mar:3, apr:4, may:5, jun:6, jul:7, aug:8, sep:9, oct:10, nov:11, dec:12}

// monPatArr contains regular expressions used for matching abbreviated months
// in a date string.

var monPatArr=new Array();
monPatArr['mon_strict']=new RegExp(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/);
monPatArr['Mon']=new RegExp(/Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec/);
monPatArr['MON']=new RegExp(/JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC/);
monPatArr['mon']=new RegExp("jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec",'i');

// monthPatArr contains regular expressions used for matching full months
// in a date string.

var monthPatArr=new Array();
monthPatArr['month']=new RegExp(/^january|february|march|april|may|june|july|august|september|october|november|december/i);
monthPatArr['Month']=new RegExp(/^January|February|March|April|May|June|July|August|September|October|November|December/);
monthPatArr['MONTH']=new RegExp(/^JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER/);
monthPatArr['month_strict']=new RegExp(/^january|february|march|april|may|june|july|august|september|october|november|december/);

// cutoffYear is the cut-off for assigning "19" or "20" as century.  Any
// two-digit year >= cutoffYear will get a century of "19", and everything
// else gets a century of "20".

var cutoffYear=10;

// FormatToken is a datatype we use for storing extracted tokens from the
// format string.

function FormatToken (token, type) {
this.token=token;
this.type=type;
}

function parseFormatString (formatStr) {
var tokArr=new Array;
var tokInd=0;
var strInd=0;
var foundTok=0;
    
while (strInd < formatStr.length) {
if (formatStr.charAt(strInd)=="%" &&
(matchArray=formatStr.substr(strInd+1).match(tokPat)) != null) {
strInd+=matchArray[0].length+1;
tokArr[tokInd++]=new FormatToken(matchArray[0],"symbolic");
} else {

// No token matched current position, so current character should 
// be saved as a required literal.

if (tokInd>0 && tokArr[tokInd-1].type=="literal") {

// Literal tokens can be combined.Just add to the last token.

tokArr[tokInd-1].token+=formatStr.charAt(strInd++);
}
else {
tokArr[tokInd++]=new FormatToken(formatStr.charAt(strInd++), "literal");
      }
   }
}
return tokArr;
}

/* buildDate does all the real work.It takes a date string and format string,
 tries to match the two up, and returns a Date object (with the supplied date
 string value).If a date string doesn't contain all the fields that a Date
 object contains (for example, a date string with just the month), all
 unprovided fields are defaulted to those characteristics of the current
 date. Time fields that aren't provided default to 0.Thus, a date string
 like "3/30/2000" in "%mm/%dd/%yyyy" format results in a Date object for that
 date at midnight.formatStr is a free-form string that indicates special
 tokens via the % character.Here are some examples that will return a Date
 object:

 buildDate('3/30/2000','%mm/%dd/%y') // March 30, 2000
 buildDate('March 30, 2000','%Mon %d, %y') // Same as above.
 buildDate('Here is the date: 30-3-00','Here is the date: %dd-%m-%yy')

 If the format string does not match the string provided, an error message
 (i.e. String object) is returned.Thus, to see if buildDate succeeded, the
 caller can use the "typeof" command on the return value.For example,
 here's the dateCheck function, which returns true if a given date is
 valid,and false otherwise (and reports an error in the false case):

 function dateCheck(dateStr,formatStr) {
 var myObj=buildDate(dateStr,formatStr);
 if (typeof myObj=="object") {
 // We got a Date object, so good.
 return true;
 } else {
 // We got an error string.
 alert(myObj);
 return false;
 }
 }

*/

function buildDate(dateStr,formatStr) {
// parse the format string first.
var tokArr=parseFormatString(formatStr);
var strInd=0;
var tokInd=0;
var intMonth;
var intDay;
var intYear;
var intHour;
var intMin;
var intSec;
var ampm="";
var strOffset;

// Create a date object with the current date so that if the user only
// gives a month or day string, we can still return a valid date.

var curdate=new Date();
intMonth=curdate.getMonth()+1;
intDay=curdate.getDate();
intYear=curdate.getFullYear();

// Default time to midnight, so that if given just date info, we return
// a Date object for that date at midnight.

intHour=0;
intMin=0;
intSec=0;

// Walk across dateStr, matching the parsed formatStr until we find a 
// mismatch or succeed.

while (strInd < dateStr.length && tokInd < tokArr.length) {

// Start with the easy case of matching a literal.

if (tokArr[tokInd].type=="literal") {
if (dateStr.indexOf(tokArr[tokInd].token,strInd)==strInd) {

// The current position in the string does match the format 
// pattern.

strInd+=tokArr[tokInd++].token.length;
continue;
}
else {

// ACK! There was a mismatch; return error.

return "\"" + dateStr + "\" does not conform to the expected format: " + formatStr;
   }
}

// If we get here, we're matching to a symbolic token.
switch (tokArr[tokInd].token) {
case 'm':
case 'M':
case 'd':
case 'D':
case 'h':
case 'H':
case 'min':
case 'MIN':
case 's':
case 'S':

// Extract one or two characters from the date-time string and if 
// it's a number, save it as the month, day, hour, or minute, as
// appropriate.

curChar=dateStr.charAt(strInd);
nextChar=dateStr.charAt(strInd+1);
matchArr=dateStr.substr(strInd).match(/^\d{1,2}/);
if (matchArr==null) {

// First character isn't a number; there's a mismatch between
// the pattern and date string, so return error.

switch (tokArr[tokInd].token.toLowerCase()) {
case 'd': var unit="day"; break;
case 'm': var unit="month"; break;
case 'h': var unit="hour"; break;
case 'min': var unit="minute"; break;
case 's': var unit="second"; break;
}
return "Bad " + unit + " \"" + curChar + "\" or \"" + curChar +
nextChar + "\".";
}
strOffset=matchArr[0].length;
switch (tokArr[tokInd].token.toLowerCase()) {
case 'd': intDay=parseInt(matchArr[0],10); break;
case 'm': intMonth=parseInt(matchArr[0],10); break;
case 'h': intHour=parseInt(matchArr[0],10); break;
case 'min': intMin=parseInt(matchArr[0],10); break;
case 's': intSec=parseInt(matchArr[0],10); break;
}
break;
case 'mm':
case 'MM':
case 'dd':
case 'DD':
case 'hh':
case 'HH':
case 'mins':
case 'MINS':
case 'ss':
case 'SS':

// Extract two characters from the date string and if it's a 
// number, save it as the month, day, or hour, as appropriate.

strOffset=2;
matchArr=dateStr.substr(strInd).match(/^\d{2}/);
if (matchArr==null) {

// The two characters aren't a number; there's a mismatch 
// between the pattern and date string, so return an error
// message.

switch (tokArr[tokInd].token.toLowerCase()) {
case 'dd': var unit="day"; break;
case 'mm': var unit="month"; break;
case 'hh': var unit="hour"; break;
case 'mins': var unit="minute"; break;
case 'ss': var unit="second"; break;
}
return "Bad " + unit + " \"" + dateStr.substr(strInd,2) + 
"\".";
}
switch (tokArr[tokInd].token.toLowerCase()) {
case 'dd': intDay=parseInt(matchArr[0],10); break;
case 'mm': intMonth=parseInt(matchArr[0],10); break;
case 'hh': intHour=parseInt(matchArr[0],10); break;
case 'mins': intMin=parseInt(matchArr[0],10); break;
case 'ss': intSec=parseInt(matchArr[0],10); break;
}
break;
case 'y':
case 'Y':

// Extract two or four characters from the date string and if it's
// a number, save it as the year.Convert two-digit years to four
// digit years by assigning a century of '19' if the year is >= 
// cutoffYear, and '20' otherwise.

if (dateStr.substr(strInd,4).search(/\d{4}/) != -1) {

// Four digit year.

intYear=parseInt(dateStr.substr(strInd,4),10);
strOffset=4;
}
else {
if (dateStr.substr(strInd,2).search(/\d{2}/) != -1) {

// Two digit year.

intYear=parseInt(dateStr.substr(strInd,2),10);
if (intYear>=cutoffYear) {
intYear+=1900;
}
else {
intYear+=2000;
}
strOffset=2;
}
else {

// Bad year; return error.

return "Bad year \"" + dateStr.substr(strInd,2) + 
"\". Must be two or four digits.";
   }
}
break;
case 'yy':
case 'YY':

// Extract two characters from the date string and if it's a 
// number, save it as the year.Convert two-digit years to four 
// digit years by assigning a century of '19' if the year is >= 
// cutoffYear, and '20' otherwise.

if (dateStr.substr(strInd,2).search(/\d{2}/) != -1) {

// Two digit year.

intYear=parseInt(dateStr.substr(strInd,2),10);
if (intYear>=cutoffYear) {
intYear+=1900;
}
else {
intYear+=2000;
}
strOffset=2;
} else {
// Bad year; return error
return "Bad year \"" + dateStr.substr(strInd,2) + 
"\". Must be two digits.";
}
break;
case 'yyyy':
case 'YYYY':

// Extract four characters from the date string and if it's a 
// number, save it as the year.

if (dateStr.substr(strInd,4).search(/\d{4}/) != -1) {

// Four digit year.

intYear=parseInt(dateStr.substr(strInd,4),10);
strOffset=4;
}
else {

// Bad year; return error.

return "Bad year \"" + dateStr.substr(strInd,4) + 
"\". Must be four digits.";
}
break;
case 'mon':
case 'Mon':
case 'MON':
case 'mon_strict':

// Extract three characters from dateStr and parse them as 
// lower-case, mixed-case, or upper-case abbreviated months,
// as appropriate.

monPat=monPatArr[tokArr[tokInd].token];
if (dateStr.substr(strInd,3).search(monPat) != -1) {
intMonth=lowerMonArr[dateStr.substr(strInd,3).toLowerCase()];
}
else {

// Bad month, return error.

switch (tokArr[tokInd].token) {
case 'mon_strict': caseStat="lower-case"; break;
case 'Mon': caseStat="mixed-case"; break;
case 'MON': caseStat="upper-case"; break;
case 'mon': caseStat="between Jan and Dec"; break;
}
return "Bad month \"" + dateStr.substr(strInd,3) + 
"\". Must be " + caseStat + ".";
}
strOffset=3;
break;
case 'month':
case 'Month':
case 'MONTH':
case 'month_strict':

// Extract a full month name at strInd from dateStr if possible.

monPat=monthPatArr[tokArr[tokInd].token];
matchArray=dateStr.substr(strInd).match(monPat);
if (matchArray==null) {

// Bad month, return error.

return "Can't find a month beginning at \"" +
dateStr.substr(strInd) + "\".";
}

// It's a good month.

intMonth=lowerMonArr[matchArray[0].substr(0,3).toLowerCase()];
strOffset=matchArray[0].length;
break;
case 'ampm':
case 'AMPM':
matchArr=dateStr.substr(strInd).match(/^(am|pm|AM|PM|a\.m\.|p\.m\.|A\.M\.|P\.M\.)/);
if (matchArr==null) {

// There's no am/pm in the string.Return error msg.

return "Missing am/pm designation.";
}

// Store am/pm value for later (as just am or pm, to make things
// easier later).

if (matchArr[0].substr(0,1).toLowerCase() == "a") {

// This is am.

ampm = "am";
}
else {
ampm = "pm";
}
strOffset = matchArr[0].length;
break;
}
strInd += strOffset;
tokInd++;
}
if (tokInd != tokArr.length || strInd != dateStr.length) {

/* We got through the whole date string or format string, but there's 
 more data in the other, so there's a mismatch. */

return "\"" + dateStr + "\" is either missing desired information or has more information than the expected format: " + formatStr;
}

// Make sure all components are in the right ranges.

if (intMonth < 1 || intMonth > 12) {
return "Month must be between 1 and 12.";
}
if (intDay < 1 || intDay > 31) {
return "Day must be between 1 and 31.";
}

// Make sure user doesn't put 31 for a month that only has 30 days

if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && intDay == 31) {
return "Month "+intMonth+" doesn't have 31 days!";
}

// Check for February date validity (including leap years) 

if (intMonth == 2) {

// figure out if "year" is a leap year; don't forget that
// century years are only leap years if divisible by 400

var isleap=(intYear%4==0 && (intYear%100!=0 || intYear%400==0));
if (intDay > 29 || (intDay == 29 && !isleap)) {
return "February " + intYear + " doesn't have " + intDay + 
" days!";
   }
}

// Check that if am/pm is not provided, hours are between 0 and 23.

if (ampm == "") {
if (intHour < 0 || intHour > 23) {
return "Hour must be between 0 and 23 for military time.";
   }
}
else {

// non-military time, so make sure it's between 1 and 12.

if (intHour < 1|| intHour > 12) {
return "Hour must be between 1 and 12 for standard time.";
   }
}

// If user specified amor pm, convert intHour to military.

if (ampm=="am" && intHour==12) {
intHour=0;
}
if (ampm=="pm" && intHour < 12) {
intHour += 12;
}
if (intMin < 0 || intMin > 59) {
return "Minute must be between 0 and 59.";
}
if (intSec < 0 || intSec > 59) {
return "Second must be between 0 and 59.";
}
return new Date(intYear,intMonth-1,intDay,intHour,intMin,intSec);
}

















function dateCheck(formatStr) {
for (i=0; i < document.MyForm.childNum.options(document.MyForm.childNum.selectedIndex).value; i++){
z=(i+1);
var kinde = "childbirthdate" + (z);
dateStr = document.MyForm(kinde).value;

var myObj = buildDate(dateStr,formatStr);
if (typeof myObj == "object") {

// We got a Date object, so good.


continue;
}
else {

// We got an error string.

alert("You must enter a date in the format MM/DD/YYYY");
	document.MyForm(kinde).focus();

return false;
   }
   }
}


function stepdateCheck(formatStr) {
if (document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value !== "0"){
for (i=0; i < document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value; i++){
z=(i+1);
var kinde = "stepchildbirthdate" + (z);
dateStr = document.MyForm(kinde).value;

var myObj = buildDate(dateStr,formatStr);
if (typeof myObj == "object") {

// We got a Date object, so good.


continue;
}
else {

// We got an error string.

alert("You must enter a date in the format MM/DD/YYYY");
	document.MyForm(kinde).focus();

return false;
   }
   }
   }else{
   return true;
   }
}
//  End -->


//end date checker stuff























































function goNew(){ 
				var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
				for (rem=0; rem < (goNew.arguments.length-2); rem+=3) {
					store = goNew.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
					if ((store.indexOf('document.layers[')==0 && document.layers==null) || (store.indexOf('document.all[')==0 && document.all==null))
						store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
					obj = eval(store);
						if (obj != null) {
							switcher[keep++] = obj;
							switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
							obj.src = goNew.arguments[rem+2];
						}
					}
				document.Data = switcher;
			} 
			
function goNormal(){ 
				if (document.Data != null)
					for (var rem=0; rem<(document.Data.length-1); rem+=2)
						document.Data[rem].src=document.Data[rem+1];
			}
			
			
			
			
function preloadImages() {
				var d=document; if(d.images) {
					if(!d.p) d.p=new Array();
						var i,j=d.p.length,a=preloadImages.arguments;
						for(i=0;
						i<a.length; i++)
					if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];
					}
				}
			}	 




































/* Javascript Author: Clay Crosland clay@burriswebsolutions.com */	
function popupWindow(pagename) {
	window.open((pagename), 'popupwindow', 'width=510,height=400,top=10,left=10,scrollbars=1,resizable=1');
}	
			
function popupWindowl(pagename) {
	window.open((pagename), 'popupwindow', 'width=800,height=600,top=10,left=10,scrollbars=1,resizable=1');
}	 

function haveNamenow1(name){

			noname.style.display = "none";
			firstblock.style.display = "block";
	 		namenow1.innerHTML = (name);
			namenow2.innerHTML = (name);
			namenow3.innerHTML = (name);
			namenow4.innerHTML = (name);
			namenow5.innerHTML = (name);
			namenow1000.innerHTML = (name);
			document.MyForm.address.focus();
}
var formHistory=new Array();
function showChildren(num){
	var name = document.MyForm.fullname.value;
	
	if ((num) !== "0") {
	document.all.secondblock.style.display = "block";
	namenow6.innerHTML = (name);
	namenow7.innerHTML = (name);
	document.all.childblock1.style.display = "block";

			
			
			for (i=num; i<12; i++){
		z = eval(i) + 1;
		
		var p = "childblock" + (z);
		var q = "childBD" + (z);
		var u = "childfullname" + (z);
		var o = "childbirthdate" + (z);
		document.all(p).style.display = "none";
		document.all(q).style.display = "none";
		document.MyForm(o).value = "";
		document.MyForm(u).value = "";
		}
			
		formHistory[formHistory.length]=num ;
		
		if (formHistory.length > 1){
		
		var lastone = formHistory[formHistory.length-2];
		
		
		
		
			if (num > lastone){
			onemore = eval(lastone) + 1;
		var g = "childblock" + (onemore);
		document.all(g).style.display = "block";
		}
		}
			
			
			
			
		
		
	document.MyForm.childfullname1.focus();
	}else{
		document.all.secondblock.style.display = "none";
		for (i=0; i<12; i++){
		z = (i + 1);
		var p = "childblock" + (z);
		var q = "childBD" + (z);
		document.all(p).style.display = "none";
		document.all(q).style.display = "none";
		}
		document.all.maritalblock.style.display = "block";
		document.all.isMarried.style.display = "block";
	namenow222.innerHTML = (name);
	namenow223.innerHTML = (name);
		}
}

/* child info */
function child(child2name,thisnum){
var t = "herechild" + (thisnum);
var x = "childBD" + (thisnum);
var y = "childnamenow" + (thisnum);
var a = "childbirthdate" + (thisnum);

		document.all(t).style.display = "none";
		document.all(x).style.display = "block";
		document.all(y).innerHTML = (child2name);
		document.MyForm(a).focus();
}

function childMore(num,thisnum,newnum,oldnum){
	var name = document.MyForm.fullname.value;
	var p = "childblock" + (newnum);
	var q = "namenow" + (oldnum);
	
	
	if ((num) !== (thisnum)) {
	document.all(p).style.display = "block";
	document.all(q).innerHTML = (name);
	
	}else{
	document.all.maritalblock.style.display = "block";
	document.all.isMarried.style.display = "block";
	namenow222.innerHTML = (name);
	namenow223.innerHTML = (name);
	}
}

function yesMarried(){
var name = document.MyForm.fullname.value;
	document.all.yesmarried.style.display = "block";
	namenow301.innerHTML = (name);
}
function noMarried(){
var name = document.MyForm.fullname.value;
	document.all.yesmarried.style.display = "none";
	document.all.spousechildnum.style.display = "none";
	for (k=0; k<12; k++){
	r = (k + 1);
	var needle = "stepchildblock" + (r);
	var needbl = "stepchildBD" + (r);
	document.all(needle).style.display = "none";
	document.all(needbl).style.display = "none";
	}
	
	document.all.executor.style.display = "block";
	namenow310.innerHTML = (name);
	document.all.executorname.style.display = "block";
	namenow320.innerHTML = (name);
	document.all.executorname2.style.display = "block";
	namenow325.innerHTML = (name);
}

function spouseNow(spousename){
	document.all.herespouse.style.display = "none";
	var name = document.MyForm.fullname.value;
	document.all.spousechildnum.style.display = "block";
	namenow303.innerHTML = (name);
	spousename1.innerHTML = (spousename);
}

var formHistory2=new Array();
function howmanyChSpouse(num){
	
	var sp = document.MyForm.spousename.value;
	var name = document.MyForm.fullname.value;
	if ((num) !== "0"){
	alert("WARNING: Estate planning for families with stepchildren can be very complex.  For example, if " +(sp)+ " dies and leaves everything to " +(name)+", "+(name)+ " could then create a new will omitting all of " + (sp) + "'s children from receiving anything.  There are many other unique challenges.  If stepchildren are part of your will, WE ENCOURAGE YOU TO CONSULT AN ATTORNEY BECAUSE THE WILL AVAILABLE ON THIS WEBSITE DOES NOT ADDRESS ANY OF THE SPECIAL CIRCUMSTANCES PRESENTED BY ESTATE PLANNING WITH STEP CHILDREN.");
	window.open('popups/warning.cfm','warning','width=600,height=400,status=1');
	document.all.stepchildblock1.style.display = "block";
	spousename2.innerHTML = (sp);
	
	
	
	
	
	
	
	
	
	
			
	
	
	
	for (i=num; i<12; i++){
		z = eval(i) + 1;
		
		var p = "stepchildblock" + (z);
		var q = "stepchildBD" + (z);
		var u = "stepchildname" + (z);
		var o = "stepchildbirthdate" + (z);
		document.all(p).style.display = "none";
		document.all(q).style.display = "none";
		document.MyForm(o).value = "";
		document.MyForm(u).value = "";
		}
			
		formHistory2[formHistory2.length]=num ;
		
		if (formHistory2.length > 1){
		
		var lastone = formHistory2[formHistory2.length-2];
		
		
		
		
			if (num > lastone){
			onemore = eval(lastone) + 1;
		var g = "stepchildblock" + (onemore);
		document.all(g).style.display = "block";
		}
	
	
	
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

}else{
	
	document.all.executor.style.display = "block";
	namenow310.innerHTML = (name);
	document.all.spouseexecutor.style.display = "block";
	
	document.all.executorname.style.display = "block";
	namenow320.innerHTML = (name);
	document.MyForm.executor1.value = (sp);
	document.MyForm.executor1.focus();
	document.all.executorname2.style.display = "block";
	namenow325.innerHTML = (name);
	}
}


function stepChildren(steps, thisnum){
	var t = "herestepchild" + (thisnum);
	var x = "stepchildBD" + (thisnum);
	var y = "stepchildnamenow" + (thisnum);
	var a = "stepchildbirthdate" + (thisnum);

		document.all(t).style.display = "none";
		document.all(x).style.display = "block";
		document.all(y).innerHTML = (steps);
		document.MyForm(a).focus();
}

function stepchildMore(num,thisnum,newnum,oldnum){
	var name = document.MyForm.spousename.value;
	var real = document.MyForm.fullname.value;
	var p = "stepchildblock" + (newnum);
	var q = "spousename" + (oldnum);
	var ff = "MyForm.executor1";
	
	if ((num) !== (thisnum)) {
	document.all(p).style.display = "block";
	document.all(q).innerHTML = (name);
	
	}else{
	document.all.spouseexecutor.style.display = "block";
	document.all.executor.style.display = "block";
	namenow310.innerHTML = (real);
	document.all.executorname.style.display = "block";
	namenow320.innerHTML = (real);
	document.MyForm.executor1.value = (name);
	document.all.executorname2.style.display = "block";
	namenow325.innerHTML = (real);
	
	}
}

function guardianCheck3(){
	
if (document.MyForm.childNum.options(document.MyForm.childNum.selectedIndex).value !== "0") {
	for (i=0; i < document.MyForm.childNum.options(document.MyForm.childNum.selectedIndex).value; i++)
{
	z = (i + 1);
	
	var chob = "childbirthdate" + (z);
	
	/* child stuff */
	var ch = document.MyForm(chob).value;
	var now = new Date(ch);
	var year = now.getYear();
	if (year < 2000) year +=1900;
	
	var chdate = new Date();
	var chyear = chdate.getYear();

	if ((chyear - year) > 17) { 	
	continue;	
	}else{ 	
	return false;	}

	} // for loop

 
 return true;

	} else { 
	return true;
	}
} 

function guardianCheck2(){


for(i = 0;i<document.MyForm.tfmarried.length;i++)
     {
      if(document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value !== 0) 
	  { 

		
		if(document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value !== "0")
          {
               
	for (p=0; p < document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value; p++)
{
z = (p + 1);
var stob = "stepchildbirthdate" + (z);

/* step child stuff */
	var st = document.MyForm(stob).value;
	var stnow = new Date(st);
	var styear = stnow.getYear();
	if (styear < 2000) styear +=1900;

	var chdate = new Date();
	var chyear = chdate.getYear();
	if ((chyear - styear) > 17) { 	
	continue;	
	}else{ 	
	return false;	}
	
	} /* second for */
	
	} /* second (<> 0) if */
	else
	
	return true; /* return true if (<> 0) */
	
	} /* close if for not married */
	else
	
	return true; /* return true if not married */
	
	} /* first for */
}


function guardianCheck(){
var name = document.MyForm.fullname.value;
	if ( (guardianCheck3()))
	{
	
	
	nowDib();
	
	return true;
	}else{
	
	document.all.guardians.style.display = "block";
	document.all.guardiansname.style.display = "block";
	document.all.guardiansname2.style.display = "block";
	namenow400.innerHTML = (name);
	namenow401.innerHTML = (name);
	namenow402.innerHTML = (name);
	namenow403.innerHTML = (name);
	namenow404.innerHTML = (name);
	
	
	return false;
	}
	
}
function nowDib() {
	lastRealopt()
	var name = document.MyForm.fullname.value;
	document.all.distribution.style.display = "block";
	namenow500.innerHTML = (name);
		for(i = 0;i<document.MyForm.tfmarried.length;i++)
     {
      
	  
	  
	  
	  //this first if will check to see if the creator is married and provide necessary distribution options of estate // 
	  
	  if(document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value == 0)
	  { 
	  var spouse = document.MyForm.spousename.value;
	  document.all.marall.style.display = "block";
	  spmarall.innerHTML = (spouse);
	  document.all.mar1.style.display = "block";
	  
	  document.all.mar4.style.display = "none";
	  document.all.mar5.style.display = "none";
	  namenow501.innerHTML = (name);
	  namenow502.innerHTML = (name);
	  spnamenow501.innerHTML = (spouse);
	  
	  //this second if will check to see if the creator has any natural children and then provide them with the necessary distribution options //
	  		if (document.MyForm.childNum.options(document.MyForm.childNum.selectedIndex).value !== "0") 
{

	document.all.mar2.style.display = "block";
	if (document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value !== "0")
	{
	document.all.mar22.style.display = "block";
	namenow5555.innerHTML = (name);
	namenow5556.innerHTML = (name);
	spnamenow4444.innerHTML = (spouse);
	}
	namenow503.innerHTML = (name);
	namenow504.innerHTML = (name);
	
	
	// here I am
	
	
	
	spnamenow502.innerHTML = (spouse);
	for (me = 0; me<document.MyForm.childNum(document.MyForm.childNum.selectedIndex).value; me++)
	{
	you = (me + 1);
	var chname = "childfullname" + (you);
	var re = "realchild" + (you);
	document.all(re).innerHTML = (document.MyForm(chname).value)+" ";
	var reneww = "realchild43" + (you);
	document.all(reneww).innerHTML = (document.MyForm(chname).value)+" ";
	}
	if (document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value !== "0")
	{
	
	document.all.mar3.style.display = "block";
	namenow520.innerHTML = (name);
	}
	for (me = 0; me<document.MyForm.childNum(document.MyForm.childNum.selectedIndex).value; me++)
	{
	you = (me + 1);
	var chname = "childfullname" + (you);
	var re = "realchild3" + (you);
	document.all(re).innerHTML = (document.MyForm(chname).value)+" ";
	
	}
	
	
	}
	/* step children now */
	if (document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex).value !== "0")
	{
	document.all.mar2.style.display = "block";
	namenow503.innerHTML = (name);
	namenow504.innerHTML = (name);
	spnamenow502.innerHTML = (spouse);
	for (kyle = 0; kyle<document.MyForm.spousechildrealnum.options(document.MyForm.spousechildrealnum.selectedIndex). value; kyle++)
	{
	bacr = (kyle + 1);
	var stename = "stepchildname" + (bacr);
	var res = "realstep" + (bacr);
	document.all(res).innerHTML = (document.MyForm(stename).value)+" ";
	
	}
	
	}
	
	}else if ((document.MyForm.childNum.options(document.MyForm.childNum.selectedIndex).value !== "0") && (document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value !== "0"))
	{
	drooRs();
	document.all.mar3.style.display = "block";
	namenow520.innerHTML = (name);
	for (me = 0; me<document.MyForm.childNum(document.MyForm.childNum.selectedIndex).value; me++)
	{
	you = (me + 1);
	var chname = "childfullname" + (you);
	var re = "realchild3" + (you);
	document.all(re).innerHTML = (document.MyForm(chname).value)+" ";
	
	}
	}else if (document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value !== 0)
	{
	drooRs()
	
	}
	
	}
}

function drooRs(){
	var name = document.MyForm.fullname.value;
	document.all.mar4.style.display = "block";
	namenow521.innerHTML = (name);
	document.all.mar5.style.display = "block";
	namenow569.innerHTML = (name);
}
function thingsAndstuff(){
	var name = document.MyForm.fullname.value;
	newTabno();
	document.all.schtuff.style.display = "block";
	namenow572.innerHTML = (name);
	
}

function noTins(){
	newTabno();
	document.all.schtuff.style.display = "none";
	document.all.writein2.style.display = "none";
}
function newTab(){
	noTins();
	document.all.lastopt.style.display = "block";
	
}

function newTabno(){
	document.all.lastopt.style.display = "none";
	document.all.writein2.style.display = "none";
	}
	
function showMo(num,ber){
	var ippy = "roto" + (num);
	var yikes = "b" + (ber);
	document.all(ippy).style.display = "block";
	document.all(yikes).style.display = "none";
	}
	
function goPercent(thelike){
	with (document.MyForm){
	if (((thelike) == "cash") && (single2.options(single2.selectedIndex).value !== "percent") && (single3.options(single3.selectedIndex).value !== "percent") && (single4.options(single4.selectedIndex).value !== "percent") && (single5.options(single5.selectedIndex).value !== "percent")){
	document.all.percy.style.display = "none";
	}else{
	document.all.percy.style.display = "block";
	document.all.percy.innerHTML = "100% Remaining";
	}
	}
}

function nowHow(){
	with (document.MyForm){
	var name = fullname.value;
	if ((single1.options(single1.selectedIndex).value == "cash") && (single2.options(single2.selectedIndex).value !== "percent") && (single3.options(single3.selectedIndex).value !== "percent") && (single4.options(single4.selectedIndex).value !== "percent") && (single5.options(single5.selectedIndex).value !== "percent")){
	document.all.percy.style.display = "none";
	}else{
	if (single1.options(single1.selectedIndex).value == "percent"){
	var coolamt1 = amt1.value;
	}else{
	var coolamt1 = 0;
	}
	if (single2.options(single2.selectedIndex).value == "percent"){
	var coolamt2 = amt2.value;
	}else{
	
	var coolamt2 = 0;
	}
	if (single3.options(single3.selectedIndex).value == "percent"){
	var coolamt3 = amt3.value;
	}else{
	var coolamt3 = 0;
	}
	if (single4.options(single4.selectedIndex).value == "percent"){
	var coolamt4 = amt4.value;
	}else{
	var coolamt4 = 0;
	}
	if (single5.options(single5.selectedIndex).value == "percent"){
	var coolamt5 = amt5.value;
	}else{
	var coolamt5 = 0;
	}
	
	var f2 = eval(coolamt1) + eval(coolamt2) + eval(coolamt3) + eval(coolamt4) + eval(coolamt5); 
	
	var newtot1 = (100 - (f2));
	if (newtot1 < 0){
	alert("You have assigned over 100% of " + (name) + "'s ownership.  Please correct the distributions");
	} 
	document.all.percy.innerHTML = (newtot1) + "% Remaining";
	}
	}
}

function showSubmit(){
for(i=0; i < document.MyForm.howdistribute.length; i++)
     {
	 with (document.MyForm){
      if((howdistribute[i].checked))
	  {
	  showTheButton();
	  return true;
	
		

} else{
	
	document.all.submitty.style.display = "none";
	document.all.submittynot.style.display = "none";
	}
	}
	}
}


function showTheButton(){
	
	
	with (document.MyForm){
	
	
	if ( (guardianCheck3())){
	
	if ((address.value == "") || (city.value == "") || (county.value == "") || (state.value == "") || (executor1.value == "") || (executor2.value == ""))
{
 	document.all.submitty.style.display = "none";
	document.all.submittynot.style.display = "block";
} 
		else{
	document.all.submitty.style.display = "block";
	document.all.submittynot.style.display = "none";
}
	
	
} else {

	
	if ((guardian1.value == "") || (guardian2.value == "") || (address.value == "") || (city.value == "") || (county.value == "") || (state.value == "") || (executor1.value == "") || (executor2.value == ""))
{
 	document.all.submitty.style.display = "none";
	document.all.submittynot.style.display = "block";
} 
		else{
	document.all.submitty.style.display = "block";
	document.all.submittynot.style.display = "none";
}
	
	
	
	}
	}
	
}



function missingInfo(){
	window.open('wills-missinginfo.cfm','missing','width=500,height=350,status=1');
}

function lastRealopt(){
	var spouse = document.MyForm.spousename.value;
	var name = document.MyForm.fullname.value;
	document.all.writein.style.display = "block";
	
	
	
	for(i = 0;i<document.MyForm.tfmarried.length;i++)
     {
      
	  
	  
	  
	  //this first if will check to see if the creator is married and provide necessary distribution options of estate // 
	  
	  if(document.MyForm.tfmarried[i].checked && document.MyForm.tfmarried[i].value == "0")
	  { 
	aaronhere.innerHTML = "to "+ (spouse) + " if he or she outlives " +(name)+ " otherwise";
	  }
	}
	
	
	namenow800.innerHTML = (name);
	
}
function newBlock(){
	document.all.writein2.style.display = "block";
	document.all.lastopt.style.display = "none";
	document.all.schtuff.style.display = "none";
	showSubmit();
}
function greaT(){
	alert('WARNING:  Some assets like real property held in joint tenancy, life insurance policies, IRAs, 401(k) accounts and certain Payable On Death bank accounts may NOT be left to beneficiaries using a will.  Instead, in the case of joint tenant real property, you must convert your interest to co-tenancy if you want to leave your share of the property to somebody in your will (otherwise the real property will automatically pass to the other joint tenants upon your death.)  In the case of the life insurance, IRAs, 401(k) and POD bank accounts, you must contact the insurance company, retirement plan administrator or financial institution holding the asset and ask for a “beneficiary designation form.”   When you receive the form, follow the directions contained on it to name the person you want to receive the asset in the event of your death.  To repeat, using your will to distribute joint tenant real property, life insurance policy proceeds, IRAs, 401(k) accounts and certain Payable On Death bank accounts will probably be ineffective');
}
