//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 1;
var class_name = 'bodytext';
var class_name2 = 'TxtMoyen_12px';
var class_name3 = 'TxtMoyen';

function getElementsByClass(searchClass, node, tag) {
    var classElements = new Array();
    if ( node == null )
       node = document.getElementById('content');
    if ( tag == null )
       tag = '*';
    var els = node.getElementsByTagName(tag);
    var elsLen = els.length;
    var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
    for (i = 0, j = 0; i < elsLen; i++) {
       if ( pattern.test(els[i].className) ) {
           classElements[j] = els[i];
           j++;
       }
    }
    return classElements;
}


function agrandirtxt() {
    cibles = getElementsByClass(class_name);
    cibles2 = getElementsByClass(class_name2);
    cibles3 = getElementsByClass(class_name3);

    size = startSz;
    size++;
    if ( size < 0 ) size = 0;
	  if ( size > 6 ) size = 6;
    startSz = size;

    for (i=0; i < cibles.length; i++) {
        cibles[i].style.fontSize = szs[ size ];
    }
    for (i=0; i < cibles2.length; i++) {
        cibles2[i].style.fontSize = szs[ size ];
    }
    for (i=0; i < cibles3.length; i++) {
        cibles3[i].style.fontSize = szs[ size ];
    }
}


function reduiretxt() {
    cibles = getElementsByClass(class_name);
    cibles2 = getElementsByClass(class_name2);
    cibles3 = getElementsByClass(class_name3);

    size = startSz;
    size--;
    if ( size < 0 ) size = 0;
	  if ( size > 6 ) size = 6;
    startSz = size;

    for (i=0; i < cibles.length; i++) {
        cibles[i].style.fontSize = szs[ size ];
    }
    for (i=0; i < cibles2.length; i++) {
        cibles2[i].style.fontSize = szs[ size ];
    }
    for (i=0; i < cibles3.length; i++) {
        cibles3[i].style.fontSize = szs[ size ];
    }
}