
// ==================
// functions for MENU
// ==================

// could be called by
// <select name="selectieveld" onChange="latenzien('hiddendiv',this.name,'field')">
function latenzien(id,veld,waarde)
{

x = document.formulier.elements[veld].selectedIndex;
if (document.formulier.elements[veld].options[x].text == waarde)
{document.getElementById(id).style.display = 'block';}
else
{document.getElementById(id).style.display = 'none';}
}



function FuncShowHide(id){

  if (document.getElementById(id).style.display == ''){
     document.getElementById(id).style.display = "none";
  } else {
     document.getElementById(id).style.display = ''
  }
}

var confirmMsg  = 'Weet u zeker dat u dit wilt verwijderen ';

function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
    	if ( typeof(theLink.href) != 'undefined' ) {
            theLink.href += '&delete';
        }
    }

    return is_confirmed;
}


function SpringNaar(x) {
  top.window.location = x
}

function editName(theLink, name)
{
	var ret = false;
	var value = prompt("Wijzig de naam van het menu item:",name);
	if (value != null && value != '') {
		if ( typeof(theLink.href) != 'undefined' ) {
            theLink.href += '&edit&newname=' + value;
        }
        ret = true;
	}

	return ret;
}

// ==================
// END MENU FUNCTIONS
// ==================

function checkTheBox(i)
{
var chk = document.compform.elements['results[]'];
chk[i].checked = true;
}
function faq(cat,qu)
{
    if( document.getElementById(cat+"_"+qu).style.display=='none' ){
    	document.getElementById(cat+"_"+qu).style.display = '';
    }else{
    	document.getElementById(cat+"_"+qu).style.display = 'none';
    }
}
function results_extra(i)
{
    var plus = (i + 1);
    document.getElementById("extra_"+i).style.display = '';
    document.getElementById("extra_hide_"+i).style.display = 'none';
    document.getElementById("extra_hide_"+plus).style.display = '';
}


function FCKeditor_OnComplete( editorInstance )
{
	var oCombo = document.getElementById( 'cmbToolbars' ) ;
	oCombo.value = editorInstance.ToolbarSet.Name ;
	oCombo.style.visibility = '' ;
}

function ChangeToolbar( toolbarName )
{
	window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
}

   function FuncShowHide(id){

      if (document.getElementById(id).style.display == ''){
         document.getElementById(id).style.display = "none";
      } else {
         document.getElementById(id).style.display = ''
      }
   }