/*	sIFR v2.0.7 MODIFIE
	Copyright 2004 - 2008 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.

	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
  
  - Modification apportée pour la prise en charge d'un paramètre pour affichage du hand cursors sur les liens créés via javascript (donc non parsés par la version originale) - FH
  
  
*/
var hasFlash=function(){var B=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+B+"))) \n<\/script> \n");if(window.hasFlash!=null){return window.hasFlash}}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var A=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(A.substr(A.indexOf(".")-2,2),10)>=B}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var C=0,B=this.length,A=arguments.length;while(C<A){this[B++]=arguments[C++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(oScope,args){var sarg=[];var rtrn,call;if(!oScope){oScope=window}if(!args){args=[]}for(var i=0;i<args.length;i++){sarg[i]="args["+i+"]"}call="oScope.__applyTemp__("+sarg.join(",")+");";oScope.__applyTemp__=this;rtrn=eval(call);oScope.__applyTemp__=null;return rtrn}}var parseSelector=function(){var C=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function E(J,G){var F=J.split(/\s*\,\s*/);var I=[];for(var H=0;H<F.length;H++){I=I.concat(B(F[H],G))}return I}function B(M,I,P){M=M.replace(" ","`");var J=M.match(C);var H,N,F,O,L,K;var G=[];if(J==null){J=[M,M]}if(J[1]==""){J[1]="*"}if(P==null){P="`"}if(I==null){I=document}switch(J[2]){case"#":O=J[3].match(C);if(O==null){O=[null,J[3]]}H=document.getElementById(O[1]);if(H==null||(J[1]!="*"&&!A(H,J[1]))){return G}if(O.length==2){G.push(H);return G}return B(O[3],H,O[2]);case".":if(P!=">"){N=D(I,J[1])}else{N=I.childNodes}for(L=0,K=N.length;L<K;L++){H=N[L];if(H.nodeType!=1){continue}O=J[3].match(C);if(O!=null){if(H.className==null||H.className.match("(\\s|^)"+O[1]+"(\\s|$)")==null){continue}F=B(O[3],H,O[2]);G=G.concat(F)}else{if(H.className!=null&&H.className.match("(\\s|^)"+J[3]+"(\\s|$)")!=null){G.push(H)}}}return G;case">":if(P!=">"){N=D(I,J[1])}else{N=I.childNodes}for(L=0,K=N.length;L<K;L++){H=N[L];if(H.nodeType!=1){continue}if(!A(H,J[1])){continue}F=B(J[3],H,">");G=G.concat(F)}return G;case"`":N=D(I,J[1]);for(L=0,K=N.length;L<K;L++){H=N[L];F=B(J[3],H,"`");G=G.concat(F)}return G;default:if(P!=">"){N=D(I,J[1])}else{N=I.childNodes}for(L=0,K=N.length;L<K;L++){H=N[L];if(H.nodeType!=1){continue}if(!A(H,J[1])){continue}G.push(H)}return G}}function D(G,F){if(F=="*"&&G.all!=null){return G.all}return G.getElementsByTagName(F)}function A(G,F){if(F=="*"){return true}return G.nodeName.toLowerCase().replace("html:","")==F.toLowerCase()}return E}();function named(A){return new named.Arguments(A)}named.Arguments=function(A){this.oArgs=A};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(E,A){var D,C;var B=E.length;while(B--){C=E[B];if(C!=null&&C.constructor!=null&&C.constructor==named.Arguments){D=E[B].oArgs;break}}if(D==null){return }for(sName in D){if(A[sName]!=null){A[sName](D[sName])}}return };var sIFR=function(){var I="http://www.w3.org/1999/xhtml";var E=false;var F=false;var P=false;var K;var H=[];var L=function(){var W=navigator.userAgent.toLowerCase();var Y={bIsWebKit:W.indexOf("applewebkit")>-1,bIsSafari:W.indexOf("safari")>-1,bIsKonq:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,bIsOpera:W.indexOf("opera")>-1,bIsXML:document.contentType!=null&&document.contentType.indexOf("xml")>-1,bHasTransparencySupport:true,bUseDOM:true,nFlashVersion:null,nOperaVersion:null,nGeckoBuildDate:null,nWebKitVersion:null};Y.bIsKHTML=Y.bIsWebKit||Y.bIsKonq;Y.bIsGecko=!Y.bIsWebKit&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(Y.bIsGecko&&W.match(/.*gecko\/(\d{8}).*/)){Y.nGeckoBuildDate=new Number(W.match(/.*gecko\/(\d{8}).*/)[1])}if(Y.bIsOpera&&W.match(/.*opera(\s|\/)(\d+\.\d+)/)){Y.nOperaVersion=new Number(W.match(/.*opera(\s|\/)(\d+\.\d+)/)[2])}Y.bIsIE=W.indexOf("msie")>-1&&!Y.bIsOpera&&!Y.bIsKHTML&&!Y.bIsGecko;Y.bIsIEMac=Y.bIsIE&&W.match(/.*mac.*/)!=null;if(Y.bIsIE||(Y.bIsOpera&&Y.nOperaVersion<7.6)){Y.bUseDOM=false}if(Y.bIsWebKit&&W.match(/.*applewebkit\/(\d+).*/)){Y.nWebKitVersion=new Number(W.match(/.*applewebkit\/(\d+).*/)[1])}if(window.hasFlash&&(!Y.bIsIE||Y.bIsIEMac)){var V=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;Y.nFlashVersion=parseInt(V.substr(V.indexOf(".")-2,2),10)}if(W.match(/.*(windows|mac).*/)==null||Y.bIsIEMac||Y.bIsKonq||(Y.bIsOpera&&Y.nOperaVersion<7.6)||(Y.bIsSafari&&Y.nFlashVersion<7)||(!Y.bIsSafari&&Y.bIsWebKit&&Y.nWebKitVersion<312)||(Y.bIsGecko&&Y.nGeckoBuildDate<20020523)){Y.bHasTransparencySupport=false}if(!Y.bIsIEMac&&!Y.bIsGecko&&document.createElementNS){try{document.createElementNS(I,"i").innerHTML=""}catch(X){Y.bIsXML=true}}Y.bUseInnerHTMLHack=Y.bIsKonq||(Y.bIsWebKit&&Y.nWebKitVersion<312);return Y}();if(window.hasFlash==false||!document.createElement||!document.getElementById||(L.bIsXML&&(L.bUseInnerHTMLHack||L.bIsIE))){return{UA:L}}function N(X){if((!O.bAutoInit&&(window.event||X)!=null)||!D(X)){return }E=true;for(var W=0,V=H.length;W<V;W++){J.apply(null,H[W])}H=[]}var O=N;function D(V){if(F==false||O.bIsDisabled==true||((L.bIsXML&&L.bIsGecko||L.bIsKHTML)&&V==null&&E==false)||document.getElementsByTagName("body").length==0){return false}return true}function S(V){if(L.bIsIE){return V.replace(new RegExp("%\d{0}","g"),"%25")}return V.replace(new RegExp("%(?!\d)","g"),"%25")}function C(W,V){if(V=="*"){return true}return W.nodeName.toLowerCase().replace("html:","")==V.toLowerCase()}function T(Z,Y,X,W,a){var d="";var c=Z.firstChild;var f,V,b,e;if(W==null){W=0}if(a==null){a=""}while(c){if(c.nodeType==3){e=c.nodeValue.replace("<","&lt;");switch(X){case"lower":d+=e.toLowerCase();break;case"upper":d+=e.toUpperCase();break;default:d+=e}}else{if(c.nodeType==1){if(C(c,"a")&&!c.getAttribute("href")==false){if(c.getAttribute("target")){a+="&sifr_url_"+W+"_target="+c.getAttribute("target")}a+="&sifr_url_"+W+"="+S(c.getAttribute("href")).replace(/&/g,"%26");d+='<a href="asfunction:_root.launchURL,'+W+'">';W++}else{if(C(c,"br")){d+="<br/>"}}if(c.hasChildNodes()){b=T(c,null,X,W,a);d+=b.sContent;W=b.nLinkCount;a=b.sLinkVars}if(C(c,"a")){d+="</a>"}}}f=c;c=c.nextSibling;if(Y!=null){V=f.parentNode.removeChild(f);Y.appendChild(V)}}return{sContent:d,nLinkCount:W,sLinkVars:a}}function R(V){if(document.createElementNS&&L.bUseDOM){return document.createElementNS(I,V)}else{return document.createElement(V)}}function B(Y,W,X){var V=R("param");V.setAttribute("name",W);V.setAttribute("value",X);Y.appendChild(V)}function U(X,W){var V=X.className;if(V==null){V=W}else{V=V.normalize()+(V==""?"":" ")+W}X.className=V}function A(V){var W=document.documentElement;if(O.bHideBrowserText==false){W=document.getElementsByTagName("body")[0]}if((O.bHideBrowserText==false||V)&&W){if(W.className==null||W.className.match(/\bsIFR\-hasFlash\b/)==null){U(W,"sIFR-hasFlash")}}}function J(X,n,Z,d,p,m,w,l,t,v,c,g,b,q){if(!D()){return H.push(arguments)}A();named.extract(arguments,{sSelector:function(i){X=i},sFlashSrc:function(i){n=i},sColor:function(i){Z=i},sLinkColor:function(i){d=i},sHoverColor:function(i){p=i},sBgColor:function(i){m=i},nPaddingTop:function(i){w=i},nPaddingRight:function(i){l=i},nPaddingBottom:function(i){t=i},nPaddingLeft:function(i){v=i},sFlashVars:function(i){c=i},sCase:function(i){g=i},sWmode:function(i){b=i},sHandCursor:function(i){q=i}});var j=parseSelector(X);if(j.length==0){return false}if(c!=null){c="&"+c.normalize()}else{c=""}if(Z!=null){c+="&textcolor="+Z}if(p!=null){c+="&hovercolor="+p}if(p!=null||d!=null){c+="&linkcolor="+(d||Z)}if(w==null){w=0}if(l==null){l=0}if(t==null){t=0}if(v==null){v=0}if(m==null){m="#FFFFFF"}if(b=="transparent"){if(!L.bHasTransparencySupport){b="opaque"}else{m="transparent"}}if(b==null){b=""}if(q==null){q="false"}var k,V,h,f,e,r,u,W,a;var Y=null;for(var o=0,s=j.length;o<s;o++){k=j[o];if(k.className!=null&&k.className.match(/\bsIFR\-replaced\b/)!=null){continue}V=k.offsetWidth-v-l;h=k.offsetHeight-w-t;if(isNaN(V)||isNaN(h)){O.bIsDisabled=true;document.documentElement.className=document.documentElement.className.replace(/\bsIFR\-hasFlash\b/,"");return }u=R("span");u.className="sIFR-alternate";a=T(k,u,g);r="txt="+S(a.sContent).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g,"%22").normalize()+c+"&w="+V+"&h="+h+"&handcursor="+q+a.sLinkVars;U(k,"sIFR-replaced");if(Y==null||!L.bUseDOM){if(!L.bUseDOM){if(!L.bIsIE){k.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',n,'" quality="best" wmode="',b,'" bgcolor="',m,'" flashvars="',r,'" width="',V,'" height="',h,'" sifr="true"></embed>'].join("")}else{k.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',h,'" class="sIFR-flash">','<param name="movie" value="',n,'"></param>','<param name="flashvars" value="',r,'"></param>','<param name="quality" value="best"></param>','<param name="wmode" value="',b,'"></param>','<param name="bgcolor" value="',m,'"></param>',"</object>"].join("")}}else{if(L.bIsOpera){W=R("object");W.setAttribute("data",n);B(W,"quality","best");B(W,"wmode",b);B(W,"bgcolor",m)}else{W=R("embed");W.setAttribute("src",n);W.setAttribute("quality","best");W.setAttribute("flashvars",r);W.setAttribute("wmode",b);W.setAttribute("bgcolor",m);W.setAttribute("pluginspace","http://www.macromedia.com/go/getflashplayer");W.setAttribute("scale","noscale")}W.setAttribute("sifr","true");W.setAttribute("type","application/x-shockwave-flash");W.className="sIFR-flash";if(!L.bIsKHTML||!L.bIsXML){Y=W.cloneNode(true)}}}else{W=Y.cloneNode(true)}if(L.bUseDOM){if(L.bIsOpera){B(W,"flashvars",r)}else{W.setAttribute("flashvars",r)}W.setAttribute("width",V);W.setAttribute("height",h);W.style.width=V+"px";W.style.height=h+"px";k.appendChild(W)}k.appendChild(u);if(L.bUseInnerHTMLHack){k.innerHTML+=""}}if(L.bIsIE&&O.bFixFragIdBug){setTimeout(function(){document.title=K},0)}}function G(){K=document.title}function Q(){if(O.bIsDisabled==true){return }F=true;if(O.bHideBrowserText){A(true)}if(window.attachEvent){window.attachEvent("onload",N)}else{if(!L.bIsKonq&&(document.addEventListener||window.addEventListener)){if(document.addEventListener){document.addEventListener("load",N,false)}if(window.addEventListener){window.addEventListener("load",N,false)}}else{if(typeof window.onload=="function"){var V=window.onload;window.onload=function(){V();N()}}else{window.onload=N}}}if(!L.bIsIE||window.location.hash==""){O.bFixFragIdBug=false}else{G()}}function M(){A(true)}M.replaceNow=function(){Q();N()};O.UA=L;O.bAutoInit=true;O.bFixFragIdBug=true;O.replaceElement=J;O.updateDocumentTitle=G;O.appendToClassName=U;O.setup=Q;O.debug=M;O.bIsDisabled=false;O.bHideBrowserText=true;return O}();if(typeof sIFR=="function"&&!sIFR.UA.bIsIEMac&&(!sIFR.UA.bIsWebKit||sIFR.UA.nWebKitVersion>=100)){sIFR.setup()};

/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();



/* gestion effet accordeon */
function Init() {
  $(".expand").css({'display':'none'});
  $(".expand").prev().css({'background':'url(/css/img/h3-toggle.gif) 0 3px  no-repeat', 'cursor':'pointer', 'margin':'5px auto 8px auto', 'padding-left':'16px', 'border-width':'0' });
  $(".selected").css({'display':'block'});
  $(".selected").prev().css({'background-position':'0 -33px', 'border-width':'1px' });
}
	
function collapseAll() {
  $(".expand").slideUp();
  $(".expand").attr('class','expand');
  $(".expand").prev().css('background-position','0 3px');
  $(".expand").prev().css('border-width','0');
}
	
function collapseOne(object) {
  object.next().slideUp();
  object.next().attr('class','expand');
  object.css('background-position','0 3px');
  object.css('border-width','0');
}

function showOne(object) {
  collapseAll();
  object.next().slideDown();
  object.next().attr('class','expand');
  object.css('background-position','0 -33px');
  object.css('border-width','1px');
}


if(typeof(Shadowbox) == 'object'){
  /* setup shadowbox */
  Shadowbox.loadSkin('classic', '/css/img/shadowbox/skin');
  Shadowbox.loadSkin('fr', '/css/img/shadowbox/lang');
  Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], '/css/img/shadowbox/player');
}

/*
 * Fonctions pour splash screen
 */
 
function instantHideSplash(target) {
  $('html').css('overflow','scroll'); /*pour ie6*/ 
  $('#trame').hide(0);
  enableshowSplash(target);
}
function hideSplash(target) {
  removeFlash();
  target.animate({left: "-240"}, 500, 'linear', function(){
    target.addClass('closed');
    $('#trame').fadeOut(50);
    $('html').css('overflow','auto'); /*pour ie6*/  
    enableshowSplash(target);
  });
}
function showSplash(target) {
  insertFlash();
  $('a.toggle').unbind('mouseover');
  $('a.toggle').unbind('mouseout');
  target.animate({left: "50%"}, 500, 'linear', function(){
    target.removeClass('closed');
    enablehideSplash(target);
    $('#trame').fadeIn(50);
  });
}
function enablehideSplash(target) {
    $('a.toggle').unbind('click');
    $('a.toggle, #trame').click(function(){hideSplash(target);});
}
function enableshowSplash(target) {
    $('a.toggle, #trame').unbind('click');
    $('a.toggle').mouseover(function () {
      target.animate({left: "-220"}, 100);
    });
    $('a.toggle').mouseout(function () {
      target.animate({left: "-240"}, 100);
    });
    $('a.toggle').click(function(){showSplash(target);});
}

function insertFlash() {
  var flashvars = {};
  var params = {};
  params.scale = "noscale";
  params.wmode = "transparent";
  var attributes = {};
  attributes.id = "splash-inside";
  swfobject.embedSWF("/flash/ovpi_salon_habitat_01_2010.swf", "splash-inside", "455", "325", "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes);
}
    
function removeFlash() {
  $('#splash-inside').replaceWith('<div id="splash-inside"></div>');
}

/**
 * Actions
 */
$(document).ready(function(){

  $("body").addClass('js-enabled');
  

   /* gestion splash */
	if($('#splash').length > 0){
		if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
		  $("body","html").css({height: "100%", width: "98%"});
		  if (document.getElementById("HideSelect") === null) {//iframe to hide select elements in ie6
      $("html").css("overflow","hidden");
			$("body").append("<iframe id='HideSelect'></iframe><div id='trame'></div>");
		  }
		}else{//all others
		  if(document.getElementById("TB_overlay") === null){
			$("body").append("<div id='trame'></div>");
		  }
		}
    $('#splash').wrapInner('<div id="splash-inside"></div>');
    $('#splash').prepend('<p id="js-toggle-splash"><a href="#" class="toggle">Fermer</a></p>');
    
    if($('#splash').hasClass('closed')) {
      instantHideSplash($('#splash'));
    } else {
      insertFlash()    
      enablehideSplash($('#splash'));
    }
	}
	/*--------------------------*/
  
  
	/* ajoute un target _blank au lien avec une classe external */
	$("a[rel='external'],a[rel='document'], a[href^='http://'], a[href^='mailto'], a[href$='.pdf'], a[href$='.doc'], a[href$='.xls'], a[href$='.txt']").each(function(){
		$(this).attr({ title: ($(this).attr("title"))?$(this).attr("title"):$(this).attr("href")+" (nouvelle fenêtre)" });
    if($(this).parent().parent().attr('class')!='ensembles')
		$(this).click(function() {window.open($(this).attr('href'));return false;});
	});
	/*--------------------*/


	/* navigation accès directs */
	$('#direct-access .inside').css('display','none');
	$('#direct-access .inside').after('<p id="direct-access-link"><a title="accès directs" href="#direct-access" class="open">accès directs</a></p>');
	/* mouse events */
	$('.js-enabled #direct-access-link').click(function(){
		if($('.js-enabled #direct-access-link a').attr('class')=='open')
		{
			$('#direct-access .inside').fadeIn();
			$('.js-enabled #direct-access-link a').attr('class', 'close');
		} else {
			$('#direct-access .inside').fadeOut();
			$('.js-enabled #direct-access-link a').attr('class', 'open');
		}
	});
  /* -------------------------------------------------------*/
  
  /* sliding actions (accordeon) */
  Init();
	$(".expand").prev().toggle(
	   function(){
			showOne($(this));
		},
	   function(){
			collapseOne($(this));
		}
	);
  /* -------------------------------------------------------*/
  
  
    /* fancy zoom */
    if ($('.ensembles').length){
    	/* realisations */

      $('.ensembles li a').each(function(){
        $(this).attr('title', $(this).attr('href'));
        $(this).css('cursor', 'pointer');
      })
      $('.ensembles li a').removeAttr('href');
      
      $('.ensembles li a').click(
        function(){
          Shadowbox.open({
            player:     'iframe',
            content:    $(this).attr('title'),
            title:    $(this).find('img').attr('alt'),
            width:      830,
            height:     560
          });
        }
      );
    } else {
      $('p.picture-left a').nyroModal();
    	$('p.picture-centers a').nyroModal();
    	$('p.picture-right a').nyroModal();
      $('.galery a').nyroModal();
    	$('p.entry-thumbnail a').nyroModal();	
    	$('p.entry-picture a').nyroModal();	
    	$('p.entry-logo a').nyroModal();	
    	$('li a.visuel').nyroModal(); 
    }
    /*--------------------*/
     
    
    /* ciblage lien 2s3i en pied de page */
    $('#footer-nav a[href=http://www.2s3i.com]').parent().attr('class', 'ss3i');
    $('#footer-nav .ss3i span').css('display', 'none');
    /*--------------------*/
  
  
    /* animation flash header*/
    if ($('#home').length) {  
      var flashvars = {};
	  flashvars.params_file = "flash/imageVisioParams.xml";
      var params = {};
      params.scale = "noscale";
      params.wmode = "transparent";
      var attributes = {};
      attributes.id = "branding";
      swfobject.embedSWF("/flash/header-home-v2.swf", "branding", "710", "500", "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes);
    }
    /*--------------------------*/
    
    
});

window.onload = function(){
  if(typeof sIFR == "function"){
    sIFR.replaceElement(named({sSelector:"h2 span", sFlashSrc:"/fonts/adobe-garamond-pro.swf", sColor:"#000000", sWmode: "opaque", sBgColor:"#FFFFFF"}));
  }
  if(typeof(Shadowbox) == 'object'){
    Shadowbox.init();
  }  
}
