title: How to call multiple functions in Javascript
body: <p>I have 4 functions that are basically the same, but with a different value..</p>
  
  <pre><code>function choose(value){
              document.getElementById('templatefield').text=value;
              if(value!=='alliance_update'){
                  document.getElementById('textentrydiv').style.display='none';
                  document.getElementById('textentrydiv').style.visibility='hidden';
              }
              document.forms[0].setAttribute('action','send_email.php?template='+value);
          }
  </code></pre>
  
  <p>if i write the functions down in a script.. it reads the last function.. and none of the others work..</p>
  
  <p>i have tried an if else that didn't work..
  can i pass the value to an array??</p>
  
  <pre><code>var templatesjs= new Array( "custom", "update", "client", "realtor" );
  </code></pre>
  
  <p>if i can do that.. how do i pass it into the value
      if(value!=='GOES HERE')</p>
  
  <p>is this even possible.. and if not.. how do i make it possible??</p>
  
  <p>Thank You</p>