	function checkForm(frm)
	{
		var count = 0;
		var workShops = new Array("eerste_workshop", "tweede_workshop");
		for(x = 0; x < workShops.length; x++) {
			formElement = frm[workShops[x]];
			for(i = 0; i < formElement.length; i++) {
				if(formElement[i].checked) {
					count++
				}
			}
		}
		
		if (count!=2) 
		{
			alert('U moet 2 keuzes aankruisen.');
			return false;
		}
		
		return true;
	}


// browser, os check
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

// redirect
function goTo(strURL) {
	if(strURL != "") {
		document.location.href = strURL;
	}
}

// zet voor IE de goeie hoogte
function setTdHeight() {
	
	tdHeight = document.getElementById('mainContainer').offsetHeight;
	if(tdHeight > 0)  {
		document.getElementById('mainDivContainer').style.height = tdHeight;
	}
	
}

/*
// pure CSSmenu IE bug fix
function startList() {
	if (document.all && document.getElementById) {
		
		var menus = new Array();
		menus[0] = "menu";
		if(document.location.href.indexOf("index.php") <= 0 && document.location.href.indexOf(".php") >= 0) {
			menus[1] = "menu2";
			if(document.location.href.indexOf("zoeken.php") <= 0) {
				menus[2] = "menu3";
			}
		}
		
		for(x = 0; x < menus.length; x++) {
			navRoot = document.getElementById(menus[x]);
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				//voor node zelf (LI)
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
				
				//voor childnodes (LI LI)
				for (j=0; j<node.childNodes.length; j++) {
					childnode = node.childNodes[j];
					if (childnode.nodeName=="UL") {
						for (k=0; k<childnode.childNodes.length; k++) {
							grantchildnode = childnode.childNodes[k];
							
							if (grantchildnode.nodeName=="LI") {
								grantchildnode.onmouseover=function() {
									this.className+=" over";
								}
								grantchildnode.onmouseout=function() {
									this.className=this.className.replace(" over", "");
								}
							}
							
							//voor childnodes (LI LI LI)
							for (p=0; p<node.childNodes.length; p++) {
								childnode = node.childNodes[p];
								if (childnode.nodeName=="UL") {
									for (l=0; l<childnode.childNodes.length; l++) {
										grantchildnode = childnode.childNodes[l];
										if (grantchildnode.nodeName=="LI") {
											grantchildnode.onmouseover=function() {
												this.className+=" over";
											}
											grantchildnode.onmouseout=function() {
												this.className=this.className.replace(" over", "");
											}
										}
									}
								}
							}
							
						}
					}
				}
			}
		}	
		
	}
}
*/

makeIEBug = function() {
//	startList();
	setTdHeight();
}

// print function
function printNow() {
	print_window.focus();
	print_window.print();
}

function selectFieldValue(obj) {
	obj.select();
}