Source: Dynamic JavaScript If Statement