function loadClt(id)
{
    var clt_object = null;
		clt_object = new XHRConnection();
		clt_object.appendData("clt", id);
		clt_object.sendAndLoad("/includes/showClassement.php", "POST", function(obj){ document.getElementById('clt'+id).innerHTML=obj.responseText;});
}
function expa(){
    var less = document.getElementById('less');
    var full = document.getElementById('full');
    $("#more").hide();
    full = strip_tags(full.innerHTML);
    less.innerHTML = full.substr(0, 300)+'...'+'<br /><a href="#" id="dmore">+ En savoir plus</a>';
		dmore();
	};
function dmore()
{
    $("#dmore").click(function() {
		   $("#less").hide();
        var descr = document.getElementById('more');
		  var full = document.getElementById('full');
      descr.innerHTML = full.innerHTML;
			$("#more").slideDown("slow");
      
      $("#dless").click(function() {
        var descr = document.getElementById('more');
  		  var full = document.getElementById('full');
  		  var less = document.getElementById('less');
  		  full = strip_tags(full.innerHTML);
        less.innerHTML = full.substr(0, 300)+'...'+'<br /><a href="#" id="dmore">+ En savoir plus</a>';
        dmore() ;
        $("#less").slideDown("slow");
        $("#more").slideUp("slow");
		  });
		});
		  
}

function strip_tags(str, allowed_tags) {
 
    var key = '', allowed = false;
    var matches = [];
    var allowed_array = [];
    var allowed_tag = '';
    var i = 0;
    var k = '';
    var html = '';
 
    var replacer = function(search, replace, str) {
        return str.split(search).join(replace);
    };
 
    // Build allowes tags associative array
    if (allowed_tags) {
        allowed_array = allowed_tags.match(/([a-zA-Z]+)/gi);
    }
  
    str += '';
 
    // Match tags
    matches = str.match(/(<\/?[^>]+>)/gi);
 
    // Go through all HTML tags
    for (key in matches) {
        if (isNaN(key)) {
            // IE7 Hack
            continue;
        }
 
        // Save HTML tag
        html = matches[key].toString();
 
        // Is tag not in allowed list? Remove from str!
        allowed = false;
 
        // Go through all allowed tags
        for (k in allowed_array) {
            // Init
            allowed_tag = allowed_array[k];
            i = -1;
 
            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'>');}
            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+' ');}
            if (i != 0) { i = html.toLowerCase().indexOf('</'+allowed_tag)   ;}
 
            // Determine
            if (i == 0) {
                allowed = true;
                break;
            }
        }
 
        if (!allowed) {
            str = replacer(html, "", str); // Custom replace. No regexing
        }
    }
 
    return str;
}