MDL-43247 SCORM: convert some js to YUI