//##############################################################################
//# INITIALIZE

function Main_Initialize()
{
  var oForm = WHITE_GetElementFlex('searchform');
  if ('object' == typeof oForm)
  {
    WHITE_InitFieldExplanation('searchfield', 'zoek');
    WHITE_InitFieldExplanation('searchfield_en', 'search');
    WHITE_AddEvent(oForm, 'submit', WHITE_FormRemoveEplanationsEvent);
    WHITE_ChangeOverImagesInit();
  }

  var oContactForm = WHITE_GetElementFlex('whiteform');
  if ('object' == typeof oContactForm)
  {
  	showhide();
  }

  WHITE_AddEvent(document.body,'contextmenu',disableRight);
}

if ('function' == typeof WHITE_AddBodyLoadFunction)
{
  WHITE_AddBodyLoadFunction(Main_Initialize);
}

//##############################################################################

function showhide() {
  bInformatie   = document.getElementById('informatie').checked;
  bAfspraak     = document.getElementById('afspraak').checked;
  bSolliciteren = document.getElementById('solliciteren').checked;

  document.getElementById('bedrijfsnaamDiv').style.display = (bInformatie || bAfspraak || (!bInformatie && !bAfspraak && !bSolliciteren))?'block':'none';
  document.getElementById('cvDiv').style.display           = (bSolliciteren)?'block':'none';
}

function disableRight(oElement) {
  return WHITE_CancelEvent(oElement);
}