$(function(){$("#menu>div.m1>div").each(function(){$(this).mouseover(function(){$("#menu>div.m1>div").css("display","block");this.style.display="none";$("#menu>div.m1>p").css("display","none");$("#menu>div.m1>p."+this.className).css("display","block")})});$("#menu>div.m2>div").each(function(){$(this).mouseover(function(){$("#menu>div.m2>div").css("display","block");this.style.display="none";$("#menu>div.m2>p").css("display","none");$("#menu>div.m2>p."+this.className).css("display","block")})});$("#menu>div.t1").click(function(){if(gen.menuN== 1)return false;gen.menuN=0;gen.menu(1,0)});$("#menu>div.t2").click(function(){if(gen.menuN==2)return false;gen.menuN=0;gen.menu(2,0)});var a=document.location.href,e=document.getElementsByTagName("base").item(0).href;a=a.replace(e,"");a==""&&diapo.ini();a=e=null;$("#newsLetter input[type=text]").each(function(){$(this).focus(function(){if(this.value==this.title)this.value=""});$(this).blur(function(){if(this.value=="")this.value=this.title})});$("#newsLetter>form").submit(function(){gen.newsLetter.prep(this, 1);return false});$("#newsLetter input[name=desinsc]").click(function(){gen.newsLetter.prep(this.form,2)});a=window.location.href;if(a.indexOf("catalogue")!=-1){$("#tizrbay>div").not("#tirbayFlt").each(function(d){$(this).mouseover(function(){gen.tizrbay.hover(this)}).click(function(){return false}).attr("id","tizrbayBsqImg"+d)});a=document.createElement("div");a.id="tizrbayShow";e=document.createElement("div");e.className="t";e.onclick=function(){document.getElementById("tizrbayShow").style.display= "none";clearTimeout(gen.tizrbay.animOut);gen.tizrbay.noShow=true};a.appendChild(e);a.onclick=function(){return false};dvi=document.createElement("div");dvi.className="im";dvi.id="tizrbayImg";a.appendChild(dvi);document.body.appendChild(a);$("#tirbayFlt").click(function(){gen.tizrbay.click();return false}).mouseout(function(){this.style.display="none"})}}); gen={menuN:1,menu:function(a,e){var d=document.getElementById("menuM1"),c=document.getElementById("menuM2"),f=e*578/10,g=578-f;if(a==1){d.style.height=f+"px";c.style.height=g+"px"}else{d.style.height=g+"px";c.style.height=f+"px"}e+=2;if(e>10){gen.menuN=a;if(a==1){$("#menu>div.t1>div>div>div").css({"background-image":"url(images/flch2.gif)","background-position":"14px 18px"});$("#menu>div.t2>div>div>div").css({"background-image":"url(images/flch.gif)","background-position":"15px 17px"})}else{$("#menu>div.t1>div>div>div").css({"background-image":"url(images/flch.gif)", "background-position":"15px 17px"});$("#menu>div.t2>div>div>div").css({"background-image":"url(images/flch2.gif)","background-position":"14px 18px"})}return false}setTimeout("gen.menu("+a+","+e+")",100)},newsLetter:{prep:function(a,e){if(gen.newsLetter.prep.arguments[2]!=true){if(a.nom.value==""||a.nom.value==a.nom.title){tabrat(a.enom.value,"","OK",function(){tabratClose();a.nom.focus()});return}else if(a.email.value==""||a.email.value==a.email.title){tabrat(a.eemail.value,"","OK",function(){tabratClose(); a.email.focus()});return}var d=/^[a-zA-Z\ ']+$/;if(d.exec(a.nom.value)==null){tabrat(a.fnom.value,"","OK",function(){tabratClose();a.email.focus();a.email.select()});return}d=/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9-]{2,}\.[a-zA-Z]{2,5}$/;if(d.exec(a.email.value)==null){tabrat(a.femail.value,"","OK",function(){tabratClose();a.email.focus();a.email.select()});return}if(e==2){tabrat(a.cfDesinscr.value,"exclamation",a.non.value,function(){tabratClose();a.reset()},a.oui.value,function(){tabratClose();gen.newsLetter.prep(a, e,true)});return}}$("#newsLetter>form>div").css("display","block");try{var c=new XMLHttpRequest}catch(f){c=new ActiveXObject("Microsoft.XMLHTTP")}c.onreadystatechange=function(){if(c.readyState==4){if(c.status==200)switch(c.responseText){case "s":tabrat(a.suc.value,"ok","OK",tabratClose);break;case "d":tabrat(a.deja.value,"ok","OK",tabratClose);break;case "emailError":tabrat(a.femail.value,"","OK",function(){tabratClose();a.email.focus();a.email.select()});break;case "emailInt":tabrat(a.intrvbl.value, "exclamation","OK",function(){tabratClose();a.reset()});break;case "EmEnv":tabrat(a.cnfenv.value,"exclamation","OK",function(){tabratClose();a.reset()});break;case "vcnfMsg":tabrat(a.vcnfMsg.value,"ok","OK",function(){tabratClose();a.reset()});break;default:tabrat(a.echec.value,"","OK",tabratClose)}else tabrat(a.echec.value,"","OK",tabratClose);$("#newsLetter>form>div").css("display","none")}};c.open("POST","actions/nwsletter.php",true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded"); c.send("sexe="+escape(a.sexe.value)+"&nom="+escape(a.nom.value)+"&email="+escape(a.email.value)+"&lg="+escape(a.lg.value)+"&t="+e)}},tizrbay:{hoverId:null,hover:function(a){gen.tizrbay.hoverId=a.id;var e=document.getElementById("tirbayFlt");e.innerHTML=a.innerHTML;e.style.width="261px";e.style.display="block";e.style.top=a.offsetTop-Math.round((e.offsetHeight-a.offsetHeight)/2)+"px";e.style.left=a.offsetLeft-29+"px";e.style.borderColor=a.style.borderColor},clickImgAt:[],tsawr:[],click:function(){var a= gen.tizrbay.hoverId,e=a.replace("tizrbayBsqImg","");if(gen.tizrbay.clickImgAt.indexOf(a)==-1){gen.tizrbay.clickImgAt.push(a);var d=document.createElement("p"),c=document.createElement("img");c.src="images/extra/loading1.gif";d.appendChild(c);c=document.createElement("span");c.innerHTML=document.infos.loadingImage.value.replace("\\n","<br>");c.style.display="block";d.appendChild(c);d.className="tizrbayLoading";d.id="tzrbyLdg01"+e;c=document.getElementById(a);d.style.top=c.offsetTop+Math.round((c.offsetHeight- 100)/2)+"px";d.style.left=c.offsetLeft+"px";document.getElementById("tizrbay").appendChild(d);gen.tizrbay.tsawr[e]=new Image;d=$("#"+a+">a>img").attr("src");d=d.replace("miniatures","fullimages");gen.tizrbay.tsawr[e].src=d;gen.tizrbay.tsawr[e].title=a;gen.tizrbay.tsawr[e].onload=function(){var f=this.title.replace("tizrbayBsqImg","");document.getElementById("tzrbyLdg01"+f).style.display="none";document.getElementById(this.title).style.border="1px #0C0 solid";if(gen.tizrbay.noShow){gen.tizrbay.noShow= false;gen.tizrbay.show(this.title)}}}else typeof gen.tizrbay.tsawr[e]!="undefined"&&gen.tizrbay.tsawr[e].complete==true&&gen.tizrbay.show(a)},noShow:true,show:function(a){var e=a.replace("tizrbayBsqImg",""),d=document.getElementById("tizrbayShow"),c=document.getElementById("page").offsetHeight+50;d.style.height=c+"px";d.style.display="block";d=document.getElementById("tizrbayImg");c=$("#"+a).offset();d.style.top=c.top+"px";d.style.left=c.left+"px";c=$("#"+a+">div").html();a=$("#"+a+">p").html();d.innerHTML= '<img id="tizrbayImgRimg" src="'+gen.tizrbay.tsawr[e].src+'" width="223" /><div>'+c+"</div><p>"+a+"</p>";document.getElementById("tirbayFlt").style.display="none";a=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;var f=(c=document.all&&!window.opera)?a.clientWidth:document.documentElement.clientWidth||self.innerWidth,g=c?a.clientHeight:self.innerHeight,h=c?a.scrollTop:pageYOffset;f=Math.round(f/2)+(c?a.scrollLeft:pageXOffset);g=Math.round(g/2)+h;f-=Math.round(gen.tizrbay.tsawr[e].width/ 2)+d.offsetLeft;g-=Math.round(gen.tizrbay.tsawr[e].height/2)+d.offsetTop;gen.tizrbay.firstAnim(1,d.offsetLeft,d.offsetTop,f,g,d.offsetWidth,d.offsetHeight,gen.tizrbay.tsawr[e].width-d.offsetWidth,gen.tizrbay.tsawr[e].height-d.offsetHeight)},firstAnim:function(a,e,d,c,f,g,h,j,k){var i=a;a/=10;var l=document.getElementById("tizrbayImg"),m=e+Math.round(c*a),n=g+Math.round(j*a),o=h+Math.round(k*a);l.style.top=d+Math.round(f*a)+"px";l.style.left=m+"px";with(document.getElementById("tizrbayImgRimg")){width= n;height=o}i++;if(!(i>10))gen.tizrbay.animOut=setTimeout("gen.tizrbay.firstAnim("+i+","+e+","+d+","+c+","+f+","+g+","+h+","+j+","+k+")",50)},animOut:null}}; diapo={images:[],tsawr:[],vtsawr:[],ini:function(){for(var a=document.getElementById("diapoMinia"),e=document.getElementById("diapo"),d=0,c=0;c<a.childNodes.length;c++)if(a.childNodes.item(c).tagName=="IMG"||a.childNodes.item(c).tagName=="img"){a.childNodes.item(c).id="diapoMiniaImg"+d;a.childNodes.item(c).onclick=function(){diapo.khddamTswir(this.id.replace("diapoMiniaImg",""))};var f=a.childNodes.item(c).src.replace(".gif",".jpg");diapo.images.push(f);b=document.createElement("div");b.id="diapoLoadDv"+ d;f=document.createElement("img");f.src="images/extra/loading1.gif";b.appendChild(f);b.className="diapoLoad";f=document.getElementById("diapoMiniaImg"+d);b.style.top=f.offsetTop+f.parentNode.offsetTop+"px";b.style.left=f.offsetLeft+"px";e.appendChild(b);d++}diapo.awidTsawr(0)},awidTsawr:function(a){diapo.tsawr[a]=new Image;diapo.tsawr[a].onload=function(){document.getElementById("diapoLoadDv"+a).style.display="none";diapo.vtsawr.push(diapo.images[a]);if(a==1){with(document.getElementById("diapoMinia"))style.top= offsetTop-6+"px";for(var e=1;e<diapo.images.length;e++)with(document.getElementById("diapoLoadDv"+e))style.top=offsetTop-3+"px";with(document.getElementById("diapoMiniaImg0")){width=79;height=39}diapo.bdo(0,1)}a++;a<diapo.images.length&&diapo.awidTsawr(a)};diapo.tsawr[a].src=diapo.images[a]},bdoP:0,bdoPprev:0,bdoDesactive:false,bdo:function(a,e){if(!diapo.bdoDesactive){diapo.bdoP=e;diapo.bdoPprev=a;var d=document.getElementById("diapoImg2");d.style.opacity=0;d.style.filter="alpha(opacity=0)";d.src= diapo.vtsawr[e];diapo.bdoAnim(10,a,e)}},khddamTswirOut:null,bdoAnim:function(a,e,d){var c=document.getElementById("diapoImg2");c.style.opacity=a/100;c.style.filter="alpha(opacity="+a+")";with(document.getElementById("diapoMiniaImg"+e)){c=79-a/10;var f=Math.round(c*0.4937);width=c;height=f}with(document.getElementById("diapoMiniaImg"+d)){c=69+a/10;f=Math.round(c*0.4937);width=c;height=f}if(a>=100){document.getElementById("diapoImg1").src=diapo.vtsawr[d];c=d+1;if(c>=diapo.vtsawr.length)c=0;diapo.bdoOut= setTimeout("diapo.bdo("+d+","+c+")",5E3);return false}a+=10;diapo.bdoAnimOut=setTimeout("diapo.bdoAnim("+a+","+e+","+d+")",50)},khddamTswirOut:null,khddamTswir:function(a){clearTimeout(diapo.bdoAnimOut);clearTimeout(diapo.khddamTswirOut);diapo.bdoDesactive=false;diapo.bdo(diapo.bdoP,a);diapo.bdoDesactive=true;diapo.khddamTswirOut=setTimeout("diapo.redim()",8E3)},redim:function(){diapo.bdoDesactive=false;var a=diapo.bdoP;a++;if(a>diapo.vtsawr.length)a=0;diapo.bdo(diapo.bdoP,a)}}; function tabrat(a){for(var e=tabrat.arguments[1]=="undefined"?"erreur":tabrat.arguments[1],d=document.createElement("div"),c=2;c<tabrat.arguments.length;c+=2){var f=document.createElement("button");f.innerHTML=tabrat.arguments[c];f.onclick=tabrat.arguments[c+1];d.appendChild(f)}with(document.getElementById("msg1b")){innerHTML="";appendChild(d)}switch(e){case "exclamation":document.getElementById("msg1img").src="images/exl.png";$("#msg>div.t").css("background-color","#ff0");break;case "ok":document.getElementById("msg1img").src= "images/blogs.png";$("#msg>div.t").css("background-color","#090");break;default:document.getElementById("msg1img").src="images/erreur.png";$("#msg>div.t").css("background-color","#f00")}a=a.replace(/\\n/g,"<br>");document.getElementById("msg1txt").innerHTML=a;a=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;d=(e=document.all&&!window.opera)?a.clientWidth:document.documentElement.clientWidth||self.innerWidth;c=e?a.clientHeight:self.innerHeight;f=document.getElementById("page").offsetHeight+ 150;$("#msg>div.t").css({height:f+"px",width:d+"px"});document.getElementById("msg").style.display="block";f=e?a.scrollTop:pageYOffset;d=Math.round(d/2)+(e?a.scrollLeft:pageXOffset);c=Math.round(c/2)+f;with(document.getElementById("msg1")){style.display="table";style.top=c-Math.round(offsetHeight/2)+"px";style.left=d-Math.round(offsetWidth/2)+"px"}}function tabratClose(){document.getElementById("msg1").style.display="none";document.getElementById("msg").style.display="none"};
