// Détection du modéle objet du navigateur
function navModele(){ 

    agent  = navigator.userAgent.toLowerCase();
    this.ns    = ((agent.indexOf('mozilla')   !=   -1) && 
                 ((agent.indexOf('spoofer')   ==   -1) && 
                 (agent.indexOf('compatible') ==   -1)));
	this.tom = (document.layers)? true:false;					//Ns4
	this.dom = (document.getElementById)? true:false;			//Ie6, ns6, opera
	this.xom = (document.all)? true:false;						//Ie4, Ie5
	this.yom=false;
	if (this.xom) {												//Ie5
		if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) this.yom = true;
		if (this.dom) this.dom = false;
	}
	this.nav=(this.ns || this.tom || this.dom || this.xom || this.yom || this.op);
    return this 
} 
nav=new navModele()
// Dimensions de la fenetre du navigateur
var winWidth;
var winHeight;

// Creation d'un calque
function createLayer(child){ 
    this.elt=nav.dom?document.getElementById(child):nav.xom?document.all[child]:nav.tom?eval('document.'+child):0; 
    this.cadre=nav.dom?document.getElementById(child).style:nav.xom?document.all[child].style:nav.tom?eval('document.'+child):0; 
	this.obj = child + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
