In the event funds are not available from the grade crossing protective fund, the commission shall apportion to the parties on the basis of the benefits to be derived by the public and the railroad, respectively, that part of the cost which would otherwise be assigned to the fund: PROVIDED, That in such instances the city, town, county or state shall not be assessed more than sixty percent of the total cost of installation on other than federal aid designated highway projects: AND PROVIDED FURTHER, That in such instances the entire cost of maintenance shall be apportioned to the railroad.