As far as I know, the casing looks identical, about the only way of telling visually, is the driveshaft length, 126 one were longer than 500, only trouble is I dont know the measurements Im sure with some digging that could be found out.
The 126 box will fit if the 500 one is knackered, but the half shafts will have to be changed, 500 half shafts to be fitted, as 126 shafts are each 22mm too long.
Note: check the oil in the box it should be straight 90’s oil. NOT EP 90. Check the condition of the gearbox for wear on the first and reverse gear. A BIS gearbox can be used with a 500 or a 126 bell-housing. A 500-gearbox bell-housing can fit a 126 and a BIS gearbox and visa versa. The BIS final drive ratio is to high to be fitted to a 600 or 650 engine.