function toggleCheckbox(element) {
	//write form value
	var input = element.firstDescendant();
	//set classes
	if(element.hasClassName('cbinactive')) {
		//set active
		element.removeClassName('cbinactive');
		element.addClassName('cbactive');
		input.value = input.id;
	} else {
		//set inactive
		element.removeClassName('cbactive');
		element.addClassName('cbinactive');
		input.value = "";
	}
}

function checkCBs(element) {
	cbcounter=0;
	for(count=1;count<12;count++) {
		if(document.anmeldung['workshop'+count].checked==true) {
			cbcounter++;
		}
	}
	if(cbcounter>6) {
		if(element.checked==true) {
			element.checked=false;
		}
		alert('Mehr als 6 Workshops können nicht ausgewählt werden!');
	}
}

function openImgDialog(fileName,windowTitle,width,height)
{
 var fileToOpen = fileName;
 var options = "dependent=yes,width="+(width+20)+",height="+(height+20)+",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,innerwidth="+width+",innerheight="+height;
 dialogWindow = window.open(fileToOpen,'Dialog',options);
 dialogWindow.focus();
}

