﻿// This file displays the What Happened to Stadium Grill link.

//globals
var dsDiv;
var WHSGtimer;
var start;

//sets values for globals
function Init()
{
    dsDiv = document.getElementById( 'divWHSG' );
    WHSGtimer;
    start = 0;

}
    
//starts the scrolling of the panel
function InitWHSG()
{
    Init();
	dsDiv.style.display = 'block';
	start               = dsDiv.offsetHeight;
	dsDiv.style.top     = 0 - start + 'px';
	ScrollWHSG( 0, 1 );
}

//panel scrolling animation
function ScrollWHSG( start, inc )
{
    //var dsDiv = document.getElementById('divWHSG');
    if( parseInt( dsDiv.style.top ) < start )
    {
        dsDiv.style.top = parseInt( dsDiv.style.top ) + inc + 'px';
        WHSGtimer       = window.setTimeout( 'ScrollWHSG(' + start + ',' + inc + ');', 10 );
    }
    else
    {
        clearTimeout( WHSGtimer );
    }
}

//hide panel
function WHSGClose()
{
	ScrollWHSG( start, -1 );
}
        