reduce duplication of javascript includsion.