<!--
google_ad_client = "pub-1022193221053920";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text";
//2007-01-05: HomeRightContents
google_ad_channel = "2805532088";
google_color_border = "edf1f7";
google_color_bg = "ffffff";
google_color_link = "4d4d4d";
google_color_text = "4d4d4d";
google_color_url = "ff4500";

/* open search add link function */
function addEngine() {
   try {
      window.external.AddSearchProvider('http://www.matinfo.ch/blog/osd.xml');
   } catch (e) {
      try {
      window.sidebar.addSearchEngine(
         'http://www.matinfo.ch/themes/matinfo/matinfo.src',  /* engine URL */
         'http://www.matinfo.ch/themes/matinfo/images/favicon.ico',  /* icon URL */
         'Mat\'s Blog',
         'Personal' );
      } catch (e) {
         alert("Impossible d'installer l'option de recherche. "); //'
      }
   }
   return false;
}


function activateStyleSheet(title) {
var c, i, t; 
if ( ! (c = document.styleSheets) ) { return true; } i = c.length; 
while(i--) { if( ( t = c[i].title ) ) { c[i].disabled = (title != t); } } return false; 
}


function setActiveStyleSheet(title) {
  var i, a, main, div;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}


// for debuging head info with js
function revealTags() {
  /* reveal tags */
  var arrElms = document.getElementsByTagName('*');
  for (var iElmCounter = 0, iElms = arrElms.length; iElmCounter < iElms; ++iElmCounter) {
    var objElm = arrElms[iElmCounter],
        strTag = objElm.nodeName,
        strLocal = objElm.localName,
        strNamespace = objElm.namespaceURI,
        arrAttrs = objElm.attributes,
        strAttrs = '';
    for (var iAttrCounter = 0, iAttrs = arrAttrs.length; iAttrCounter < iAttrs; ++iAttrCounter) {
      var objAttr = arrAttrs[iAttrCounter];
      strAttrs += ' ' + objAttr.nodeName + '="' + objAttr.nodeValue.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '"';
    }
    if ((strNamespace == null && (strTag == 'STYLE' || strTag == 'SCRIPT')) || 
        (strNamespace == 'http://www.w3.org/1999/xhtml' && (strLocal == 'style' || strLocal == 'script'))) {
      /* don't mess up styles or scripts */
      objElm.insertBefore(document.createTextNode('/*<' + strTag + strAttrs + '>*/'), objElm.firstChild);
      objElm.appendChild(document.createTextNode('/*</' + strTag + '>*/'));
    } else {
      objElm.insertBefore(document.createTextNode('<' + strTag + strAttrs + '>'), objElm.firstChild);
      /* skip empty elements */
      if (strNamespace != null || (strTag != 'AREA' && strTag != 'BASE' && strTag != 'BASEFONT' &&
          strTag != 'BGSOUND' && strTag != 'BR' && strTag != 'COL' && strTag != 'EMBED' && strTag != 'FRAME' &&
          strTag != 'HR' && strTag != 'IMG' && strTag != 'INPUT' && strTag != 'ISINDEX' && strTag != 'KEYGEN' &&
          strTag != 'LINK' && strTag != 'META' && strTag != 'PARAM' && strTag != 'SPACER' && strTag != 'WBR')) {
        objElm.appendChild(document.createTextNode('</' + strTag + '>'));
      }
    }
    /* display hidden elements */
    if ((strNamespace == null && (strTag == 'HEAD' || strTag == 'BASE' || strTag == 'BASEFONT' ||
         strTag == 'BGSOUND' || strTag == 'LINK' || strTag == 'META' || strTag == 'PARAM' ||
         strTag == 'SCRIPT' || strTag == 'STYLE' || strTag == 'TITLE')) ||
        (strNamespace == 'http://www.w3.org/1999/xhtml' && (strLocal == 'head' || strLocal == 'base' ||
         strLocal == 'basefont' || strLocal == 'bgsound' || strLocal == 'link' || strLocal == 'meta' ||
         strLocal == 'param' || strLocal == 'script' || strLocal == 'style' || strLocal == 'title'))) {
      objElm.style.display = 'block';
    }
  }
}
//-->