When it is deemed advisable by the judge of the district court of a county that does not have a juvenile detention home, that juvenile delinquents in his county be transferred for safekeeping or detention to juvenile detention homes located in other counties, then for the purpose of maintaining them in the juvenile detention homes there shall be budgeted by the county commissioners of the county in each year, sufficient funds to provide for the keeping of such juvenile delinquents in juvenile detention homes. The amount to be budgeted shall be determined and fixed by the district court. On or before May 1 of each year the district judge shall make an estimate of revenue required for the ensuing year for the maintenance of juvenile delinquents in the juvenile detention homes and shall certify the estimate to the board of county commissioners in the county without a juvenile detention home. The budget allowance shall be known as the "juvenile maintenance fund." The county treasurer collecting money for the fund shall make disbursements from the fund to the county treasurer in the county in which the juveniles have been detained, upon certificate of the clerk of the district court in which the juveniles are detained, stating that the amount is due for their maintenance. The certificate shall be approved by the district judge of the county from which the juvenile was transferred before it is paid. Upon the payment to the county treasurer where the juvenile is detained the county treasurer shall place the amount paid in the juvenile detention home maintenance fund.