I am creating a JS function that takes a time input in minutes only and divides that number by an inputted digit. I would like to know how we use Javascript to convert that result into minutes and seconds.

For instance, 30 (1800 seconds) divided by 4 = 450 seconds. How do I show that as 7:30? I can divide by 60 to get 7.5, but I don't know how to go from there. I got as far as the following, then got stuck.

PHP Code:
<form id="form2"><table>
<
tr>
<
td class="alignright">
<
form id="pitStops">
Main length (minutes): <input class="display" type="number" size="4" value="" name="main">
</
td>
</
tr>
<
tr>
<
td class="alignright">
Number of pit stops: <input class="display" type="number" size="4" value="" name="STOPSnum">
</
td>
</
tr>
<
tr>
<
td class="alignright"
<
input id="resultPitStops" class="buttPress2" type="button" value="Pit Time = "
<
input id="timeBetween" class="display2" size="4" type="number" value="" name="between"></td>
</
tr>

</
table></form>

<
SCRIPT LANGUAGE="JavaScript">
 
function 
heatpit(form) {
    
form.elements.main.value,
    
form.elements.STOPSnum.value,
    
secs2 60;
periods 1;

    
result2 secs2 periods;

    
form.elements.between.value result2;
}



resultPitStops.onclick = function () {
    var 
form document.getElementById('form2');
    
heatpit(form);
}

</SCRIPT> 
Thanks!