//variables for random quotes
var quotes = new Array;
	quotes[0] = "&quot;Seek diligently to turn the hearts of the children to their fathers,<br>and the hearts of the fathers to the children.&quot; &mdash; D & C 98:16";
	quotes[1] = "&quot;And He shall plant in the hearts of the children the promises made to the fathers<br>and the hearts of the children shall turn to their fathers.&quot; &mdash; D&C 2:2";
	quotes[2] = "&quot;Love is the central motivation for family history work.&quot;<br> &mdash; Encyclopedia of Mormonism, Vol. 2";
	quotes[3] = "&quot;The greatest responsibility in this world that God has laid upon us is to seek after our dead.&quot;<br> &mdash; Joseph Smith";
	quotes[4] = "&quot;All of our vast family history endeavor is directed to temple work. There is no other purpose for it.&quot;<br> &mdash; Gordon B. Hinckley"
	quotes[5] = "&quot;I believe the youth are not only willing and able to do genealogical research,<br>but they are a good means of giving life to the whole program.&quot; &mdash; Ezra&nbsp;Taft&nbsp;Benson"
	quotes[6] =	 "&quot;I believe that the Lord is anxious to put into our hands inventions of which we laymen have hardly had a glimpse.&quot;<br> &mdash; Spencer W. Kimball";
	quotes[7] = "&quot;[Your ancestors'] hearts are bound to you. Their hope is in your hands.<br>You will have more than your own strength as you choose to labor on to find them.&quot; &mdash; Henry B. Eyring"
//	quotes[8] = "&quot;Those who wait beyond the veil for the ordinances of the gospel are in desperate circumstances analogous to the handcart pioneers....<br>We need to wake up the whole Church to their plight.&quot; &mdash; D. Todd Christofferson, quoting Gordon B. Hinckley"
	quotes[9] = "&quot;[Your ancestors'] hearts are bound to you. Their hope is in your hands.<br>You will have more than your own strength as you choose to labor on to find them.&quot; &mdash; Henry B. Eyring"
    var n = quotes.length;
    var random = Math.floor( Math.random()*n );

//This function is used to show/hide table rows 

function show_hide(oItem) //oItem is the TD containing the arrow button
{

var pRow = oItem.parentNode; //sets a variable for the parent row containing all the relevant children

var regdetail = pRow.nextSibling

var circleimg = pRow.childNodes[0].firstChild
if (regdetail.style.display == 'none')
	{regdetail.style.display = 'table-row'
	pRow.style.backgroundColor = '#efefef'
	circleimg.src = '_images/uparrow.png'}
else
	{regdetail.style.display = 'none'
	pRow.style.backgroundColor = '#fff'
	circleimg.src = '_images/downarrow.png'}
}

//This function validates that an email field generally has the right format

function validate_email(field)
{

with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {alert("Please enter a complete email address.");
   document.GetElementById(field.id).focus();
  return false;
  }
else {return true;}
}
}

//This function creates an expiring "New" notice next to an item.
//Use by putting <script>marknew(YYYY,MM,DD) < /script> in the front of the item, where YYYY,MM,DD are the year, month, and day you want the item to expire.
var newtext="<span class='new'>New! </span>"
var today=new Date()
function marknew(yr,mon,day){
var expire=new Date(yr,mon-1,day)
if (today.getTime()<=expire.getTime())
document.write(newtext);
}

//same as above, but this one says "Updated."
//This function creates an expiring "New" notice next to an item.
//Use by putting <script>marknew(YYYY,MM,DD) < /script> in the front of the item, where YYYY,MM,DD are the year, month, and day you want the item to expire.
var updatetext="<span class='new'>Updated </span>"
var today=new Date()
function markupdated(yr,mon,day){
var expire=new Date(yr,mon-1,day)
if (today.getTime()<=expire.getTime())
document.write(updatetext);
}
