I reckon using hash tables is better than using ini for a seen script like this, which isn't hard to do the converting.
@Ghost-Writer, you can use more than one $iif followed by another $iif...just to make sure the comparisons and closing bracket are properly placed.