
// 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.Amt.min = 0.00;
    f.Term.min = 0;
    f.Irate.min = 0.00;
    f.Ptax.min = 0.00;
    f.HI.min = 0.00;
    if (ns4)
    {
      for (i = 0; i <f.elements.length; i++)
      {
      	e = f.elements[i];
	switch (e.name)
	{
	   case "Amt" :
	     e.Carletonname = "LoanAmt";
	     break;
	   case "Payfreq" :
	     e.Carletonname = "PaymentFreq";
	     break;
	   case "Term" :
	     e.Carletonname = "Term";
	     break;
	   case "Irate" :
	     e.Carletonname = "InterestRate";
	     break;
	   case "Ptax" :
	     e.Carletonname = "PropertyTaxRate";
	     break;
	   case "PMI" :
	     e.Carletonname = "PMIrad";
	     break;
	   case "HI" :
	     e.Carletonname = "HomeOwnerInsRate";
	     break;
	}
      }
    }
    f.Amt.optional = false;
    f.Payfreq.optional = true;
    f.Term.optional = false;
    f.Irate.optional = false;
    f.Ptax.optional = false;
    f.PMI.optional = true;
    f.HI.optional = false;
    return verify(f);
}	
