
// This is a simple wrapper function that will set the minimum and maximum values for the points.htm
// form.  It will also cover Netscape's failings and assign the appropriate value to the Carletonname
// property.  (No such coverage is needed for IE 5 as you are able to set properties within the form
// with greater flexibility than Netscape currently supports.)

function wrap(f)
{

    ns4 = (document.layers)? true:false // Netscape check
    f.anin.min = 0.0;
    f.downcash.min = 0.0;
    f.irate.min = 0.0;
    f.mondebt.min = 0;
    f.proirate.min = 0.00;
    f.protrate.min = 0.00;
    f.term.min = 0.00;
    if (ns4)
    {
      for (i = 0; i <f.elements.length; i++)
      {
      	e = f.elements[i];
	switch (e.name)
	{
	  case "anin":
	    e.Carletonname = "GrossAnnualIncome";
	    break;
	  case "downcash":
	    e.Carletonname = "DownPayment";
	    break;
	  case "irate":
	    e.Carletonname = "InterestRate";
	    break;
	  case "mondebt":
	    e.Carletonname = "MonthlyDebt";
	    break;
	  case "proirate":
	    e.Carletonname = "PropertyInsuranceRate";
	    break;
	  case "protrate":
	    e.Carletonname = "PropertyTaxRate";
	    break;
	  case "term" :
	    e.Carletonname = "Term";
	    break;
	}
      }
    }
    f.anin.optional = false;
    f.downcash.optional = false;
    f.irate.optional = false;
    f.mondebt.optional = false;
    f.proirate.optional = false;
    f.protrate.optional = false;
    f.term.optional = false;
    return verify(f);
}	
