Example code for convert time to seconds.
String.prototype.toSEC = function () {
value = this;
formats = value.split(":");
s = 0; m = 0; h = 0; res = 0;
if(formats.length>2) s = formats[2];
if(formats.length>1) m = formats[1];
if(formats.length>0) h = formats[0];
res += (parseInt(h)*3600);
res += (parseInt(m)*60);
res += parseInt(s);
return res;
}
time = '11:45:00';
time.toSEC();