function showMoreSel(who,where){

	
	if(who == "yes"){
		document.all(where).style.display="block";
	}else{
		document.all(where).style.display="none";
	}
}

	var calcaller;
    var calcallervalue;
    function showcalendar(element)
    {
      calcaller = element;
      calcallervalue = eval(element).value;
thewindow =window.open('popups/calendar.htm', 'popupwindow', 'width=325,height=325,center=yes,help=no,menubar=0,resizeable=0,scrollbars=0,status=1');
    }

	
var missingFields;
function checkIt(what)
{
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 ( n == "ownername" || n == "owneradr" || n == "ownercity" ||  n == "ownerstate" || n == "baileename" || n == "baileeadr" || n == "baileecity" || n == "illyorn" || what.illyorn.value == "yes" && (n == "businesstype1" || n == "busstate1") || n == "animaldefectsyorn" || what.animaldefectsyorn.value == "yes" && (n == "businesstype2" || n == "busstate2") || n == "effectivedate" || n == "animalname" || n == "foalpercent" || n == "regnumber" || n == "rabiesexposeamt" || n == "animaltype" || n == "animalillness1" || n == "animalillness2" || n == "animaldescribe" || n == "dailycost" || n == "statelaw")
      {
        missingFields[missingFields.length] = n;
      }
    }
  }
  if (missingFields.length > 0)
  {
     window.open("popups/missinginfo-bill-of-sale.cfm",'missinginfo','width=650,height=550,scrollbars=1,status=1');
    return false;
  }
  return true;
  }
  catch(e)
  {
    alert(e.message);
    return false;
  }
}


function dosubmit()
{
  if (checkIt(document.MyForm))
    document.MyForm.submit();
}
