﻿function SetSize()
{
    var lngBodyHeight = GetViewportHeight();
    var lngTopHeight = 125;
    var lngHeight = lngBodyHeight - lngTopHeight;
    
    if (lngHeight > 5)
    {
        document.getElementById('fraLeft').height = lngHeight;    
        document.getElementById('fraMain').height = lngHeight;    
        document.getElementById('fraRight').height = lngHeight;    
    }
}

function GetViewportHeight()
{
    if (typeof window.innerHeight != 'undefined')
    {// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
      return window.innerHeight
    }
    else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight != 'undefined' && document.documentElement.clientHeight != 0)
    {// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
       return document.documentElement.clientHeight - 5
    }
    else
    {// older versions of IE
       return document.getElementsByTagName('body')[0].clientHeight
    }
}

function GetViewportWidth()
{
    if (typeof window.innerWidth != 'undefined')
    {// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
      return window.innerWidth
    }
    else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
    {// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
       return document.documentElement.clientWidth
    }
    else
    {// older versions of IE
       return document.getElementsByTagName('body')[0].clientWidth
    }
}