Javascript Subnet Calculator