
// ==================
// 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 resizeText(multiplier) {
  if (document.body.style.fontSize == "") {
  	console.log('fs: ' + document.body.style.fontSize);
    document.body.style.fontSize = "1.0em";
  }
  document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em";
  console.log('fs2: ' + document.body.style.fontSize);
}


