﻿function loadSpecific() {
}

function downloadFile(elem) {
  switch (top.location.pathname.split('/')[1]) {
    case 'nl':
      if(confirm('Wilt u op de hoogte blijven van aanbiedingen en acties van Flex-i-Trans?'))
      {
        informationYes(elem.href);
      }
      else
      {
        informationNo(elem.href);
      }
      break;
    case 'en':
      if(confirm('Would you be informed about actions of Flex-i-Trans?'))
      {
        informationYes(elem.href);
      }
      else
      {
        informationNo(elem.href);
      }
      break;
  }
}

function informationYes(file) {
  switch (top.location.pathname.split('/')[1]) {
    case 'nl':
      top.location.href = '/nl/contact/contact.html?file=' + file;
      break;
    case 'en':
      top.location.href = '/en/contact/contact-en.html?file=' + file;
      break;
  }
}

function informationNo(file) {
  window.open(file);
}

function checkDownload() {
  var download = top.location.search.substr(6, top.location.search.lenght);

  if (download != '') {
    window.open(download);
  }
}