Function not working properly. Please help
<p>Hello I'm having trouble with the function setUpTranslation(). 
//The purpose of this function is to place the French phrases into the document and set up the event handlers for the mousedown and mouseup events. </p>

<p>//These are the arrays of the French phrases and English phrases that I have do place into the document:</p>

<pre><code>var english = new Array();
english[0] = "This hotel isn't far from the Eiffel Tower.";
english[1] = "What time does the train arrive?";
english[2] = "We have been waiting for the bus for one half-hour.";
english[3] = "This meal is delicious";
english[4] = "What day is she going to arrive?";
english[5] = "We have eleven minutes before the train leaves!";
english[6] = "Living in a foreign country is a good experience.";
english[7] = "Excuse me! I'm late!";
english[8] = "Is this taxi free?";
english[9] = "Be careful when you go down the steps.";


var french = new Array();
french[0] = "Cet h&amp;#244;tel n'est pas loin de la Tour Eiffel.";
french[1] = "A quelle heure arrive le train?";
french[2] = "Nous attendons l'autobus depuis une demi-heure.";
french[3] = "Ce repas est d&amp;#233;licieux";
french[4] = "Quel jour va-t-elle arriver?";
french[5] = "Nous avons onze minutes avant le d&amp;#233;part du train!";
french[6] = "Habiter dans un pays &amp;#233;tranger est une bonne exp&amp;#233;rience.";
french[7] = "Excusez-moi! Je suis en retard!";
french[8] = "Est-ce que ce taxi est libre?";
french[9] = "Faites attention quand vous descendez l'escalier.";
</code></pre>

<p>//function I'm having trouble with</p>

<pre><code>function setUpTranslation(){
var phrases = document.getElementByTagName("p");
    for (i =0; i&lt;phrases.length; i++){
     phrases[i].number =i;
     phrases[i].childNodes[1].innerHTML =french[i];

     phrases[i].childNodes[1].onmousedown =function(){
     swapFE(event);

     phrases[i].childNodes[1].onmouseup =function(){
     swapEF(event); 
     };
  };
}
</code></pre>

<p>//Below are the other two functions swapFE() and swapEF(). The purpose of the function swapFE() is to exchange the French phrase for the English translation
//The purpose of the function swapEF() is to exchange the English translation for the French phrase.</p>

<pre><code>function swapFE(e){
var phrase =e.srcElement;
var parent =phrase.parentNode;
var idnum =parent.childNodes[0];
var phrasenum =parseInt(idnum.innerHTML)-1;
    phrase.innerText =english[phrasenum]; 
}

function swapEF(e){
var phrase =e.srcElement;
var parent =phrase.parentNode;
var idnum =parent.childNodes[0];
var phrasenum =parseInt(idnum.innerHTML)-1;
    phrase.innerText =french[phrasenum];
}
</code></pre>

<p>//Not sure if these are right. Thanks in advance!</p>
