diff -r ed4ac18baf07 -r 912f100fecb0 src/js/utils.js --- a/src/js/utils.js Wed Oct 19 15:00:34 2011 +0200 +++ b/src/js/utils.js Thu Oct 20 10:19:00 2011 +0200 @@ -23,6 +23,11 @@ } } +/* convert a time to a percentage in the media */ +IriSP.timeToPourcent = function(time,timetotal){ + return (parseInt(Math.round(time/timetotal*100))); +}; + /* for ie compatibility if (Object.prototype.__defineGetter__&&!Object.defineProperty) { Object.defineProperty=function(obj,prop,desc) {