<!--

function ChangeStyleSheet(css, forced)
{
  if (forced || (css != myCSS))
  {
    myCSS = css;
    //ResetCookie();

	var tag = document.getElementsByTagName("link");
    for(var i=0; i<tag.length; i++)
    {
      if (tag[i].getAttribute("rel").indexOf("style") != -1
			&& tag[i].getAttribute("title"))
	    {
        tag[i].disabled = true;
        if (tag[i].getAttribute("title") == myCSS)
	        tag[i].disabled = false;
      }
    }
  }
}

/* increasing and decreasing text size.
how this works:
1- loop through all of the stylesheets
2 - check if they have a title
3 - check if that title contains "article" (indicates our article stylesheet)
4 - disable all article stylesheets
5 - enable the next size up or down.
6 - exit, enjoy the day.
*/
/*var sz=13 //default stylesheet
function selectStyleSheet(dir) // récupérer sur lemonde.fr
{
var li; // link items - that is, stylesheets
//make sure we're under limit
if (10<sz+dir&&sz+dir<20){
   for(var i=0; li=document.getElementsByTagName("link")[i]; i++) {
// get stylesheets
     if(li.getAttribute("rel").indexOf("style") != -1 && li.getAttribute("title")) {
      if(li.getAttribute("title").indexOf("article") !=-1) li.disabled = true;
// check if 1 - it's a stylesheet with a title, 2- if it is an article stylesheet, disable it
		if (li.getAttribute("title").indexOf(sz+dir)>-1)li.disabled = false;
// if it's the next in line, enable it
	  }
	 }
//don't forget to increment the size, so we know what's next....
    sz=sz+dir;
   }
  }
  */

function CssInsertRule(css, tag, value)
{
  if (css.insertRule)
    css.insertRule(tag+' {'+value+'}');
  else
  if (css.addRule)
    css.addRule(tag, value);
}

//-----


function AllCssHarmony(css)
{
  //CssInsertRule(css, 'body');
}

function AllCssHarmony()
{
  var tag = document.getElementsByTagName("link");
  for(var i=0; i<tag.length; i++)
  {
    if(tag[i].getAttribute("rel").indexOf("style") != -1
		&& tag[i].getAttribute("title"))
    {
      tag[i].disabled = true;
	  //CssHarmony(tag[i]);
      tag[i].disabled = (tag[i].getAttribute("title") == myCSS) ? false : true;
    }
  }
}

//-->