function Projet(int_id, obj_parent, str_nom,str_dir){

/******************************************/
/**********DECLARATION DE PROPRIETE********/
/******************************************/
	this._parent = obj_parent;
	this.nom = str_nom;
	this.dir = this._parent.dir + str_dir;
	this.ouvert = false;
	this.index = int_id;
	this.id = this._parent.id + "_projet_" + int_id;
	this.content = new Array();
	this.scriptPath = this._parent.scriptPath + ".content[" + this.index + "]";
	this.html = "";

/******************************************/
/**********DECLARATION DE METHODE********/
/******************************************/

//ouverture/fermeture du projets
//-----------------------------------------
	this.setOuverture = function() {
	oDiaporama.close();		
		if (this.content[0].html == "") {
			this.displayBlocs();
			this.ouvert = true;
			this.setCss();	
		}else{			
			this.togleBlocs();	
			this.setCss();	
		}
	
	}

//affectation du style CSS
//----------------------------
	this.setCss = function(){
		
		var div = $(this.id);
		if (this.ouvert==true) {
			div.removeClassName('projet_off');
			div.addClassName('projet_on');	
			//var div = document.getElementById("titre_"+this.id);
			//alert(findPos(div).y);
			//window.scrollTo(0, findPos(div).y);					
		}else{
			div.removeClassName('projet_on');
			div.addClassName('projet_off');	
		}
		if (this.index == this._parent.content.length - 1) {
			this._parent.setBottom(this.ouvert);
		}

	}
		
//affichage/masquage du content
//-------------------------------------	
	this.togleBlocs = function(){
		var div = $('content_'+this.id);
		if (div.visible()==false) {
			div.show();			
		}else{
			div.hide();			
		}
		this.ouvert = !this.ouvert;
		setBgStatus();

	}
	
	this.close = function() {
		var div = $('content_'+this.id);
		div.hide();	
		this.ouvert = false;
		this.setCss();
	}
	
//HTML du projet
//------------------------
	this.createHtml = function () {
		
		var str_css = new String();
		var str_css_projet = new String();
		if (this.index < this._parent.content.length -1) {
			str_css = "projet_titre";
			str_css_projet = "projet_content";
		}else{
			str_css = "projet_titre_last";
			str_css_projet = "projet_content_last";			
		}

		var str_html = new String();
		str_html+="<div id=\"" + this.id + "\" class=\"projet_off\">\n";
		str_html+="<div id=\"titre_"+this.id+"\" class=\""+str_css+"\"><div onClick=\""+ this.scriptPath +".setOuverture();\"><span>"+this.nom+"</span></div></div>\n";
		str_html+="<div id=\"content_"+this.id+"\" class=\""+str_css_projet+"\">\n</div>\n";
		str_html+="</div>\n";
		this.html = str_html;
	}
	
//content (appelé une seule fois, à la première ouverture)
//-----------------------------------------------------------------
	this.displayBlocs = function(){
		var div = $('content_'+this.id);
		
		if (div.empty()) {
			var str_display = "";
			this.content[0].createHtml();
			if (!this.content[0].deploye) this.content[0].togleThis();
			str_display +=this.content[0].html;
			div.update(str_display);				
			div.show();
			setBgStatus();				
		}		
		
	}
	
}