// zorg ervoor dat de instellingen overeenkomen met de geselecteerde taal in 
// de keuzelijst:

function wijzigTaal() 
{
	var taal = document.forms[0].gebrtaal
	keuze = taal.options[taal.selectedIndex].value
	
	// set cookie:
	var exp = new Date()
	var overHalfJaar = exp.getTime() + (183 * 24 * 60 * 60 * 1000)
	exp.setTime(overHalfJaar)
	document.cookie="cula=" + keuze + "; expires=" + exp.toGMTString()
	
	if (keuze == 'nl') 
	{
		location.href = location.pathname + "?taal=nl";
	}
	else 
	{
		location.href = location.pathname + "?taal=en";
	}
}

function newWin(doc) {
		var attr = "Width=130,Height=124,titlebar=no,title=no,menubar=no,location=no";
		var nw = window.open(doc, "fragment", attr);
}

function status_boodschap ( tekst ) {
	window.status = tekst
	return true;
}

/* functies voor het menu */	
	function blur(n) {
		if(navigator.appName!="Netscape") {
			document.anchors(n).blur();
		}
	}
	
	var statustxtdutch = new Array()
	statustxtdutch["introductie"]="Introductiepagina van deze website"
	statustxtdutch["cv"]="CV"
	statustxtdutch["films"] = "Films";
	statustxtdutch["projects"]="Actuele projecten"
	statustxtdutch["visanthro"]="Informatie over visuele antropologie"
	statustxtdutch["potato"]="Ga naar Potato Die Webbouw (www.potatodie.nl)"

	var statustxteng = new Array()
	statustxteng["introductie"] = "Introduction to this website"
	statustxteng["idealsound"]="Documentary The Ideal Sound"
	statustxteng["films"] = "Films";
	statustxteng["cv"]="CV"
	statustxteng["visanthro"]="More about visual anthropology"
	statustxteng["potato"]="Visit Potato Die Webbuilding (www.potatodie.nl)"
	statustxteng["projects"]="Current projects"
	
	function mouseover(index)
	{
		var taal = document.forms[0].gebrtaal
		var keuze = taal.options[taal.selectedIndex].value
		//alert ("K" + keuze)
		if (keuze == "nl") 
			window.status=statustxtdutch[index]
		else
			window.status=statustxteng[index]
	}

/* cookie gedoe */
function getCookieData( labelName ) {
	var labelLen = labelName.length
	var cookieData = document.cookie
	var cLen = cookieData.length
	var i = 0
	var cEnd
	while ( i < cLen ) {
		var j = i + labelLen
		if ( cookieData.substring(i,j) == labelName) {
			cEnd = cookieData.indexOf(";", j)
			if ( cEnd == -1 )
				cEnd = cookieData.length
			return unescape(cookieData.substring( j + 1, cEnd ))
		}
		i++
	}
	return ""
}

function setCookieData( labelName, value, expDays ) {
	var exp = new Date()
	var overEenTijdje = exp.getTime() + (expDays * 24 * 60 * 60 * 1000)
	exp.setTime(overEenTijdje)
	document.cookie=labelName + "=" + value + "; expires=" + exp.toGMTString()
}

// waarde uitlezen uit cookie
// cookievariabele heet cula (4 karakters)
var currLanguage = getCookieData("cula");
// if (currLanguage == "")	currLanguage = "nl"