
/**
* this overrule is necessary to display the images correctly
**/
// tabs function
function showDbmTabs(id){
	var tabCont = document.getElementById("tPoolTabsContainer");
	var tabs = document.getElementById("tPoolTabs");
	for(var i=0;i<tabCont.childNodes.length;i++)
		if(tabCont.childNodes[i]&&tabCont.childNodes[i].style)
			tabCont.childNodes[i].style.display = "none";
	for(var i=0;i<(tabs.childNodes.length);i++)
		if(tabs.childNodes[i]&&tabs.childNodes[i].style&&tabs.childNodes[i].tagName=="DIV") {
			tabs.childNodes[i].className = "activeIn";
			tabs.childNodes[i].childNodes[0].className = "leftImg";
			document.getElementById("tabCont"+id).style.display = "block";
			document.getElementById("tab"+id).className = "active";
			//document.getElementById("_tImg"+id).src = "/static/images/tPoolTabs_active_left.jpg";
			document.getElementById("_tImg"+id).className = "leftImgActive";
		}
}



/**
  * @param mainId String Id of main list
  * @param num Number Number of visible items
  * @param toggle Boolean Specifies if list must be hided or showed
  * @param btn Object Button object
  */

function toggleColumns(mainId, num, hideItems, generateClass, btn) {
 var tmp = [];
 var divContainer = document.getElementById("_listContainer"+mainId);
 if(!divContainer){
  divContainer = createDivContainer(mainId);
 }
 if(!num){
  alert("Number of visible items not set.");
  return;
 }
 divContainer.innerHTML="";
 cloneList(mainId,"twoColums");
 if(hideItems){
  var items = divContainer.firstChild.getElementsByTagName("li");
  for(var i=num;i<items.length;i++){
   tmp[tmp.length] = items[i];
  }
  for(var i=0;i<tmp.length;i++){
   var item = tmp[i];
   if(item.removeNode) item.removeNode(true);
   else if(item.parentNode.removeChild) item.parentNode.removeChild(item);
  }
  if(btn){
   btn.innerHTML="bekijk alle trefwoorden<img src='/static/images/trefwoorden_open.gif' alt='bekijk alle trefwoorden' />";
  }
  eval(mainId+"__hideList = false");
 }else{
  if(btn){
   btn.innerHTML="lijst inklappen<img src='/static/images/trefwoorden_close.gif' alt='lijst inklappen' />";
  }
  eval(mainId+"__hideList = true");
 }
 divideUls(mainId);
 
 //divideList(mainId,2,"__dividedUL_"+mainId)
}

function ControleerZoeken(form) {
  if (ControleerSearch(form.trefwoord)) {
    return true;
  }
  return false;
}

function ControleerSearch(txt) {
  if (txt.value.length > 2) {
    return true;
  }
  alert('Vul \u00E9\u00E9n of meer trefwoorden in.');
  txt.focus();
  return false;
}