  function propertyRentalInfo(prefix){
   var prefixVal = "";
   var incomeVal = "";
   var propExpVal = "";
   var index = 0;
    if(prefix != null){
      var str = prefix.substring(prefix.indexOf("_") + 1, prefix.length);
      index = parseInt(str);
      prefixVal = prefix;
      incomeVal = "opi_" + index + "_";
      propExpVal = "PropExp_" + index + "_";
    }

    this.m_monthlyRentalIncome = "";
    this.m_rentalOffsetOption = -1;
    this.m_rentalOffset = "";
    this.m_incPercentInGds = "";
    this.m_incPercentInTds = "";
    this.m_insuranceExpense = "";
    this.m_hydroExpense = "";
    this.m_managementExpense = "";
    this.m_repairExpense = "";
    this.m_interestExpense = "";
    this.m_generalExpense = "";


    if(eval("document.forms[0]." + incomeVal + "monthlyRentalIncome") && eval("document.forms[0]." + incomeVal + "monthlyRentalIncome.value").length > 0){
      this.m_monthlyRentalIncome = eval("document.forms[0]." + incomeVal + "monthlyRentalIncome.value");
    }
    if(eval("document.forms[0]." + incomeVal + "incomeAmount") && eval("document.forms[0]." + incomeVal + "incomeAmount.value").length > 0){
      this.m_monthlyRentalIncome = eval("document.forms[0]." + incomeVal + "incomeAmount.value");
    }
    if(eval("document.forms[0].hf" + prefixVal + "_rentalOffsetOption") && eval("document.forms[0].hf" + prefixVal + "_rentalOffsetOption.value").length > 0){
      this.m_rentalOffsetOption = eval("document.forms[0].hf" + prefixVal + "_rentalOffsetOption.selectedIndex");
    }
    if(eval("document.forms[0]." + prefixVal + "rentalOffset" ) && eval("document.forms[0]." + prefixVal + "rentalOffset.value").length > 0){
      this.m_rentalOffset = eval("document.forms[0]." + prefixVal + "rentalOffset.value");
    }
    if(eval("document.forms[0].hf" + incomeVal + "incPercentInGds" ) && eval("document.forms[0].hf" + incomeVal + "incPercentInGds.value").length > 0){
      this.m_incPercentInGds = eval("document.forms[0].hf" + incomeVal + "incPercentInGds.value");
    }
    if(eval("document.forms[0].hf" + incomeVal + "incPercentInTds" ) && eval("document.forms[0].hf" + incomeVal + "incPercentInTds.value").length > 0){
      this.m_incPercentInTds = eval("document.forms[0].hf" + incomeVal + "incPercentInTds.value");
    }
    if(eval("document.forms[0]." + propExpVal + "insuranceExpense") && eval("document.forms[0]." + propExpVal + "insuranceExpense.value").length > 0){
      this.m_insuranceExpense = eval("document.forms[0]." + propExpVal + "insuranceExpense.value");
    }
    if(eval("document.forms[0]." + propExpVal + "hydroExpense") && eval("document.forms[0]." + propExpVal + "hydroExpense.value").length > 0){
      this.m_hydroExpense = eval("document.forms[0]." + propExpVal + "hydroExpense.value");
    }
    if(eval("document.forms[0]." + propExpVal + "managementExpense") && eval("document.forms[0]." + propExpVal + "managementExpense.value").length > 0){
      this.m_managementExpense = eval("document.forms[0]." + propExpVal + "managementExpense.value");
    }
    if(eval("document.forms[0]." + propExpVal + "repairExpense") && eval("document.forms[0]." + propExpVal + "repairExpense.value").length > 0){
      this.m_repairExpense = eval("document.forms[0]." + propExpVal + "repairExpense.value");
    }
    if( eval("document.forms[0]." + propExpVal + "interestExpense") && eval("document.forms[0]." + propExpVal + "interestExpense.value").length > 0){
    this.m_interestExpense = eval("document.forms[0]." + propExpVal + "interestExpense.value");
    }
    if(eval("document.forms[0]." + propExpVal + "generalExpense") && eval("document.forms[0]." + propExpVal + "generalExpense.value").length > 0){
      this.m_generalExpense = eval("document.forms[0]." + propExpVal + "generalExpense.value");
    }

  }
  function repopulateRentalValues(rentInfo,prefix){
    var prefixVal2 = "";
    var incomeVal = "";
    var propExpVal = "";
    var index = 0;
    if(prefix != null){
      var str = prefix.substring(prefix.indexOf("_") + 1, prefix.length);
      index = parseInt(str);
      incomeVal = "opi_" + index + "_";
      propExpVal = "PropExp_" + index + "_";
      prefixVal2 = prefix;
    }
    Format_UpdateContent(incomeVal + "monthlyRentalIncome","" + rentInfo.m_monthlyRentalIncome);
    Format_UpdateContent(incomeVal + "incomeAmount","" + rentInfo.m_monthlyRentalIncome);
    Format_UpdateContent(prefixVal2 + "rentalOffsetOption","" + rentInfo.m_rentalOffsetOption);
    Format_UpdateContent(prefixVal2 + "rentalOffset","" + rentInfo.m_rentalOffset);
    Format_UpdateContent(incomeVal + "incPercentInGds","" + rentInfo.m_incPercentInGds);
    Format_UpdateContent(incomeVal + "incPercentInTds","" + rentInfo.m_incPercentInTds);
    Format_UpdateContent(propExpVal + "insuranceExpense","" + rentInfo.m_insuranceExpense);
    Format_UpdateContent(propExpVal + "hydroExpense","" + rentInfo.m_hydroExpense);
    Format_UpdateContent( propExpVal + "managementExpense","" + rentInfo.m_managementExpense);
    Format_UpdateContent( propExpVal + "repairExpense","" + rentInfo.m_repairExpense);
    Format_UpdateContent( propExpVal + "interestExpense","" + rentInfo.m_interestExpense);
    Format_UpdateContent(propExpVal + "generalExpense","" + rentInfo.m_generalExpense);
    if(eval("document.forms[0].hf" + prefixVal2 + "_rentalOffsetOption")){
     eval("document.forms[0].hf" + prefixVal2 + "_rentalOffsetOption.selectedIndex=" +  rentInfo.m_rentalOffsetOption);
    }
    if(eval("document.forms[0].hf" + incomeVal + "incPercentInGds")){
      eval("document.forms[0].hf" + incomeVal + "incPercentInGds.value='" + rentInfo.m_incPercentInGds + "'");
    }
    if(eval("document.forms[0].hf" + incomeVal + "incPercentInTds")){
      eval("document.forms[0].hf" + incomeVal + "incPercentInTds.value='" + rentInfo.m_incPercentInTds + "'");
    }
  }
  function mortgageInfo(noEditing, insured, include, inRate,interestOnly,inCancelButton,netRateCalculated,existing, mortgageTypeDd,financingType){
  this.m_noEditing = noEditing;
  this.m_insured = insured;
  this.m_include = include;
  this.m_inRate = inRate;
  this.m_interestOnly = interestOnly;
  this.m_inCancelButton = inCancelButton;
  this.m_netRateCalculated = netRateCalculated;
  this.m_isExisting = existing;
  this.m_mortgageTypeDd = mortgageTypeDd;
  this.m_financingType = financingType;
}

