Simple Javascript Option Resolver