<!--

/* Contructeur layer */
function classDmc_Layer(){
/* Version 2.0 */
/* Marc */
	this.chemin=window.document;
	this.variable=false;
	this.navigateur="ie";

	this.type="document.all.";
	this.fintype="";
	this.is_style="style";
	if( typeof(document.all)=="object" && typeof(document.getElementById)!="function" ){
		this.navigateur="ie";
		this.type="document.all.";
		this.fintype="";
	}else if( typeof(document.all)=="object" && typeof(document.getElementById)=="function" ){
		this.navigateur="net6";//ie5
		this.type="document.all.";
		this.fintype="";
	}else if( typeof(document.layers)=="object" ){
		this.navigateur="net";
		this.type="document.layers.";
		this.is_style="style";
		this.fintype="";
	} else if( typeof(document.getElementById)=="function" && typeof(document.all) !="object" ){
		this.navigateur="net6";
		this.type="document.getElementById('";
		this.fintype="')";
	}else{
			debuger("ClassclassDmc_Layer"," Gestion du calque inconnu");
	}
	
	this.is_object=Dmc_object;
	this.is_sousobject=Dmc_sousobject;
	
	this.setObj = function(nom){
		//alert("chemein="+typeof(this.chemin.getElementById(nom)))
		if( this.navigateur=="ie" && typeof(this.chemin.all[nom])=="object"){
	//	alert("cas1")
			return this.chemin.all[nom];
		}else if( this.navigateur=="ie5" && typeof(this.chemin.getElementById(nom)) =="object" ){
		//alert("cas2")
			return this.chemin.getElementById(nom);
		}else if( this.navigateur=="net" && typeof(this.chemin.layers[nom]) == "object" ){
		//alert("cas3")
			return this.chemin.layers[nom];
		}else if( this.navigateur=="net6" && typeof(this.chemin.getElementById(nom)) == "object" ){
		//alert("cas4")
			return this.chemin.getElementById(nom);
		}else{
			debuger("classDmc_Layer","setObj/ "+nom+"+ n'est pas un calque")
		  return false;
		}
	}
	
	this.init = function(chemin){
		if(typeof(chemin)=="object"){
			this.chemin=chemin;
		}else{
			this.chemin=window.document;
			debuger("classDmc_Layer","init/ cheminMenu n'est pas un chemin")
		}
	}
}

/* +++++++++++++++++++++++++++++++++++++++ */
/* Test si le layer existe  */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_object(nom){
	/* Version 2.0 */
	/* Marc */
	
	var texte=this.type+nom+this.fintype;
	var resultat=((typeof(eval(texte))=="object") && (typeof(eval(texte)) !=null))? eval(texte):false;
	return resultat;
}

/* +++++++++++++++++++++++++++++++++++++++ */
/* Test si le layer dans un layer  existe  */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_sousobject(parent,fils){
	/* Version 2.0 */
	/* Marc */
	var resultat=false;
	var texte=this.type+fils+this.fintype;

	if(this.navigateur=="net" && typeof(this.is_object(parent))=="object"){
		if(typeof(this.is_object(parent).eval(texte))=="object")
			resultat=this.is_object(parent).eval(texte);
		else
			debuger("classDmc_Layer","Dmc_sousobject /"+texte+" pas un sous object type net");
	}else if(this.navigateur=="net6"){
		if(typeof(eval(texte))=="object")
			resultat=eval(texte);
		else
			debuger("classDmc_Layer","Dmc_sousobject /"+texte+" pas un sous object type net6");
	}else{
		texte=this.type+fils;
		if(typeof(eval(texte))=="object")
			resultat=eval(texte);
		else
			debuger("classDmc_Layer","Dmc_sousobject /"+texte+" pas un sous object type ie");	
	}
	return resultat;
}

/* +++++++++++++++++++++++++++++++++++++++ */
/* Recupère la couleur de fond */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_getfond(nom){
	/* Version 2.0 */
	/* Marc */
	var resultat=false;
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			 resultat=nom.bgColor;
		else
			resultat=nom.style.backgroundColor;
	}
	return resultat;
}

/* Associer au constructeur */
classDmc_Layer.prototype.getfond=Dmc_getfond;
/* appel  : my_layer.getfond()  */


/* +++++++++++++++++++++++++++++++++++++++ */
/* Change la couleur de fond */
/* @nom un objet layer */
/* @couleur #000000 */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_setfond(nom,couleur){
	/* Version 2.0 */
	/* Marc */
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			nom.bgColor=couleur;
		else
			nom.style.backgroundColor=couleur;
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.setfond=Dmc_setfond;
/* appel  : my_layer.setfond()  */



/* +++++++++++++++++++++++++++++++++++++++ */
/* Cache un layer */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_cacher(nom){
	/* Version 2.0 */
	/* Marc */
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			nom.visibility='hide';
		else
			nom.style.visibility='hidden';
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.f_cacher=Dmc_cacher; 
/* appel  : my_layer.f_cacher()  */

/* +++++++++++++++++++++++++++++++++++++++ */
/* Rend visible (inherit) un layer */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_inherit(nom){
	/* Version 2.0 */
	/* Marc */
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			nom.visibility='inherit';
		else
			nom.style.visibility='inherit';
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.f_inherit=Dmc_inherit; 
/* appel  : my_layer.f_visible()  */


/* +++++++++++++++++++++++++++++++++++++++ */
/* Rend visible un layer */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_visible(nom){
	/* Version 2.0 */
	/* Marc */
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			nom.visibility='show';
		else
			nom.style.visibility='visible';
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.f_visible=Dmc_visible; 
/* appel  : my_layer.f_visible()  */


/* +++++++++++++++++++++++++++++++++++++++ */
/* Change la position y*/
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_setposy(nom,pos){
	/* Version 2.0 */
	/* Marc */
	if((typeof(nom)=="object") && (!isNaN(pos))){
		var position=parseInt(pos);
		if(this.navigateur=="net")
			nom.pageY=position;
		else
			nom.style.top=position;
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.set_posy=Dmc_setposy;
/* appel  : my_layer.set_posy()  */


/* +++++++++++++++++++++++++++++++++++++++ */
/* Change la position x*/
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_setposx(nom,pos){
	/* Version 2.0 */
	/* Marc */
	if((typeof(nom)=="object") && (!isNaN(pos))){
		var position=parseInt(pos);
		if(this.navigateur=="net")
			nom.pageX= position;
		else
			nom.style.left= position;
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.set_posx=Dmc_setposx;
/* appel  : my_layer.set_posx()  */

/* +++++++++++++++++++++++++++++++++++++++ */
/* Récupère la longueur d'un layer */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_getwidth(nom){
	/* Version 2.0 */
	/* Marc */
	var resultat=false;
	if(typeof(nom)+""=="object"){
		if(this.navigateur=="net")
			resultat=parseInt(nom.clip.width);
		else
			resultat=parseInt(nom.style.width);
	}
	return resultat;
}
/* Associer au constructeur */
classDmc_Layer.prototype.get_width=Dmc_getwidth;
/* appel  : my_layer.get_width()  */

/* +++++++++++++++++++++++++++++++++++++++ */
/* Récupère la hauteur d'un layer */
/* @nom un objet layer */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_getheight(nom){
	/* Version 2.0 */
	/* Marc */
	var resultat=false;
	if(typeof(nom)=="object"){
		if(this.navigateur=="net")
			resultat=parseInt(nom.clip.height);
		else
			resultat=parseInt(nom.style.height);
	}
	return resultat;
}
/* Associer au constructeur */
classDmc_Layer.prototype.get_height=Dmc_getheight;
/* appel  : my_layer.get_height()  */


/* +++++++++++++++++++++++++++++++++++++++ */
/* Change la hauteur d'un layer */
/* @nom un objet layer */
/* @pos nouvelle position */
/* +++++++++++++++++++++++++++++++++++++++ */
function Dmc_setheight(nom,pos){
	/* Version 2.0 */
	/* Marc */
	if((typeof(nom)=="object") && (!isNaN(pos))){
		var hauteur=parseInt(pos);
		if(this.navigateur=="net")
			nom.clip.height=hauteur;
		else
			nom.style.height=hauteur;
	}
}
/* Associer au constructeur */
classDmc_Layer.prototype.set_height=Dmc_setheight;
/* appel  : my_layer.set_width()  */
function debuger(fonction,texte){

}
//-->
