function calcWarmup(){var main=parseInt(document.getElementById("main").value)||3000;var int=document.getElementById("int").value;var plen=parseInt(document.getElementById("plen").value)||25;var warmup_pct=int==="easy"?0.10:int==="mod"?0.15:0.20;var wm=Math.round(main*warmup_pct/plen)*plen;var dur=int==="easy"?15:int==="mod"?20:25;document.getElementById("r1").textContent=wm+"m";document.getElementById("r2").textContent=dur+" min";document.getElementById("desc").innerHTML="For a "+main+"m "+int+" main set, warmup should be approximately "+wm+"m.
Suggested warmup:
200 swim, 100 kick with board, 100 pull, 4x50 easy @ :45
Key: keep warmup easy.";document.getElementById("results").style.display="block";}