/* Funciones usadas para redimensionar */

function getViewportHeight()
// Obtiene la altura del viewport
{
   if (typeof window.innerWidth != 'undefined')
   {
      return window.innerHeight;
   }
   // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
   else if (typeof document.documentElement != 'undefined'
         && typeof document.documentElement.clientWidth !=
      'undefined' && document.documentElement.clientWidth != 0)
   {
      return document.documentElement.clientHeight;
   }
   // older versions of IE
   else
   {
      return document.getElementsByTagName('body')[0].clientHeight;
   }
}

function resizeObject(offset,wn,lyr,scrollLinks, scrollOffset, scrollBar,scrollTrack)
// Redimensiona un espacio de scroll
{
   if (w3cdomCompat())
   {
      var viewportheight = getViewportHeight();

      var newsize=viewportheight-offset;
      document.getElementById(wn).style.height=newsize+'px';
      var wndo = new dw_scrollObj(wn, lyr);
      wndo.setUpScrollControls(scrollLinks, true, "v");

      if (scrollOffset != -1 )
      {
         var newscrollsize=viewportheight-scrollOffset;
         document.getElementById(scrollTrack).style.height=newscrollsize+'px';
         wndo.setUpScrollbar(scrollBar, scrollTrack, "v", 0, -45, false);
      }
   }
}