makeDate = function(d){
	var dd = "";
	d = d.split(':');
	if(parseInt(d[0],10)>0) dd += parseInt(d[0],10)+'h ';
	if(parseInt(d[1],10)>0 || parseInt(d[0],10)>0) dd += parseInt(d[1],10)+'m ';
	dd += parseInt(d[2],10)+'s';
	return dd;
};
makeSecsToTime = function(t){
	var h, m, s, d;
	h = Math.floor(t/60/60);
	t-=h*60*60;
	m = Math.floor(t/60);
	t-=m*60;
	s = t;
	
	d = '';
	if(h>0) d+=h+'h ';
	if(m>0 || h>0) d+=m+'m ';
	d+=s+'s';
	
	return d;
};
makeTimeToSecs = function(t){
	t = t.split(':');
	return parseInt(t[0],10)*60*60+parseInt(t[1],10)*60+parseInt(t[2],10);
};
mkStartTime = function(t){
	var st;
	st = t.split(' ')[1];
	st = st.split(':');
	st.pop();
	st.pop();
	st = st.join(':');
	
	return st;
};
mkEndTime = function(t, d){
	var tm, th;
	t = t.split(':');
	tm = parseInt(t[1],10);
	th = parseInt(t[0],10);
	d = Math.floor(d/60);
	tm += d;
	if(tm >= 60){ th++; tm -= 60; }
	
	if(th<10) th = "0"+th;
	if(tm<10) tm = "0"+tm;
	
	return th+':'+tm;
};
