
   var openImg = new Image();
   openImg.src = "images/expanded_button.gif";
   var closedImg = new Image();
   closedImg.src = "images/collapsed_button.gif";
   
   function showBranch(branch) {
      var objBranch = 
         document.getElementById(branch).style;
      if(objBranch.display=="block")
         objBranch.display="none";
      else
         objBranch.display="block";
   }
   
   function swapFolder(img) {
      objImg = document.getElementById(img);
      if(objImg.src.indexOf('images/collapsed_button.gif')>-1)
         objImg.src = openImg.src;
      else
         objImg.src = closedImg.src;
   }

   function createMenu(branch)
   {
        document.write("<div class=\"trigger\" onClick=\"showBranch(\'branch1\');swapFolder(\'folder1\')\">");
        document.write("<img src=\"images/collapsed_button.gif\" id=\"folder1\"><img src=\"images/corp_over.jpg\">");
        document.write("</div>");
        document.write("<span class=\"branch\" id=\"branch1\">");
        document.write("<a href=history.html><li>SDS History</li></a>");
        document.write("<a href=sds_capabilities.html><li>SDS Capabilities</li></a>");
        document.write("<a href=benefitsofsds.html><li>Benefits of SDS</li></a>");
        document.write("<a href=customers.html><li>SDS Premier Clients</li></a>");
        document.write("<a href=existingclientrankings.html><li>Existing Client Rankings</li></a>");
        document.write("<a href=testimonials.html><li>Testimonials</li></a>");
        document.write("</span>");
        
        document.write("<div class=\"trigger\" onClick=\"showBranch(\'branch2\');swapFolder(\'folder2\')\">");
        document.write("<img src=\"images/collapsed_button.gif\" id=\"folder2\"><img src=\"images/app_funr.jpg\">");
        document.write("</div>");
        document.write("<span class=\"branch\" id=\"branch2\">");
        document.write("<a href=patient_demographics.html><li>e-PMS</li></a>");
        document.write("<a href=dispensing_ordering.html><li>Dispensing/Ordering</li></a>");
        document.write("<a href=till.html><li>e-POS</li></a>");
        document.write("<a href=billing.html><li>Medical Billing & A/R</li></a>");
        document.write("<a href=appointment.html><li>Appointment Book/Call Center</li></a>");
        document.write("<a href=home_office.html><li>Home Office</li></a>");
        document.write("<a href=centraldatarespository.html><li>Central Data Repository</li></a>");
        document.write("<a href=im.html><li>Inventory Manager</li></a>");
        document.write("</span>");

        document.write("<div class=\"trigger\" onClick=\"location.href='news.html'\">");
        document.write("<img src=\"images/collapsed_button.gif\" id=\"link2\"><img src=\"images/latest_news.jpg\">");
        document.write("</div>");

        document.write("<div class=\"trigger\" onClick=\"location.href='events.html'\">");
        document.write("<img src=\"images/collapsed_button.gif\" id=\"link1\"><img src=\"images/sds_events.jpg\">");
        document.write("</div>");




        document.write("<div class=\"trigger\" onClick=\"showBranch(\'branch3\');swapFolder(\'folder3\')\">");
        document.write("<img src=\"images/collapsed_button.gif\" id=\"folder3\"><img src=\"images/contact_sds.jpg\">");
        document.write("</div>");
        document.write("<span class=\"branch\" id=\"branch3\">");
        document.write("<a href=contact.html><li>Contact SDS</li></a>");
        document.write("<a href=support.html><li>SDS Support</li></a>");
        document.write("</span>");




        showBranch(branch);

	swapFolder(branch.replace("branch","folder"))
}
