


function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck(); 

function ConstructSimpleObj(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.changeTxt=changeTxt; 
	this.changeHTML=changeHTML;
    this.changeImg=changeImg; 
    this.show=show; 
    this.hide=hide; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 

function hide(){
	this.css.visibility = 'hidden';
}

function show(){
	this.css.visibility = 'visible';
}

function changeTxt(p_txt){
	this.el.innerText = p_txt
}

function changeHTML(p_txt){
	 this.el.innerHTML = p_txt
}

function changeImg(p_src){
	this.el.src = p_src
}


function InitialiseFloatBlock()
{ 
    idFloat=new Object();
    idFloat.float_id=new ConstructSimpleObj('float_id');
//    idFloat.float_text=new ConstructSimpleObj('float_text');
    idFloat.titre_long=new ConstructSimpleObj('titre_long', 'float_id');
    idFloat.desc=new ConstructSimpleObj('desc','float_id');
    idFloat.img=new ConstructSimpleObj('img_big');
    idFloat.taille=new ConstructSimpleObj('taille', 'float_id');
    idFloat.ref=new ConstructSimpleObj('ref', 'float_id');
	
} 


function showImg(p_img_num)
{
//	for (var i in this) writedebug(i + ' = ' + this[i]);
	
	if (p_img_num == null) return;
//	alert(p_img_num);
	if (p_img_num == "main") {
		idFloat.img.changeImg("mitaines/main_big.gif");
		idFloat.float_id.hide();
//		idFloat.float_text.show();
	}
	else {
		idFloat.img.changeImg(id_tab[p_img_num-1].src);
		idFloat.titre_long.changeHTML(id_tab[p_img_num-1].titre_long);
		idFloat.desc.changeHTML(id_tab[p_img_num-1].desc);
		idFloat.taille.changeHTML(id_tab[p_img_num-1].taille);
		idFloat.ref.changeHTML(id_tab[p_img_num-1].ref);
		idFloat.float_id.show();
//		idFloat.float_text.hide();
	}
}


function showBorder(p_img_id)
{
	if(!p_img_id) return;
//	obj = ((p_img_num >= 1) && (p_img_num <= nb_img) ) ? 'img_' + p_img_num : p_img_num;
	//alert(obj)
	
	nest= ''; // ???
    this.css=bw.dom?document.getElementById(p_img_id).style:bw.ie4?document.all[p_img_id].style:bw.ns4?eval(nest+'document.'+p_img_id):0; 
	this.css.border = '1px solid #ef5f6c';
}

function removeBorder(p_img_id)
{
	if (!p_img_id) return;
//	obj = ((p_img_num >= 1) && (p_img_num <= nb_img) ) ? 'img_' + p_img_num : p_img_num;
	nest= ''; // ???
    this.css=bw.dom?document.getElementById(p_img_id).style:bw.ie4?document.all[p_img_id].style:bw.ns4?eval(nest+'document.'+p_img_id):0; 
	this.css.border='1px solid #acd474';
}


/*********  Tableau des Mitaines   **********/

function Mitaine(p_src, p_titre_court, p_titre_long, p_desc, p_taille, p_ref) 
{   
	this.src	= p_src;  
	this.titre_court = p_titre_court;  
	this.titre_long	= p_titre_long;  
	this.desc	= p_desc;
	this.taille	= p_taille;
	this.ref	= p_ref;
}


function initMitainesIdTab()
{ 
	id_tab = new Array(); 

/** Page 1 **/	
	addNewId( new Mitaine("mitaines/a_mb1.gif", "Violet Bleu", "Violet Bleu", "Dentelle extensible synthétique", "S-M-L", "VioB.1"));
	addNewId( new Mitaine("mitaines/a_mb2.gif", "Bleu outremer",  "Bleu outremer", "Dentelle extensible synthétique", "S-M-L", "BleO.2"));
	addNewId( new Mitaine("mitaines/a_mb3.gif", "Blanc", "Blanc", "Dentelle extensible synthétique", "S/M/L", "Blan.3"));
	addNewId( new Mitaine("mitaines/a_mb4.gif", "Marron / Orange", "Marron / Orange", "Dentelle extensible synthétique", "S-M-L", "MaOr.4"));
	addNewId( new Mitaine("mitaines/a_mb5.gif", "Bleu ciel B", "Bleu ciel", "Dentelle extensible synthétique", "S-M-L", "BleC.5"));
	addNewId( new Mitaine("mitaines/a_mb6.gif", "Bleu jeans", "Bleu jeans", "Dentelle extensible synthétique", "S-M-L", "BleJ.6"));
	addNewId( new Mitaine("mitaines/a_mb7.gif", "Marron glacé / Rose saumon", "Marron glacé / Rose saumon", "Dentelle extensible synthétique", "S-M-L", "MGRS.7"));
	addNewId( new Mitaine("mitaines/a_mb8.gif", "Marron gris / Bleu turquoise", "Marron gris / Bleu turquoise", "Dentelle extensible synthétique", "S-M-L", "MGBT.8"));
	addNewId( new Mitaine("mitaines/a_mb9.gif", "Bordeaux / Vert / Orange", "Bordeaux / Vert / Orange", "Dentelle extensible synthétique", "S-M-L", "BVO.9"));
	addNewId( new Mitaine("mitaines/a_mb10.gif", "Ecru / Marron",  "Ecru / Marron", "Dentelle extensible synthétique", "S-M-L", "EcrM.10"));

/** Page 2 **/
	addNewId( new Mitaine("mitaines/a_mb11.gif", "Framboise",  "Framboise Ecrasée", "Dentelle extensible synthétique", "S-M-L", "FraE.11"));
	addNewId( new Mitaine("mitaines/a_mb12.gif", "Fuchsia",  "Fuchsia", "Dentelle extensible synthétique", "S-M-L", "Fuch.12"));
	addNewId( new Mitaine("mitaines/a_mb13.gif", "Jaune moutarde", "Jaune moutarde", "Dentelle extensible synthétique", "S-M-L", "JauM.13"));
	addNewId( new Mitaine("mitaines/a_mb14.gif", "Bordeau / Orange pailleté",  "Bordeau / Orange pailleté", "Dentelle extensible synthétique", "S-M-L", "BoOP.14"));
	addNewId( new Mitaine("mitaines/a_mb15.gif", "Rose vif / Orange",  "Rose vif / Orange", "Dentelle extensible synthétique", "S-M-L", "RoVO.15"));
	addNewId( new Mitaine("mitaines/a_mb16.gif", "Bleu turquoise / Vert anis",  "Bleu turquoise / Vert anis", "Dentelle extensible synthétique", "S-M-L", "BTVA.16"));
	addNewId( new Mitaine("mitaines/a_mb17.gif", "Noir 1",  "Noir 1", "Dentelle extensible synthétique", "S-M-L", "Noir.17"));
	addNewId( new Mitaine("mitaines/a_mb18.gif", "Noir / Blanc", "Noir / Blanc", "Dentelle extensible synthétique", "S-M-L", "NoiB.18"));
	addNewId( new Mitaine("mitaines/a_mb19.gif", "Gris Taupe / Bleu Marine",  "Gris Taupe / Bleu Marine", "Dentelle extensible synthétique", "S-M-L", "GTBM.19"));
	addNewId( new Mitaine("mitaines/a_mb20.gif", "Orange", "Orange", "Dentelle extensible synthétique", "S-M-L", "Oran.20"));

/** Page 3 **/
	addNewId( new Mitaine("mitaines/a_mb21.gif", "Rouge", "Rouge", "Dentelle extensible synthétique", "S-M-L", "Roug.21"));
	addNewId( new Mitaine("mitaines/a_mb22.gif", "Rose Saumon", "Rose Saumon", "Dentelle extensible synthétique", "S-M-L", "RoSo.22"));
	addNewId( new Mitaine("mitaines/a_mb23.gif", "Vieux rose",  "Vieux rose", "Dentelle extensible synthétique", "S-M-L", "ViRs.23"));
	addNewId( new Mitaine("mitaines/a_mb24.gif", "Violet",  "Violet", "Dentelle extensible synthétique", "S-M-L", "Vio.24"));
	addNewId( new Mitaine("mitaines/a_mb25.gif", "Marron Rosé",  "Marron Rosé", "Dentelle extensible synthétique", "S-M-L", "MaRo.25"));
	addNewId( new Mitaine("mitaines/a_mb26.gif", "Chocolat",  "Chocolat", "Dentelle extensible synthétique", "S-M-L", "Choco.26"));
	addNewId( new Mitaine("mitaines/a_mb27.gif", "Fuchsia / Bord pailleté",  "Fuchsia / Bord pailleté", "Dentelle extensible synthétique", "S-M-L", "FuBP.27"));
	addNewId( new Mitaine("mitaines/a_mb28.gif", "Vieux rose clair & foncé",  "Vieux rose clair & foncé", "Dentelle extensible synthétique", "S-M-L", "VRCF.28"));
	addNewId( new Mitaine("mitaines/a_mb29.gif", "Rouille rosé",  "Rouille rosé", "Dentelle extensible synthétique", "S-M-L", "RouR.29"));
	addNewId( new Mitaine("mitaines/a_mb30.gif", "Fuchsia",  "Fuchsia", "Dentelle extensible synthétique", "S-M-L", "Fush.30"));

/** Page 4 **/
	addNewId( new Mitaine("mitaines/a_mb31.gif", "Noir / Gris vert", "Noir / gris vert", "Dentelle extensible synthétique", "S-M-L", "NoGV.31"));
	addNewId( new Mitaine("mitaines/a_mb32.gif", "Gris Nacré / Bleu", "Gris Nacré / Bleu", "Dentelle extensible synthétique", "S-M-L", "GrNB.32"));
	addNewId( new Mitaine("mitaines/a_mb33.gif", "Gris vert",  "Gris vert", "Dentelle extensible synthétique", "S-M-L", "GriV.33"));
	addNewId( new Mitaine("mitaines/a_mb34.gif", "Anthracite pailleté",  "Anthracite pailleté", "Dentelle extensible synthétique", "S-M-L", "AntP.34"));
	addNewId( new Mitaine("mitaines/a_mb35.gif", "Rose vif / Rose clair",  "Rose vif / Rose clair", "Dentelle extensible synthétique", "S-M-L", "RVRC.35"));
	addNewId( new Mitaine("mitaines/a_mb36.gif", "Moutarde / Fuchsia",  "Moutarde / Fuchsia", "Dentelle extensible synthétique", "S-M-L", "MoFu.36"));
	addNewId( new Mitaine("mitaines/a_mb37.gif", "Chair / Noir",  "Chair / Noir", "Dentelle extensible synthétique", "S-M-L", "ChaN.37"));
	addNewId( new Mitaine("mitaines/a_mb38.gif", "Vert amande / Ecru",  "Vert amande / Ecru", "Dentelle extensible synthétique", "S-M-L", "VeAE.38"));
	addNewId( new Mitaine("mitaines/a_mb39.gif", "Noir 2",  "Noir 2", "Dentelle extensible synthétique", "S-M-L", "Noir.39"));
	addNewId( new Mitaine("mitaines/a_mb40.gif", "Bleu canard / Ecru pailleté",  "Bleu canard / Ecru pailleté", "Dentelle extensible synthétique", "S-M-L", "BCEP.40"));

/** Page 5 **/
	addNewId( new Mitaine("mitaines/a_mb41.gif", "Beige / Gris", "Beige / Gris", "Dentelle extensible synthétique", "S-M-L", "BeiG.41"));
	addNewId( new Mitaine("mitaines/a_mb42.gif", "Vermillon", "Vermillon", "Dentelle extensible synthétique", "S-M-L", "Verm.42"));
	addNewId( new Mitaine("mitaines/a_mb43.gif", "Bleu marine",  "Bleu marine", "Dentelle extensible synthétique", "S-M-L", "BleM.43"));
	addNewId( new Mitaine("mitaines/a_mb44.gif", "Orange pastel",  "Orange pastel", "Dentelle extensible synthétique", "S-M-L", "OrPa.44"));
	addNewId( new Mitaine("mitaines/a_mb45.gif", "Rose indien",  "Rose indien", "Dentelle extensible synthétique", "S-M-L", "RosI.45"));
	addNewId( new Mitaine("mitaines/a_mb46.gif", "Lie de vin / Bleu",  "Lie de vin / Bleu.", "Dentelle extensible synthétique", "S-M-L", "LiVB.46"));
	addNewId( new Mitaine("mitaines/a_mb47.gif", "Ecru / Gris",  "Ecru / Gris", "Dentelle extensible synthétique", "S-M-L", "EcrG.47"));
	addNewId( new Mitaine("mitaines/a_mb48.gif", "Rose / Rose indien",  "Rose / Rose indien", "Dentelle extensible synthétique", "S-M-L", "RRI.48"));
	addNewId( new Mitaine("mitaines/a_mb49.gif", "Rose pale / Bordeau",  "Rose pale / Bordeau", "Dentelle extensible synthétique", "S-M-L", "RPB.49"));

}


function addNewId(p_mitaine)
{
	id_tab[id_tab.length] = p_mitaine;
}



