var nTicks = 0;
var iText = 0;
var nTop = 0;
var tick_element;
function get_el(id)
{
	if (document.getElementById)
	{
		el = document.getElementById(id);
	}
	else
	{
		el = document.all[id];
	}
	return el;
}
function startticker()
{
	tick_element = get_el('tick');
	nTop = 0;
	setTimeout('MoveIt()', 1000);
}
function TickIt()
{
	if (tick_element)
	{
		tick_element.innerHTML = aTickerText[iText];
		iText = (iText+1) % aTickerText.length;
		nTop = 14; // witruimte boven tekst, dus tekst "verdwijnt" aan onderkant
		tick_element.style.top = nTop;
		setTimeout('MoveIt()', 100);
	}
}
function MoveIt()
{
	if (tick_element)
	{
		nTop -= 2; // witruimte boven tekst verminderen, dus tekst schuift omhoog
		tick_element.style.top = nTop + "px";

		if (nTop <= -14) // tekst helemaal naar boven geschoven?
		{
			TickIt(); // laat volgende tekst zien
		}
		else
		{
			// als tekst helemaal in beeld is, 2 sec. leestijd
			setTimeout('MoveIt()', (nTop == 0 ? 2000 : 100));
		}
	}
}
function toggle_contact()
{
	el = get_el('kvk');
	if (el)
	{
		el.style.display = 'none';
	}
	el = get_el('contact');
	if (el)
	{
		el.style.display = el.style.display == 'none'? 'block': 'none';
	}
}
function toggle_kvk()
{
	el = get_el('contact');
	if (el)
	{
		el.style.display = 'none';
	}
	el = get_el('kvk');
	if (el)
	{
		el.style.display = el.style.display == 'none'? 'block': 'none';
	}
}
function op(url)
{
	var nw = window.open(url, '_blank', 'width=500,height=440');
}
function op2(url)
{
  var nw = window.open(url, '_blank', 'width=500,height=300');
  var x = (self.screen && self.screen.width) ? (self.screen.width-500)/2 : 100;
  var y = (self.screen && self.screen.height) ? (self.screen.height-300)/2 : 100;
  if (nw) nw.moveTo(x,y);

}
function op3(url)
{
	var x = (self.screen && self.screen.width) ? (self.screen.width-765)/2 : 50;
	var y = (self.screen && self.screen.height) ? (self.screen.height-440)/2 : 100;
	var nw = window.open(url, '_blank', 'width=750,height=440,screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y);
	//if (nw) nw.moveTo(x,y);
}

