var minigoPopup;
function dismissMinigoPopup()
{
	minigoPopup = document.getElementById('MinigoPopup');
	if(minigoPopup != null)
	{
		setTimeout('movePopup(true)', 10);
	}
}
function showMinigoPopup()
{
	minigoPopup = document.getElementById('MinigoPopup');
	if(minigoPopup != null)
	{
		setTimeout('movePopup(false)', 10);
		setTimeout('autoHide()', 20000);
	}
}
function movePopup(bHide)
{
    var left = parseInt(minigoPopup.style.left); // removes the "px" at the end
    var increment = bHide?-15:15;
    var limit = bHide?-245:0;
    if(left == null)
    {
		minigoPopup.style.display = 'none';
		return;
    }
    
    left += increment;
    
    if(bHide && left <= limit)
    {
		minigoPopup.style.left = limit + "px";
		minigoPopup.style.display = 'none';
    }
    else if(!bHide && left >= limit)
    {
		minigoPopup.style.left = limit + "px";
    }
    else
    {
		// Move the div.
		minigoPopup.style.left = left + "px";
		setTimeout('movePopup('+bHide+')', 10);
    }
}
function autoHide()
{
	dismissMinigoPopup();
}
