	function PopCentre(page,options) {
	var hauteur=500;
	  var largeur=650; 
	 var top=(screen.height-hauteur)/2;
	  var left=(screen.width-largeur)/2;
	  window.open(''+page+'','pop','top='+top+',left='+left+',width='+largeur+',height='+hauteur+','+options+'');
	}
	function PopupImage(img,titre,width,height) {
		w=open('','image','top=50,left=100,width='+width+',height='+height+',toolbar=no,scrollbars=yes,resizable=yes');	
		w.document.write('<HTML><HEAD>');
		w.document.write('<TITLE>'+titre+'</TITLE></HEAD>');
		w.document.write("<SCRIPT type='text/javascript'>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+100); window.focus();} else { setTimeout('check()',250) } document.forms['tot'].elements['envoi'].value = 'Close'; }</"+"SCRIPT>");
		w.document.write("<BODY onload='checksize();' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
		w.document.write('<IMG src="'+img+'" border=0>');
		w.document.write('<div align="center" style="position: absolute; left: '+(width-80)+'px; top: 0px; width: 80px; height: 40px; visibility: visible; z-index: 10"><form name="tot"><input type="button" style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=55);border: none" name="envoi" value="Chargement en cours" onClick="window.close()" ></form></div>');
		w.document.write('</BODY></HTML>');
		w.document.close();
	}
// ----------------------------------------------
// StyleSwitcher functions written by Paul Sowden
// For the details, visit ALA:
// http://www.alistapart.com/stories/alternate/

// modified by Michiel Dethmers, tincan ltd to include the option
// for textonly

var i;
var stylesheets;

function setActiveStyleSheet(title) {
  var i, a, main;
  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;
    }
  }
}

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

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; domain=.yadugaz07.com; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function rememberFontSize(divname,fontsize) {
  var cookie = readCookie("fontsize");
  var cookieout = '';
  if (cookie) {
    var divs = cookie.split('~');
    for (var i=0; i<divs.length;i++) {
      var pairs = divs[i].split('|');
      if (pairs[0] == divname) {
        cookieout += divname+'|'+fontsize+'~';
      } else if (pairs[0] && pairs[0] != 'undefined') {
        cookieout += pairs[0]+'|'+pairs[1]+'~';
      }
    }
  } else {
    cookieout = divname+'|'+fontsize+'~';
  }
  createCookie('fontsize',cookieout,365);
}

function setFontSize(cookieval) {
  var divs = cookieval.split('~');
  for (var i=0; i<divs.length;i++) {
    var pairs = divs[i].split('|');
    var div = document.getElementById(pairs[0]);
    if (div) {
      div.style.fontSize = pairs[1];
    }
  }
}

function increasefont(divname,step) {
  if (!step) { step = 20; }
  var div = document.getElementById(divname);
  if (!div) return;
  var fontsize = div.style.fontSize;
  if (!fontsize) {
    fontsize = "100%";
  }
  fontsize = parseInt(fontsize);
  fontsize += step;
  if (fontsize > 180) {
    fontsize = 180;
  }
  fontsize += '%';
  
  rememberFontSize(divname,fontsize);
  div.style.fontSize = fontsize;
}

function defaultfont(divname) {
  var fontsize = "100%";
  var div = document.getElementById(divname);
  rememberFontSize(divname,fontsize);
  div.style.fontSize = fontsize;
}


function decreasefont(divname,step) {
  var cookie = readCookie("fontsize");
  if (!step) { step = 20; }
  var div = document.getElementById(divname);
  if (!div) return;
  var fontsize = div.style.fontSize;
  if (!fontsize) {
    fontsize = "100%";
  }
  fontsize = parseInt(fontsize);
  fontsize -= step;
  if (fontsize < 50) {
    //alert('I cannot believe you can still read that\n-- powered by the Webbler, http://www.webbler.org --');
    fontsize = 50;
  }
  fontsize += '%';
  rememberFontSize(divname,fontsize);
  div.style.fontSize = fontsize;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var fontsize = readCookie("fontsize");
  if (fontsize) {
    setFontSize(fontsize);
  }
    var title = cookie ? cookie : getPreferredStyleSheet();
    setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);