Modified from Bill Israel's ER2 theme.