// -----------------------------------------------------------------------------

if (document.images) {
  a0 = new Image(156,18); a0.src = "grafx/menu_about_jongeneel.gif";
  a1 = new Image(156,18); a1.src = "grafx/menu_about_jongeneel_over.gif";

  b0 = new Image(156,18); b0.src = "grafx/menu_business_activities.gif";
  b1 = new Image(156,18); b1.src = "grafx/menu_business_activities_ov.gif";

  c0 = new Image(156,18); c0.src = "grafx/menu_our_customers.gif";
  c1 = new Image(156,18); c1.src = "grafx/menu_our_customers_over.gif";

  d0 = new Image(156,18); d0.src = "grafx/menu_the_fleet.gif";
  d1 = new Image(156,18); d1.src = "grafx/menu_the_fleet_over.gif";

  e0 = new Image(156,18); e0.src = "grafx/menu_vacancies.gif";
  e1 = new Image(156,18); e1.src = "grafx/menu_vacancies_over.gif";

  f0 = new Image(156,18); f0.src = "grafx/menu_contact_details.gif";
  f1 = new Image(156,18); f1.src = "grafx/menu_contact_details_over.gif";

  g0 = new Image(156,18); g0.src = "grafx/menu_home.gif";
  g1 = new Image(156,18); g1.src = "grafx/menu_home_over.gif";

  x0 = new Image(65,65); x0.src = "grafx/picto_alg_gr.gif";
  x1 = new Image(65,65); x1.src = "grafx/picto_alg_grwit.gif";

  y0 = new Image(65,66); y0.src = "grafx/picto_gevaar_gr.gif";
  y1 = new Image(65,66); y1.src = "grafx/picto_gevaar_grwit.gif";

  z0 = new Image(65,66); z0.src = "grafx/picto_food_gr.gif";
  z1 = new Image(65,66); z1.src = "grafx/picto_food_grwit.gif";
}

// -----------------------------------------------------------------------------

function change(imageName,imageFile) {
  if (!document.images) return;
  document.images[imageName].src = eval(imageFile + ".src");
}

// -----------------------------------------------------------------------------

function checkContact() {

  var f = document.contactForm;

  if (f.naam.value.length < 2) {
    alert('Vul a.u.b. uw naam in!');
    return false
  }

  if (f.mail.value == '') {
    alert('Vul a.u.b. uw e-mailadres in!');
    return false
  }

  if (isEmail(f.mail.value) != true) {
    alert('Vul a.u.b. een geldig e-mailadres in!');
    return false
  }

  return true
}

// -----------------------------------------------------------------------------

function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

// -----------------------------------------------------------------------------