var position = null;
var the_timeout = null; 
var interval_time = 0;

function moveDiv()
{
	if (position == null)
	{
		position = 0;
	}
	else
	{
		if (position == 0)
		{
			position = 1;
		}
		else
		{
			position = 0;
		}
	}
	
	interval_time = 1;
	the_timeout=setTimeout('moveDivPosition();',100);
	
	return false;
}

function moveDivPosition()
{
	var the_style = getStyleObject("header");
	if (the_style)
	{
		var current_height = parseInt(the_style.height);
		var new_height = null;
		var setNextTimeout = false;
		
		//alert(current_height + " " + position);
		if (position == 0)
		{
			new_height = current_height + 10;
		}
		else
		{
			new_height = current_height - 10;
		}
		
		if (document.layers)
		{
			the_style.height = new_height;
		}
		else
		{
			the_style.height = new_height + "px";
		}
		
		if (position == 0)
		{
			if (new_height < 287)
			{ 
				setNextTimeout = true;
				//interval_time = interval_time * 1.1 ;
			} 
		}
		else
		{
			if (new_height > 87)
			{ 
				setNextTimeout = true;
				//interval_time = interval_time * 1.1;
			} 
		}
		
		if (setNextTimeout)
		{
			the_timeout = setTimeout('moveDivPosition();',interval_time); 
		}
	} 
} 

//BROWSER STUFF 
// 
function getStyleObject(objectId)
{
	if(document.getElementById && document.getElementById(objectId))
	{ 
		return document.getElementById(objectId).style; 
	}
	else if (document.all && document.all(objectId))
	{ 
		return document.all(objectId).style;
	}
	else if (document.layers && document.layers[objectId])
	{ 
		return document.layers[objectId]; 
	}
	else
	{ 
		return false; 
	} 
} 
