countUpP = 0;
oLadebalken = document.getElementById("ladebalken").firstChild;
var obj_show = document.getElementById("ladefenster");
obj_show.style.display = "block";
obj_show.style.left = screen.width/2-150;
obj_show.style.top = 100;
countUp();

function countUp()
{
	if(countUpP == 100)
	{
		return;
	}
	progress(++countUpP);
	window.setTimeout("countUp()", step);
}

function closeObj()
{
	obj = document.getElementById("ladefenster");
	obj.style.display = "none";
}

function progress(value)
{
	if(value < 51)
		oLadebalken.style.background = 'r'+'gb(255, ' + Math.floor(value / 50 * 255) + ', 0)';
	else
		oLadebalken.style.background = 'r'+'gb(' + Math.floor(255 - ((value - 50) / 50 * 255)) + ', 255, 0)';
	
	oLadebalken.style.width = value + "%";
}