Try:
if( depth > 140 )
{
document.getElementById("divetimes").innerHTML = '<p>There is no safe no decompression time for this depth.</p>';
}
else
{
document.getElementById("divetimes").innerHTML = '<p>At that depth your no decompression limit is <em class = myclass2>' + nodetime + '</em> minutes. You need to make a saftey if your down at least <em class = myclass3>' + sstime + '</em> minutes.</p>';
};
The 'innerHTML' property needs to be a string. The browser may not like the parenthesis you were using. You also need to make sure that there is actually an element in the document with the 'id' attribute set to "divetimes".
In either case, you should have a debugging tool available to point out the error. MSIE comes with one in the F12 Developer Tools. Chrome and Firefox have add-ons available. Check them out and you'll find your error.