    function getWindowHeight() 
    {        
        var windowHeight=0;
        
        if (typeof(window.innerHeight)=='number') 
        {
            windowHeight=window.innerHeight;
        }
        else 
        {
            if (document.documentElement&&
            document.documentElement.clientHeight) 
            {
                windowHeight=document.documentElement.clientHeight;
            }
            else 
            {
                if (document.body&&document.body.clientHeight) 
                {
                    windowHeight=document.body.clientHeight;
                }
            }
        }
        
        return windowHeight;
    }

    function init () {
    if (document.getElementById('content')) {
        var contentHeight=0;
        
        contentHeight = getWindowHeight() - 160;
        document.getElementById('content').style.height=(contentHeight + '')+'px';
        }
    }
     



  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

    


function getParameter ( queryString, parameterName ) {
// Add "=" to the parameter name (i.e. parameterName=value)
var parameterName = parameterName + "=";
if ( queryString.length > 0 ) {
// Find the beginning of the string
begin = queryString.indexOf ( parameterName );
// If the parameter name is not found, skip it, otherwise return the value
if ( begin != -1 ) {
// Add the length (integer) to the beginning
begin += parameterName.length;
// Multiple parameters are separated by the "&" sign
end = queryString.indexOf ( "&" , begin );
if ( end == -1 ) {
end = queryString.length
}
// Return the string
return unescape ( queryString.substring ( begin, end ) );
}
// Return "null" if no parameter has been found
return "null";
}
} 


    function AutoScroll(divToScrollTo)
    {  
            document.getElementById('content').scrollTop = findPosY(document.getElementById(divToScrollTo)) - 200;
 
    }
    
    
    
    
    
        window.onload = function() 
        {
           init(); 
            
           var queryString = window.top.location.search.substring(1); 
           var x = getParameter(window.top.location.search.substring(1), 'divID');
 
           if( !(x=="null") && !(x=="") && !(x==undefined))
           {
            AutoScroll(x);
            }
        }

        window.onresize = function() 
        {
           init(); 
        } 