jquery accordion menu - using a PHP SESSION to activate ?

jquery accordion menu - using a PHP SESSION to activate ?

Hi

I'm no great shakes at javascript but I've managed to integrate 2 instances of the Accordion Menu into my page http://www.esma-test.com/accueil.php and it works beautifully

however when the user clicks a link and the page refreshes the menus return to their default state - whereas i would the like the menu to stay open at the section the user clicked in

I was thinking of using a php session to write the <script> tags that would activate the currently opened section, but i have two questions :

- what line of code would i need to put in the <script> tags to trigger the menu to open at the right section ?

- do i need to give each div in my menu an ID so that they can be targetted individually ?

here's my menu code :
<div class="basic2 clearfix" id="list1c">
            
            <a class="basic2-title">PILOT</a>
            <div class="basic2-menu-div">
               <ul>
                  <li><a href="">- Job specifications</a></li>
                  <li><a href="">- Initial training</a></li>

                  <li><a href="">- Advanced training</a></li>
                  <li><a href="">- Training schedule</a></li>
                  <li><a href="">- Teaching material</a></li>
               </ul>         
            </div>
   
            <a class="basic2-title">CABIN CREW</a>
            <div class="basic2-menu-div">

               <ul>
                  <li><a href="">- Job specifications</a></li>
                  <li><a href="">- Initial training</a></li>
                  <li><a href="">- Advanced training</a></li>
                  <li><a href="">- Training schedule</a></li>
                  <li><a href="">- Teaching material</a></li>

               </ul>         
            </div>   
   
            <a class="basic2-title">MAINTENANCE ENGINEER</a>
            <div class="basic2-menu-div">
               <ul>
                  <li><a href="">- Job specifications</a></li>
                  <li><a href="">- Initial training</a></li>
                  <li><a href="">- Advanced training</a></li>

                  <li><a href="">- Training schedule</a></li>
                  <li><a href="">- Teaching material</a></li>
               </ul>         
            </div>   
   
            <a class="basic2-title">AIRPORT STAFF</a>
            <div class="basic2-menu-div">
               <ul>
                  <li><a href="">- Job specifications</a></li>

                  <li><a href="">- Initial training</a></li>
                  <li><a href="">- Advanced training</a></li>
                  <li><a href="">- Training schedule</a></li>
                  <li><a href="">- Teaching material</a></li>
               </ul>         
            </div>
   
            <a class="basic2-title">CONSULTING</a>

            <div class="basic2-menu-div">
               <ul>
                  <li><a href="">- Job specifications</a></li>
                  <li><a href="">- Initial training</a></li>
                  <li><a href="">- Advanced training</a></li>
                  <li><a href="">- Training schedule</a></li>
                  <li><a href="">- Teaching material</a></li>

               </ul>         
            </div>         
         </div>


and I would use a php session variable like
<?php
   // get the id of the menu from the GET url var
   if(isset($_GET['menu_id']))&&($_GET['menu_id']!="")){
      $_SESSION['menuopen'] = $_GET['menu_id'];
   }
   
   // if the session is not empty, use it to activate the menu section
   if(isset($_SESSION['menuopen']))&&($_SESSION['menuopen']!="")){
      echo "<script language=\"javascript\">\n";
      echo "function_to_activate_menu('".$_SESSION['menuopen']."');\n";
      echo "</script>\n";
   }   
?>


where function_to_activate_menu(); would be the code i need to activate the menu

does anyone know how i would do this ?

thanks