
var newWindow = null;
var case_nr; var clicked; var mac=false;
if (navigator.userAgent && (navigator.userAgent.indexOf("Mac") >= 0))	mac=true;


function setCase(ref)
{
	for(var i=0; i <= cases-1; i++)
		if (ref == (client[i] + '.html'))	case_nr=i;
}

function openWindow(nr)
{
	clicked=parseInt(nr); ref=refs[clicked]; setCase(ref);
	
	if (!newWindow || newWindow.closed)
	{
		newWindow=window.open('http://www.triasdigitaal.nl/interviews_kort/' + ref,'client','width=607,height=620,status=no,toolbar=no,menubar=no,scrollbars=yes');
		if (mac) newWindow.resizeTo(605,620);
	}
	else 
	{	windowSwap=true; newWindow.location='http://www.triasdigitaal.nl/interviews_kort/' + ref; newWindow.focus();}
}

function openList()
{
	clicked=1; case_nr=cases + 1;
	
	if (!newWindow || newWindow.closed)
	{
		newWindow=window.open('http://www.triasdigitaal.nl/list.html','client','width=607,height=620,status=no,toolbar=no,menubar=no,scrollbars=yes');
		if (mac) newWindow.resizeTo(605,620);
	}
	else 
	{	windowSwap=true; newWindow.location=ref; newWindow.focus();}
}