var lichtkrant
	
function init()
{
	lichtkrant = document.getElementById('lichtkrant');
	
	if(lichtkrant!=null)
	{
		lichtkrant.width = lichtkrant.offsetWidth;
		lichtkrant.left = 1000;
		setInterval('startLichtkrant()', 20);
	}
} 
	
function cl(url)
{	
	if(arguments.length>1)
	{
		url += '?arg='
		
		for(i=1;i<arguments.length;i++)
		{
			url+= arguments[i];
			
			if(i<arguments.length-1)
			{
				url+= ':'
			}
		}
	}
	
	window.location = url; 
	
	return false
}

function oo(OBJ_ID)
{
	cl('nieuwbouw-object.php',OBJ_ID);
}

function op(PRJ_ID)
{
	cl('nieuwbouw-project.php',PRJ_ID);
}

function openImage(bestand, breedte, hoogte)
{	
	var links = (screen.width-breedte)/2
	if(links<0) links=0;
	var boven = (screen.height-hoogte)/2
	if(boven<0) boven=0;
	
	var opties = 'width=' + breedte + ',height=' + hoogte + ', left=' + links + ',top=' + boven + ', location=no';
	
	if(screen.availWidth < breedte || screen.availHeight < hoogte)
	{
		opties += ',scrollbars=yes';
	}
	
	window.open('afbeelding.php?arg=' + bestand, 'afbeelding', opties);
}

function startLichtkrant()
{  
  	lichtkrant.left -= 1;
  	
  	if(lichtkrant.left < -lichtkrant.width)
  	{
  		lichtkrant.left = 1000;
  	}
  	lichtkrant.style.left = (lichtkrant.left + 'px');
}
