function Header(id, lang, displayType, colour) {
  if (id == null || lang == null) { alert('Missing Arguments'); return; }
  var searchDisplayType = (displayType == 'narrow') ? 'header_narrow' : 'header';
  var container = (typeof(id) == "string") ? document.getElementById(id) : id;
  var protocol = window.location.protocol + '//';
  var host = 'dev.mytelus.com';
  if (window.location.host != host) host = 'www.mytelus.com';
  var rows = 6;
  var preLoad = new Array();
  preLoad.push(protocol + host + '/global/images/header/' + lang + '/button_home_on.gif');
  preLoad.push(protocol + host + '/global/images/header/' + lang + '/button_goto_section_on.gif');
  for (var i = 0; i < preLoad.length; i++) {
    var loadImg = new Image();
    loadImg.src = preLoad[i];
  }
  var titles = new Array();
  var links = new Object();

  if (lang == 'en') {
    titles.push(new Array('Auto', 'http://automotive.mytelus.com/automotive'));
    //titles.push(new Array('Classifieds', 'http://mytelus.livedeal.ca'));
    titles.push(new Array('Games', 'http://' + host + '/games/home.do'));
    titles.push(new Array('Health', 'http://health.mytelus.com'));
    titles.push(new Array('Home &amp; Garden', 'http://' + host + '/homegarden'));
    titles.push(new Array('Horoscopes', 'http://' + host + '/horoscopes'));
    titles.push(new Array('Life &amp; Tech', 'http://' + host + '/ncp_news/category.en.do?pn=tech'));
    titles.push(new Array('Lotteries', 'http://' + host + '/lotteries'));
    titles.push(new Array('Maps &amp; Directions', 'http://' + host + '/maps'));
    titles.push(new Array('Money', 'http://money.mytelus.com'));
    titles.push(new Array('Movies', 'http://' + host + '/movies/releases.do'));
    titles.push(new Array('Music', 'http://' + host + '/music/display.do'));
    titles.push(new Array('News', 'http://' + host + '/ncp_news'));
    titles.push(new Array('Personals', 'http://lavalife.mytelus.com/clickthru/clickthru.act?context=an66&locale=en_CA&id=telusPage&a=24426'));
    titles.push(new Array('Phone Book', 'http://' + host + '/phonebook'));
    titles.push(new Array('Photos', 'http://' + host + '/photos'));
    titles.push(new Array('Shopping', 'http://' + host + '/shopping'));
    titles.push(new Array('Sports', 'http://' + host + '/sports'));
    titles.push(new Array('Travel', 'http://' + host + '/travel'));
    titles.push(new Array('Weather', 'http://' + host + '/weather'));
    links.langPage = new Array('Fran&ccedil;ais', 'http://www3.globetrotter.net');
    links.mail = new Array('Webmail', 'http://webmail.telus.net');
  } else if (lang == 'fr') {
    titles.push(new Array('Annonces class&eacute;es', 'http://www.dejavu.ca/gt/'));
    titles.push(new Array('Automobile', 'http://www.globetrotter.net/gt/auto123/index.asp'));
    titles.push(new Array('Boutique', 'http://www3.globetrotter.net/boutique'));
    titles.push(new Array('Cartes virtuelles', 'http://carte.globetrotter.net/index.asp'));
    titles.push(new Array('Cin&eacute;ma et vid&eacute;o', 'http://culturel.globetrotter.net/cinema/index.asp'));
    titles.push(new Array('Emploi', 'http://www.globetrotter.net/gt/emploi/index.asp'));
    titles.push(new Array('Habitation', 'http://www.globetrotter.net/gt/habitation/index.asp'));
    titles.push(new Array('Horoscope', 'http://www.globetrotter.net/gt/horoscope/'));
    titles.push(new Array('Jeux', 'http://www3.globetrotter.net/jeux/home.do'));
    titles.push(new Array('Loterie', 'http://www.globetrotter.net/gt/coin/loterie.asp'));
    titles.push(new Array('M&eacute;t&eacute;o', 'http://contenu.globetrotter.net/meteo/qc.html'));
    titles.push(new Array('Musique et radio', 'http://www.globetrotter.net/musique/'));
    titles.push(new Array('Nouvelles', 'http://www3.globetrotter.net/nouvelles'));
    titles.push(new Array('Photos', 'http://photos.globetrotter.net/index.asp'));
    //titles.push(new Array('Recettes', 'http://www.globetrotter.net/gt/recettes/index.asp'));
    titles.push(new Array('Rencontres', 'http://globetrotter.compagnie.com/?nump=9850&nums=4'));
    titles.push(new Array('Sports', 'http://www.globetrotter.net/gt/nouvelles/liste_nouvelle.asp?type=sport&filtre=Sports'));
    titles.push(new Array('Stars', 'http://culturel.globetrotter.net/stars/index.asp'));
    titles.push(new Array('TELUS 411', 'http://www.globetrotter.net/gt/TELUS_411/index.asp'));
    titles.push(new Array('Voyages', 'http://www.globetrotter.net/gt/voyages/index.asp'));
    links.langPage = new Array('English', 'http://www.mytelus.com/');
    links.mail = new Array('Messagerie', 'http://www.globetrotter.net/gt/messagerie');
  }

  this.setLangPage = function(arg) {
    links.langPage[1] = arg;
  }

  this.display = function(title) {
    container.style.fontFamily = 'arial,helvetica,sans-serif';
    container.style.fontSize = '11px';
    container.style.textAlign = 'left';
    container.style.width = (displayType == 'narrow') ? '760px' : '975px';
    container.style.margin = '30px auto 5px auto';

    var mainDiv = document.createElement('div');
    mainDiv.style.padding = '20px 0px 0px 20px';
    mainDiv.style.cssFloat = 'left'; mainDiv.style.styleFloat = 'left';
    container.appendChild(mainDiv);

    var img1 = document.createElement('img');
    img1.src = protocol + host + '/global/images/header/' + lang + '/logo.gif';
    img1.style.verticalAlign = 'top';
    if (lang == 'fr') img1.style.marginTop= '-17px';
    img1.style.marginRight = '10px';
    mainDiv.appendChild(img1);

    var a2 = document.createElement('a');
    a2.href = (lang == 'fr') ? 'http://www3.globetrotter.net/' : 'http://www.mytelus.com/'
    a2.target = '_top';
    mainDiv.appendChild(a2);
    var img2 = document.createElement('img');
    img2.style.border = 'none';
    img2.off = protocol + host + '/global/images/header/' + lang + '/button_home_off.gif';
    img2.on = protocol + host + '/global/images/header/' + lang + '/button_home_on.gif';
    img2.src = img2.off;
    img2.style.verticalAlign = 'top';
    img2.style.marginRight = '10px';
    img2.onmouseover = function() { this.src = this.on; }
    img2.onmouseout = function() { this.src = this.off }
    a2.appendChild(img2);
    
    var a3 = document.createElement('a');
    a3.href="#";
    a3.onclick = function() { return false; }
    mainDiv.appendChild(a3);
    var img3 = document.createElement('img');
    img3.style.border = 'none';
    img3.off = protocol + host + '/global/images/header/' + lang + '/button_goto_section_off.gif';
    img3.on = protocol + host + '/global/images/header/' + lang + '/button_goto_section_on.gif';
    img3.src = img3.off;
    img3.style.verticalAlign = 'top';
    img3.onmouseover = function() { this.src = this.on; selDiv.style.display = 'inline'; }
    img3.onmouseout = function() { this.src = this.off; selDiv.style.display = 'none'; }
    a3.appendChild(img3);

    var selDiv = document.createElement('div');
    selDiv.style.zIndex = 10;
    selDiv.style.position = 'absolute';
    selDiv.style.display = 'none';
    selDiv.style.padding = '5px';
    selDiv.style.fontSize = '11px';
    selDiv.style.backgroundColor = '#ffffff';
    selDiv.style.border = '1px solid #333333';
    selDiv.onmouseover = function(e) { this.style.display = 'inline'; }
    selDiv.onmouseout = function(e) { this.style.display = 'none'; }
    mainDiv.appendChild(selDiv);

    for (var i = 0; i < titles.length; i++) {
      if (i%rows == 0) { 
        var colDiv = document.createElement('div');
        colDiv.style.cssFloat = 'left'; colDiv.style.styleFloat = 'left';
        colDiv.style.width = '105px';
        selDiv.appendChild(colDiv);
      }
      var selA = document.createElement('a');
      selA.href = titles[i][1];
      selA.target = '_top';
      selA.innerHTML = titles[i][0];
      selA.style.color = '#333333';
      selA.style.fontSize = '11px';
      selA.style.lineHeight = '17px';
      selA.style.textDecoration = 'none';
      selA.onmouseover = function() { this.style.textDecoration = 'underline'; }
      selA.onmouseout = function() { this.style.textDecoration = 'none'; }
      colDiv.appendChild(selA);
      colDiv.appendChild(document.createElement('br'));
    }

    var br = document.createElement('br');
    br.style.clear = 'both';
    selDiv.appendChild(br);

    var rtDiv = document.createElement('div');
    rtDiv.style.cssFloat = 'right'; rtDiv.style.styleFloat = 'right';
    rtDiv.style.marginBottom = '5px';
    container.appendChild(rtDiv);

    var mDiv = document.createElement('div');
    mDiv.style.textAlign = 'right';
    rtDiv.appendChild(mDiv);

    var count = 0;
    for (i in links) {
      if (i == 'langPage' && title == 'Personals') {
        count++;
        continue;
      }
      var a = document.createElement('a');
      a.href = links[i][1];
      a.target = '_top';
      a.innerHTML = links[i][0];
      a.style.color = '#333333';
      a.style.fontSize = '11px';
      a.style.textDecoration = 'none';
      a.onmouseover = function() { this.style.textDecoration = 'underline'; }
      a.onmouseout = function() { this.style.textDecoration = 'none'; }
      if (i == 'mail') {
        a.style.paddingLeft = '17px';
        a.style.background = 'transparent url(http://www.mytelus.com/global/images/header/icon_webmail.gif) 0 1px no-repeat';
      }
      mDiv.appendChild(a);
      if (count < 1) {
        var span = document.createElement('span');
        span.appendChild(document.createTextNode(' | '));
        span.style.color = '#a0a0a0';
        mDiv.appendChild(span);
      }
      count++;
    }

    // FONT SIZE
    try { 
      var fontSize = new FontSize(mDiv, lang);
    } catch(e) {}

    if (fontSize != null) {
      var span = document.createElement('span');
      span.appendChild(document.createTextNode(' | '));
      span.style.color = '#a0a0a0';
      mDiv.appendChild(span);
      fontSize.display();
    }
 
    var boxContainer = document.createElement('div');
    boxContainer.style.width = (displayType == 'narrow') ? '327px' : '541px';
    boxContainer.style.height = '52px';
    boxContainer.style.marginTop = '2px';
    if (displayType == 'narrow') {
      boxContainer.style.background = 'url(' + protocol + host + '/global/images/header/bg_header_form760.gif) no-repeat top left';
    } else {
      boxContainer.style.background = 'url(' + protocol + host + '/global/images/header/bg_header_form.gif) no-repeat top left';
    }
    rtDiv.appendChild(boxContainer);

    var searchDiv = document.createElement('div');
    searchDiv.style.padding = (displayType == 'narrow') ? '2px 0px 0px 10px' : '6px 0px 0px 10px';
    boxContainer.appendChild(searchDiv);
    var headerSearch = new SearchBox(searchDiv, lang, searchDisplayType, colour);
    headerSearch.display();

    var br = document.createElement('br');
    br.style.clear = 'both';
    container.appendChild(br);
  }
}
