var status;
var height;
var top;
var count = 0;

// Initialize our variables here
function setup()
{
	document.getElementById("banner").style.visibility = "visible";
	window.setTimeout("expand()", 1000);
	//alert('test');
	
	var temp = document.getElementById("banner").style.height;
	height = parseInt(temp);
	status = 1;
};

function slideHandler()
{
	if (status==0) 
		{
		expand();
		status = 1;
		}
	else 
		{
		collapse();
		status = 0;
		}
}

function collapse()
{
	top = document.getElementById("banner").offsetTop;
	
	if (top > -56)
	{
		top -= 1;
		document.getElementById("banner").style.top = top + 'px';
		window.setTimeout("collapse()", 1);
	}
	else 
		{
		document.getElementById("banner").style.visibility = "hidden";
		}
}


function expand()
{ 
		//alert('height ' + height);
		//alert('max ' + max);
	if (document.getElementById("banner").style.visibility == "hidden")
		{	//alert('vis');
			document.getElementById("banner").style.visibility = "visible";
		}
	var bannerDocObj = document.getElementById("banner");
	var top = bannerDocObj.offsetTop;
	
	if (top < 50)
	{
		top += 1;
		bannerDocObj.style.top = top + 'px';
		setTimeout("expand()", 1);
	}
}