txt_collapse = 'inklappen';
txt_collapse = 'inklappen';
txt_expand = 'uitklappen';
img_collapse = 'http://www.alles-in-1.org/images/collapse_blk.gif';
img_expand = 'http://www.alles-in-1.org/images/expand_blk.gif';

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();	

	}

}


function bekijkFilmMusical() {
	url = 'http://www.alles-in-1.org/movies/movie.php';
	features = 'width=340,height=330,left=50,top=30,toolbar=no,status=no,scrollbars=no,resize=no,menubar=no,address=no,location=no,directories=no';
	popWin = window.open(url, 'filmWin', features);
}


function demoEngels() {
	url = 'http://www.alles-in-1.org/movies/engels_demo.html';
	features = 'width=733,height=512,left=20,top=10,toolbar=no,status=no,scrollbars=no,resize=no,menubar=no,address=no,location=no,directories=no';
	popWin = window.open(url, 'demoWin', features);
}


function printWin(url) {
	features = 'width=530,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 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;

	}

}

