How do I convert inline JS coding into an external style sheet?
<p>I have JS code in both the body and head portions of my page. If I wanted to have them be in an external .js file, how would I move them over and then call them back onto the page?</p>

<p>Head - </p>

<pre><code>&lt;script language="Javascript"&gt;
setInterval("settime()", 1000);

function settime () {
var curtime = new Date();
var curhour = curtime.getHours();
var curmin = curtime.getMinutes();
var cursec = curtime.getSeconds();
var time = "";

if(curhour == 0) curhour = 12;
time = (curhour &gt; 12 ? curhour - 12 : curhour) + ":" +
     (curmin &lt; 10 ? "0" : "") + curmin + ":" +
     (cursec &lt; 10 ? "0" : "") + cursec + " " +
     (curhour &gt; 12 ? "pm" : "am");

document.date.clock.value = time;
}
&lt;/script&gt; 
</code></pre>

<p>Body - </p>

<pre><code>&lt;script language="JS" type="text/javascript"&gt;
var monthArray = new Array("January", "February", "March", "April", "May",
                       "June", "July", "August", "September",
                       "October", "November", "December");

var today = new Date();
var todayMonth = today.getMonth();
var todayDate = today.getDate();
var todayYear = today.getFullYear();
document.write(monthArray[todayMonth] + " " + todayDate + ", " + todayYear);
&lt;/script&gt;
</code></pre>
