// JavaScript Document


//Partie Guide déco///////////////////
var showroom=0;
var gal= "<table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"615\" colspan=\"3\"><img src=\"img/spacer.gif\" height=\"20\"></td></tr><tr><td width=\"97\"><img src=\"img/spacer.gif\" width=\"97\"></td><td width=\"474\"><img src=\"img/guide_deco/cuisine_1.jpg\" width=\"474\" height=\"433\" name=\"gros_visu\"></td><td width=\"44\"><img src=\"img/spacer.gif\" width=\"44\"></td></tr><tr><td width=\"97\" colspan=\"2\" align=\"right\"><div id=\"icone\"></div></td><td width=\"44\"><img src=\"img/spacer.gif\" width=\"44\" height=\"5\"></td></tr></table>";

var cons= "<table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"5\"><img src=\"img/spacer.gif\" width=\"5\"></td><td width=\"610\" align=\"left\"><div id=\"title_conseil\"><font class=\"title\"><b>Le Titre</b></font><br><br>Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat.</div></td></tr></table></td></tr><tr><td width=\"615\"><img src=\"img/spacer.gif\" height=\"10\"></td></tr><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"64\"><img src=\"img/spacer.gif\" height=\"10\" width=\"64\"></td><td width=\"214\"><img src=\"img/guide_deco/title_regle_base.gif\" width=\"214\" height=\"33\"></td><td width=\"337\"><img src=\"img/spacer.gif\" height=\"10\" width=\"337\"></td></tr></table></td></tr><tr><td width=\"615\"><img src=\"img/spacer.gif\" height=\"12\"></td></tr><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"80\"><img src=\"img/spacer.gif\" height=\"10\" width=\"80\"></td><td width=\"429\" align=\"left\"><div id=\"txt1\">Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat.<br>Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat.<br></div></td><td width=\"106\" align=\"left\" valign=\"bottom\"><img src=\"img/guide_deco/virgule1.gif\" width=\"40\" height=\"49\"></td></tr></table></td></tr><tr><td width=\"615\"><img src=\"img/spacer.gif\" height=\"10\"></td></tr><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"5\"><img src=\"img/spacer.gif\" width=\"5\"></td><td width=\"298\"><table width=\"298\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"298\"><img src=\"img/guide_deco/title_tendance.gif\" width=\"298\" height=\"33\"></td></tr><tr><td width=\"298\"><img src=\"img/spacer.gif\" height=\"6\"></td></tr><tr><td width=\"298\" align=\"center\"><div id=\"txt2\">Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat. Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat.</div></td></tr></table></td><td width=\"42\"><img src=\"img/spacer.gif\" width=\"42\"></td><td width=\"261\"><img src=\"img/guide_deco/conseils_cuisine.jpg\" width=\"261\" height=\"253\" name=\"visu_conseils\"></td><td width=\"8\"><img src=\"img/spacer.gif\" width=\"8\"></td></tr></table></td></tr><tr><td width=\"615\"><img src=\"img/spacer.gif\" height=\"10\"></td></tr><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"135\"><img src=\"img/spacer.gif\" height=\"10\" width=\"135\" /></td><td width=\"195\"><img src=\"img/guide_deco/title_conseil_jour.gif\" width=\"195\" height=\"29\"></td><td width=\"285\"><img src=\"img/spacer.gif\" height=\"10\" width=\"285\"></td></tr></table></td></tr><tr><td width=\"615\"><img src=\"img/spacer.gif\" height=\"9\"></td></tr><tr><td width=\"615\"><table width=\"615\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"150\"><img src=\"img/spacer.gif\" height=\"10\" width=\"150\"></td><td width=\"441\" align=\"left\"><div id=\"txt3\">Lorem ipsum dolor sit amet, consectetuer adipiscing, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat Lorem ipsum dolor sit amet.</div></td><td width=\"24\"><img src=\"img/spacer.gif\" height=\"10\" width=\"24\"></td></tr></table></td></tr></table>";

var matrice= new Array('cuisine', 'cuisine', 'sdb', 'sdb', 'salon', 'salon', 'chambre', 'chambre', 'couloir', 'couloir', 'exterieur', 'exterieur', 'hotel');
var numero= new Array(14, 1, 20, 1, 7, 1, 1, 1, 8, 1, 10, 1, 18);
var txt1_conseil= new Array('', 'En kit, sur mesure ou artisanale, la cuisine est devenue l\'un des espaces à vivre les plus importants de notre cocon, qu\'il soit petit ou grand. Le mat&eacute;riel le plus high tech s\'escamotant aujourd\'hui derri&egrave;re des fa&ccedil;ades intelligentes qui &eacute;pousent le style qui nous pla&icirc;t, il &eacute;tait donc urgent que le carrelage suive la mouvance : c’est fait ! Version appart\' en ville ou campagne chic, d&eacute;couvrez notre galerie et n\'oubliez pas qu\'en vous servant de l\'outil 3D, vous pouvez cr&eacute;er vos propres compositions.', '', '', '', '', '', '', '', '', '', '', '');
var txt2_conseil= new Array('', 'Le damier a la cote, qu\'on se le dise, tout comme le noir et blanc, intemporels et toujours modernes ! Qu\'on soit fan des fifties, du style gustavien ou des pays nordiques, on l\'aime parce qu’il donne du rythme, un &eacute;quilibre g&eacute;om&eacute;trique et une personnalit&eacute; unique.', '', '', '', '', '', '', '', '', '', '', '');
var txt3_conseil= new Array('', 'Rien ne vous emp&ecirc;che de mettre la tendance &agrave; votre propre sauce : un damier en tons vari&eacute;s et chauds est id&eacute;al pour donner une impression « campagne » ; et faire la cuisine deviendra un vrai jeu d\'enfant avec les motifs de Robert Le H&eacute;ros. Suivez le guide...', '', '', '', '', '', '', '', '', '', '', '');
var titre_conseil= new Array('', '<font class=\"title\"><b>Un univers gourmand...</b></font><br><br>Minicuisine épurée pour célibataire pressé ou véritable pièce à vivre pour famille nombreuse, à chacun son style et le carrelage qui lui correspond. Le plein d’idées à piquer, conseils déco à l’appui...', '', '', '', '', '', '', '', '', '', '', '');

function rollover(id, color){
	document.getElementById(id).style.backgroundColor= color;
}

function rollout(id){
	document.getElementById(id).style.backgroundColor= "#08897e";
}

function rollout_template(id){
	document.getElementById(id).style.backgroundColor= "#3b3b3b";
}

function toyellow(id){
	document.getElementById(id).style.color= "#fadd16";
}

function init_showroom(){
	showroom=0;
}

function over_menu_showroom(num){
	if(num!=showroom){
		document.getElementById("tiret"+num).style.color= "#e95251";
		document.getElementById("puce"+num).style.visibility= "visible";
	}
}

function out_menu_showroom(num){
	if(num!=showroom){
		document.getElementById("tiret"+num).style.color= "#b0b0b0";
		document.getElementById("puce"+num).style.visibility= "hidden";
	}
}

function click_menu_showroom(num){
	document.getElementById("tiret"+num).style.color= "#e95251";
	document.getElementById("texte"+num).style.color= "#e95251";
	document.getElementById("puce"+num).style.visibility= "visible";
	showroom= num;
	
	for(i=1; i<14; i++){
		if(num!=i){
			document.getElementById("texte"+i).removeAttribute("style");
			document.getElementById("tiret"+i).style.color= "#b0b0b0";
			document.getElementById("puce"+i).style.visibility= "hidden";
		}
	}
	
	if((num % 2)==1){
		document.getElementById('contenu').innerHTML= gal;
		
		MM_swapImage('gros_visu','','img/guide_deco/'+matrice[num-1]+'_1.jpg',1);
		
		var content_icone= "";
		for(j=1; j<=numero[num-1]; j++){
			content_icone+= "<a href=\"javascript:click_icone_showroom('"+matrice[num-1]+"', "+j+");\" onmouseout=\"MM_swapImage('img"+j+"','','img/guide_deco/"+matrice[num-1]+"_icone_"+j+"_off.jpg',1)\" onmouseover=\"MM_swapImage('img"+j+"','','img/guide_deco/"+matrice[num-1]+"_icone_"+j+"_on.jpg',1)\"><img src=\"img/guide_deco/"+matrice[num-1]+"_icone_"+j+"_off.jpg\" name=\"img"+j+"\" width=\"38\" height=\"41\" border=\"0\" id=\"img"+j+"\"></a>";
		}
		document.getElementById('icone').innerHTML= content_icone;
	}
	else{
		document.getElementById('contenu').innerHTML= cons;
		document.getElementById('txt1').innerHTML= txt1_conseil[num-1];
		document.getElementById('txt2').innerHTML= txt2_conseil[num-1];
		document.getElementById('txt3').innerHTML= txt3_conseil[num-1];
		document.getElementById('title_conseil').innerHTML= titre_conseil[num-1];
		
		MM_swapImage('visu_conseils','','img/guide_deco/conseils_'+matrice[num-1]+'.jpg',1);
	}
}

function click_icone_showroom(nom, numero){
	MM_swapImage("gros_visu","","img/guide_deco/"+nom+"_"+numero+".jpg",1);
}

function open_popup(nom, w, h){
	window.open(nom+".html","_blank","toolbar=no, resizable=no, width="+w+", height="+h+"");
}


//Partie Zoom sur les tapis///////////////////

var type_zoom="";
var numero_zoom=0;
var contenu_prec="";
var contenu_suiv="";

var tab_zoom= new Array();
tab_zoom["actuels"]=3;
tab_zoom["terrazzo"]=17;
tab_zoom["angel1"]=1;
tab_zoom["angel2"]=1;
tab_zoom["angel3"]=1;
tab_zoom["camaieux"]=2;
tab_zoom["caro"]=1;
tab_zoom["celadon"]=1;
tab_zoom["clairsobscurs"]=7;
tab_zoom["inclusion1"]=1
tab_zoom["inclusion2"]=1
tab_zoom["inclusion3"]=1
tab_zoom["inclusion4"]=1
tab_zoom["nacres"]=4;
tab_zoom["neoclassique"]=3;
tab_zoom["noiretblanc"]=1;
tab_zoom["robert"]=1;
tab_zoom["robert2"]=1;
tab_zoom["robert3"]=1;
tab_zoom["terrescuites"]=2;
tab_zoom["traditionnel"]=7;

function appel_zoom(id){
	type_zoom=id;
	numero_zoom=1;
	
	if(numero_zoom==1){
		contenu_prec= "";
	}
	else{
		contenu_prec= "<a href=\"javascript:prev();\"><font color=\"#ffd962\">pr&eacute;c&eacute;dent</font></a>";
	}
	
	if(numero_zoom==tab_zoom[type_zoom]){
		contenu_suiv= "";
	}
	else{
		contenu_suiv= "<a href=\"javascript:next();\"><font color=\"#ffd962\">suivant</font></a>";
	}
	
	zoom();
}

function prev(){
	numero_zoom-=1;
	
	if(numero_zoom==1){
		contenu_prec= "";
	}
	else{
		contenu_prec= "<a href=\"javascript:prev();\"><font color=\"#ffd962\">pr&eacute;c&eacute;dent</font></a>";
	}
	
	if(numero_zoom==tab_zoom[type_zoom]){
		contenu_suiv= "";
	}
	else{
		contenu_suiv= "<a href=\"javascript:next();\"><font color=\"#ffd962\">suivant</font></a>";
	}
	
	zoom();
}

function next(){
	numero_zoom+=1;
	
	if(numero_zoom==1){
		contenu_prec= "";
	}
	else{
		contenu_prec= "<a href=\"javascript:prev();\"><font color=\"#ffd962\">pr&eacute;c&eacute;dent</font></a>";
	}
	
	if(numero_zoom==tab_zoom[type_zoom]){
		contenu_suiv= "";
	}
	else{
		contenu_suiv= "<a href=\"javascript:next();\"><font color=\"#ffd962\">suivant</font></a>";
	}
	
	zoom();
}

function zoom(){
	document.getElementById("bg_popup").style.visibility= "visible";
	if(document.all){
		document.getElementById("bg_popup").style.filter = "alpha(opacity=" + Math.floor(0.8 * 100) + ")";
	}
	else{
		document.getElementById("bg_popup").style.setProperty("-moz-opacity", .8, "");
	}
	document.getElementById("content_popup").style.visibility= "visible";
	
	document.getElementById("content_popup").innerHTML= "<center><table width=\"487\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"487\"><img src=\"img/tapis/"+type_zoom+"_"+numero_zoom+".jpg\"></td></tr><tr><td width=\"487\"><img src=\"img/spacer.gif\" height=\"7\"></td></tr><tr><td width=\"487\"><table width=\"487\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"243\" align=\"left\">"+contenu_prec+"</td><td width=\"244\" align=\"right\">"+contenu_suiv+"</td></tr></table></td></tr><tr><td width=\"487\"><img src=\"img/spacer.gif\" height=\"7\"></td></tr><tr><td width=\"487\" align=\"right\"><a href=\"javascript:fermer();\"><font color=\"#ffd962\">fermer</font></a></td></tr></table></center>";
}





// v v v   XiTi  v v v

<!--
var xtdr = 30;
var xw = window;
var xd = document;
xto_force = null;      				//to fix your own independant xtor
xtdm = (xw.xtdmc!=null && xw.xtdmc!='') ? ";domain=" + xw.xtdmc  : "" ;
xtnv = (xw.xtnv!=null) ? xw.xtnv : xd ;
xtsd = (xw.xtsd!=null) ? xw.xtsd : "http://www" ;
xtsite = (xw.xtsite!=null) ? xw.xtsite : 0;
xtn2 = (xw.xtn2!=null) ? "&s2="+xw.xtn2 : "";
xtp = (xw.xtpage!=null) ? xw.xtpage : "";
xtrd = (xtsite=="redirect") ? true : false;
xtdi = ((xw.xtdi!=null)&&(xw.xtdi!="")) ? "&di=" + xw.xtdi : "";
xtm = (xw.xtparam!=null) ? xw.xtparam : "";

xter = ((xw.xterr!=null)&&(xw.xterr!="")&&(xtm.indexOf("&err",0)<0)) ? "&err=" + xw.xterr : "";
xtmc = ((xw.xtmc!=null)&&(xw.xtmc!="")&&(xtm.indexOf("&mc",0)<0)) ? "&mc=" + xw.xtmc : "";
xtac = ((xw.xtac!=null)&&(xw.xtac!="")&&(xtm.indexOf("&ac",0)<0)) ? "&ac=" + xw.xtac : "";
xtan = ((xw.xtan!=null)&&(xw.xtan!="")&&(xtm.indexOf("&an",0)<0)) ? "&an=" + xw.xtan : "";
xtnp = ((xw.xtnp!=null)&&(xw.xtnp!="")&&(xtm.indexOf("&np",0)<0)) ? "&np=" + xw.xtnp : "";
xtprm = ((xw.xtprm!=null)&&(xtm.indexOf("&x",0)<0)) ? xw.xtprm : "";
xtm += xter+xtmc+xtac+xtan+xtnp+xtprm+xtdi;

try {xt_rfr = top.document.referrer;}
catch(e) {xt_rfr = xtnv.referrer; }
xts = screen;
var xtxp = new Date();
xtxp.setTime(xtxp.getTime()+(xtdr*1000));
var xtdate = new Date();
var xtheureh = xtdate.getTime() / (1000*3600);

function xtclURL(ch)
{
	return ch.replace(/%3C/g,'<').replace(/%3E/g,'>').replace(/[<>]/g,'');
}

function Getxtorcookie(nom)
{	var arg = nom + "=";
	var i = 0 ;
	while (i<xd.cookie.length)
	{var j = i + arg.length;if (xd.cookie.substring(i,j) == arg) {return valeurxtorcook(j);}
	i = xd.cookie.indexOf(" ",i) + 1;if (i==0) {break;}	}
	return null;}

function valeurxtorcook(index)
{var fin = xd.cookie.indexOf(";",index);
if (fin==-1) {fin=xd.cookie.length;};
return unescape(xtclURL(xd.cookie.substring(index,fin)));}
	
function recupxtor(param)
{
	var xturl = xtclURL(xtnv.location.search.toLowerCase().replace(/%3d/g,'='));
	xtpos = xturl.indexOf(param+"=");
	if (xtpos > 0)
	{chq = xturl.substring(1, xturl.length);mq = chq.substring(chq.indexOf(param+"="), chq.length);pos3 = mq.indexOf("&");
		if (pos3 == -1) pos3 = mq.indexOf("%26")
		if (pos3 == -1) pos3 = mq.length;
		return mq.substring(mq.indexOf("=")+1, pos3);}
	else {	return null; }
}

function wcookie(p1,p2,p3,p4,fmt)
{
	p2 = (fmt==0) ? p2 : escape(p2);
	xd.cookie = p1 + "=" + p2 + ";expires=" + p3.toGMTString() + " ;path=/" + p4;
}

function xt_med(type,section,page,x1,x2,x3,x4,x5)
{
	xt_img = new Image();
	xt_ajout = (type=="F") ? "" : (type=="M") ? "&a="+x1+"&m1="+x2+"&m2="+x3+"&m3="+x4+"&m4="+x5 : "&clic="+x1;
	Xt_im = xtsd+'.xiti.com/hit.xiti?s='+xtsite+'&s2='+section;
	Xt_im += '&p='+page+xt_ajout+'&hl=' + xtdate.getHours() + 'x' + xtdate.getMinutes() + 'x' + xtdate.getSeconds();
	if(parseFloat(navigator.appVersion)>=4)
	{Xt_im += '&r=' + xts.width + 'x' + xts.height + 'x' + xts.pixelDepth + 'x' + xts.colorDepth;}
	xt_img.src = Xt_im;
	if ((x2 != null)&&(x2!=undefined)&&(type=="C"))
	{ if ((x3=='')||(x3==null)) { document.location = x2} else {xfen = window.open(x2,'xfen',''); xfen.focus();}}
	else	{return;}
}

if((xtsite!=0)||(xtrd))
{
	xtourl_rf = recupxtor("xtref");		//referrer prioritaire si dans URL
	xtourl = recupxtor("xtor");
	xto = (xto_force!=null) ? xto_force : (xtourl!=null) ? xtourl : (!xtrd) ? Getxtorcookie("xtord") : null;
	xplus = (xto==null) ? "" : "&xto="+xto;
	Xt_r = (xtourl_rf!=null) ? xtourl_rf.replace(/[<>]/g, '') : Getxtorcookie("xtref");
	if(Xt_r==null)	{	Xt_r = xt_rfr.replace(/[<>]/g, '')	}
	if (!xtrd)
	{		
		var xtnav = navigator.appName+" "+navigator.appVersion;
		var xtIE = (xtnav.indexOf('MSIE'));
		if (xtIE>=0) {xtvers = parseInt(xtnav.substr(xtIE+5));xtIE=true;}
		else {xtvers = parseFloat(navigator.appVersion);xtIE=false;}
		var xtnet=(xtnav.indexOf('Netscape') >=0);
		var xtmac=(xtnav.indexOf('Mac') >=0);
		var xtOP=(navigator.userAgent.indexOf('Opera') >=0);
		if((xtIE)&&(xtvers >=5)&&(!xtmac)&&(!xtOP)&&(!xtrd))
	 	{
	    	xd.body.addBehavior("#default#clientCaps");
	    	xtconn = '&cn=' + xd.body.connectionType;
	    	xtconn += '&ul=' + xd.body.UserLanguage;
	    	xd.body.addBehavior("#default#homePage");
	    	xthome = (xd.body.isHomePage(location.href))? '&hm=1': '&hm=0';
		   xtresr = '&re='+xd.body.offsetWidth+'x'+xd.body.offsetHeight;
	 	}
		else
		{xtconn = ''; xthome='';if(xtvers >=5){xtresr = '&re='+xw.innerWidth+'x'+xw.innerHeight;}else{xtresr =''};}
		if((xtnet)&&(xtvers >=4)||(xtOP)){var xtlang = '&lng=' + navigator.language;}
		else {if((xtIE)&&(xtvers >=4)&&(!xtOP)){var xtlang = '&lng=' +navigator.userLanguage;} else {xtlang = '';}}
				
		Xt_param = 's='+xtsite+xtn2+'&p='+xtp+'&hl='+xtdate.getHours()+'x'+xtdate.getMinutes()+'x'+xtdate.getSeconds();
		Xt_param += xplus+xtm+xtconn+xthome+xtlang;
		Xt_i = '<img width="1" height="1" src="'+xtsd+'.xiti.com/hit.xiti?'+Xt_param;
		if(xtvers>=4)
		{Xt_i+='&r='+xts.width+'x'+xts.height+'x'+xts.pixelDepth+'x'+xts.colorDepth;}
		xd.write(Xt_i+xtresr+'&ref='+Xt_r.replace(/&/g, '$')+'" >');
	}
	else
	{
		if (xto!=null) {wcookie("xtord",xto,xtxp,xtdm,1);}
		if (Xt_r!="")	{wcookie("xtref",Xt_r.replace(/&/g, '$'),xtxp,xtdm,0);}
		if(xw.xtloc!=null)	{xtnv.location=xw.xtloc;}
	}
}
//-->

