Please help me fix this javascript tool
<p>This is in the head :</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt; f
function TextDefine(val) { 
    var i= 0;
    var array1 = val.value.split("\n");
    for ( i = 0; i &lt; array1.length; ++i) { 
          array1[i] = "[b]" + array1[i] + "[/b]"; 
    }
    document.getElementById('another').value = array1.join("\n");
} 
&lt;/script&gt;
</code></pre>

<p>Then This is in the body:</p>

<pre><code>&lt;textarea name="data" id="data"&gt;&lt;/textarea&gt; 
&lt;textarea name="another" id="another"&gt;&lt;/textarea&gt; 
&lt;input type="button" name="submit1" value="Submit" 
       onclick="TextDefine(document.getElementById('data'))" /&gt;
</code></pre>

<p>i would like to add another text area so that when i click on the generate button, it will also get the content of the text area i just created. example:</p>

<p>text area 1</p>

<pre><code>content of the text area 1
</code></pre>

<p>text area i just created</p>

<pre><code>content of the text area 2
</code></pre>

<p>then the generated content content in the thrid text area should be:</p>

<pre><code>[b]content of the text area 1[/b]
content of the text area 2
</code></pre>

<p>please see the javascript code why it had [b], i do not know how do to it so i need your help :( Thank You!</p>
