title: How call Javascript Function
body: <p>I have code (see below) in my webpage. With below code i get two flash mp3 players on the web page.</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;Test&lt;/title&gt;
      &lt;script type="text/javascript" src="Contents/swfobject.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
      function stop() {
      document.getElementById("myId1").SetVariable("player:jsStop", "");}
      &lt;/script&gt;    
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;table style="width:100%; text-align: center;"&gt;
  
  &lt;tr&gt;
  &lt;td&gt;
  
  &lt;script type="text/javascript"&gt;
  swfobject.embedSWF("Contents/player_mp3_maxi.swf", "myId1", "250", "20", "9.0.0", false, false, {menu: "false",flashvars: "mp3=Contents/Sleep Away.mp3"}, false);
  &lt;/script&gt;
  
  &lt;div id="myId1" 
  style="position: relative; width: 250px; height: 20px; "&gt;
  &lt;/div&gt;
  
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;
  
  &lt;script type="text/javascript"&gt;
  swfobject.embedSWF("Contents/player_mp3_maxi.swf", "myId2", "250", "20", "9.0.0", false, false, {menu: "false",flashvars: "mp3=Contents/Kalimba.mp3"}, false);
  &lt;/script&gt;                
  
  &lt;div id="myId2" 
  style="position: relative; width: 250px; height: 20px; "&gt;
  &lt;/div&gt;
  
  &lt;br /&gt;              
  &lt;a href="javascript:stop()"&gt;Stop&lt;/a&gt;        
  
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above code works fine and all i need now that only one flash mp3 player should play the audio at one time.  For example if i click on flash plyer 2 then falsh player 1 should stop and vice versa.  I can stop flash players with click event with below code but this is not fulfilling what i need.</p>
  
  <p>I have put below function in head tag</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function stop() {
      document.getElementById("myId1").SetVariable("player:jsStop", "");}
      &lt;/script&gt; 
  </code></pre>
  
  <p>and this in body tag</p>
  
  <pre><code>&lt;a href="javascript:stop()"&gt;Stop&lt;/a&gt; 
  </code></pre>
  
  <p>Can please any friend tell me that how can i achive what i need with above stop function.  Or where should i put this code so when i click on fash player 2 then flash player 1 should stop playing audio.</p>