Upped version of chiftf-view.js