javascript function - the correct way to do this
<p>Hi all and thanks for looking,</p>

<p>What is the correct way to do this:</p>

<pre><code>&lt;script language="javascript"&gt;
function flag(nation)
{
this.nation=nation;
document.getElementById("flag").innerHTML="&lt;img src='images/flags/'+nation+'.jpg'&gt;";
}
&lt;/script&gt;
</code></pre>

<p>with this in the link tags: onClick="flag(scotislands)"; and the image name being scotislands.jpg</p>

<p>Many thanks,
B.</p>
