added scfunc.js javascript functions for SC integration