var skin = new Class({
	initialize: function(path){
        this.path = path||'images';
        //alert("skin path = "+ this.path);
        //Bandeau haut
        this.topLeft = new Element('img').setProperties({
                            src: this.path+'/tl.png'
                        }).setStyles({
                            width: '13px',
                            height: '10px'
                        });
        this.top = new Element('img').setProperties({
                            src: this.path+'/t.png'
                        }).setStyles({
                            width: '100%',
                            height: '10px'
                        });
        this.topRight = new Element('img').setProperties({
                            src: this.path+'/tr.png'
                        }).setStyles({
                            width: '13px',
                            height: '10px'
                        });
        //Coin Barre de titre
        this.topLeft2 = new Element('img').setProperties({
                            src: this.path+'/tl2.png'
                        }).setStyles({
                            width: '13px',
                            height: '20px'
                        });
        this.topRight2 = new Element('img').setProperties({
                            src: this.path+'/tr2.png'
                        }).setStyles({
                            width: '13px',
                            height: '20px'
                        });
        //Fond de la barre de titre. Définition de propriétés CSS
        //avec un gif en background
        this.top2Class = {
                            width: '100%',
                            height: '20px',
                            background: 'url(\''+this.path+'/t2.gif\') repeat-x top'
                        };
        //Bordure contenue
        this.left = new Element('img').setProperties({
                            src: this.path+'/l.png'
                        }).setStyles({
                            width: '8px',
                            height: '100%'
                        });
        this.right = new Element('img').setProperties({
                            src: this.path+'/r.png'
                        }).setStyles({
                            width: '8px',
                            height: '100%'
                        });
        //Bandeau bas
        this.bottomLeft = new Element('img').setProperties({
                            src: this.path+'/bl.png'
                        }).setStyles({
                            width: '13px',
                            height: '20px'
                        });
        this.bottom = new Element('img').setProperties({
                            src: this.path+'/b.png'
                        }).setStyles({
                            width: '100%',
                            height: '20px'
                        });
        this.bottomRight = new Element('img').setProperties({
                            src: this.path+'/br.png'
                        }).setStyles({
                            width: '17px',
                            height: '20px'
                        });

        //Pour IE applique un patch pour la transparence des PNG
        if(window.ie){
            this.topLeft = fixPNG2(this.topLeft);
            this.top = fixPNG2(this.top);
            this.topRight = fixPNG2(this.topRight);
            this.topLeft2 = fixPNG2(this.topLeft2);
            this.topRight2 = fixPNG2(this.topRight2);
            this.left = fixPNG2(this.left);
            this.right = fixPNG2(this.right);
            this.bottomLeft = fixPNG2(this.bottomLeft);
            this.bottom = fixPNG2(this.bottom);
            this.bottomRight = fixPNG2(this.bottomRight);
        }
    }
});
