txt_collapse = 'inklappen';
txt_collapse = 'inklappen';
txt_expand = 'uitklappen';
img_collapse = '';
img_expand = '';

function modifyStyle(newfile) {
	var x = document.getElementById('style');
	x.setAttribute('href',newfile);
}

function Collapse(id) {

	if (document.getElementById('item_group'+id).style.display == 'none') {
		document.getElementById('item_group'+id).style.display='block';
		document.getElementById('collapse_group'+id).src=img_collapse;
		document.getElementById('collapse_group'+id).title=txt_collapse;
	} else {
		document.getElementById('item_group'+id).style.display='none';
		document.getElementById('collapse_group'+id).src=img_expand;
		document.getElementById('collapse_group'+id).title=txt_expand;
	}

}


function getLocation(url) {

	location.href = url;

}


// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the size of the largest image to be used (needed for Netscape)
defaultWidth  = 700;
defaultHeight = 700;

// Set autoclose true to have the window close automatically. Set autoclose false to allow multiple popup windows
var AutoClose = true;


extras='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;


function popImage(imageURL,imageTitle) {

	imgWin=window.open(imageURL,'',extras);

	with (imgWin.document) {

		//writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		writeln('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl">');
		writeln('<head>');
		writeln('<title>Loading...</title>');
		writeln('<style type="text/css">body{background: #FFFFFF; margin: 0px; padding: 0px;}</style>');
		writeln('<script type="text/javascript">');
		writeln('var NS = (navigator.appName=="Netscape")?true:false;');
		writeln('function reSizeToImage() {');
		writeln('	iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
		writeln('	iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
		writeln('	iWidth = document.images[0].width - iWidth;');
		writeln('	iHeight = document.images[0].height - iHeight;');
		writeln('	window.resizeBy(iWidth, iHeight);');
		writeln('}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</script>');
		writeln('</head>');

		if (!AutoClose) {
			writeln('<body onload="reSizeToImage();doTitle();self.focus()">')
		} else {
			writeln('<body onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
		}

		writeln('<img id="Plaatje" src='+imageURL+' onclick="javascript:window.close();" />');
		writeln('</body>');
		writeln('</html>');

		close();	

	}

}


settings='scrollbars=no,width=500,height=420,left='+PositionX+',top='+PositionY;

function popFilm(filmURL,filmTitle) {

	filmWin=window.open('movie.php?title='+filmTitle+'&file='+filmURL,'',settings);

}




function printWin(url) {
	features = 'width=580,height=500,left=25,top=50,toolbar=yes,status=no,scrollbars=yes,resize=no,menubar=yes,address=no,location=no,directories=no';
	popWin = window.open(url, 'printWin', features);
}


function ableInput(id) {
	if ((!document.forms.formulier) || (document.forms.formulier.new_item)) {

		//nothing

	} else {

		if (document.forms.formulier.change_pos.checked == true) {
			document.forms.formulier.pos_id.disabled = false;
  			document.forms.formulier.position.disabled = false;
		}

		else if (document.forms.formulier.change_pos.checked == false) {
  			document.forms.formulier.position.disabled = true;
			document.forms.formulier.pos_id.disabled = true;
		}

	}

}


function ableDateChooser(id) {
	if (!document.forms.formulier) {

		//nothing

	} else {

		if (document.forms.formulier.onbeperkt.checked == true) {
			document.forms.formulier.date.disabled = true;
		}

		else if (document.forms.formulier.onbeperkt.checked == false) {
  			document.forms.formulier.date.disabled = false;
		}

	}

}


function noRefresh() {

	if ((document.forms.formulier)) {

		document.forms.formulier.refresh.value = '0';

	}

}


function confirmButton(url, message) {

	var agree=confirm(message);

	if (agree) {

		window.location.href=url;

	} else {

		return false ;
	}

}


function navigate(id) {

	if (id != '') {

		window.location.href='index.php?id='+id;

	}

}


