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