class_volet_content = function (volet) {
		
	this.volet = document.getElementById(volet);
	
	var hauteur = function (box) {
		if (box.offsetHeight) {
			return parseInt(box.offsetHeight);
			}
			else if (box.style.pixelHeight) {
				return parseInt(box.style.pixelHeight);
				}	
		}
	
	this.height = hauteur(this.volet);
	
	this.flag;	
	this.pos;	
	this.percentSpeed = 30;	
	
	this.vitesse = Math.round((this.height*this.percentSpeed)/100);	
	
	var obj = this;
	
	this.initClass = function () {
		this.style_volet();
		}
		
	this.change_flag = function (flag) {
		this.flag = flag;
		this.initClass();
		}
		
	this.style_volet = function () {
		this.volet.style.overflow = 'hidden';
		switch (this.flag) {
			case 0:
				this.volet.style.height = '0px';
				this.pos = 0;
				break;
			case 1:
				this.volet.style.height = this.height+'px';
				this.pos = this.height;
				break;
			}
		}
	
	this.change_flag = function (flag) {
		this.flag = flag;	
		this.initClass();
		}
		
	this.click_volet = function () {
		switch (this.flag) {
			case 0:
				this.openVolet();
				break;
			case 1:
				this.closeVolet();
				break;
			}
		}
		
	this.change_class = function (obj) {
		switch (this.flag) {
			case 0:
				obj.className = obj.className.replace(/close/g, '');
				obj.className += ' sel';
				break;
			case 1:
				obj.className = obj.className.replace(/sel/g, '');
				obj.className += ' close';
				break;
			default:
				obj.className += ' sel';
				break;
			}
		}
	
	var timerCloseVolet;
	this.closeVolet = function() {
		clearTimeout(timerOpenVolet);
		if (this.pos>0) {
			if (this.pos-this.vitesse<=0) {
				this.pos = 0;
				}
				else {
					this.pos = this.pos-this.vitesse;
					}
			
			this.volet.style.height = this.pos+'px';
			timerCloseVolet = setTimeout(function () {obj.closeVolet();},80);
			}
			else {
				clearTimeout(timerCloseVolet);
				this.change_flag(0);	
				}
		}
	var timerOpenVolet;
	this.openVolet = function() {
		clearTimeout(timerCloseVolet);
		if (this.pos<this.height) {
			if (this.pos+this.vitesse>=this.height) {
				this.pos = this.height;
				}
				else {
					this.pos = this.pos+this.vitesse;
					}
			
			this.volet.style.height = this.pos+'px';
			timerOpenVolet = setTimeout(function () {obj.openVolet();},80);
			}
			else {
				clearTimeout(timerOpenVolet);
				this.change_flag(1);	
				}
		}
	
	}
