﻿

function DisplayHidePanel(obj1,className,DivMainBlock,DivTop)
{ 

//Author : Gyanesh Buda
//         Dot Net Programmer
//         gyanesh_buda@hotmail.com
        
        var anchor=document.getElementById(obj1);
        var header=document.getElementById(obj1);
        var mainDiv=document.getElementById(DivMainBlock);
        var topDiv=document.getElementById(DivTop);

        if(className=='hide')
        {
           //anchor.className='minus';
           mainDiv.style.display='block';
           header.className = 'show';
           //topDiv.className='behandlingLeft1';
        }
        else if(className=='show')
        {
          // anchor.className='plus';
           mainDiv.style.display='none';
           header.className = 'hide';
           
          // topDiv.className='behandlingLeftTitle';
        }
        
        var Pre = anchor.id.substring(0,1);
        var Value = anchor.id.substring(1,4);
        Value = parseInt(Value) - 1;
        
        for(Value;Value > 110 ; Value --)
        {
          try{
           var header_All = document.getElementById(Pre+Value);
           var mainDiv_All =document.getElementById(Pre+Value+Value);
           
           if(header_All!= null)
           {
           mainDiv_All.style.display='none';
           header_All.className = 'hide';
           }
           
          }
          catch(err)
          {
          }
        }
        
        var Post = anchor.id.substring(0,1);
        var Value_Post = anchor.id.substring(1,4);
        Value_Post = parseInt(Value_Post) + 1;
        for(Value_Post;Value_Post < 150 ; Value_Post++)
        {
          try{
             var header_All_Post = document.getElementById(Post+Value_Post);
             var mainDiv_All_Post =document.getElementById(Post+Value_Post+Value_Post);
           
               if(header_All_Post != null)
               {
                mainDiv_All_Post.style.display='none';
                header_All_Post.className = 'hide';
               }
           
              }
          catch(err)
          {
          }
          
         }
        
        
}
