title: master page javascript load event
body: <p>i add a new menu in my master page i should use a javascript function  in master page to setup my menu ,the first time i load the page all work fine but when i click in my menuitem to redirect to another aspx page the setupmenu () function which is in the master didn't work 
  this is my code </p>
  
  <pre><code>&lt;%@ Master Language="VB" AutoEventWireup="false" CodeFile="MasterPage.master.vb"
      Inherits="MasterPage" %&gt;
  
  &lt;%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
      Namespace="System.Web.UI" TagPrefix="asp" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head id="Head1" runat="server"&gt;
      &lt;title&gt;Qualipro Net&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
      $( document ).ready(function() {
          function setupmenu() {
              $("#section-menu")
          .accordion({
              "header": "a.menuitem"
          })
          .bind("accordionchangestart", function (e, data) {
              data.newHeader.next().andSelf().addClass("current");
              data.oldHeader.next().andSelf().removeClass("current");
          })
          .find("a.menuitem:first").addClass("current")
          .next().addClass("current");
  
              $('#section-menu .submenu').css('height', 'auto');
          }
          });
          &lt;/script&gt;
           &lt;script  src="js/scripts.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/jquery.jqplot.min.js"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/plugins/jqplot.barRenderer.min.js"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/plugins/jqplot.pieRenderer.min.js"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/plugins/jqplot.highlighter.min.js"&gt;&lt;/script&gt;
          &lt;script  type="text/javascript" src="js/jqPlot/plugins/jqplot.pointLabels.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/jquery-1.6.4.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jquery-ui/jquery.ui.core.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/jquery-ui/jquery.ui.widget.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="js/jquery-ui/jquery.ui.accordion.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="js/jquery-ui/jquery.effects.core.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="js/jquery-ui/jquery.effects.slide.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;body id="Body1" dir="ltr" runat="server"&gt;
      &lt;form id="form1" runat="server"&gt;
        &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server"&gt;
             &lt;asp:Panel ID="panelAModif" runat="server" align="left" CssClass="panelmod"&gt;
                      &lt;div class="grid_2"&gt;
                          &lt;div class="box sidemenu"&gt;
                              &lt;div class="block" id="section-menu"&gt;
                                  &lt;ul class="section menu"&gt;
                                      &lt;li&gt;&lt;a class="menuitem"&gt;G.R.H&lt;/a&gt;
                                          &lt;ul class="submenu"&gt;
                                              &lt;li&gt;&lt;a &gt;Employés&lt;/a&gt; 
                                              &lt;/li&gt;
                                              &lt;li&gt;&lt;a runat="server"  href="~/employe/RemplacerPersonne.aspx"&gt;Remplacer Personne&lt;/a&gt; &lt;/li&gt;
                                          &lt;/ul&gt;
                                      &lt;/li&gt;
                                      &lt;li&gt;&lt;a class="menuitem"&gt;Documentation&lt;/a&gt;
                                          &lt;ul class="submenu"&gt;
                                              &lt;li&gt;&lt;a&gt;Documents internes&lt;/a&gt; &lt;/li&gt;
                                       &lt;/ul&gt;
                                      &lt;/li&gt;
                                      &lt;li&gt;&lt;a class="menuitem"&gt;Audits&lt;/a&gt;
                                          &lt;ul class="submenu"&gt;
                                              &lt;li&gt;&lt;a&gt;Audits&lt;/a&gt; &lt;/li&gt;
  
                                          &lt;/ul&gt;
                                      &lt;/li&gt;
                                      &lt;li&gt;&lt;a class="menuitem"&gt;Actions&lt;/a&gt;
                                          &lt;ul class="submenu"&gt;
                                              &lt;li&gt;&lt;a&gt;Actions&lt;/a&gt; &lt;/li&gt;
                                              &lt;li&gt;&lt;a&gt;Demandes d'actions&lt;/a&gt; &lt;/li&gt;
                                              &lt;li&gt;&lt;a&gt;Modèle d'actions&lt;/a&gt; &lt;/li&gt;
  
                                          &lt;/ul&gt;
                                      &lt;/li&gt;
                                  &lt;/ul&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/asp:Panel&gt;
        &lt;/asp:ContentPlaceHolder&gt;
      &lt;/form&gt;
      &lt;/body&gt;
  </code></pre>
  
  <p>i didn't find a solution to call the javascript function from another content page. 
  thanks in advance </p>