add max window calculation for children

http://manage.dimagi.com/default.asp?151398
F841 local variable 'row' is assigned to but never used