       function resize(target_height)
       {
         object = document.getElementById ? document.getElementById('pan_div') : document.all.pan_div;
         current_height = object.style.height.replace("px", "");

         object_big = document.getElementById ? document.getElementById('pan_big') : document.all.pan_big;
         object_small = document.getElementById ? document.getElementById('pan_small') : document.all.pan_small;


         dif = current_height - target_height;

         if (current_height < target_height)
         {
           object_small.style.display = 'none';
           jump(target_height, 'plus');
         }
         else
         {
           object_big.style.display = 'none';
           jump(target_height, 'minus');
         }

       }

////////////////////////////////////////////////////////////////////////////////////////////////////////////

      function jump(target_height, offset)
      {
        var ease_offset = 200;
        
        if (current_height > ease_offset)
        {
          if (offset == 'plus')
          {
            current_height = (current_height)*1 + 40;
          }
          else
          {
            current_height = (current_height)*1 - 40;
          }
        }
        else
        {
          if (offset == 'plus')
          {
            current_height = (current_height)*1 + 40;
          }
          else
          {
            current_height = (current_height)*1 - 40;
          }

        }

        if (offset == 'plus')
        {
            if (current_height > target_height)
            {
               current_height = target_height;
            }
        }
        else
        {
            if (current_height < target_height)
            {
               current_height = target_height;
            }
        }


        object.style.height = current_height+'px';


        
        if (offset == 'plus')
        {
          if (object.style.height.replace("px", "") >= target_height)
          {
              object_big.style.display = 'block';
              return false;
          }
        }
        else
        {
          if (object.style.height.replace("px", "") <= target_height)
          {
              object_big.style.display = 'none';
              object_small.style.display = 'block';
              return false;
          }
        }

        __timer = setTimeout("jump("+target_height+", '"+offset+"')", 1);

      }


