var msg1 = "Did you know that your Internet Explorer is out of date?";
var msg2 = "To get the best possible experience using our website we recommend that you upgrade to a newer version or other web browser. A list of the most popular web browsers can be found below.";
var msg3 = "Just click on the icons to get to the download page";
var msg1_nl = "Ben je op de hoogte dat je versie van Internet Explorer verouderd is?";
var msg2_nl = "Voor de beste gebruikservaring van onze website, raden we je aan om een nieuwere of andere browser te gebruiken.";
var msg3_nl = "Klik op een van de icoontjes om naar de download pagina te gaan.";
var msg1_fr = "Saviez-vous que votre version d'Internet Explorer est trop ancienne ?";
var msg2_fr = "Pour obtenir la meilleur navigation possible sur notre site, nous vous recommandons une mise a jour votre navigateur ou d'en choisir un autre. Une liste des navigateurs les plus populaires se trouve ci-dessous.";
var msg3_fr = "Il suffit de cliquer sur l'image du navigateur correspondant pour rejoindre sa page de chargement.";
var br1 = "Explorer 7+";
var br2 = "Firefox 3+";
var br3 = "Safari 3+";
var br4 = "Opera 9+";
var br5 = "Chrome 2+";
var url1 = "http://www.microsoft.com/windows/Internet-explorer/default.aspx";
var url2 = "http://www.mozilla.com/firefox/";
var url3 = "http://www.apple.com/safari/download/";
var url4 = "http://www.opera.com/download/";
var url5 = "http://www.google.com/chrome";
var imgPath;

function e(str, lang) {
    imgPath = str;

    var _d = document.getElementById('ie_warning');

    var _h = document.createElement('h1');
    var _p1 = document.createElement('p');
    var _p2 = document.createElement('p');
    var _ul = document.createElement('ul');
    var _li1 = document.createElement('li');
    var _li2 = document.createElement('li');
    var _li3 = document.createElement('li');
    var _li4 = document.createElement('li');
    var _li5 = document.createElement('li');
    var _ico1 = document.createElement('div');
    var _ico2 = document.createElement('div');
    var _ico3 = document.createElement('div');
    var _ico4 = document.createElement('div');
    var _ico5 = document.createElement('div');
    var _lit1 = document.createElement('div');
    var _lit2 = document.createElement('div');
    var _lit3 = document.createElement('div');
    var _lit4 = document.createElement('div');
    var _lit5 = document.createElement('div');


    _d.className = 'iew_box';

    if(lang == 'fr'){
        msg1 = msg1_fr;
        msg2 = msg2_fr;
        msg3 = msg3_fr;
    } else {
        msg1 = msg1_nl;
        msg2 = msg2_nl;
        msg3 = msg3_nl;
    }

    _h.appendChild(document.createTextNode(msg1));
    _p1.appendChild(document.createTextNode(msg2));
    _p2.appendChild(document.createTextNode(msg3));
    
    // urls
    _li1.onclick = function() {window.open(url1)};
    _li2.onclick = function() {window.open(url2)};
    _li3.onclick = function() {window.open(url3)};
    _li4.onclick = function() {window.open(url4)};
    _li5.onclick = function() {window.open(url5)};

    // icones
    _ico1.className = "iew_ico";
    _ico2.className = "iew_ico";
    _ico3.className = "iew_ico";
    _ico4.className = "iew_ico";
    _ico5.className = "iew_ico";

    _ico1.style.backgroundImage = "url('"+imgPath+"browser_ie.gif')";
    _ico2.style.backgroundImage = "url('"+imgPath+"browser_firefox.gif')";
    _ico3.style.backgroundImage = "url('"+imgPath+"browser_safari.gif')";
    _ico4.style.backgroundImage = "url('"+imgPath+"browser_opera.gif')";
    _ico5.style.backgroundImage = "url('"+imgPath+"browser_chrome.gif')";

    //legend
    _lit1.appendChild(document.createTextNode(br1));
    _lit2.appendChild(document.createTextNode(br2));
    _lit3.appendChild(document.createTextNode(br3));
    _lit4.appendChild(document.createTextNode(br4));
    _lit5.appendChild(document.createTextNode(br5));

    _lit1.className = "iew_legend";
    _lit2.className = "iew_legend";
    _lit3.className = "iew_legend";
    _lit4.className = "iew_legend";
    _lit5.className = "iew_legend";

    _d.appendChild(_h);
    _d.appendChild(_p1);
    _d.appendChild(_p2);
    _d.appendChild(_ul);

    _ul.appendChild(_li1);
    _ul.appendChild(_li2);
    _ul.appendChild(_li3);
    _ul.appendChild(_li4);
    _ul.appendChild(_li5);

    _li1.appendChild(_ico1);
    _li2.appendChild(_ico2);
    _li3.appendChild(_ico3);
    _li4.appendChild(_ico4);
    _li5.appendChild(_ico5);

    _li1.appendChild(_lit1);
    _li2.appendChild(_lit2);
    _li3.appendChild(_lit3);
    _li4.appendChild(_lit4);
    _li5.appendChild(_lit5);

}


