history.forward(1);

function showMarried(what)
{
  document.all.grantorsingle.style.display = (what == "No" ? "block" : "none");
  document.all.grantormarried.style.display = (what == "Yes" ? "block" : "none");
}

function accInt()
{
  if (event.keyCode >= 48 && event.keyCode <= 57)
    return true;
  else
    return false;
}

var missingFields;
function checkForm()
{
  var what = document.MyForm;
  missingFields = new Array();
  try
  {
    var els = what.elements;
    for (i = 0; i < els.length; i++)
    {
      el = els[i];
      n = el.name.toLowerCase();
   	 	switch (el.tagName.toUpperCase())
      {
        case "INPUT":
        case "SELECT":
       	  v = el.value;
      	break;
        case "TEXTAREA":
          v = el.innerText;
        break;
   		}
   		if (v == "")
      {
        if
        ( !(what.marriedgrantors.value != "Yes" && (n == "grantor1" || n == "grantor2") || what.marriedgrantors.value != "No" && n == "grantor" ) )
        {
          missingFields[missingFields.length] = n;
     		}
      }
    }
    if (missingFields.length > 0)
    {
      window.open('/popups/missinginfo.cfm','missinginfo','width=600,height=500,scrollbars=1,resizable=1,status=1');
    	return false;
    }
    else
  	  return true;
	}  // close try
 	catch(e)
  {
    alert(e.message);
    return false;
 	}
}

function doerror()
{
  alert(event.error);
  event.srcElement.focus();
}