(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return!!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return!!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return+new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return!o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return-1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return!!T.firstChild},empty:function(T){return!T.firstChild},has:function(V,U,T){return!!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex"in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return!F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};;jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return!!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return!(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return!this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return-j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return-j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return-j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return-j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return-j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return-j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return-j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return-j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return-(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return-0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;;jQuery.fn.extend({everyTime:function(interval,label,fn,times,belay){return this.each(function(){jQuery.timer.add(this,interval,label,fn,times,belay);});},oneTime:function(interval,label,fn){return this.each(function(){jQuery.timer.add(this,interval,label,fn,1);});},stopTime:function(label,fn){return this.each(function(){jQuery.timer.remove(this,label,fn);});}});jQuery.event.special
jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{'ms':1,'cs':10,'ds':100,'s':1000,'das':10000,'hs':100000,'ks':1000000},timeParse:function(value){if(value==undefined||value==null)
return null;var result=this.regex.exec(jQuery.trim(value.toString()));if(result[2]){var num=parseFloat(result[1]);var mult=this.powers[result[2]]||1;return num*mult;}else{return value;}},add:function(element,interval,label,fn,times,belay){var counter=0;if(jQuery.isFunction(label)){if(!times)
times=fn;fn=label;label=interval;}
interval=jQuery.timer.timeParse(interval);if(typeof interval!='number'||isNaN(interval)||interval<=0)
return;if(times&&times.constructor!=Number){belay=!!times;times=0;}
times=times||0;belay=belay||false;var timers=jQuery.data(element,this.dataKey)||jQuery.data(element,this.dataKey,{});if(!timers[label])
timers[label]={};fn.timerID=fn.timerID||this.guid++;var handler=function(){if(belay&&this.inProgress)
return;this.inProgress=true;if((++counter>times&&times!==0)||fn.call(element,counter)===false)
jQuery.timer.remove(element,label,fn);this.inProgress=false;};handler.timerID=fn.timerID;if(!timers[label][fn.timerID])
timers[label][fn.timerID]=window.setInterval(handler,interval);this.global.push(element);},remove:function(element,label,fn){var timers=jQuery.data(element,this.dataKey),ret;if(timers){if(!label){for(label in timers)
this.remove(element,label,fn);}else if(timers[label]){if(fn){if(fn.timerID){window.clearInterval(timers[label][fn.timerID]);delete timers[label][fn.timerID];}}else{for(var fn in timers[label]){window.clearInterval(timers[label][fn]);delete timers[label][fn];}}
for(ret in timers[label])break;if(!ret){ret=null;delete timers[label];}}
for(ret in timers)break;if(!ret)
jQuery.removeData(element,this.dataKey);}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(index,item){jQuery.timer.remove(item);});});;jQuery.fn.f_slider=function(options){var options=jQuery.extend({itemsVisible:1,doAutoScroll:false,slideAmount:""},options);if(options.slideAmount!=""&&jQuery(jQuery(this).selector).length>0){return this.each(function(i){var sliderContainer=jQuery(this);var sliderInner=sliderContainer.find("ul[class*=-slider]");var listItems=sliderContainer.find("ul[class*=-slider]").children();var listItemsHTML;var sliderMoving=false;var itemsVisible=options.itemsVisible;var currentSliderCount=itemsVisible;var currentSliderPos=0;var initSliderPos=currentSliderPos;var slideAmount=options.slideAmount;var doAutoScroll=options.doAutoScroll;function moveSlider(direction){if(!sliderMoving){clearInterval(doAutoScroll);calculateNextPosition(direction);sliderMoving=true;sliderInner.animate({left:(currentSliderPos*-1)},1000,function(){checkForLoop();});updatePaginator2();}}
function calculateNextPosition(direction){if(direction=='right'){currentSliderCount=currentSliderCount+itemsVisible;currentSliderPos+=slideAmount;}else if(direction=='left'){currentSliderCount=currentSliderCount-itemsVisible;currentSliderPos-=slideAmount;}else{currentSliderCount=(direction+1)*itemsVisible;var width=(slideAmount/itemsVisible)*listItems.length;currentSliderPos=width-initSliderPos+(direction*slideAmount);}}
function autoScroll(){moveSlider('right');}
function addListItems(){if(listItems.length>0){for(var i=1;i<=itemsVisible;i++){var isEvenTest=listItems.length%itemsVisible;if((isEvenTest*1)>0){sliderInner.append('<li class="blank"></li>');listItems=sliderContainer.find("ul[class*=-slider]").children();}}
listItemsHTML=sliderContainer.find("ul[class*=-slider]").html();listItems=sliderContainer.find("ul[class*=-slider]").children();var paginatorBtns=listItems.length/itemsVisible;for(var i=1;i<=paginatorBtns;i++){if(i==1){sliderContainer.find("ul[class*=paginator]").append('<li class="current"><a href="#">'+i+'</a></li>');}else{sliderContainer.find("ul[class*=paginator]").append('<li><a href="#">'+i+'</a></li>');}}
if(jQuery.browser.msie){if(sliderContainer.parent("div.col").prev("div.col-first").children("h3").html()=="Sorties de la semaine"){}else{var pw=(paginatorBtns*13)+63;sliderContainer.find("ul[class*=paginator]").css("width",pw);}}
if(listItems.length>itemsVisible){sliderInner.append(listItemsHTML);sliderInner.append(listItemsHTML);resetSlider();if(doAutoScroll!=false){doAutoScroll=setInterval(autoScroll,5000);}}else{sliderContainer.find("ul[class*=paginator]").find("li.current a").hide();sliderContainer.find("ul[class*=paginator]").find("li.next a").hide();sliderContainer.find("ul[class*=paginator]").find("li.prev a").hide();}}else{sliderContainer.find("ul[class*=paginator]").find("li.next a").hide();sliderContainer.find("ul[class*=paginator]").find("li.prev a").hide();}}
function checkForLoop(){if((currentSliderCount>=(listItems.length+itemsVisible))||(currentSliderCount==0)){resetSlider();}
sliderMoving=false;if(doAutoScroll!=false){doAutoScroll=setInterval(autoScroll,5000);}}
function resetSlider(){var width=(slideAmount/itemsVisible)*listItems.length;if(currentSliderCount==0){currentSliderCount=listItems.length;currentSliderPos=width+width-slideAmount-initSliderPos;}else{currentSliderCount=itemsVisible;currentSliderPos=width-initSliderPos;}
var posAdjust="-"+currentSliderPos+"px";sliderInner.css({left:posAdjust});}
function updatePaginator(){sliderContainer.find("ul[class*=paginator]").find("li.current").removeClass("current");var paginatorCurrent=currentSliderCount/itemsVisible;paginatorCurrent=paginatorCurrent+1;sliderContainer.find("ul[class*=paginator]").find("li:eq("+paginatorCurrent+")").addClass("current");}
function updatePaginator2(){var cSc=currentSliderCount;if((currentSliderCount>=(listItems.length+itemsVisible))||(currentSliderCount==0)){if(cSc==0){cSc=listItems.length;}else{cSc=itemsVisible;}}
sliderContainer.find("ul[class*=paginator]").find("li.current").removeClass("current");var paginatorCurrent=cSc/itemsVisible;paginatorCurrent=paginatorCurrent+1;sliderContainer.find("ul[class*=paginator]").find("li:eq("+paginatorCurrent+")").addClass("current");}
addListItems();sliderContainer.find("ul[class*=paginator]").find("li.prev a").click(function(e){e.preventDefault();moveSlider('left');});sliderContainer.find("ul[class*=paginator]").find("li.next a").click(function(e){e.preventDefault();moveSlider('right');});sliderContainer.find("ul[class*=paginator]").find("li a").each(function(i,val){if(i>1&&!sliderContainer.sliderMoving){jQuery(val).click(function(e){e.preventDefault();if(!jQuery(this).parent().hasClass("current")&&!sliderMoving){moveSlider(i-2);sliderContainer.find("ul[class*=paginator]").find("li.current").removeClass("current");jQuery(val).parents("li").addClass("current");}});}});});}};jQuery.fn.f_controler=function(options){myFeature=function(name){this.init(name);}
jQuery.extend(myFeature.prototype,{widget_name:'',widget_scrollInterval:0,widget_delay:0,widget_faderTimer:0,widget_hoverTimer:0,widget_sliderContainer:'',widget_sliderInner:'',widget_listItems:'',widget_currentSliderPos:'',widget_initSliderPos:'',widget_slideAmount:'',widget_isFading:false,widget_scrollInterval:false,widget_setIntervalId:0,widget_setTimeOutId:0,widget_setTimeOutId2:0,widget_setTimeOutId3:0,myNameIs:function(){return this.widget_name;},saveScrollInterval:function(widget_scrollInterval){this.widget_scrollInterval=widget_scrollInterval;},getScrollInterval:function(){return this.widget_scrollInterval;},saveFaderTimer:function(widget_faderTimer){this.widget_faderTimer=widget_faderTimer;},getFaderTimer:function(){return this.widget_faderTimer;},saveDelay:function(widget_delay){this.widget_delay=widget_delay;},getDelay:function(){return this.widget_delay;},saveHoverTimer:function(widget_hoverTimer){this.widget_hoverTimer=widget_hoverTimer;},getHoverTimer:function(){return this.widget_hoverTimer;},saveSetIntervalId:function(widget_setIntervalId){this.widget_setIntervalId=widget_setIntervalId;},getSetIntervalId:function(){return this.widget_setIntervalId;},saveSetTimeOutId:function(widget_setTimeOutId){this.widget_setTimeOutId=widget_setTimeOutId;},getSetTimeOutId:function(){return this.widget_setTimeOutId;},saveSetTimeOutId2:function(widget_setTimeOutId2){this.widget_setTimeOutId2=widget_setTimeOutId2;},getSetTimeOutId2:function(){return this.widget_setTimeOutId2;},saveSetTimeOutId3:function(widget_setTimeOutId3){this.widget_setTimeOutId3=widget_setTimeOutId3;},getSetTimeOutId3:function(){return this.widget_setTimeOutId3;},moveSlider:function(widget_direction,widget_trigger){if(!this.widget_isFading){this.widget_listItems.eq(this.widget_currentSliderPos).fadeOut(800);this.widget_isFading=true;this.calculateNextPosition(widget_direction);this.widget_listItems.eq(this.widget_currentSliderPos).fadeIn(1000);this.widget_isFading=false;if(widget_trigger!="bullet"){this.updatePaginator();}}},calculateNextPosition:function(widget_direction){if(widget_direction=="right"){if(this.widget_currentSliderPos==this.widget_listItems.length-1){this.resetSlider();}else{this.widget_currentSliderPos++;}}else{this.widget_currentSliderPos=widget_direction;}},resetSlider:function(){this.widget_currentSliderPos=this.widget_initSliderPos;},updatePaginator:function(){this.paginatorCurrent=this.widget_sliderContainer.find("ul[class*=paginator]").find("li.current").prevAll().size();this.widget_sliderContainer.find("ul[class*=paginator]").find("li.current").removeClass("current");if(this.paginatorCurrent==this.widget_listItems.length+1){this.paginatorCurrent=1;}
this.paginatorCurrent=this.paginatorCurrent+1;this.widget_sliderContainer.find("ul[class*=paginator]").find("li:eq("+this.paginatorCurrent+")").addClass("current");},hideNonVisiblePosters:function(){if(this.widget_listItems.length>0){for(var i=this.widget_listItems.length;i>1;i--){this.widget_listItems.eq(i-1).hide();}}},addListItems:function(){if(this.widget_listItems.length>0){this.paginatorBtns=this.widget_listItems.length;for(var i=1;i<=this.paginatorBtns;i++){if(i==1){this.widget_sliderContainer.find("ul[class*=paginator]").append('<li class="current"><a href="#">'+i+'</a></li>');}else{this.widget_sliderContainer.find("ul[class*=paginator]").append('<li><a href="#">'+i+'</a></li>');}}
if(jQuery.browser.msie){var pw=(this.paginatorBtns*13)+63;this.widget_sliderContainer.find("ul[class*=paginator]").css("width",pw);}}else{this.widget_sliderContainer.find("ul[class*=paginator]").find("li.next a").hide();this.widget_sliderContainer.find("ul[class*=paginator]").find("li.prev a").hide();}},autoFade:function(){this.moveSlider("right","");},info:function(){},init:function(options){var options=jQuery.extend({widget_name:"",widget_scrollInterval:0,widget_delay:0},options);this.widget_name=options.widget_name;this.widget_scrollInterval=options.widget_scrollInterval;this.widget_delay=options.widget_delay;this.widget_sliderContainer=jQuery("#"+this.widget_name);this.widget_sliderInner=this.widget_sliderContainer.find("ul[class*=-slider]");this.widget_listItems=this.widget_sliderInner.children();this.widget_currentSliderPos=0;this.widget_initSliderPos=this.widget_currentSliderPos;this.hideNonVisiblePosters();this.addListItems();}});var rescope=function(scope,method){if(!method){method=scope;scope=null;}
if(typeof method=="string"){scope=scope||window;if(!scope[method]){throw(['method not found']);}
return function(){return scope[method].apply(scope,arguments||[]);};}
return!scope?method:function(){return method.apply(scope,arguments||[]);};}
jQuery.fn.f_moveSlider=function(_name,_direction,_delay,_scrollInterval,_iterator,_trigger){if(_name==g1.myNameIs()){if(_delay>=0){var _d=setTimeout(function(){if(_scrollInterval>0){var _t=setInterval(_g1_scrollInterval,_scrollInterval);g1.saveSetIntervalId(_t);}else{g1.moveSlider(_direction,_trigger);}},_delay);if(_iterator==1){g1.saveSetTimeOutId(_d);}else if(_iterator==2){g1.saveSetTimeOutId2(_d);}else if(_iterator==3){g1.saveSetTimeOutId3(_d);}}}else if(_name==g2.myNameIs()){if(_delay>=0){var _d=setTimeout(function(){if(_scrollInterval>0){var _t=setInterval(_g2_scrollInterval,_scrollInterval);g2.saveSetIntervalId(_t);}else{g2.moveSlider(_direction,_trigger);}},_delay);if(_iterator==1){g2.saveSetTimeOutId(_d);}else if(_iterator==2){g2.saveSetTimeOutId2(_d);}}}else if(_name==g3.myNameIs()){if(_delay>=0){var _d=setTimeout(function(){if(_scrollInterval>0){var _t=setInterval(_g3_scrollInterval,_scrollInterval);g3.saveSetIntervalId(_t);}else{g3.moveSlider(_direction,_trigger);}},_delay);if(_iterator==1){g3.saveSetTimeOutId(_d);}else if(_iterator==2){g3.saveSetTimeOutId2(_d);}}}else{return-1;}}
function _g1_scrollInterval(){g1.autoFade();}
function _g2_scrollInterval(){g2.autoFade();}
function _g3_scrollInterval(){g3.autoFade();}
function _g1_clearIntervals(){clearInterval(g1.getSetTimeOutId());clearInterval(g1.getSetTimeOutId2());clearInterval(g1.getSetIntervalId());}
function _g2_clearIntervals(){clearInterval(g2.getSetTimeOutId());clearInterval(g2.getSetTimeOutId2());clearInterval(g2.getSetIntervalId());}
function _g3_clearIntervals(){clearInterval(g3.getSetTimeOutId());clearInterval(g3.getSetTimeOutId2());clearInterval(g3.getSetIntervalId());}
jQuery.fn.f_stopAutoFader=function(_name){if(_name==g1.myNameIs()){_g1_clearIntervals();}else if(_name==g2.myNameIs()){_g2_clearIntervals();}else if(_name==g3.myNameIs()){_g3_clearIntervals();}else if(_name=="all"){_g1_clearIntervals();_g2_clearIntervals();_g3_clearIntervals();}else{return-1;}}
jQuery.fn.f_launchSynchroFaders=function(_name,_trigger){this.delay_1=g1.getDelay();this.delay_2=g2.getDelay();this.delay_3=g3.getDelay();if(_trigger=="mouseout"){jQuery().f_stopAutoFader("all");}else if(_trigger=="bullet"){this.delay_1+=1000;this.delay_2+=1000;this.delay_3+=1000;}
if(_name==g1.myNameIs()){jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_3,0,1,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_1,g1.getScrollInterval(),2,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_2,g2.getScrollInterval(),2,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_3,g3.getScrollInterval(),2,"");}else if(_name==g2.myNameIs()){jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_3,0,1,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_1,g2.getScrollInterval(),2,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_2,g3.getScrollInterval(),2,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_3,g1.getScrollInterval(),2,"");}else if(_name==g3.myNameIs()){jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_3,0,1,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_1,g3.getScrollInterval(),2,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_2,g1.getScrollInterval(),2,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_3,g2.getScrollInterval(),2,"");}
delete this.delay_1;delete this.delay_2;delete this.delay_3;}
jQuery.fn.f_ajustSynchroFaders=function(_name){this.delay_1=g1.getDelay();this.delay_2=g2.getDelay();this.widget_scrollInterval=g1.getScrollInterval()-2000;if(_name==g1.myNameIs()){jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_1,this.widget_scrollInterval,2,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_2,this.widget_scrollInterval,2,"");}else if(_name==g2.myNameIs()){jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g3.myNameIs(),"right",this.delay_1,this.widget_scrollInterval,2,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_2,this.widget_scrollInterval,2,"");}else if(_name==g3.myNameIs()){jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_1,0,1,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_2,0,1,"");jQuery().f_moveSlider(g1.myNameIs(),"right",this.delay_1,this.widget_scrollInterval,2,"");jQuery().f_moveSlider(g2.myNameIs(),"right",this.delay_2,this.widget_scrollInterval,2,"");}
delete this.delay_1;delete this.delay_2;delete this.widget_scrollInterval;}
var g1=new myFeature({widget_name:"genre-1",widget_scrollInterval:6000,widget_delay:2000});var g2=new myFeature({widget_name:"genre-2",widget_scrollInterval:6000,widget_delay:4000});var g3=new myFeature({widget_name:"genre-3",widget_scrollInterval:6000,widget_delay:6000});jQuery().f_launchSynchroFaders("genre-1");jQuery('div.genre').f_faderMouseEvents();};jQuery.fn.f_faderMouseEvents=function(){if((jQuery(this).selector).length>0){return this.each(function(i){var sliderId=jQuery(this).attr("id");var sliderContainer=jQuery(this);var sliderInner=sliderContainer.find("ul[class*=-slider]");var listItems=sliderContainer.find("ul[class*=-slider]").children();var rescope=function(scope,method){if(!method){method=scope;scope=null;}
if(typeof method=="string"){scope=scope||window;if(!scope[method]){throw(['method not found']);}
return function(){return scope[method].apply(scope,arguments||[]);};}
return!scope?method:function(){return method.apply(scope,arguments||[]);};}
sliderContainer.find("ul[class*=paginator]").find("li a").each(function(i,val){if(i>1){jQuery(val).click(function(e){e.preventDefault();if(!jQuery(this).parent().hasClass("current")){jQuery().f_stopAutoFader("all");jQuery().f_moveSlider(sliderId,i-2,0,0,3,"bullet");sliderContainer.find("ul[class*=paginator]").find("li.current").removeClass("current");jQuery(val).parents("li").addClass("current");if(sliderInner.hasClass("features-hover")){jQuery().f_ajustSynchroFaders(sliderId);}
else{jQuery().f_launchSynchroFaders(sliderId,"bullet");}}});}});sliderContainer.find("ul.paginator").hover(function(){sliderContainer.find("ul.features-slider").addClass("features-hover");jQuery().f_stopAutoFader("all");jQuery().f_ajustSynchroFaders(sliderId);},function(){sliderContainer.find("ul.features-slider").removeClass("features-hover");jQuery().f_launchSynchroFaders(sliderId,"mouseout");});sliderInner.hover(function(){sliderInner.addClass("features-hover");jQuery().f_stopAutoFader("all");jQuery().f_ajustSynchroFaders(sliderId);},function(){sliderInner.removeClass("features-hover");if(jQuery("div#lb-mask").css("display")=="none")jQuery().f_launchSynchroFaders(sliderId,"mouseout");});});}};function videoSlider(){jQuery("ul.videos-slider li._videos").hover(function(){jQuery(this).addClass("pointer");},function(){jQuery(this).removeClass("pointer");});jQuery("ul.videos-slider li h4 a.a_info, ul.videos-slider li h4 a.a_img, ul.videos-slider li h4 a.video").hover(function(){jQuery(this).parents("li").removeClass("pointer");},function(){jQuery(this).parents("li").addClass("pointer");});jQuery("ul.videos-slider li p a.a_info").hover(function(){jQuery(this).parents("li").addClass("hover");},function(){jQuery(this).parents("li").removeClass("hover");});jQuery("ul.videos-slider li._videos").click(function(e){if(jQuery(this).hasClass("pointer")){e.preventDefault();var href=jQuery(this).find("a").attr("href");if(href!="#"&&href!=""&&href!=undefined){window.location=href;}}});};/*

13twelve vs. JQuery

This javascript is the main javascript for the sites actions.

*/

// --------------------------------------------------------------------------------------------------------------
// set up variables

var isSafari = false;
var isSafari3 = false;
var isSafari4 = false;
var isIE = false;
var isIE6 = false;
var isIE7 = false;
var isIE8 = false;
var isMozilla = false;
var isOpera = false;
var isChrome = false;
var isMac = false;
var isiphone = false;
var isFirstCallLightboxes = true;
var ssoStatus = '';
var mpid = '';
var pgid = '';
var dfid = '';
var tpid = '';
var sesStatus = '';
var tableau = new Array();


// --------------------------------------------------------------------------------------------------------------
// what to do on DOM ready
jQuery(document).ready(function(){
	runOnDOMready();
});

// --------------------------------------------------------------------------------------------------------------
function runOnDOMready() {
	browserTest();
	setUpClasses();
	ieNavClasses();
	if (typeof sUrlSite != "string") {
		switch (tpid) {
			case "589": // home v3
			homepage();
			break;
			case "593": // home cinema v3
			case "596": // home crea+ v3
			case "597": // home divertissement v3
			case "607": // home série v3
			sectionHomepages();
			break;
			case "594":
			tvGrid();
			break;
			case "598": // films du moment
			case "600": // programmes du moment
			lesFilmsDuMois();
			case "599": // recherche programme
			programmes();
			break;
			case "603": // programme
			leGrandJournal();
			break;
			case "608": // video v3
			videoV3();
			break;
			case "609": // home sport v3
			homepageSport();
			break;
			case "614": // sport vidéo v3
			SportVideo();
			break;
			case "616": // mes enregistrements
			mesEnregistrements();
			break;
			case "630": // live canal
			live();
			break;
			default:
			indispensableFunctions();
			customDropDown();
			videoSlider();
			break;
		}
	}
}

// --------------------------------------------------------------------------------------------------------------
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ application wide functions */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (remember to test if the elements you are messing with exist) */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ( eg. if ((jQuery('body.homepage'))!=""){ } ) */

function browserTest() {

	/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ some simple browser testing */
	// are we on a Mac ?
	if (navigator.appVersion.indexOf("Mac")!=-1) {
		isMac = true;
		jQuery('body').addClass("isMac");
	}

	function searchVersion(browser) {
		var dataString = navigator.userAgent;
		var index = dataString.indexOf(browser);
		if (index == -1) return;
		var bVersion = parseFloat(dataString.substring(index+browser.length+1));
		return bVersion.toString().split(".")[0];
	}

	// Safari versioning
	isSafari =  jQuery.browser.safari;
	if (isSafari) {
		jQuery('body').addClass("isSafari");
		version = searchVersion("Version") || + "";
		jQuery('body').addClass("isSafari"+version);
		isSafari3 = (version == 3) ? true : false;
		isSafari4 = (version == 4) ? true : false;
	}

	// IE versioning
	isIE = jQuery.browser.msie;
	if (isIE) {
		jQuery('body').addClass("isIE");
		version = searchVersion("MSIE") || "";
		jQuery('body').addClass("isIE"+version);
		isIE6 = (version == 6) ? true : false;
		isIE7 = (version == 7) ? true : false;
		isIE8 = (version == 8) ? true : false;
	}

	// Mozilla versioning
	isMozilla = jQuery.browser.mozilla;
	if (isMozilla) {
		jQuery('body').addClass("isMozilla");
		version = searchVersion("Firefox") || "";
		jQuery('body').addClass("isMozilla"+version);
	}

	// Opera versioning
	isOpera = jQuery.browser.opera;
	if (isOpera) {
		jQuery('body').addClass("isOpera");
	}

	// Chrome
	if (navigator.userAgent.indexOf("Chrome") != -1) {
		isChrome = true;
		jQuery('body').addClass("isChrome");
	}

	// iPhone
	if (navigator.userAgent.indexOf("iPhone") != -1) {
		isiphone = true;
		jQuery('body').addClass("isIphone");
	}

}

function setUpClasses() {
	jQuery('li:nth-child(even)').addClass("even");
	jQuery('li:first-child').addClass("first");
	jQuery('li:last-child').addClass("last");
	jQuery("input[type=submit]").hover(function(){
		jQuery(this).addClass("submitHover");
	}, function() {
		jQuery(this).removeClass("submitHover");
	});
	jQuery('a[class*="ch-sm-"]').addClass("ch-sm");
}

// this function search and replaces a string and returns the new string
// http://www.daveshuck.com/blog/index.cfm/2006/12/13/Javascript-examples--removeElement-and-replaceAll
function replaceAll( str, searchTerm, replaceWith, ignoreCase )   {
	var regex = "/"+searchTerm+"/g";
	if( ignoreCase ) regex += "i";
	return str.replace( eval(regex), replaceWith );
}


function searchBox() {
	var timer1 = microtime(true);
	if (jQuery("div#nav input[type=text]").val() != "Rechercher") {
		jQuery("div#nav input[type=text]").addClass("searchFor");
	}
	jQuery("div#nav input[type=text]").focus(function(e){
		if (jQuery(e.target).val() == "Rechercher") {
			jQuery(e.target).val("").addClass("searchFor");
		}
	});
	jQuery("div#nav input[type=text]").blur(function(e){
		if (jQuery(e.target).val() == "") {
			jQuery(e.target).val("Rechercher").removeClass("searchFor");
		}
	});

	if (jQuery("div.section-subFeatures div.rechercherFilm form fieldset input[type=text]").val() != "Rechercher") {
		jQuery("div.section-subFeatures div.rechercherFilm form fieldset input[type=text]").addClass("searchFor");
	}
	jQuery("div.section-subFeatures div.rechercherFilm form fieldset input[type=text]").focus(function(e){
		if (jQuery(e.target).val() == "Rechercher") {
			jQuery(e.target).val("").addClass("searchFor");
		}
	});
	jQuery("div.section-subFeatures div.rechercherFilm form fieldset input[type=text]").blur(function(e){
		if (jQuery(e.target).val() == "") {
			jQuery(e.target).val("Rechercher").removeClass("searchFor");
		}
	});

	if (jQuery("div.planifier div.planifier-header div.rechercherUnProgramme form fieldset input[type=text]").val() != "Rechercher un programme") {
		jQuery("div.planifier div.planifier-header div.rechercherUnProgramme form fieldset input[type=text]").addClass("searchFor");
	}
	jQuery("div.planifier div.planifier-header div.rechercherUnProgramme form fieldset input[type=text]").focus(function(e){
		if (jQuery(e.target).val() == "Rechercher un programme") {
			jQuery(e.target).val("").addClass("searchFor");
		}
	});
	jQuery("div.planifier div.planifier-header div.rechercherUnProgramme form fieldset input[type=text]").blur(function(e){
		if (jQuery(e.target).val() == "") {
			jQuery(e.target).val("Rechercher un programme").removeClass("searchFor");
		}
	});
	var timer2 = microtime(true);
	totalTimer["searchBox"] = (timer2-timer1);
}

function filterClasses(klass) {
	if(isIE6) {
		klass = replaceAll(klass, ieNavClass[0], "");
		klass = replaceAll(klass, ieNavClass[1], "");
	}
	klass = replaceAll(klass, "first", "");
	klass = replaceAll(klass, "last", "");
	klass = replaceAll(klass, "even", "");
	klass = replaceAll(klass, "current", "");
	klass = replaceAll(klass, "dropdown", "");
	klass = replaceAll(klass, " ", "");
	return klass;
}

var ieNavClass = new Array();
function ieNavClasses() {
	// function to sort fix IE6's lack of multiple CSS class selector
	if (isIE6) {
		//
		jQuery("."+ieNavClass[0]).removeClass(ieNavClass[0]);
		jQuery("."+ieNavClass[1]).removeClass(ieNavClass[1]);
		//
		jQuery("#nav ul li.current").each(function(i,val) {
			var klass = jQuery(this).attr("class");
			klass = filterClasses(klass);
			klass = klass + "-current";
			jQuery(this).addClass(klass);
			ieNavClass[0] = klass;
		});
		jQuery("#nav ul li.dropdown").each(function(i,val) {
			var klass = jQuery(this).attr("class");
			klass = filterClasses(klass);
			klass = klass + "-dropdown";
			jQuery(this).addClass(klass);
			ieNavClass[1] = klass;
		});
	}
}

function dropdowns() {

	var timer1 = microtime(true);
	var etat="";
	jQuery("#nav div.dropdown h2").hide();
	var animating = false;
	var currentWas = "";
	var navlink6WasCurrent = "";
	var navlink7WasCurrent = "";
	//
	jQuery("#nav > ul li a._nav").each(function(i,val){
		jQuery(this).click(function(e) {
			if (!animating) {
				animating = true;
				var el = jQuery(this);
				var klass = el.parent("li").attr("class");
				klass = filterClasses(klass);
				if (klass != "") {
					dd_Klass = ".dropdown-" + klass;
					// check that the clicked option has a coressponding dropdown div
					// it does this off the name, not off the array index
					if (jQuery(dd_Klass).length > 0) {
						e.preventDefault();
						if (jQuery("#nav > ul li.dropdown").length > 0) {
							// one already open, so close it up, then open the next,
							// but wait, is this the same one being clicked?
							if (!el.parent("li").hasClass("dropdown")) {
								jQuery("#nav > ul li.dropdown").removeClass("dropdown");
								el.parent("li").addClass("dropdown");
								jQuery("#nav").addClass("heightFix");
								ieNavClasses();
								jQuery(".dropdown-open").fadeOut("normal", function(){
									jQuery(".dropdown-open").removeClass("dropdown-open");
									// open next
									jQuery(dd_Klass).fadeIn("normal", function(){
										jQuery(dd_Klass).addClass("dropdown-open");
										animating = false;
									});
								});
							} else {
								// its the same, so close the open one
								jQuery("#nav > ul li.dropdown").removeClass("dropdown");
								jQuery("#nav").removeClass("heightFix");
								ieNavClasses();
								jQuery(".dropdown-open").slideUp("normal", function(){
									jQuery(".dropdown-open").removeClass("dropdown-open");
									jQuery("#nav").removeClass("dd-open");
									if (currentWas != "" || navlink6WasCurrent != "" || navlink7WasCurrent != "") {
										if(currentWas != "") {
											jQuery("#nav > ul li."+currentWas).addClass("current");
										}
										if(navlink6WasCurrent != "") {
											jQuery('#navlink6').parent().addClass("current");
										}
										if(navlink7WasCurrent != "") {
											jQuery('#navlink7').parent().addClass("current");
										}
										ieNavClasses();
										currentWas = "";
										navlink6WasCurrent = "";
										navlink7WasCurrent = "";
									}
									animating = false;
								});

							}
						} else {
							// none already open, just open one up
							el.parent("li").addClass("dropdown");
							jQuery("#nav").addClass("dd-open");
							//
							if(el.parent().parent().find("li.current").length > 0 || jQuery('#navlink6').parent().hasClass('current') || jQuery('#navlink7').parent().hasClass('current')) {
								if (el.parent().parent().find("li.current").length > 0) {
									currentWas = filterClasses(el.parent().parent().find("li.current").attr("class"));
								}
								if(jQuery('#navlink6').parent().hasClass('current')) {
									navlink6WasCurrent = 'true';
								}
								if(jQuery('#navlink7').parent().hasClass('current')) {
									navlink7WasCurrent = 'true';
								}
								el.parent().parent().find("li.current").removeClass("current");
								ieNavClasses();
							}
							//
							jQuery(dd_Klass).slideDown("normal", function(){
								ieNavClasses();
								jQuery(dd_Klass).addClass("dropdown-open");
								animating = false;
							});
						}
					}
				}
			}
		});
	});
	jQuery("#nav").find(".a_close_nav").click(function(e) {
		e.preventDefault();
		jQuery("#nav > ul li.dropdown").removeClass("dropdown");
		jQuery("#nav").removeClass("heightFix");
		ieNavClasses();
		jQuery(".dropdown-open").slideUp("normal", function(){
			jQuery(".dropdown-open").removeClass("dropdown-open");
			jQuery("#nav").removeClass("dd-open");

			if (currentWas != "" || navlink6WasCurrent != "" || navlink7WasCurrent != "") {
				if(currentWas != "") {
					jQuery("#nav > ul li."+currentWas).addClass("current");
				}
				if(navlink6WasCurrent != "") {
					jQuery('#navlink6').parent().addClass("current");
				}
				if(navlink7WasCurrent != "") {
					jQuery('#navlink7').parent().addClass("current");
				}
				ieNavClasses();
				currentWas = "";
				navlink6WasCurrent = "";
				navlink7WasCurrent = "";
			}
		});
	});
	var timer2 = microtime(true);
	totalTimer["dropdow"] = (timer2-timer1);
}

function lightboxes() {
	var timer1 = microtime(true);
	var _eY = 0;
	var _tab = 0;

	function showMask() {
		if (isIE6) {
			var h = jQuery("body").height();
			jQuery("div#lb-mask").height(h);
		}
		jQuery("div#lb-mask").show();
	}

	function hideMask() {
		jQuery("div#lb-mask").hide();
	}

	function hideLBs() {
		jQuery("div.lb").hide();
	}

	function clearBreveSport() {
		if(jQuery("#breveSportDropDown").is(":visible")){
			customDropDown("brevesportDropDown");
		}
		jQuery("#brevesport-inner").html("");
	}

	function clearProgramDetail() {
		if(jQuery("#detailProgramDropDown").is(":visible")){
			customDropDown("detailProgramDropDown");
		}
		jQuery("#detailprogram-inner").html("");
		FlashPlayerStop();
	}

	// update show detail program after ajax complete
	function update(textStatus,href,tab) {
		if (textStatus == "success") {
			liBrevesInitUserCookie();
			if(jQuery("#detailProgramDropDown").is(":visible")){
				customDropDown("detailProgramDropDown");
			}
			tabs(tab);
			updatePopupEPG(tab);
			labelMessages();
		} else {
			window.location = href;
		}
	}

	function positionPopup(id) {
		var _parent = jQuery(id).parent('.lb');
		_parent.show();
		var h = jQuery(window).height();
		var h2 = parseFloat(_parent.height());
		var windowTopOffset = jQuery(window).scrollTop();
		if ((h-h2) < 80) {
			windowTopOffset = windowTopOffset + 40;
		} else {
			windowTopOffset = windowTopOffset + ((h-h2) / 2);
		}
		_parent.css('top', windowTopOffset + 'px');
	}

	function openPopup(id, bRec) {

		function _openPopup(id, bRec) {
			var params = "";
			if (bRec) {
				params = params + "rec=1";
			}
			if (typeof pid == "string") {
				if (params != "") {
					params = params + "&";
				}
				params = params + "pid=" + pid;
			}
			if (typeof cid == "string") {
				if (params != "") {
					params = params + "&";
				}
				params = params + "cid=" + cid;
			}
			
			if (isFirstCallLightboxes) {
				if (typeof init == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "init=" + init;
				}
				if (typeof lck == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "lck=" + lck;
				}
				if (typeof mc == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "mc=" + mc;
				}
				if (typeof mesinc == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "mesinc=" + mesinc;
				}
				if (typeof remember == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "remember=" + remember;
				}
				if (typeof exist == "string") {
					if (params != "") {
						params = params + "&";
					}
					params = params + "exist=" + exist;
				}
			}

			if (id == "compte-login") {
				var _id = "#lb-login";
			} else {
				var _id = "#lb-" + id;
			}

			if (id == "forget-password" || id == "login" || id == "compte-login") {
				if (authentif || authentif_light) {
					if (params != "") {
						params = params + "&";
					}
					params = params + "authentif_light=1";
				}
				if (typeof sUrlSite == "string") {
					var url = sUrlSite + "/partner/partner_popin.js.php?id=" + id + "&" + params;
					jQuery.getScript(url, function() {
						positionPopup(_id);
						if (id == "compte-login" && (!isSafari || isChrome)) {
							jQuery(_id + " input[name=SUBSCRIBER_EMAIL]").remove();
							jQuery(_id + " input[name=SUBSCRIBER_EMAIL_DISABLED]").removeAttr("disabled");
							jQuery(_id + " input[name=SUBSCRIBER_EMAIL_DISABLED]").attr("name", "SUBSCRIBER_EMAIL");
						}
						jQuery(_id + " input[name=from_url]").val(from_url);
						jQuery(_id + " input:enabled:first").focus();
						jQuery(_id + " input:enabled:first").select();
						jQuery("#a_compte-login-forget").click(function(e) {
							e.preventDefault();
							hideLBs();
							openPopup("compte-login");
						});
						jQuery("#a_forget-password").click(function(e) {
							e.preventDefault();
							hideLBs();
							openPopup("forget-password");
						});
						jQuery("#a_register-forget").click(function(e) {
							e.preventDefault();
							hideLBs();
							openPopup("register");
						});
						jQuery("#a_register-signup").click(function(e) {
							e.preventDefault();
							hideLBs();
							openPopup("register");
						});
						jQuery("#lb-close-login, #lb-close-forget-password").click(function(e) {
							e.preventDefault();
							hideMask();
							hideLBs();
						});
					});
				} else {
					if (id == "forget-password") {
						var _href = "/forget.ajax.php";
					} else {
						var _href = "/login.ajax.php";
					}
				}
			}
			if (id == "register" || id == "compte") {
				if (typeof sUrlSite == "string") {
					var _src = sUrlSiteSecure + "/index.php?pid=" + pid + "&cid=" + cid + "&tpl=10&par=CPLUS&url_retour=" + from_url;
					if (id == "register") {
						var _height = 975;
					}
					if (id == "compte") {
						var _height = 810;
					}
					jQuery(_id).css("height", _height + "px");
					jQuery(_id).html('<p class="close" style="top: 54px;"><a href="#" id="lb-close">Fermer</a></p><iframe width="660" height="' + _height + '" frameborder="0" scrolling="auto" src="' + _src + '">');
					jQuery("#lb-close").click(function(e) {
						jQuery("div#lb-mask").hide();
						jQuery("div.lb").hide();
					});
				} else {
					var _href = "/compte.ajax.php";
				}
			}

			if (typeof _href == "string" && typeof from_url == "string") {
				if (params != "") {
					_href += "?" + params;
				}
				jQuery(_id).load(_href,
				function(responseText, textStatus, XMLHttpRequest) {
					positionPopup(_id);
					jQuery(_id + " input[name=from_url]").val(from_url);
					jQuery(_id + " input:enabled:first").focus();
					jQuery(_id + " input:enabled:first").select();
					if (bRec && id == "compte") {
						jQuery(_id + " input[type=radio][name=SUBSCRIBER_FLAG_ABO]").each(function(){
							if ($(this).val() == "0") {
								$(this).removeAttr("checked");
							}
							if ($(this).val() == "1") {
								$(this).attr("checked", "checked");
							}
						});
						jQuery(_id + " input[name=SUBSCRIBER_NUMBER]").focus();
						jQuery(_id + " input[name=SUBSCRIBER_NUMBER]").select();
					}
					if (bRec && (id == "login" || id == "compte-login" || id == "compte")) {
						var _html = '';
						if (id == "login" || id == "compte-login") {
							_html += '<p class="program-rec">Pour enregistrer ce programme, nous vous invitons à vous identifier.</p>';
						}
						_html += '<input type="hidden" name="rec" value="1" /><input type="hidden" name="mpid" value="'+mpid+'" /><input type="hidden" name="pgid" value="'+pgid+'" /><input type="hidden" name="dfid" value="'+dfid+'" />';
						if (jQuery("div.semaine-slider").is(":visible")) {
							var date = jQuery("div.semaine-slider ul li.current").attr("id").replace("nav-", "");
							_html += '<input type="hidden" name="date" value="'+date+'" />';
						}
						jQuery(_id + " form").prepend(_html);
					}
					jQuery("#a_compte-login-forget").click(function(e) {
						e.preventDefault();
						hideLBs();
						openPopup("compte-login", bRec);
					});
					jQuery("#a_forget-password").click(function(e) {
						e.preventDefault();
						hideLBs();
						openPopup("forget-password", bRec);
					});
					jQuery("#a_register-forget").click(function(e) {
						e.preventDefault();
						hideLBs();
						openPopup("register", bRec);
					});
					jQuery("#a_register-signup").click(function(e) {
						e.preventDefault();
						hideLBs();
						openPopup("register", bRec);
					});
					jQuery("#lb-close, #lb-close-button, #lb-close-login, #lb-close-forget-password").click(function(e) {
						e.preventDefault();
						hideMask();
						hideLBs();
					});
				}
				);
			} else {
				positionPopup(_id);
			}
		}

		if (id == "compte" && typeof sUrlSiteSecure == "string") {
			if (typeof sUrlSite == "string") {
				var url = sUrlSiteSecure + "/lib/front_tools/ajax/check_sso.php";
				jQuery.getScript(url, function(){
					if (ssoStatus == "2") {
						id = "login";
					} else {
						if (ssoStatus == "1") {
							id = "compte-login";
						} else {
							id = "compte";
						}
					}
					_openPopup(id, bRec);
				});
			} else {
				var url = "/lib/front_tools/ajax/check_session.php";
				jQuery.getScript(url, function(){
					var url = sUrlSiteSecure + "/lib/front_tools/ajax/check_sso.php";
					jQuery.getScript(url, function(){
						if (ssoStatus == "2") {
							id = "login";
						} else {
							if (ssoStatus == "1") {
								id = "compte-login";
							} else {
								if (sesStatus == "1") {
									id = "compte";
								} else {
									id = "login";
								}
							}
						}
						_openPopup(id, bRec);
					});
				});
			}
		} else {
			_openPopup(id, bRec);
		}

	}

	jQuery("#lb-mask").click(function(e) {
		if(jQuery("#detailprogram-inner").is(":visible")){
			FlashPlayerStop();
			jQuery("#detailprogram-inner").html("");
		}
		e.preventDefault();
		if ( jQuery().f_launchSynchroFaders){
			jQuery().f_launchSynchroFaders("genre-1");
		}
		hideMask();
		hideLBs();
	});

	jQuery("#lb-close-alt").click(function(e) {
		e.preventDefault();
		clearProgramDetail();
		if ( jQuery().f_launchSynchroFaders){
			jQuery().f_launchSynchroFaders("genre-1");
		}
		hideMask();
		hideLBs();
	});

	jQuery("#lb-close-brevesport").click(function(e) {
		e.preventDefault();
		clearBreveSport();
		hideMask();
		hideLBs();
	});

	// show register
	jQuery("#a_register, #a_register-planNav, #a_register-avisCom, .register").click(function(e) {
		e.preventDefault();
		showMask();
		openPopup("register");
	});

	// show login
	jQuery("#a_login, #a_login-live, #a_login-planNav, .identify").click(function(e) {
		e.preventDefault();
		showMask();
		openPopup("login");
	});

	jQuery("#a_login-rec").click(function(e) {
		e.preventDefault();
		hideLBs();
		openPopup("login", true);
		
	});

	if (typeof(bIsAutentif) != "undefined") {
		if (bIsAutentif == 1) {
			var myAccountCompteLogin = "";
			var myAccountCompte = ", .myaccount";
		} else {
			var myAccountCompteLogin = ", .myaccount";
			var myAccountCompte = "";
		}
	} else {
		var myAccountCompteLogin = "";
		var myAccountCompte = "";
	}

	jQuery("#a_compte-login, #a_compte-login-live"+myAccountCompteLogin).click(function(e) {
		e.preventDefault();
		showMask();
		openPopup("compte-login");
	});

	jQuery("#a_compte-login-rec").click(function(e) {
		e.preventDefault();
		showMask();
		hideLBs();
		openPopup("compte-login", true);
	});

	// show compte
	jQuery("#a_compte-logged"+myAccountCompte).click(function(e) {
		e.preventDefault();
		showMask();
		hideLBs();
		openPopup("compte");
	});

	jQuery("#a_compte-rec, #a_compte-rec-2").click(function(e) {
		e.preventDefault();
		showMask();
		hideLBs();
		openPopup("compte", true);
	});

	// show forget-password
	jQuery(".forgotpwd").click(function(e) {
		e.preventDefault();
		showMask();
		hideLBs();
		openPopup("forget-password");
	});

	// show contribution
	jQuery("#a_contribution").click(function(e) {
		e.preventDefault();
		showMask();
		openPopup("contribution");
	});

	// ajax show breve sport
	jQuery(".pop-brevesport").click( function(e) {
		e.preventDefault();
		jQuery("#lb-brevesport .wrap").css('background-position','1000px top');
		jQuery("#lb-brevesport .wrap p").css('display','none');
		jQuery("#lb-brevesport").css('background-position','1000px top');
		showMask();
		jQuery("div#lb-mask").html("<div id='loader' style='height:350px;width:100%;text-align:center;margin-top:560px;'><img src='ajax-loader.gif' alt='loader' /></div>");

		if (jQuery().f_stopAutoFader) jQuery().f_stopAutoFader("all");
		_eY = e.pageY;
		if (jQuery(this).children("h4").length > 0) {
			_href = jQuery(this).children("h4").children("a").attr("href");
		} else if (jQuery(this).children("h5").length > 0) {
			_href = jQuery(this).children("h5").children("a").attr("href");
		} else if (jQuery(this).children("a").length > 0) {
			_href = jQuery(this).children("a").attr("href");
		}

		if (_href != "" || _href != "#") {
			jQuery("#brevesport-inner").load(_href,
			function(responseText, textStatus, XMLHttpRequest) {
				if (textStatus == "success") {
					customDropDown("brevesportDropDown");
					var _parent = jQuery("#lb-brevesport").parent(".lb");
					var h = jQuery(window).height();
					var h2 = parseFloat(_parent.height());
					var windowTopOffset = jQuery(window).scrollTop();
					if (h < h2) {
						windowTopOffset = windowTopOffset;
					} else {
						windowTopOffset = windowTopOffset + ((h-h2)/2);
					}
					_parent.css("top", windowTopOffset+"px");
					jQuery("#lb-brevesport .wrap").css('background-position','left top');
					jQuery("#lb-brevesport .wrap p").css('display','block');
					jQuery("#lb-brevesport").css('background-position','left top');
					jQuery("#loader").hide();
				} else {
					window.location = href;
				}
			}
			)
		}

		jQuery("#lb-brevesport").parent(".lb").show();
	});

	// ajax show detail program
	jQuery(".pop-detailprogram").click( function(e) {
		e.preventDefault();

		jQuery("#lb-detailprogram .wrap").css('background-position','1000px top');
		jQuery("#lb-detailprogram .wrap p").css('display','none');
		jQuery("#lb-detailprogram").css('background-position','1000px top');
		showMask();
		//jQuery("#lb-mask").css('opacity','0.5');
		//jQuery("#detailprogram-inner").html("<div style='height:350px;width:100%;text-align:center;'><img src='ajax-loader.gif' alt='loader' style='margin-top:160px;'/></div>");
		jQuery("div#lb-mask").html("<div id='loader' style='height:350px;width:100%;text-align:center;margin-top:360px;'><img src='ajax-loader.gif' alt='loader' /></div>");
		updatePopupEPG(_tab);

		if (jQuery().f_stopAutoFader) jQuery().f_stopAutoFader("all");
		if (!jQuery(e.target).is("span.lbl-voirLeDirect")) {
			_eY = e.pageY;
			if (jQuery(this).children("h4").length > 0) {
				_href = jQuery(this).children("h4").children("a").attr("href");
			} else if (jQuery(this).children("h5").length > 0) {
				_href = jQuery(this).children("h5").children("a").attr("href");
			} else if (jQuery(this).children("a").length > 0) {
				_href = jQuery(this).children("a").attr("href");
			}
			//
			if (jQuery(e.target).is("a.lbl-rec")) {
				_tab = 4;
			} else {
				if (jQuery(e.target).is("a.lbl-ba")) {
					_tab = 3;
				} else {
					if(jQuery(e.target).is("a.lbl-diff")) {
						_tab = 2;
					} else {
						_tab = 1;
					}
				}
			}

			if (_href != "" || _href != "#") {
				jQuery("#detailprogram-inner").load(_href,
				function(responseText, textStatus, XMLHttpRequest) {
					update(textStatus, _href, _tab);
					if (_tab == 4) {
						initTab4();
					}
					jQuery("#lb-detailprogram .wrap").css('background-position','left top');
					jQuery("#lb-detailprogram .wrap p").css('display','block');
					jQuery("#lb-detailprogram").css('background-position','left top');
					jQuery("#loader").hide();
				}
				)
			}

			jQuery("#lb-detailprogram").parent(".lb").show();
		}
	});

	// align visible popups
	if(jQuery("#lb-login").is(":visible")) {
		openPopup("login");
	}

	if(jQuery("#lb-register").is(":visible")) {
		openPopup("register");
	}

	if(jQuery("#lb-compte").is(":visible")) {
		openPopup("compte");
	}

	if(jQuery("#lb-forget-password").is(":visible")) {
		openPopup("forget-password");
	}

	if(jQuery("#lb-contribution").is(":visible")) {
		openPopup("contribution");
	}

	if(isFirstCallLightboxes && typeof jQuery("#lien_programme") == "object") {
		jQuery("#lien_programme").trigger("click");
	}

	var timer2 = microtime(true);
	totalTimer["lightboxes"] = (timer2-timer1);
}

function updatePopupEPG(tab) {
	var _parent = jQuery("#lb-detailprogram").parent(".lb-alt");
	var h = jQuery(window).height();
	var h2 = parseFloat(_parent.height());
	if(tab ==3) h2 =380;
	var windowTopOffset = jQuery(window).scrollTop();
	if (h < h2) {
		windowTopOffset = windowTopOffset;
	} else {
		windowTopOffset = windowTopOffset + ((h-h2)/2);
	}
	_parent.css("top", windowTopOffset+"px");
}


function liHover() {
	var timer1 = microtime(true);

	jQuery("ul.schedule li").hover(function(){
		jQuery(this).addClass("hover");
		jQuery(this).children("span").addClass("hover");
	}, function() {
		jQuery(this).removeClass("hover");
		jQuery(this).children("span").removeClass("hover");
	});

	var timer2 = microtime(true);
	totalTimer["liHover"] = (timer2-timer1);
}


function liClick() {
	var timer1 = microtime(true);

	if(jQuery("div.btn_ecoutez a.btn")){
		jQuery("div.btn_ecoutez a.btn").click(function(e) {
			e.preventDefault();
			var href = jQuery(this).attr("href");
			if (href != "#" && href != "" && href != undefined) {
				window.location = href;
				return false;
			}
		});
	}

	if(jQuery("span.lien_auteur a.auteur")){
		jQuery("span.lien_auteur a.auteur").click(function(e) {
			e.preventDefault();
			var href = jQuery(this).attr("href");
			if (href != "#" && href != "" && href != undefined) {
				window.location = href;
				return false;
			}
		});
	}

	if(jQuery("p.author a.auteur")){
		jQuery("p.author a.auteur").click(function(e) {
			e.preventDefault();
			var href = jQuery(this).attr("href");
			if (href != "#" && href != "" && href != undefined) {
				window.location = href;
				return false;
			}
		});
	}



	jQuery("ul.thumbs li, ul.covers li, ul.thumbs li, ul.videos li, ul.sitevideos li, div.feature, div.alert, div.signup, ul.icon-list li").click(function(e) {
		e.preventDefault();
		var href = jQuery(this).find("a").attr("href");
		if (href != "#" && href != "" && href != undefined) {
			// si target = _blank
			if (jQuery(this).find("a").attr("target") == "_blank") {
				window.open(href);
			} else {
				window.location = href;
			}
		}
	});

	//
	jQuery("ul.thumbs li, ul.covers li, ul.thumbs li, ul.videos li, ul.sitevideos li, ul.schedule li, ul.icon-list li").not("ul.videos-slider li, ul.thumbs-reagir li").hover(function(){
		jQuery(this).addClass("hover");
	}, function() {
		jQuery(this).removeClass("hover");
	});
	//
	jQuery("div.feature, div.feature-small").hover(function(){
		jQuery(this).addClass("feature-hover");
	}, function() {
		jQuery(this).removeClass("feature-hover");
	});
	//
	jQuery("div.alert").hover(function(){
		jQuery(this).addClass("alert-hover");
	}, function() {
		jQuery(this).removeClass("alert-hover");
	});
	//
	jQuery("div.signup").hover(function(){
		jQuery(this).addClass("signup-hover");
	}, function() {
		jQuery(this).removeClass("signup-hover");
	});
	// reagir specific
	jQuery("div.reagir a.btn").click(function(e) {
		e.preventDefault();
		var href = jQuery(this).attr("href");
		if (href != "#" && href != "" && href != undefined) {
			window.location = href;
		}
	});




	jQuery("div.reagir").click(function(e) {
		if (jQuery(this).hasClass("reagir-hover")) {
			e.preventDefault();
			var href = jQuery(this).find("a").attr("href");
			if (href != "#" && href != "" && href != undefined) {
				window.location = href;
			}
		}
	});
	jQuery("div.reagir:not(div.reagir a.btn)").hover(function(){
		jQuery(this).addClass("reagir-hover");
	}, function() {
		jQuery(this).removeClass("reagir-hover");
	});
	jQuery("div.reagir a.btn").hover(function(){
		jQuery(this).parents("div.reagir").removeClass("reagir-hover");
	}, function() {
		jQuery(this).parents("div.reagir").addClass("reagir-hover");
	});
	// cesoirsur specific
	jQuery("div.cesoirsur div.img").click(function(e) {
		e.preventDefault();
		var href = jQuery(this).prev("#cdsoursur-schedule").children("ul.schedule-sm").children("li:first").find("a").attr("href");
		if (href != "#" && href != "" && href != undefined) {
			window.location = href;
		}
	});
	jQuery("div.cesoirsur div.pop-detailprogram").hover(function(){
		jQuery(this).prev("#cdsoursur-schedule").children("ul.schedule-sm").children("li:first").addClass("hover");
	}, function() {
		jQuery(this).prev("#cdsoursur-schedule").children("ul.schedule-sm").children("li:first").removeClass("hover");
	});
	// crea+ specifc
	jQuery("ul.thumbs-reagir li div.img, ul.thumbs-reagir li a.video").hover(function(){
		jQuery(this).parents("li").children("h4").addClass("hover");
	}, function() {
		jQuery(this).parents("li").children("h4").removeClass("hover");
	});
	jQuery("ul.w-video-small li").hover(function(){
		jQuery(this).addClass("hover");
	}, function() {
		jQuery(this).removeClass("hover");
	});
	// w-video-small specific (ce soir listing, top bande annonces)
	jQuery("ul.w-video-small li").hover(function(){
		jQuery(this).addClass("hover");
		jQuery(this).children("a").addClass("hover");
	}, function() {
		jQuery(this).removeClass("hover");
		jQuery(this).children("a").removeClass("hover");
	});
	// tv grid specific
	if (jQuery("div.cemoiscisurcanalplus").length > 0) {
		jQuery("div.genre ul.features").hover(function(){
			jQuery(this).addClass("features-hover");
		}, function() {
			jQuery(this).removeClass("features-hover");
		});

		jQuery("div.ch div.img").hover(function(){
			jQuery(this).next().children("li.first").addClass("hover");
		}, function() {
			jQuery(this).next().children("li.first").removeClass("hover");
		});
	}
	var timer2 = microtime(true);
	totalTimer["liClick"] = (timer2-timer1);
}

function customDropDown(id) {
	var timer1 = microtime(true);
	if(typeof id == "string"){
		var cddDivs = "div#"+id;
	} else {
		var cddDivs = "div.customDropDown";
	}
	jQuery(cddDivs).each(function (i) {
		jQuery(this).find("h3").hover(function(){
			jQuery(this).addClass("hover");
		}, function() {
			jQuery(this).removeClass("hover");
		});
		//
		var ddShow = false;
		var ddInput = jQuery(this).children()[0];
		var ddDiv = jQuery(this).children()[1];
		//
		ddInput = jQuery(ddInput);
		ddDiv = jQuery(ddDiv);
		//
		ddDiv.hide();
		//
		var clickFunction = jQuery(this).attr("id");
		//
		ddInput.click(
		function () {;
		toggleDD();
		}
		);

		jQuery(document).click(
		function (e) {
			if(jQuery(e.target).parents().attr("id") != clickFunction) {
				ddDiv.hide();
				ddDiv.removeClass("dd-open");
				ddDiv.prev().removeClass("dd-open");
				if(isIE) {
					jQuery(".schedule-sm").css("zIndex","1");
				}
			}
		}
		);
		//
		//
		function toggleDD() {
			ddDiv.toggle();
			ddDiv.toggleClass("dd-open");
			ddDiv.prev().toggleClass("dd-open");
			if(isIE) {
				if(ddDiv.hasClass("dd-open")) {
					jQuery(".schedule-sm").css("zIndex","-1");
				} else {
					jQuery(".schedule-sm").css("zIndex","1");
				}
			}
		}
		//


		//on stocke la valeur de la permiere entrée.
		valeur = ddDiv.find("li:first a").text();

		if(jQuery(this).attr("id")!="filtrerDropDown"){
			ddDiv.find("li:first").hide();
		}

		//nmb-147356
		//on regarde la valeur du h3 qui correspond à la valeur de la liste déroulante sélectionnée
		//si elle est différente de la première valeur de la liste déroulante alors on affiche la premiere valeur sinon on ne fait rien

		if((ddDiv.find("li:first a").val()=="CANAL+") && jQuery("#cdsoursurDropDown h3").val()!=ddDiv.find("li:first a").val()){
			ddDiv.find("li:first").show();
		}

		if(jQuery("#detailProgramDropDown h3").is(":visible")){
			if(jQuery("#detailProgramDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}
		if(jQuery("#NavSportDropDown h3").is(":visible")){
			if(jQuery("#NavSportDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}
		if(jQuery("#JourneeSportDropDown h3").is(":visible")){
			if(jQuery("#JourneeSportDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}
		if(jQuery("#nbResultsForGlobalSearchDropDown h3").is(":visible")){
			if(jQuery("#nbResultsForGlobalSearchDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}

		if(jQuery("#nbResultatsParPageDropDown h3").is(":visible")){
			if(jQuery("#nbResultatsParPageDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}

		if(jQuery("#nbResultatsParPageDropDown2 h3").is(":visible")){
			if(jQuery("#nbResultatsParPageDropDown2 h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
		}

		if(jQuery("#brevesportDropDown h3").is(":visible")){
			if(jQuery("#brevesportDropDown h3").text() != valeur){
				ddDiv.find("li:first").show();
			}
			ddDiv.find("li.selected").hide();
		}


		//
		ddDiv.find("li a").click(
		function (e) {
			if(jQuery(this).parents("li").parents("ul").parents("div").parents("div").attr("id") != "NavSportDropDown"){
				e.preventDefault();
			}
			ddInput.html(jQuery(this).html());

			toggleDD();
			jQuery(this).parent().siblings().show();
			jQuery(this).parent().hide();
			if (clickFunction) {
				//on sauvegarde le click dans le cookie
				eval(clickFunction + "('" + (jQuery(this).attr("rel")) + "')");
				userPageLiState.updateValue(jQuery(this).parents("li").attr("id"),(jQuery(this).attr("rel")));
				userPageLiParentState.updateValue(jQuery(this).parents("li").attr("id"),jQuery(this).parents("li").parents("div").parents("div").attr("id"));
			}

		}
		);
	});
	var timer2 = microtime(true);
	totalTimer["custumDropDown"] = (timer2-timer1);
}

/*
function cdsoursurDropDown(rel) {
var cdsoursurScheduleContent = new Array();
cdsoursurScheduleContent[0] = '<ul class="schedule schedule-sm"><li><h3><a href="#">Dexter Season 3</a></h3><p>20h30</p></li><li><h3><a href="#">Les randonneurs de Saint-Tropez</a></h3><p>22h45</p></li></ul>';
cdsoursurScheduleContent[1] = '<ul class="schedule schedule-sm"><li><h3><a href="#">Adieu De Gaulle</a></h3><p>20h30</p></li><li><h3><a href="#">Les Guignols</a></h3><p>21h45</p></li></ul>';
cdsoursurScheduleContent[2] = '<ul class="schedule schedule-sm"><li><h3><a href="#">Heroes</a></h3><p>20h30</p></li><li><h3><a href="#">Mornin riding</a></h3><p>20h45</p></li></ul>';
cdsoursurScheduleContent[3] = '<ul class="schedule schedule-sm"><li><h3><a href="#">Tennis</a></h3><p>20h30</p></li><li><h3><a href="#">Basket</a></h3><p>22h45</p></li></ul>';
cdsoursurScheduleContent[4] = '<ul class="schedule schedule-sm"><li><h3><a href="#">Harry Potter</a></h3><p>20h30</p></li><li><h3><a href="#">La femma sans tete</a></h3><p>20h45</p></li></ul>';
jQuery("#cdsoursur-schedule").html(cdsoursurScheduleContent[rel]);
setUpClasses();
} */

function sectionOpenClose() {
	jQuery("#content div.section-closed").addClass("section-squish");
	jQuery("div.section p.openClose a._openClose").click(
	function (e) {
		e.preventDefault();
		var el = jQuery(this);
		// si la section est fermée
		if (el.parents("div.section").hasClass("section-closed")) {
			//gestion des cookies pour sauvegarder de l'etat de la section
			userPageSectionState.updateValue(el.parents("div.section").attr("class").split(" ")[1],'1');
			if (isIE || isSafari) {
				var _cols = el.parents("div.section").find("div.cols");
				// remeasuring the heights in IE, because its rubbish lols
				_cols.attr("style","");
				el.parents("div.section").find("div.col").attr("style","");
				_cols.each(function(i,val){
					var max = 0;
					jQuery(this).children("div.col").each(function(j){
						if (jQuery(this).height() > max) max = jQuery(this).height();
					});
					jQuery(this).parents("div.section").find("p.plusLink").css({ top: (max + 18)});
					jQuery(this).parents("div.section").attr("maxheight",max);
					jQuery(this).find("div.col").height(max);
				});
			}
			el.parents("div.section").removeClass("section-closed");
			if (isIE || isSafari) {
				el.parents("div.section").removeClass("section-squish");
				el.parents("div.section").css({ height: 0 });
				var h = (el.parents("div.section").attr("maxheight") * 1) + 55;
				el.parents("div.section").animate({
					height: h,
					marginBottom: "53px"
				}, 300, function(){

				});
			} else {
				el.parents("div.section").removeClass("section-squish", 300);
			}
			// si la section est ouverte
		} else {
			//gestion des cookies pour sauvegarder de l'etat de la section
			userPageSectionState.updateValue(el.parents("div.section").attr("class").split(" ")[1],'0');
			el.parents("div.section").addClass("section-closed");
			if (isIE || isSafari) {
				el.parents("div.section").animate({
					height: 0,
					marginBottom: "25px"
				}, 300, function(){
					el.parents("div.section").addClass("section-squish")
				})
			} else {
				el.parents("div.section").addClass("section-squish", 300);
			}
		}
	}
	);
}

function sectionColHeights() {
	var timer1 = microtime(true);
	jQuery("div.section div.cols div.col:first-child").addClass("col-first");
	var _cols = jQuery("div.section div.cols");
	_cols.each(function(i,val){
		// RC: Modif pour ne prendre en compte que les colonnes presentes
		if (!jQuery(this).parent().hasClass("noSectionColHeights")) {
			var max = 0;
			jQuery(this).children("div.col").each(function(j){
				if (jQuery(this).height() > max) max = jQuery(this).height();
			});

			if (max != 0) {
				if (isIE || jQuery.browser.msie || isSafari) {
					//jQuery(this).parents("div.section").find("p.plusLink").css({ bottom: 'auto', top: (max + 18)});
					jQuery(this).parents("div.section").attr("maxheight",max);
				}
				if ( jQuery(this).children("div.col2x").length > 0 ) {
					jQuery(this).children("div.col2x").children("ul").find("li").css({ marginRight: 20});
				}

				jQuery(this).find("div.col").height(max);

			}
		}
	});
	var timer2 = microtime(true);
	totalTimer["sectionColHeight"] = (timer2-timer1);
}

function sectionColHeightsAlt() {
	jQuery("div.section div.cols div.col:first-child").addClass("col-first");
	var _cols = jQuery("div.section div.cols");
	_cols.each(function(i,val){
		var heights = new Array();
		heights[0] = jQuery(this).find("div.col:nth-child(1)").height();
		heights[1] = jQuery(this).find("div.col:nth-child(2)").height();
		var max = 0;
		for (var i = 0; i <=1; i++) {
			if (heights[i] > max) {
				max = heights[i];
			}
		}
		if (isIE || jQuery.browser.msie || isSafari) {
			jQuery(this).parents("div.section").find("p.plusLink").css({ bottom: 'auto', top: (max + 18)});
			jQuery(this).parents("div.section").attr("maxheight",max);
		}
		jQuery(this).find("div.col").height(Math.max(71, max));
		jQuery("#lesFilmsDuMois div.cols div.col").css("borderBottom", "1px solid #e6e6e6");

	});
}


function tabs(t) {

	if (t) {
		var _a = jQuery("ul.tabs li a._tabs");
		_a.each(function(i){
			var _class = jQuery(this).parents("li").attr("class");
			_class = _class.replace("tab-", "");
			_class = _class.replace("current", "");
			_class = _class.replace(" ", "");
			if (_class == t) {
				jQuery(this).unbind("click");
			} else {
				jQuery(this).bind("click", function(){
					tabs(_class);
					if (_class == 4) {
						initTab4();
					}
				});
			}
		});
		jQuery("#detailprogram-inner ul.tabs li[class*=tab-]").removeClass("current");
		jQuery("#detailprogram-inner ul.tabs li.tab-"+t).addClass("current");
		jQuery("#detailprogram-inner div[class*=tab-content]").hide();
		if (t==2) {
			if (typeof jQuery("#detailprogram-inner div.tab-content-2")=='undefined'){
				jQuery("#detailprogram-inner div.tab-content-3").show();
			} else {
				FlashPlayerStop();
				jQuery("#detailprogram-inner div.tab-content-2").show();
				if (isIE || jQuery.browser.msie) {
					jQuery("#detailprogram-inner div.diffusion").css("float","none");
					jQuery("#detailprogram-inner div.diffusion").css("margin","0px 10px 0px 14px");
					jQuery("#detailprogram-inner div.diffusion").css("float","left");
				}
			}

		} else {
			jQuery("#detailprogram-inner div.tab-content-"+t).show();
			var c1_vide=false;
			jQuery("#detailprogram-inner div.tab-content-1 div.feature-alt p").each(function(){
				if(jQuery(this).html()==""){
					c1_vide=true;
				}
			});
			if(c1_vide){
				jQuery("#detailprogram-inner ul.tabs li.tab-1").hide();
				jQuery("#detailprogram-inner div.tab-content-1").hide();
				if (t==1){
					tabs(2);
				}
			}
			if(t==3){
				FlashPlayerPlay();
			}else{
				FlashPlayerStop();
			}
		}

	} else {
		var _a = jQuery("ul.tabs li a._tabs");
		_a.each(function(i){
			jQuery(this).click(function(e){
				e.preventDefault();
				var w = jQuery("ul.tabs li").length - i;
				jQuery("div[class*=tab-content]").hide();
				if (w==2) {
					if (typeof jQuery(this).parents("ul").nextAll("div.tab-content-2")=='undefined') {
						jQuery(this).parents("ul").nextAll("div.tab-content-3").show();
						FlashPlayerPlay();
					} else {
						jQuery(this).parents("ul").nextAll("div.tab-content-2").show();
						FlashPlayerStop();
					}
				} else if (w==3) {
					jQuery(this).parents("ul").nextAll("div.tab-content-3").show();
					FlashPlayerPlay();
				} else {
					jQuery(this).parents("ul").nextAll("div.tab-content-1").show();
					FlashPlayerStop();
				}

				_b = jQuery("ul.tabs li[class*=tab-]");
				_b.removeClass("current");
				// Sauvegarde de la selection en cookie
				if (typeof userPageTabState!='undefined') {
					_b.each(function (i) {
						userPageTabState.updateValue(jQuery(this).attr("class").split(" ")[0],'0');
					});
					userPageTabState.updateValue(jQuery(this).parents("li").attr("class").split(" ")[0],'1');
				}
				jQuery(this).parents("li").addClass("current");
				// for pop up epg
				if (jQuery("#lb-detailprogram").length > 0) {
					updatePopupEPG();
				}
				if (jQuery("div.diffusions").length > 0 ) {
					var _nb = jQuery("div.diffusion").size();
					if (_nb > 0) {
						jQuery('div.diffusion:nth-child(even)').addClass("even");
						var _last = jQuery('div.diffusion:last-child');
						_last.addClass("last");
						if (_last.hasClass("even")) {
							_last.prev("div.diffusion").addClass("last");
						}
						if (_nb <= 10) {
							jQuery("div.diffusions").css({height: "250px"});
						}
					}
				}
			});
		});
	}

}


function alertSmallIEfix() {
	jQuery("div.alert-small").each(function(){
		var klass = jQuery(this).attr("class");
		klass = replaceAll(klass, "alert-", "");
		klass = replaceAll(klass, " ", "-");
		jQuery(this).addClass(klass);
	});
}

function jourAccordion() {
	// set up time and date to open the accordions at the right time
	var d = new Date();
	var h = d.getHours();
	// times to split by
	var t = [0, 5, 10, 15, 20, 25];
	// which to open
	var o = 0;
	for (var i = 0; i < t.length; i++) {
		if (t[5-i] >= h + 1) {
			o = 5-i;
		}
	}
	// index's start from 0 not 1 lol
	o--;
	// need to fix the heights of the accordions
	var hgts = { t1: [], t2: [], t3: [], t4: [], t5: [] };
	jQuery("div.jour-accordion").each(function(div){
		// few helper class fixes
		jQuery(this).contents("h5:first").addClass("last");
		jQuery(this).contents("h5:last").addClass("last");
		//jQuery(this).contents("h5").eq(o).addClass("open");
		// find all the heights
		jQuery(this).find("ul").each(function(i) {
			hgts["t"+(i+1)][div] = jQuery(this).height();
		});
	});
	// then fix the heights...
	jQuery("div.jour-accordion").each(function(i){
		jQuery(this).find("ul").each(function(i) {
			// sort the array by length, bring the biggest value to the 1st position
			hgts["t"+(i+1)].sort(function(a,b){return b - a});
			// and fix the heights
			jQuery(this).height(hgts["t"+(i+1)][0]);
		});
		jQuery(this).find("h5").each(function(i){
			jQuery(this).find("a").click(function(e){
				e.preventDefault();
				jQuery("div.jour-accordion").each(function(){
					jQuery(this).contents("h5").eq(i).toggleClass("open");
					if (!isIE) {
						jQuery(this).contents("ul").eq(i).slideToggle();
					} else {
						jQuery(this).contents("ul").eq(i).toggle();
					}
				});
				var valeur;

				cle=jQuery(this).parents().attr("class").replace("open","");
				cle=cle.replace(" last","");
				cle=cle.replace("accordeon_","");

				if(jQuery(this).parents().hasClass("open")){
					valeur="1";
					updateTableau(cle,valeur);
				}else{
					valeur="0";
					//tableau[cle]=valeur;
					updateTableau(cle,valeur);
				}

			});
		});

	});
	// open the current time
	jQuery("div.jour-accordion ul").hide();
	//jQuery("div.jour-accordion").each(function(div){
	//	jQuery(this).contents("ul").eq(o).show();
	//});



}

function labelMessages() {
	var bgS = -180;
	jQuery("span.message").prev("a.lbl").addClass("lbl-message");
	jQuery("a.lbl-message").mousemove(function(e){
		var mX = e.pageX;
		var pX = jQuery(this).parent().offset().left;
		pX = Math.ceil(pX);
		var p = mX - pX;
		p = (p > 5) ? p : 5;
		p = bgS + p - 5;
		if (jQuery("#programmesTable").length > 0) {
			p = p + 71;
		}
		jQuery(this).next("span.message").css({ backgroundPosition: p });

	});
	jQuery("a.lbl-message").hover(function(){
		if (isIE && jQuery("div.customDropDown").length > 0) {
			jQuery("div.customDropDown").addClass("customDropDown-alt");
		}
		jQuery(this).next().show();
	}, function() {
		if (isIE && jQuery("div.customDropDown").length > 0) {
			jQuery("div.customDropDown").removeClass("customDropDown-alt");
		}
		jQuery(this).next().hide();
	});
}

function labelMessages2() {
	jQuery("a.lbl-message2").hover(function(){
		jQuery(".message2").css('display', 'block');
	}, function() {
		jQuery(".message2").hide();
	});
}

function labelMessages3() {
	jQuery("a.lbl-message3").hover(function(){
		jQuery(this).next().css('display', 'block');
	}, function() {
		jQuery(this).next().hide();
	});
}


function semaineSlider2() {

	var sliderContainer = jQuery("div.planifier div.planifier-header div.semaine-slider-container")
	var sliderInner =  jQuery("div.planifier div.planifier-header div.semaine-slider-container div.semaine-slider");
	var slideAmount = 95;
	var sliderMoving = false;
	var currentSet = 15;
	var budge = 55;
	var maxSet = 25;
	/* in case you want dynamic number of days */
	/* var maxSet = jQuery("div.planifier div.planifier-header div.semaine-slider-container div.semaine-slider ul li").size(); */

	var currentDayIndex_r = 0; /* relative index of the current day */
	var todayIndex = 0; /* stays the same */

	var currentOffsetLeft = 0;
	var _x1 = jQuery("#canalplus").offset().left + 55;
	var _x2 = _x1 + (4 * 95);

	// set up
	getCurrentIndexes();
	updateCurrentOffsetLeft(); // initialize
	todayIndex = currentDayIndex_r;
	//
	var currentSliderPos = budge + ((currentDayIndex_r) * slideAmount * -1); // because the current day is meant to be in 2nd position in the semaineSlider
	sliderInner.css({ left: currentSliderPos });

	// returns relative index of the current day
	function getCurrentIndexes() {
		var current = jQuery("div.semaine-slider ul li.current");
		currentDayIndex_r = current.prevAll().size();
	}

	function updateCurrentOffsetLeft() {
		currentOffsetLeft = sliderInner.find("ul").find("li").eq(currentDayIndex_r).offset().left;
	}

	// the slider functions
	function moveSlider(direction) {
		if (!sliderMoving) {
			calculateNextPosition(direction);
			sliderMoving = true;
			sliderInner.animate({
				left: currentSliderPos
			}, 800, function(){ sliderMoving = false; });
			updateSlider(direction);
			updatePaginator();
		}
	}
	// calculate the next position of the slider
	function calculateNextPosition(direction) {
		if(direction == 'right') {
			currentSliderPos -= slideAmount;
			currentSet++;
		} else if (direction == 'left') {
			currentSliderPos += slideAmount;
			currentSet--;
		}
	}

	// update paginator links
	function updatePaginator() {

		if(currentDayIndex_r == 0) {
			sliderContainer.find("ul[class*=paginator]").find("li.prev a").hide();
			sliderContainer.find("ul[class*=paginator]").find("li.next a").show();
		} else if (currentDayIndex_r == (maxSet-1)) {
			sliderContainer.find("ul[class*=paginator]").find("li.next a").hide();
			sliderContainer.find("ul[class*=paginator]").find("li.prev a").show();
		} else {
			sliderContainer.find("ul[class*=paginator]").find("li.next a").show();
			sliderContainer.find("ul[class*=paginator]").find("li.prev a").show();
		}
	}

	function updateSlider(direction) {
		if (direction == 'right') {
			sliderInner.find("ul").find("li.current").removeClass("current");
			sliderInner.find("ul").find("li").eq(currentDayIndex_r+1).addClass("current");
		} else if (direction == 'left'){
			sliderInner.find("ul").find("li.current").removeClass("current");
			sliderInner.find("ul").find("li").eq(currentDayIndex_r-1).addClass("current");
		}
		getCurrentIndexes(); // updates the index
		updateCurrentOffsetLeft(); // updates the left offset
		output();
	}

	// add some events to the slider buttons
	sliderContainer.find("ul[class*=paginator]").find("li.prev a").click(function(e){
		e.preventDefault();
		updateCurrentOffsetLeft();
		if (currentOffsetLeft <= _x1) {
			moveSlider('left');
		} else {
			updateSlider('left');
		}
	});
	sliderContainer.find("ul[class*=paginator]").find("li.next a").click(function(e){
		e.preventDefault();
		updateCurrentOffsetLeft();
		if (currentOffsetLeft >= _x2) {
			moveSlider('right');
		} else {
			updateSlider('right');
		}
	});

	sliderInner.find("ul").find("li").click(function(e){
		e.preventDefault();
		if (!jQuery(this).hasClass("current")) {
			updateCurrentOffsetLeft();
			sliderInner.find("ul").find("li.current").removeClass("current");
			jQuery(this).addClass("current");
			currentDayIndex_r = jQuery(this).prevAll().size(); // updates the index of current
			updateCurrentOffsetLeft(); // updates the left offset of current
		}
	});
}

function emissionSlider() {
	var sliderContainer = jQuery("div.planifier div.planifier-header div.semaine-slider-container")
	var sliderInner =  jQuery("div.planifier div.planifier-header div.semaine-slider-container div.semaine-slider");
	var slideAmount = 520;
	var sliderMoving = false;
	if (typeof initCurrentSet != 'undefined') {
		var currentSet = initCurrentSet;
	} else {
		var currentSet = 0;
	}
	var budge = 60;
	var currentSliderPos = budge + (currentSet * slideAmount * -1);
	if (typeof iMaxSet != 'undefined') {
		var maxSet = iMaxSet;
	} else {
		var maxSet = 3;
	}

	jQuery("div.flashContent-top-sport div.planifier div.planifier-header div.semaine-slider-container div.semaine-slider ul li a").click(function(e){
		e.preventDefault();
	});

	// set up
	sliderInner.css({ left: currentSliderPos });

	// the slider functions
	function moveSlider(direction) {
		if (!sliderMoving) {
			calculateNextPosition(direction);
			sliderMoving = true;
			sliderInner.animate({
				left: currentSliderPos
			}, 1000, function(){ sliderMoving = false; });
			updatePaginator();
		}
	}
	// calculate the next position of the slider
	function calculateNextPosition(direction) {
		if(direction == 'right') {
			currentSliderPos -= slideAmount;
			currentSet++;
		} else if (direction == 'left') {
			currentSliderPos += slideAmount;
			currentSet--;
		}
	}

	// update paginator links
	function updatePaginator() {
		if(currentSet == 0) {
			if(maxSet == 0) {
				sliderContainer.find("ul[class*=paginator]").find("li a").css("display", "none");
			} else {
				sliderContainer.find("ul[class*=paginator]").find("li a").removeClass("inactive");
				sliderContainer.find("ul[class*=paginator]").find("li.prev a").addClass("inactive");
				sliderContainer.find("ul[class*=paginator]").find("li.next a").show();
			}
		} else if (currentSet == maxSet) {
			sliderContainer.find("ul[class*=paginator]").find("li a").removeClass("inactive");
			sliderContainer.find("ul[class*=paginator]").find("li.next a").addClass("inactive");
			sliderContainer.find("ul[class*=paginator]").find("li.prev a").show();
		} else {
			sliderContainer.find("ul[class*=paginator]").find("li a").removeClass("inactive");
			sliderContainer.find("ul[class*=paginator]").find("li.next a").show();
			sliderContainer.find("ul[class*=paginator]").find("li.prev a").show();
		}
	}

	updatePaginator();

	// add some events to the slider buttons
	sliderContainer.find("ul[class*=paginator]").find("li.prev a").click(function(e){
		e.preventDefault();
		if (currentSet != 0) {
			moveSlider('left');
		}
	});
	sliderContainer.find("ul[class*=paginator]").find("li.next a").click(function(e){
		e.preventDefault();
		if (currentSet != maxSet) {
			moveSlider('right');
		}
	});

	sliderInner.find("ul").find("li").hover(function(){
		if (!jQuery(this).hasClass("current")) {
			jQuery(this).addClass("hover");
		}
	}, function() {
		jQuery(this).removeClass("hover");
	});

	sliderInner.find("ul").find("li").click(function(){
		if (!jQuery(this).hasClass("current")) {
			sliderInner.find("ul").find("li.current").removeClass("current");
			jQuery(this).addClass("current");
		}
	});
}


function homepageVideos() {
	// set up
	var which = 0;
	var hrefs = ["/ajax/tab1-content1.htm", "/ajax/tab1-content2.htm", "/ajax/tab1-content3.htm", "/ajax/tab1-content4.htm"];
	jQuery("#tab-content-1 ul.paginator li.prev a").hide();
	//
	function swapContent(textStatus,href) {
		jQuery("#tab-content-1 ul.paginator li").removeClass("current");
		jQuery("#tab-content-1 ul.paginator li").eq(which + 2).addClass("current");
		if (textStatus == "success") {
			//if (window.console && !jQuery.browser.safari) {console.log(which);}
			if (which == 3) {
				jQuery("#tab-content-1 ul.paginator li.next a").hide();
			} else {
				jQuery("#tab-content-1 ul.paginator li.next a").show();
			}
			if (which == 0) {
				jQuery("#tab-content-1 ul.paginator li.prev a").hide();
			} else {
				jQuery("#tab-content-1 ul.paginator li.prev a").show();
			}
			setUpClasses();
		} else {
			window.location = href;
		}
	}
	// btn clicks
	jQuery("#tab-content-1 ul.paginator li a:not(li.next a, li.prev a)").click( function(e) {
		e.preventDefault();
		which = jQuery(e.target).html();
		which = (which * 1) - 1;
		jQuery("#tab-content-1-list").load(hrefs[which],
		function(responseText,textStatus,XMLHttpRequest) {
			swapContent(textStatus,hrefs[which]);
		}
		)
	});
	jQuery("#tab-content-1 ul.paginator li.next a").click( function(e) {
		e.preventDefault();
		which++;
		jQuery("#tab-content-1-list").load(hrefs[which],
		function(responseText,textStatus,XMLHttpRequest) {
			swapContent(textStatus,hrefs[which]);
		}
		)
	});
	jQuery("#tab-content-1 ul.paginator li.prev a").click( function(e) {
		e.preventDefault();
		which--;
		jQuery("#tab-content-1-list").load(hrefs[which],
		function(responseText,textStatus,XMLHttpRequest) {
			swapContent(textStatus,hrefs[which]);
		}
		)
	});
}

/*
* RC: Class gerant la sauvegarde en cookie des informations d'etat de certains elements
*/
function UserPageElementState(page) {
	this.cookieName = "userElementCookieState_";
	this.page = page;
	this.aEls = new Array();

	this.cookie = null;
	this.init = function() {
		this.cookie = jQuery.cookie(this.cookieName + this.page);
		if(this.cookie && this.cookie != "") {
			var aElsTmp = this.cookie.split("|");
			for(i=0; i<aElsTmp.length; i++){
				var tmp = aElsTmp[i].split(":");
				this.aEls[tmp[0]]= tmp[1];
			}
		}
	};
	this.updateValue = function(id,value) {
		this.aEls[id] = value;
		var tmp = "";
		for (var key in this.aEls) {
			tmp += key + ":" + this.aEls[key] + "|";
		}
		jQuery.cookie(this.cookieName + this.page, tmp, { expires: 30});
	};

}

/*function UserPageElementStateGrille(page) {
this.cookieName = "userElementCookieStateGrille_";
this.page = page;
this.aEls = new Array();

this.cookie = null;
this.init = function() {
this.cookie = jQuery.cookie(this.cookieName + this.page);
if(this.cookie && this.cookie != "") {
var aElsTmp = this.cookie.split("|");
for(i=0; i<aElsTmp.length; i++){
var tmp = aElsTmp[i].split(":");
this.aEls[tmp[0]]= tmp[1];
}
}
};
this.updateValue = function(id,value) {
//alert("id "+id+ " value"+value);
this.aEls[id] = value;
var tmp = "";
for (var key in this.aEls) {
tmp += key + ":" + this.aEls[key] + "|";
}
jQuery.cookie(this.cookieName + this.page, tmp, {expires :30 });
};

}*/




/*
* RC: Fonction d'initialisation de l'ouverture/fermeture
* RC:  des differentes sections de la home
*/
function sectionInitUserCookie(){
	userPageSectionState = new UserPageElementState("home_section");
	userPageSectionState.init();
	for (var key in userPageSectionState.aEls) {
		if (userPageSectionState.aEls[key] == 0) {
			var e = jQuery.Event("click");
			jQuery("div."+key+" p.openClose a._openClose").trigger(e);
		}
	}
}
/*
* RC: Fonction d'initialisation de l'ouverture/fermeture
* RC:  des differentes tabulations fil vidéo de la home
*/
function tabInitUserCookie(){
	userPageTabState = new UserPageElementState("home_tab");
	userPageTabState.init();
	for (var key in userPageTabState.aEls) {
		if (userPageTabState.aEls[key] == 1) {
			var e = jQuery.Event("click");
			jQuery("ul.tabs li."+key+" a._tabs").trigger(e);
			var b = key;
		}
	}
	if ((b == "tab-3" && !jQuery("ul.tabs li.tab-3").is(":visible")) || (b == "tab-2" && !jQuery("ul.tabs li.tab-2").is(":visible"))) {
		var bDisplayFirst = true;
	}

	if(!b || bDisplayFirst){		// si aucun élément n'est trouvé, on clique sur le premier onglet
		var key2 = "tab-1";
		var e = jQuery.Event("click");
		jQuery("ul.tabs li."+key2+" a._tabs").trigger(e);
	}
}

/*
* RC: Fonction d'initialisation de l'ouverture/fermeture
* RC:  des differentes sections de la home thematique sport
*/
function sportSectionInitUserCookie(){
	userPageSectionState = new UserPageElementState("home_sport_section");
	userPageSectionState.init();
	for (var key in userPageSectionState.aEls) {
		if (userPageSectionState.aEls[key] == 0) {
			var e = jQuery.Event("click");
			jQuery("div."+key+" p.openClose a._openClose").trigger(e);
		}
	}
}


function liBrevesInitUserCookie(){
	userPageLiState = new UserPageElementState("home_breves");
	userPageLiState.init();

	for (var key in userPageLiState.aEls) {
		if (userPageLiState.aEls[key] !="" ) {
			key=key.replace("breves_","");
			var b = key;
		}
	}
	userPageLiParentState = new UserPageElementState("parent_breves");
	userPageLiParentState.init();

	for (var key in userPageLiParentState.aEls) {
		if (userPageLiParentState.aEls[key] !="" ) {
			var parent = userPageLiParentState.aEls[key];
		}
	}

	if(b){
		jQuery("#"+parent+" h3").trigger("click");
		jQuery("#"+parent+" #breves_"+b+" a").trigger("click");
	}

}

/*function h5AccordeonInitUserCookie(){

h5AccordeonPageState = new UserPageElementStateGrille("grille_h5");
h5AccordeonPageState.init();

for (var key in h5AccordeonPageState.aEls) {
if (h5AccordeonPageState.aEls[key] !="" ) {
value=h5AccordeonPageState.aEls[key];
var cle=key;
var b=value;
}
if(b=="1"){
jQuery("."+cle+" a").trigger("click");
jQuery("."+cle).addClass("open");

}else{
jQuery("."+cle+" a").trigger("click");
jQuery("."+cle).removeClass("open");
}
}

}*/


function openAccordeon(){
	for (i=0;i<tableau.length;i++){
		chaine=tableau[i].split(",");
		cle=chaine[0];
		valeur=chaine[1];
		if(valeur==1){
			jQuery(".accordeon_"+cle).addClass("open");
			if(!isIE){
				jQuery(".ul_"+cle).slideToggle();
			}else{
				jQuery(".ul_"+cle).toggle();
			}
		}
		if(valeur==0){
			jQuery(".accordeon_"+cle).removeClass("open");
			if(!isIE){
				jQuery(".ul_"+cle).slideToggle();
			}else{
				jQuery(".ul_"+cle).toggle();
			}
		}

	}
}


function updateTableau(cle,valeur){
	tableau.push(cle+","+valeur);
}



// PAGE FUNCTIONS --------------------------------------------------------------------------------------------------------------

var userPageSectionState = null;


function indispensableFunctions() {
	dropdowns(); // handles the site menu drop down
	lightboxes(); // handles the login lightbox
	isFirstCallLightboxes = false;
	searchBox(); // handles search box
}

function homepage() {
	indispensableFunctions();
	liClick();
	tabs();
	sectionColHeights();
	sectionOpenClose();
	tabInitUserCookie();
	sectionInitUserCookie();
	liBrevesInitUserCookie();
	customDropDown();
	jQuery('div.videos-slider-container').f_slider({ itemsVisible: 4, doAutoScroll: false, slideAmount: 660 });
	videoSlider();
}

function register() {
	indispensableFunctions();
	jQuery('input[type=submit]').addClass("submit");
	jQuery('input[type=radio]').addClass("radio");
	jQuery('input[type=checkbox]').addClass("checkbox");
	jQuery('input[type=image]').addClass("image");
	jQuery('input[type=file]').addClass("file");
	jQuery('input[type=text]').addClass("text");
	jQuery('input[type=password]').addClass("text");
}

function searchResults() {
	jQuery("div.programmesTable table tbody tr td div.col1 div.img").hover(function(){
		jQuery(this).parents().children("h4").children("a").addClass("hover");
	}, function() {
		jQuery(this).parents().children("h4").children("a").removeClass("hover");
	});
	jQuery("#rechercherSite").focus();
}

function searchResults2() {
	indispensableFunctions();
	liBrevesInitUserCookie();
	customDropDown();
	var _last = jQuery('ul.thumbs li:last-child');
	if (_last.hasClass("noMarginRight")) {
		_last.addClass("last-alt");
		_last.prev().addClass("last-alt");
		_last.prev().prev().addClass("last-alt");
	} else if (_last.hasClass("even")) {
		_last.prev().addClass("last-alt");
	}
	jQuery("#rechercherSite").focus();
}

function sectionInitialize() {
	var timer1 = microtime(true);
	var _cols = jQuery("div.section div.cols");
	// >>RC
	// si il n'y a pas de blocs definis pour cette section
	// alors surppresion de cette section.
	_cols.each(function(i,val){
		if(jQuery(this).children("div.col").length == 0) {
			jQuery(this).parents("div.section").remove();
		}
	});
	var timer2 = microtime(true);
	totalTimer["sectionInitialize"] = (timer2-timer1);
}

function sectionHomepages() {
	indispensableFunctions();
	sectionInitialize();
	sectionColHeights();
	customDropDown();
	jQuery('div.col2x-videos-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.col-covers-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 324 });
	videoSlider();
	liClick();
	var tmp = "";
	var total = 0;
	for (var key in totalTimer) {
		tmp+=key +":" + totalTimer[key] +"\n";
		total += totalTimer[key];
	}
	tmp+="TOTAL:" + total;
}

function homepageSport() {
	sectionHomepages();
	sectionOpenClose();
	sportSectionInitUserCookie();
	liBrevesInitUserCookie();
}

function tvGrid() {
	indispensableFunctions();
	liClick();
	labelMessages();
	liBrevesInitUserCookie();
	customDropDown();
	tabs();
	videoSlider();
	semaineSlider2();
	jourAccordion();
	jQuery('div.cemoiscisurcanalplus').f_controler();
}

function programmes() {
	indispensableFunctions();
	sectionColHeightsAlt();
	customDropDown();
	labelMessages();
}

function lesFilmsDuMois() {
	jQuery("div.bannerbar").css("margin-top", "40px");
}

function leGrandJournal() {
	indispensableFunctions();
	sectionInitialize();
	sectionColHeights();

	jQuery("div.feature, div.feature-small").hover(function(){
		jQuery(this).addClass("feature-hover");
	}, function() {
		jQuery(this).removeClass("feature-hover");
	});

	jQuery("ul.features-alt li").hover(function(){
		jQuery(this).addClass("hover");
	}, function() {
		jQuery(this).removeClass("hover");
	});

	jQuery("ul.videos li").click(function(e) {
		e.preventDefault();
		var href = jQuery(this).find("a").attr("href");
		if (href != "#" && href != "" && href != undefined) {
			window.location = href;
		}
	});

	jQuery("div.sideTool-alt ul.icon-list li").hover(function(){
		jQuery(this).addClass("hover");
		jQuery(this).children("a.icon").addClass("icon-hover");
	}, function() {
		jQuery(this).removeClass("hover");
		jQuery(this).children("a.icon").removeClass("icon-hover");
	});

	if (jQuery('dd').length > 0) {
		jQuery('dd:nth-child(even)').addClass("even");
		jQuery('dd:first-child').addClass("first");
		jQuery('dd:last-child').addClass("last");
	}
	if (jQuery("div.alert")[0]) {
		jQuery("div.alert").click(function(e) {
			e.preventDefault();
			e.preventDefault();
			var href = jQuery(this).find("a").attr("href");
			if (href != "#" && href != "" && href != undefined) {
				window.location = href;
			}
		});
		jQuery("div.alert").hover(function(){
			jQuery(this).addClass("alert-hover");
		}, function() {
			jQuery(this).removeClass("alert-hover");
		});
	}
	emissionSlider();
	jQuery('div.twocol div.col2x-videos-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.onecol div.col2x-videos-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 330 });
	jQuery('div.onecol div.content_sommaire').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 310 });
	jQuery('div.col2x div.content_sommaire').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.onecol div.content_invites').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 310 });
	jQuery('div.col2x div.content_invites').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.col-covers-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 324 });
	videoSlider();
}

function SportVideo() {
	indispensableFunctions();
	customDropDown();
	emissionSlider();
	jQuery('div.twocol div.col2x-videos-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.onecol div.col2x-videos-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 330 });
	jQuery('div.onecol div.content_sommaire').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 310 });
	jQuery('div.col2x div.content_sommaire').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.onecol div.content_invites').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 310 });
	jQuery('div.col2x div.content_invites').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 660 });
	jQuery('div.col-covers-slider-container').f_slider({ itemsVisible: 1, doAutoScroll: false, slideAmount: 324 });
	videoSlider();
	liBrevesInitUserCookie();
}

function videoV3(){
	indispensableFunctions();
	liBrevesInitUserCookie();
	customDropDown();
	if(jQuery("div.linkbar").is(":visible")){
		jQuery("div.infoVideoRight-closed a, div.infoVideoRight-open a ").click(function(e) {
			e.preventDefault();
			if(jQuery("div.infoVideoRight-closed").hasClass("infoVideoRight-open")){
				jQuery("#infoVideo").slideUp("slow",function(){
					jQuery("div.infoVideoRight-closed").removeClass("infoVideoRight-open");
				});
			}else{
				jQuery("div.infoVideoRight-closed").addClass("infoVideoRight-open");
				jQuery('div.infoVideo-player').slideDown('slow');
			}
		});
	}
	jQuery("ul.type-video li.case a").click(function(e) {
		e.preventDefault();
		jQuery("ul.type-video li.case").each(function(){
			jQuery("ul.type-video li.case").removeClass("case-cochee");
		});
		jQuery(this).parent().addClass("case-cochee");
	});
	jQuery("div.videov3-content-tab ul.tabs li a._tabs").click(function(e) {
		e.preventDefault();
		jQuery("div.videov3-content-tab ul.tabs li ").each(function(){
			jQuery("div.videov3-content-tab ul.tabs li ").removeClass("current");
		});
		jQuery(this).parent().addClass("current");
	});
	jQuery("ul.features-alt-videov3-2x4 li h4 a, ul.features-alt-videov3-2x4 li p a, ul.features-alt-videov3-2x4 li a").click(function(e) {
		e.preventDefault();
	});
	jQuery("ul.features-alt-videov3-3x3 li h4 a, ul.features-alt-videov3-3x3 li p a, ul.features-alt-videov3-3x3 li a").click(function(e) {
		e.preventDefault();
	});
	jQuery("ul.features-alt-videov3-4x3 li h4 a, ul.features-alt-videov3-4x3 li p a, ul.features-alt-videov3-4x3 li a").click(function(e) {
		e.preventDefault();
	});
}

function mesEnregistrements() {
	indispensableFunctions();
	liBrevesInitUserCookie();
	customDropDown();
	videoSlider();
	liHover();
}

var initHeightRightSection = 0;
function updateHeightRightSection() {
	var heightMainSection = jQuery("div#mainSection").height();
	var heightRightSection = jQuery("div#rightSection").height();
	if (heightMainSection > heightRightSection) {
		jQuery("div#rightSection").css("height", heightMainSection + "px");
	} else {
		if (heightRightSection > initHeightRightSection) {
			if (heightMainSection > initHeightRightSection) {
				jQuery("div#rightSection").css("height", heightMainSection + "px");
			} else {
				jQuery("div#rightSection").css("height", initHeightRightSection + "px");
			}
		}
	}
}

function liveOnglet() {
	if (jQuery("div#contenuOnglet div.texte_presentation a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.texte_presentation a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.texte_presentation div.texteSecondaire").is(":visible")) {
				//jQuery("div#contenuOnglet div.texte_presentation div.texteSecondaire").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.texte_presentation div.texteSecondaire").hide();
				jQuery("div#contenuOnglet div.texte_presentation img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.texte_presentation img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.texte_presentation div.texteSecondaire").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.texte_presentation div.texteSecondaire").show();
				jQuery("div#contenuOnglet div.texte_presentation img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.texte_presentation img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listePhoto a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listePhoto a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listePhoto div.listPhotoCache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listePhoto div.listPhotoCache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listePhoto div.listPhotoCache").hide();
				jQuery("div#contenuOnglet div.listePhoto img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listePhoto img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listePhoto div.listPhotoCache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listePhoto div.listPhotoCache").show();
				jQuery("div#contenuOnglet div.listePhoto img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listePhoto img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste1-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste1-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste1-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste1-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste2-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste2-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste2-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste2-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste3-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste3-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste3-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste3-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste4-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste4-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste4-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste4-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste5-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste5-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste5-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste5-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste6-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste6-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste6-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste6-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste7-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste7-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste7-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste7-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	if (jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn a.btn").is(":visible")) {
		jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div#contenuOnglet div.listeRegroupee div.liste8-cache").is(":visible")) {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste8-cache").slideUp("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-cache").hide();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn img.replie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div#contenuOnglet div.listeRegroupee div.liste8-cache").slideDown("slow", function() {
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-cache").show();
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn img.deplie").css("display", "none");
				jQuery("div#contenuOnglet div.listeRegroupee div.liste8-btn img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	jQuery("div#contenuOnglet ul.features li a").click(function(e) {
		e.preventDefault();
		jQuery("div#contenuOnglet ul.features li").each(function() {
			jQuery(this).removeClass("current");
		});
		jQuery(this).parents("div#contenuOnglet ul.features li").addClass("current");
	});
}

function live() {
	liClick();
	initHeightRightSection = jQuery("div#rightSection").height();
	indispensableFunctions();
	customDropDown();
	videoSlider();
	liveOnglet();
	updateHeightRightSection();
	if (jQuery("div.contenuCentral.texte_presentation a.btn").is(":visible")) {
		jQuery("div.contenuCentral.texte_presentation a.btn").click(function(e) {
			e.preventDefault();
			if (jQuery("div.contenuCentral.texte_presentation div.texteSecondaire").is(":visible")) {
				//jQuery("div.contenuCentral.texte_presentation div.texteSecondaire").slideUp("slow", function() {
				jQuery("div.contenuCentral.texte_presentation div.texteSecondaire").hide();
				jQuery("div.contenuCentral.texte_presentation img.replie").css("display", "none");
				jQuery("div.contenuCentral.texte_presentation img.deplie").css("display", "inline");
				updateHeightRightSection();
				//});
			} else {
				//jQuery("div.contenuCentral.texte_presentation div.texteSecondaire").slideDown("slow", function() {
				jQuery("div.contenuCentral.texte_presentation div.texteSecondaire").show();
				jQuery("div.contenuCentral.texte_presentation img.deplie").css("display", "none");
				jQuery("div.contenuCentral.texte_presentation img.replie").css("display", "inline");
				updateHeightRightSection();
				//});
			}
		});
	}
	jQuery("div.videov3-content-tab ul.tabs li a._tabs").click(function(e) {
		e.preventDefault();
		jQuery("div.videov3-content-tab ul.tabs li").each(function() {
			jQuery(this).removeClass("current");
		});
		jQuery(this).parent().addClass("current");
	});
}


function IsNumeric(sText) {
	var ValidChars = "0123456789.";
	var IsNumber=true;
	var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	return IsNumber;
}

function IsValidPassword(sText) {
	var ValidChars = "^'"+'"&#¤$';
	var IsNumber=true;
	var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) {
			//IsNumber = true;
		} else {
			IsNumber = false;
		}
	}
	return IsNumber;
}

function verifyEmail(form) {
	var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
	if (form.SUBSCRIBER_EMAIL.value.search(emailRegEx) == -1) {
		return false;
	}
	return true;
}

function verifyForget(form) {
	var msgError = "";
	if (verifyEmail(form)) {
		return true;
	}
	jQuery(form).find("#label_email-forget-password").addClass("error");
	msgError += "L'adresse e-mail est invalide<br/>";
	jQuery(form).find(".errors").css("display", "block");
	jQuery(form).find(".errors").html("<p><strong>Erreur d'identification.</strong><br/>"+msgError+"</p>");

	return false;
}

function verifyIdent(form) {
	var msgError = "";
	if (form.SUBSCRIBER_EMAIL.value.length!=0 && form.SUBSCRIBER_PASSWORD.value.length!=0 && verifyEmail(form)) {
		return true;
	}
	if (form.SUBSCRIBER_EMAIL.value.length==0 || !verifyEmail(form)) {
		jQuery(form).find("#label_email-login").addClass("error");
		msgError += "L'adresse e-mail est invalide<br/>";
	}
	else {
		jQuery(form).find("#label_email-login").removeClass("error");
	}
	if (form.SUBSCRIBER_PASSWORD.value.length==0) {
		jQuery(form).find("#label_passe-login").addClass("error");
		msgError += "Le champ mot de passe est vide<br/>";
	}
	else {
		jQuery(form).find("#label_passe-login").removeClass("error");
	}
	jQuery(form).find(".errors").css("display", "block");
	jQuery(form).find(".errors").html("<p><strong>Erreur d'identification.</strong><br/>"+msgError+"</p>");

	return false;
}

function checkForm(email, nick, num, zip, userdigit) {
	var url = "/lib/front_tools/inscription/ajax/checkForm.php";
	if (typeof sUrlSite == "string") {
		url = sUrlSite + url;
	}
	jQuery.ajax({
		url: url,
		async: false,
		type: "get",
		data: {email:email, nickname:nick, numabonne:num, zipcode:zip, userdigit:userdigit},
		dataType: "text",
		success: function(data){
			var params = data.split("|");
			jQuery("form input[name=AJ_EMAIL_UNICITY]").val(params[0]);
			jQuery("form input[name=AJ_NICK]").val(params[1]);
			jQuery("form input[name=AJ_NUMBER_VAL]").val(params[2]);
			jQuery("form input[name=AJ_ZIP_CODE]").val(params[3]);
			jQuery("form input[name=AJ_CAPTCHA]").val(params[4]);
			jQuery("form input[name=AJ_DIV_CAPTCHA]").val(params[5]);
		},
		error: function(){}
	});
}


function verifyRegister(form) {

	var msgError = "";
	var bRetour = true;

	if (form.TRSACT.value == "UPD") {
		checkForm(form.SUBSCRIBER_EMAIL.value, form.SUBSCRIBER_NICKNAME.value, form.SUBSCRIBER_NUMBER.value, form.SUBSCRIBER_ZIP.value, "");
	} else {
		checkForm(form.SUBSCRIBER_EMAIL.value, form.SUBSCRIBER_NICKNAME.value, form.SUBSCRIBER_NUMBER.value, form.SUBSCRIBER_ZIP.value, form.userdigit.value);
	}

	// CIVILITE
	if (form.CIVILITY_ID_LOOP[0].checked) {
		form.CIVILITY_ID.value = form.CIVILITY_ID_LOOP[0].value;
	} else {
		if (form.CIVILITY_ID_LOOP[1].checked) {
			form.CIVILITY_ID.value = form.CIVILITY_ID_LOOP[1].value;
		} else {
			if (form.CIVILITY_ID_LOOP[2].checked) {
				form.CIVILITY_ID.value = form.CIVILITY_ID_LOOP[2].value;
			}
		}
	}

	if (form.CIVILITY_ID.value == "") {
		bRetour = false;
		jQuery(form).find("#legend_civility").addClass("error");
		msgError += "Merci d'indiquer votre civilit&eacute;<br/>";
	} else {
		jQuery(form).find("#legend_civility").removeClass("error");
	}

	// NOM
	if (form.SUBSCRIBER_LAST_NAME.value.length == 0) {
		bRetour = false;
		jQuery(form).find("#label_nom").addClass("error");
		msgError += "Merci de remplir le champ Nom<br/>";
	} else {
		jQuery(form).find("#label_nom").removeClass("error");
	}

	// PRENOM
	if (form.SUBSCRIBER_FIRST_NAME.value.length == 0) {
		bRetour = false;
		jQuery(form).find("#label_prenom").addClass("error");
		msgError += "Merci de remplir le champ Pr&eacute;nom<br/>";
	} else {
		jQuery(form).find("#label_prenom").removeClass("error");
	}

	// PSEUDO
	if (form.SUBSCRIBER_NICKNAME.value.length == 0) {
		bRetour = false;
		jQuery(form).find("#label_pseudo").addClass("error");
		msgError += "Merci d'indiquer un pseudonyme<br/>";
	} else {
		jQuery(form).find("#label_pseudo").removeClass("error");
		if (form.AJ_NICK.value != 1 && form.SUBSCRIBER_NICKNAME.value != form.SUBSCRIBER_NICKNAME_OLD.value) { 		// ce pseudo est déjà utilisé
			bRetour = false;
			jQuery(form).find("#label_pseudo").addClass("error");
			msgError += "Ce pseudo est d&eacute;j&agrave; utilis&eacute;<br/>";
		}
	}

	// EMAIL
	if (form.SUBSCRIBER_EMAIL.value.length == 0 || !verifyEmail(form)) {
		bRetour = false;
		jQuery(form).find("#label_email").addClass("error");
		msgError += "L'adresse e-mail est invalide<br/>";
	} else {
		jQuery(form).find("#label_email").removeClass("error");
		if (form.AJ_EMAIL_UNICITY.value == 1 && form.SUBSCRIBER_EMAIL.value != form.SUBSCRIBER_EMAIL_OLD.value) { 	// ce mail est déjà utilisé
			bRetour = false;
			jQuery(form).find("#label_email").addClass("error");
			msgError += "Ce mail est d&eacute;j&agrave; utilis&eacute;<br/>";
		}
	}

	// MOT DE PASSE + CONFIRMATION
	if (form.SUBSCRIBER_PASSWORD.value.length < 4) {
		bRetour = false;
		jQuery(form).find("#label_passe").addClass("error");
		msgError += "Merci de choisir un mot de passe ayant 4 caract&egrave;res minimum<br/>";
	} else {
		if (!IsValidPassword(form.SUBSCRIBER_PASSWORD.value)) {
			bRetour = false;
			jQuery(form).find("#label_passe").addClass("error");
			msgError += "Attention, ne pas utiliser les caract&egrave;res ^ ' \&quot; &amp; # &curren; $ pour le mot de passe<br/>";

		} else {
			jQuery(form).find("#label_passe").removeClass("error");
			if ((form.SUBSCRIBER_PASSWORD.value) != (form.password_Confirmation.value)) {	// test de la confirmation de mot de passe
				bRetour = false;
				jQuery(form).find("#label_passe2").addClass("error");
				msgError += "Merci de v&eacute;rifier la confirmation de votre mot de passe<br\>" ;
			} else {
				jQuery(form).find("#label_passe2").removeClass("error")
			}
		}
	}

	// CODE POSTAL
	if (form.SUBSCRIBER_ZIP.value.length == 0) {
		bRetour = false;
		jQuery(form).find("#label_code-postal").addClass("error");
		msgError += "Merci de remplir le champ Code postal<br/>";
	} else {
		if(!IsNumeric(form.SUBSCRIBER_ZIP.value)) {
			bRetour = false;
			jQuery(form).find("#label_code-postal").addClass("error");
			msgError += "Merci de remplir le champ Code postal avec une valeur num&eacute;rique<br/>";
		} else {
			if (form.SUBSCRIBER_ZIP.value.length != 5) {
				bRetour = false;
				jQuery(form).find("#label_code-postal").addClass("error");
				msgError += "Merci de saisir un code postal &agrave; 5 chiffres<br/>";
			} else {
				jQuery(form).find("#label_code-postal").removeClass("error");
			}
		}
	}

	// ABONNE OUI/NON - NUMERO ABONNE
	if (form.SUBSCRIBER_FLAG_ABO[0].checked) {
		if (form.SUBSCRIBER_NUMBER.value.length == 0) {
			bRetour = false;
			msgError += "Merci d'indiquer un N&deg; d'abonn&eacute;<br/>";
			jQuery(form).find("#label_no-abonne").addClass("error");
		} else {
			if (form.SUBSCRIBER_NUMBER.value != "" && form.SUBSCRIBER_ZIP.value != "" && form.AJ_NUMBER_VAL.value == 1) {
				if (form.AJ_ZIP_CODE.value != 1) {
					bRetour = false;
					msgError += "Votre N&deg; d'abonn&eacute; et votre code postal ne concordent pas<br/>";
					jQuery(form).find("#label_no-abonne").addClass("error");
				} else {
					jQuery(form).find("#label_no-abonne").removeClass("error");
				}
			} else {
				bRetour = false;
				msgError += "Veuillez renseigner un N&deg; d'abonn&eacute; valide<br/>";
				jQuery(form).find("#label_no-abonne").addClass("error");
			}
		}
	} else {
		jQuery(form).find("input[name=SUBSCRIBER_NUMBER]").val("");
		jQuery(form).find("#label_no-abonne").removeClass("error");
	}


	// CODE DE CONTROLE
	if (form.TRSACT.value == "INS") {
		if (form.userdigit.value.length == 0) {
			bRetour = false;
			jQuery(form).find("#label_code").addClass("error");
			msgError += "Merci de saisir le code de contr&ocirc;le<br/>";
		} else {
			if (form.AJ_CAPTCHA.value != 1) {
				bRetour = false;
				jQuery(form).find("#label_code").addClass("error");
				msgError += "Le code de contr&ocirc;le saisi ne correspond pas &agrave; l'image<br/>";
			} else {
				jQuery(form).find("#label_code").removeClass("error");
			}
		}
	}

	// CGU
	if (form.TRSACT.value == "INS") {
		if (!form.CGU_SUBSCRIBER.checked) {
			bRetour = false;
			msgError += "Veuillez accepter les C.G.U. pour valider votre inscription<br/>";
			jQuery(form).find("#label_cgu").addClass("error");
		} else {
			jQuery(form).find("#label_cgu").removeClass("error");
		}
	}

	// GESTION DES ERREURS
	if (!bRetour) {
		if (form.TRSACT.value == "INS") {
			jQuery(form).find("#captcha").html('<img width="170" height="27" style="vertical-align: middle; float: left;" alt="Image de contrôle" src="' + form.AJ_DIV_CAPTCHA.value + '" /><input id="userdigit" type="text" size="6" name="userdigit"/>');
		}
		jQuery(form).find(".errors").css("display", "block");
		jQuery(form).find(".errors").html("<p><strong>Certains champs n'ont pas &eacute;t&eacute; remplis correctement</strong><br/>"+msgError+"</p>");
	}

	return bRetour;
}


function openPopupCguNclinet(tpl, height, width, scroll, popup_type) {
	var params = "height=" + height + ",width=" + width + ",scrollbars=" + scroll;
	var url = "/index_popup.php?tpl=" + tpl + "&popup_type=" + popup_type;
	if (typeof sUrlSite == "string") {
		url = sUrlSite + url;
	}
	window.open(url, "TexteRiche", params);
}

function FlashPlayerStop() {
	if (document.getElementById('CanalPlayerEmbarque')) {
		if (typeof document.getElementById('CanalPlayerEmbarque').playerStop=='function') {
			document.getElementById('CanalPlayerEmbarque').playerStop();
		}
	}
}

function FlashPlayerPlay() {
	if (document.getElementById('CanalPlayerEmbarque')) {
		if (typeof document.getElementById('CanalPlayerEmbarque').playerPlay=='function') {
			document.getElementById('CanalPlayerEmbarque').playerPlay();
		}
	}
}


var totalTimer = new Array();


function microtime (get_as_float) {
	// http://kevin.vanzonneveld.net
	// +   original by: Paulo Ricardo F. Santos
	// *     example 1: timeStamp = microtime(true);
	// *     results 1: timeStamp > 1000000000 && timeStamp < 2000000000

	var now = new Date().getTime() / 1000;
	var s = parseInt(now, 10);

	return (get_as_float) ? now : (Math.round((now - s) * 1000) / 1000) + ' ' + s;
}


/**
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
*/

function writeFlash(p) {
	writeEmbed(
	'D27CDB6E-AE6D-11cf-96B8-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
	'application/x-shockwave-flash',
	p
	);
}

function writeShockWave(p) {
	writeEmbed(
	'166B1BCA-3F9C-11CF-8075-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
	'application/x-director',
	p
	);
}

function writeQuickTime(p) {
	writeEmbed(
	'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
	'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
	'video/quicktime',
	p
	);
}

function writeRealMedia(p) {
	writeEmbed(
	'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
	'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
	'audio/x-pn-realaudio-plugin',
	p
	);
}

function writeWindowsMedia(p) {
	p.url = p.src;
	writeEmbed(
	'6BF52A52-394A-11D3-B153-00C04F79FAA6',
	'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
	'application/x-mplayer2',
	p
	);
}

function writeEmbed(cls, cb, mt, p) {
	var h = '', n;

	h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
	h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
	h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
	h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
	h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
	h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
	h += '>';

	for (n in p)
	h += '<param name="' + n + '" value="' + p[n] + '">';

	h += '<embed type="' + mt + '"';

	for (n in p)
	h += n + '="' + p[n] + '" ';

	h += '></embed></object>';

	document.write(h);
}
function closeBAR(){jQuery("div#contribution").html("");jQuery("div#lb-mask").hide();jQuery("div.lb").hide();}
function openBAR(cibleType,prodId,tokenId){if(typeof(tokenId)=='undefined'){tokenId=subscriberToken;}
jQuery("div#contribution").html("");jQuery("div#lb-mask").show();jQuery("div.lb-alt #lb-contribution").css("height","530px");changeBAR(cibleType,prodId,tokenId);jQuery("#lb-contribution").parent(".lb").show();var _parent=jQuery("#lb-contribution").parent(".lb-alt");var h=jQuery(window).height();var h2=parseFloat(_parent.height());var windowTopOffset=jQuery(window).scrollTop();if(h<h2){windowTopOffset=windowTopOffset;}else{windowTopOffset=windowTopOffset+((h-h2)/2);}
_parent.css("top",windowTopOffset+"px");}
function changeBAR(cibleType,prodId,tokenId){swfFile="";xmlFile="";switch(cibleType)
{case'WEBCAM':swfFile="http://static2.canalplus.fr/mdc/flash/CanalBAR_modWebcam.swf";xmlFile="http://static2.canalplus.fr/mdc/xml/webcam-configuration.xml";break;case'PHOTO':swfFile="http://static2.canalplus.fr/mdc/flash/CanalBAR_modPhoto.swf";xmlFile="http://static2.canalplus.fr/mdc/xml/photo-configuration.xml";break;case'TEXT':swfFile="http://static2.canalplus.fr/mdc/flash/CanalBAR_modText.swf";xmlFile="http://static2.canalplus.fr/mdc/xml/text-configuration.xml";break;case'VIDEO':swfFile="http://static2.canalplus.fr/mdc/flash/CanalBAR_modVideo.swf";xmlFile="http://static2.canalplus.fr/mdc/xml/video-configuration.xml";break;default:swfFile="http://static2.canalplus.fr/mdc/flash/CanalBAR_modAudio.swf";xmlFile="http://static2.canalplus.fr/mdc/xml/audio-configuration.xml";break;}
var flashvars={xmlConfigurationURL:xmlFile,production_id:prodId,token:tokenId};var params={menu:"true",bgcolor:'#ffffff',scale:"noscale",allowScriptAccess:"always"};swfobject.embedSWF(swfFile,"contribution","676","530","9.0.0","/flash/expressInstall.swf",flashvars,params);}
function openUser(id,mdc_type,mdc_id){function positionPopup(id){var _parent=jQuery(id).parent('.lb');_parent.show();var h=jQuery(window).height();var h2=parseFloat(_parent.height());var windowTopOffset=jQuery(window).scrollTop();if((h-h2)<80){windowTopOffset=windowTopOffset+40;}else{windowTopOffset=windowTopOffset+((h-h2)/2);}
_parent.css('top',windowTopOffset+'px');}
function _openPopup(id){var params="";if(typeof pid=="string"){if(params!=""){params=params+"&";}
params=params+"pid="+pid;}
if(typeof cid=="string"){if(params!=""){params=params+"&";}
params=params+"cid="+cid;}
if(isFirstCallLightboxes){if(typeof init=="string"){if(params!=""){params=params+"&";}
params=params+"init="+init;}
if(typeof lck=="string"){if(params!=""){params=params+"&";}
params=params+"lck="+lck;}
if(typeof mc=="string"){if(params!=""){params=params+"&";}
params=params+"mc="+mc;}
if(typeof mesinc=="string"){if(params!=""){params=params+"&";}
params=params+"mesinc="+mesinc;}
if(typeof remember=="string"){if(params!=""){params=params+"&";}
params=params+"remember="+remember;}
if(typeof exist=="string"){if(params!=""){params=params+"&";}
params=params+"exist="+exist;}}
if(id=="compte-login"){var _id="#lb-login";}else{var _id="#lb-"+id;}
if(id=="forget-password"||id=="login"||id=="compte-login"){if(authentif||authentif_light){if(params!=""){params=params+"&";}
params=params+"authentif_light=1";}
if(typeof sUrlSite=="string"){var url=sUrlSite+"/partner/partner_popin.js.php?id="+id+"&"+params;jQuery.getScript(url,function(){positionPopup(_id);if(id=="compte-login"&&(!isSafari||isChrome)){jQuery(_id+" input[name=SUBSCRIBER_EMAIL]").remove();jQuery(_id+" input[name=SUBSCRIBER_EMAIL_DISABLED]").removeAttr("disabled");jQuery(_id+" input[name=SUBSCRIBER_EMAIL_DISABLED]").attr("name","SUBSCRIBER_EMAIL");}
jQuery(_id+" input[name=from_url]").val(from_url);jQuery(_id+" input:enabled:first").focus();jQuery(_id+" input:enabled:first").select();jQuery("#a_compte-login-forget").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("compte-login",mdc_type,mdc_id);});jQuery("#a_forget-password").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("forget-password",mdc_type,mdc_id);});jQuery("#a_register-forget").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("register",mdc_type,mdc_id);});jQuery("#a_register-signup").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("register",mdc_type,mdc_id);});jQuery("#lb-close-login, #lb-close-forget-password").click(function(e){e.preventDefault();jQuery("div#lb-mask").hide();jQuery("div.lb").hide();});});}else{if(id=="forget-password"){var _href="/forget.ajax.php";}else{var _href="/login.ajax.php";}}}
if(id=="register"||id=="compte"){if(typeof sUrlSite=="string"){var _src=sUrlSiteSecure+"/index.php?pid="+pid+"&cid="+cid+"&tpl=10&par=CPLUS&url_retour="+from_url;if(id=="register"){var _height=975;}
if(id=="compte"){var _height=810;}
jQuery(_id).css("height",_height+"px");jQuery(_id).html('<p class="close" style="top: 54px;"><a href="#" id="lb-close">Fermer</a></p><iframe width="660" height="'+_height+'" frameborder="0" scrolling="auto" src="'+_src+'">');jQuery("#lb-close").click(function(e){jQuery("div#lb-mask").hide();jQuery("div.lb").hide();});}else{var _href="/compte.ajax.php";}}
if(typeof _href=="string"&&typeof from_url=="string"){if(params!=""){_href+="?"+params;}
jQuery(_id).load(_href,function(responseText,textStatus,XMLHttpRequest){positionPopup(_id);jQuery(_id+" input[name=from_url]").val(from_url);jQuery(_id+" input:enabled:first").focus();jQuery(_id+" input:enabled:first").select();jQuery("#a_compte-login-forget").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("compte-login",mdc_type,mdc_id);});jQuery("#a_forget-password").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("forget-password",mdc_type,mdc_id);});jQuery("#a_register-forget").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("register",mdc_type,mdc_id);});jQuery("#a_register-signup").click(function(e){e.preventDefault();jQuery("div.lb").hide();openUser("register",mdc_type,mdc_id);});jQuery("#lb-close, #lb-close-button, #lb-close-login, #lb-close-forget-password").click(function(e){e.preventDefault();jQuery("div#lb-mask").hide();jQuery("div.lb").hide();});});}else{positionPopup(_id);}}
if(from_url.indexOf('?')>0){if(from_url.charAt(from_url.indexOf('?')+1)!=''){from_url=from_url+'&mdc_type='+mdc_type+'&mdc_id='+mdc_id;}
else{from_url=from_url+'mdc_type='+mdc_type+'&mdc_id='+mdc_id;}}
else{from_url=from_url+'?mdc_type='+mdc_type+'&mdc_id='+mdc_id;}
jQuery("div#lb-mask").show();jQuery("div.lb").hide();if(id=="compte"&&typeof sUrlSiteSecure=="string"){var url=sUrlSite+"/lib/front_tools/ajax/check_session.php";jQuery.getScript(url,function(){var url=sUrlSiteSecure+"/lib/front_tools/ajax/check_sso.php";jQuery.getScript(url,function(){if(ssoStatus=="2"){id="login";}else{if(ssoStatus=="1"){id="compte-login";}else{if(sesStatus=="1"){id="compte";}else{id="login";}}}
_openPopup(id);});});}else{_openPopup(id);}};function _PopUpParam(iwidth,iheight,mb,rs,sb,st,tb){var strProperties;if(screen){var iPosL=(screen.width-iwidth)/2;var iPosT=(screen.height-iheight)/2;}else{var iPosL=100;var iPosT=100;}
if(navigator.appVersion.indexOf("MSIE")!=-1){iwidth=iwidth+26;}
strProperties="width="+iwidth+",height="+iheight;strProperties+=",left="+iPosL+",top="+iPosT+",directories=0";strProperties+=",hotkeys=1,location=0,menubar="+mb;strProperties+=",resizable="+rs+",scrollbars="+sb;strProperties+=",status="+st+",titlebar=0,toolbar="+tb;return strProperties;}
function popupSimpleNoScroll(PageURL,strName,iwidth,iheight){return window.open(PageURL,strName,_PopUpParam(iwidth,iheight,0,0,0,0,0));}
function popupSimple(PageURL,strName,iwidth,iheight){return window.open(PageURL,strName,_PopUpParam(iwidth,iheight,0,0,1,1,0));}
function popupMenuSimple(PageURL,strName,iwidth,iheight){return window.open(PageURL,strName,_PopUpParam(iwidth,iheight,1,0,1,1,0));}
function CheckWindow(obj){if(obj&&!obj.closed)
obj.close();}
function popupColor(obj,obj2){args=obj;var arr=showModalDialog(libDir+"/form_tools/editor/popup_colorpicker.htm",args,"dialogWidth:430px; dialogHeight:270px; scroll:no; status:no; center:yes; help:no");if(arr!=null){obj.value=arr.toUpperCase();obj2.style.backgroundColor=arr.toUpperCase();obj.focus();}}
var editor;function popupEditor(boxName,subfolder){if(editor){editor.close();}
editor=window.open(libDir+"/form_tools/editor/dhtml_editor.php?boxName="+boxName+"&subfolder="+subfolder,'popup_editor','width=700,height=500,toolbar=no,status=yes,resizable=yes,menubar=no,scrollbars=no');}
function resizeInner(width,height){if(window.innerWidth){window.innerWidth=width;window.innerHeight=height;}else{width+=5;height+=30;resizeTo(width,height);}}
function openPopupVideo(cid,getTitle){strUrl='/index_popup.php?1=1&tpl=108';if(cid){strUrl+='&cid='+cid;}
if(getTitle){strUrl+='&getTitle=1';}
window.open(strUrl,'Vidéo','height=720,width=780');}
function openPopupGallery(gallery_id2,gallery_id3,gallery_id4,type){strUrl='/index_popup.php?tpl=135&from=js';if(gallery_id2){strUrl+='&gallery_id2='+gallery_id2;}
if(gallery_id3){strUrl+='&gallery_id3='+gallery_id3;}
if(gallery_id4){strUrl+='&gallery_id4='+gallery_id4;}
if(type){strUrl+='&type='+type;}
window.open(strUrl,'Galerie','height=720,width=780');}
function openPopupEnsavoirPlus(cid,thePath){strUrl=thePath+'/index_popup.php?tpl=124';if(cid){strUrl+='&cid='+cid;}
window.open(strUrl,'savoirplus','height=650,width=650,left=0,top=0,scrollbars=no');}
function openNewPopup(cid){strUrl='index_popup.php?tpl=184';if(cid){strUrl+='&cid='+cid;}
window.open(strUrl,'thePopUp','height=650,width=650,left=0,top=0,scrollbars=no');}
function openPopupMosaique(){strUrl='index_popup.php?tpl=119&annee=2004';window.open(strUrl,'Mosaique','height=730,width=796,scrollbars=yes');}
function getFileExtension(strPath){var strfileName,valPosition,strfileExtension
valPosition=String(strPath).lastIndexOf('\\',0);strfileName=String(strPath).substr(valPosition+1);valPosition=strfileName.lastIndexOf('.');strfileExtension=strfileName.substr(valPosition+1);return strfileExtension;}
function openPopupRich(cid,largeur,hauteur,path){var theLargeur,theHauteur,thePath;var nombre_args=arguments.length;if(nombre_args==1)
{theLargeur=650;theHauteur=650;thePath="";}
else if(nombre_args==2)
{theLargeur=largeur;theHauteur=650;thePath="";}
else if(nombre_args==3)
{theLargeur=largeur;theHauteur=hauteur;thePath="";}
else if(nombre_args==4)
{theLargeur=largeur;theHauteur=hauteur;thePath=path;}
strUrl=thePath+'/index_popup.php?tpl=124';if(cid){strUrl+='&cid='+cid;}
window.open(strUrl,'savoirplus','width='+theLargeur+',height='+theHauteur+',left=0,top=0,scrollbars=yes');}
function openPopupSonUnique(cid){strUrl='index_popup.php?tpl=279';if(cid){strUrl+='&cid='+cid;}
window.open(strUrl,'Video','height=365,width=218');}
function openPopupTextRich(pid,tpl,cid,height,width,scroll){strUrl='index_popup.php?tpl='+tpl;if(pid){strUrl+='&pid='+pid;}
if(cid){strUrl+='&cid='+cid;}
if(!height)height=400;if(!width)width=610;if(scroll){scroll='yes';}else{scroll='no';}
window.open(strUrl,'TexteRiche','height='+height+',width='+width+',scrollbars='+scroll);}
function openPopupTextRichSlogo(pid,tpl,cid,height,width,scroll){strUrl='index_popup.php?tpl='+tpl;if(pid){strUrl+='&pid='+pid;}
if(cid){strUrl+='&cid='+cid;}
if(!height)height=400;if(!width)width=610;if(scroll){scroll='yes';}else{scroll='no';}
window.open(strUrl,'Riche','height='+height+',width='+width+',scrollbars='+scroll);}
function videoPlayer(contentId){if(sUrlBigPlayer){document.location=sUrlBigPlayer+'/#/'+contentId+"/"+sRequestURI;}}
function videoPlayerWithParentContent(contentId,contentParentId){if(sUrlBigPlayer){document.location=sUrlBigPlayer+'/#/'+contentId+"/"+sRequestURI;}}
function displayEpg(){document.getElementById('epg').style.zIndex='3';document.getElementById('flashContentEpg').style.zIndex='3';}
function hideEpg(){document.getElementById('epg').style.zIndex='0';document.getElementById('flashContentEpg').style.zIndex='0';}
var isPlayerInfoSport=false;function displayPlayer(){if(sUrlBigPlayer){if(sThematiqueListe!=''){document.location=sUrlBigPlayer+'/#/'+sThematiqueListe+'/'+sRequestURI;}else{document.location=sUrlBigPlayer+'/#/'+sRequestURI;}}}
var BackupBackgroundImage;function displayPlayerNoWrite(){if(sUrlBigPlayer){document.location=sUrlBigPlayer+'/#/'+sRequestURI;}}
function hidePlayer(){document.getElementById('zones').style.display="block";document.body.style.backgroundColor="";document.body.style.backgroundImage=BackupBackgroundImage;if(isPlayerInfoSport){history.go(0);}else{if(document.getElementById("embed_playercontent_full")){document.getElementById("embed_playercontent_full").innerHTML="";}
document.getElementById('player_video').zIndex='1';document.getElementById('player_video').style.width='20px';document.getElementById('player_video').style.height='auto';document.getElementById('player_video').style.marginLeft='960px';document.getElementById('player_video').style.backgroundColor='#FFFFFF';document.getElementById('divPlayerVideo').style.display='none';document.getElementById('bt_player_video').style.display='block';showSelectTags();}}
function hideSelectTags(){iNbCombo=document.getElementsByTagName('select').length;for(i=0;i<iNbCombo;i++){document.getElementsByTagName('select')[i].style.visibility="hidden";}}
function showSelectTags(){iNbCombo=document.getElementsByTagName('select').length;for(i=0;i<iNbCombo;i++){document.getElementsByTagName('select')[i].style.visibility="visible";}}
function displayPubHome(){document.getElementById('publicite_home').style.left='658px';document.getElementById('publicite_home').style.top='190px';document.getElementById('publicite_home').style.width='300px';document.getElementById('publicite_home').style.height='250px';document.getElementById('publicite_home').style.display='block';setTimeout("hidePubHome()",10000);}
function hidePubHome(){document.getElementById('publicite_home').style.left='808px';document.getElementById('publicite_home').style.top='315px';document.getElementById('publicite_home').style.width='150px';document.getElementById('publicite_home').style.height='125px';}
jQuery(document).ready(function(){onloadcall();});function onloadcall(){if(typeof(lancer_premiere_emission)=='function'){lancer_premiere_emission();}
if(typeof(InitAfficherComment_v2)=='function'){InitAfficherComment_v2();}
if(typeof(changeNavNews)=='function'){changeNavNews();}
if(typeof(InitAfficherComment)=='function'){InitAfficherComment();}
if(typeof(initScrollLayer1)=='function'){initScrollLayer1();}
if(typeof(videoExclu)=='function'){videoExclu(0);}
if(typeof(initPageSerie)=='function'){initPageSerie();}
if(typeof(initSportArticlesListe)=='function'){initSportArticlesListe();}
if(typeof(initSportArticle)=='function'){initSportArticle();}
if(typeof(initSportChangeComboJournee)=='function'){initSportChangeComboJournee();}
if(typeof(initVitrineSecondaireLive)=='function'){initVitrineSecondaireLive();}
if(typeof(initVitrineSecondaireNewsSport)=='function'){initVitrineSecondaireNewsSport();}}
function goToLog(){showIndification();document.getElementById('embed_playercontent_full').innerHTML='';document.getElementById('advertmessagecontent_full').innerHTML='';document.getElementById('advertcontent_full').innerHTML='';hideEmbedPlayer();closeVideoPlayer();}
function writeFlash(p){writeEmbed('D27CDB6E-AE6D-11cf-96B8-444553540000','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','application/x-shockwave-flash',p);}
function writeShockWave(p){writeEmbed('166B1BCA-3F9C-11CF-8075-444553540000','http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0','application/x-director',p);}
function writeQuickTime(p){writeEmbed('02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0','video/quicktime',p);}
function writeRealMedia(p){writeEmbed('CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','audio/x-pn-realaudio-plugin',p);}
function writeWindowsMedia(p){p.url=p.src;writeEmbed('6BF52A52-394A-11D3-B153-00C04F79FAA6','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701','application/x-mplayer2',p);}
function writeEmbed(cls,cb,mt,p){var h='',n;h+='<object classid="clsid:'+cls+'" codebase="'+cb+'"';h+=typeof(p.id)!="undefined"?'id="'+p.id+'"':'';h+=typeof(p.name)!="undefined"?'name="'+p.name+'"':'';h+=typeof(p.width)!="undefined"?'width="'+p.width+'"':'';h+=typeof(p.height)!="undefined"?'height="'+p.height+'"':'';h+=typeof(p.align)!="undefined"?'align="'+p.align+'"':'';h+='>';for(n in p)
h+='<param name="'+n+'" value="'+p[n]+'">';h+='<embed type="'+mt+'"';for(n in p)
h+=n+'="'+p[n]+'" ';h+='></embed></object>';document.write(h);};jQuery.fn.extend({selectbox:function(options){return this.each(function(){new jQuery.SelectBox(this,options);});}});if(!window.console){var console={log:function(msg){}}}
jQuery.SelectBox=function(selectobj,options){var opt=options||{};opt.inputClass=opt.inputClass||"selectbox";opt.containerClass=opt.containerClass||"selectbox-wrapper";opt.hoverClass=opt.hoverClass||"current";opt.currentClass=opt.selectedClass||"selected"
opt.debug=opt.debug||false;opt.direction=opt.direction||'auto';var elm_id=selectobj.id;var active=-1;var inFocus=false;var hasfocus=0;var $select=jQuery(selectobj);var $container=setupContainer(opt);var $input=setupInput(opt);$select.hide().before($input).before($container);init();$input.click(function(){if(!inFocus){positionContainer();}
else{if($container.is(':visible')&&!initFocus){hideMe();}
else{positionContainer();initFocus=false;}}}).focus(function(){if($container.not(':visible')){initFocus=true;inFocus=true;positionContainer();}}).blur(function(){if($container.is(':visible')&&hasfocus>0){if(opt.debug)console.log('container visible and has focus')}
else if(jQuery.browser.msie){if(document.activeElement.getAttribute('id').indexOf('_container')==-1){hideMe();}else{$input.focus();}}else{hideMe();}}).keydown(function(event){switch(event.keyCode){case 38:event.preventDefault();moveSelect(-1);break;case 40:event.preventDefault();moveSelect(1);break;case 13:event.preventDefault();jQuery('li.'+opt.hoverClass).trigger('click');break;case 27:hideMe();break;}});function hideMe(){hasfocus=0;$container.hide();}
function init(){$container.append(getSelectOptions($input.attr('id'))).hide();var width=$input.outerWidth()-2;$container.width(width+'px');}
function setupContainer(options){var container=document.createElement("div");$container=jQuery(container);$container.attr('id',elm_id+'_container');$container.addClass(options.containerClass);return $container;}
function setupInput(options){var input=document.createElement("input");var $input=jQuery(input);$input.attr("id",elm_id+"_input");$input.attr("type","text");$input.addClass(options.inputClass);$input.attr("autocomplete","off");$input.attr("readonly","readonly");$input.attr("tabIndex",$select.attr("tabindex"));return $input;}
function moveSelect(step){var lis=jQuery("li",$container);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
lis.removeClass(opt.hoverClass);jQuery(lis[active]).addClass(opt.hoverClass);}
function setCurrent(){var li=jQuery("li."+opt.currentClass,$container).get(0);var ar=(''+li.id).split('_');var el=ar[ar.length-1];$select.val(el).attr("selectedIndex",$container.find("li").index(li));$input.val(jQuery(li).html());return true;}
function positionContainer(){if($container.not(':visible')){var p=$input.position();var b=jQuery(document).height();var h=$select.children('option').length*12;$container.css('top',p.top+$input.outerHeight()+'px');$container.css('left',p.left+'px');$container.css('height',h+'px');$container.css('max-height',h+'px');$container.css('z-index','999');$container.show();if(opt.direction=='up'){$container.css('margin-top','-'+($container.outerHeight()+$input.outerHeight()-2)+'px');}
else if(opt.direction=='down'){}
else{if(b<jQuery(document).height()){$container.css('margin-top','-'+($container.outerHeight()+$input.outerHeight()-2)+'px');}}}
else{$container.hide();}}
function getCurrentSelected(){return $select.val();}
function getCurrentValue(){return $input.val();}
function getSelectOptions(parentid){var select_options=new Array();var ul=document.createElement('ul');$select.children('option').each(function(){var li=document.createElement('li');li.setAttribute('id',parentid+'_'+jQuery(this).val());li.innerHTML=jQuery(this).html();if(jQuery(this).is(':selected')){$input.val(jQuery(this).html());jQuery(li).addClass(opt.currentClass);}
ul.appendChild(li);jQuery(li).mouseover(function(event){hasfocus=1;if(opt.debug)console.log('over on : '+this.id);jQuery(event.target,$container).addClass(opt.hoverClass);}).mouseout(function(event){hasfocus=-1;if(opt.debug)console.log('out on : '+this.id);jQuery(event.target,$container).removeClass(opt.hoverClass);}).click(function(event){var fl=jQuery('li.'+opt.hoverClass,$container).get(0);if(opt.debug)console.log('click on :'+this.id);jQuery('li.'+opt.currentClass).removeClass(opt.currentClass);jQuery(this).addClass(opt.currentClass);setCurrent();hideMe();$select.change();});});return ul;}};;var lastContentId="";function Sondage_modif(action,temp_sondage,sondage_id,sondage_ordre,afficher_resultat){if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Sondage_modif(xmlDoc,temp_sondage);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Sondage_modif(xmlDoc,temp_sondage);};}
sURL="/processus/page/sport/xt_sondage.php";sParams="sondage_id="+sondage_id+"&action="+action+"&sondage_ordre="+sondage_ordre+"&temp_sondage="+temp_sondage+"&aff_resul="+afficher_resultat;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);}
function display_Sondage_modif(xmlDoc,temp_sondage){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;document.getElementById('cookie_'+temp_sondage).innerHTML=resultat;id_scroll='#cookie_'+temp_sondage;jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function Breves_modif(niv1,niv2,temp_breve,pid){if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Breves_modif(xmlDoc,temp_breve);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Breves_modif(xmlDoc,temp_breve);};}
document.getElementById('Bloc_En_Cours_'+temp_breve).value="";sURL="/processus/page/sport/xt_breves.php";sParams="pid="+pid+"&niv1="+niv1+"&niv2="+niv2+"&zone_tpl="+temp_breve;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);}
function display_Breves_modif(xmlDoc,temp_breve){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;document.getElementById('breve_'+temp_breve).innerHTML=resultat;id_scroll='#breve_'+temp_breve;jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function Breves_liste_popup(niv1,niv2,temp_breve,contentId){if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Breves_liste_popup(xmlDoc,temp_breve,contentId);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Breves_liste_popup(xmlDoc,temp_breve,contentId);};}
sURL="/processus/page/sport/xt_breves.php";sParams="niv1="+niv1+"&niv2="+niv2+"&zone_tpl="+temp_breve+"&popup=1&contentId="+contentId;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);jQuery('#breves_gauche').jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}
function display_Breves_liste_popup(xmlDoc,temp_breve,contentId){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;document.getElementById('breves_gauche').innerHTML=resultat;id_scroll='#breve_'+temp_breve;jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});if(!contentId){document.getElementById('breve_title_droit').innerHTML='';document.getElementById('content_breves_droit').innerHTML='';if(document.getElementById('idFirtBreve')){popup_Breves_partie_droite(temp_breve,document.getElementById('idFirtBreve').innerHTML);}}}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function initScrollPopup(){jQuery('#breves_gauche').jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}
function Display_div(element,param){if(param==1){document.getElementById(element).style.display='block';document.getElementById(element).style.visibility='visible';}
else
{document.getElementById(element).style.display='none';document.getElementById(element).style.visibility='hidden';}}
function Change_Selection_Breve(temp_breve,id_breve){if(document.getElementById('Bloc_En_Cours_'+temp_breve).value!=""){ancien_id=document.getElementById('Bloc_En_Cours_'+temp_breve).value;document.getElementById('Breve_Bloc_'+temp_breve+'_'+ancien_id).style.backgroundColor="#E5E5E5";Display_div('Breve_Txt_Long_'+temp_breve+'_'+ancien_id,0);Display_div('Breve_Txt_Court_'+temp_breve+'_'+ancien_id,1);}
document.getElementById('Breve_Bloc_'+temp_breve+'_'+id_breve).style.backgroundColor="#CCCCCC";Display_div('Breve_Txt_Court_'+temp_breve+'_'+id_breve,0);Display_div('Breve_Txt_Long_'+temp_breve+'_'+id_breve,1);document.getElementById('Bloc_En_Cours_'+temp_breve).value=id_breve;Change_Over_Breve(temp_breve,id_breve,0);id_scroll='#breve_'+temp_breve;jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}
function popup_Breves(niv1,niv2,temp_breve,pid,contentId){if(navigator.appVersion.indexOf('MSIE 6')>0){document.location.href='#';document.getElementById('content_alerte').style.position="absolute";document.getElementById('zone_alerte_grise_haut').style.position="absolute";document.getElementById('zone_alerte_grise_droite').style.position="absolute";document.getElementById('zone_alerte_grise_bas').style.position="absolute";document.getElementById('zone_alerte_grise_gauche').style.position="absolute";}
if(typeof(hideSelectTags)=='function'){hideSelectTags();}
if(document.getElementById('video_flash')){document.getElementById('video_flash').style.display='none';}
if(document.getElementById('idpublicitemegabanner')){document.getElementById('idpublicitemegabanner').style.display='none';}
if(document.getElementById('idpublicitepave')){document.getElementById('idpublicitepave').style.display='none';}
if(document.getElementById('CanalPlayerEmbarque')){document.getElementById('CanalPlayerEmbarque').playerPause();document.getElementById('CanalPlayerEmbarque').style.visibility='hidden';}
if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Popup_Breves(xmlDoc,niv1,temp_breve);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Popup_Breves(xmlDoc,niv1,temp_breve);};}
sURL="/processus/page/sport/xt_breves_v2.php";sParams="pid="+pid+"&niv1="+niv1+"&niv2="+niv2+"&zone_tpl="+temp_breve;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);Breves_liste_popup(niv1,niv2,temp_breve,contentId);initScrollPopup()
popup_Breves_partie_droite(temp_breve,contentId);refresh_pub_partenaire();}
function display_Popup_Breves(xmlDoc,niv1,temp_breve){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;if(document.getElementById('content_alerte')){document.getElementById('content_alerte').style.display="block";document.getElementById('content_alerte').style.left=String((screen.width-760)/2)+"px";document.getElementById('content_alerte').style.top="50px";document.getElementById('content_alerte').innerHTML=resultat;}
if(document.getElementById('zone_alerte_grise_haut')){document.getElementById('zone_alerte_grise_haut').style.display="block";document.getElementById('zone_alerte_grise_haut').style.left=String((screen.width-760)/2)+"px";document.getElementById('zone_alerte_grise_haut').style.height="50px";document.getElementById('zone_alerte_grise_haut').style.width="760px";}
if(document.getElementById('zone_alerte_grise_droite')){document.getElementById('zone_alerte_grise_droite').style.display="block";document.getElementById('zone_alerte_grise_droite').style.left=String((screen.width-760)/2+760)+"px";document.getElementById('zone_alerte_grise_droite').style.height="2000px";document.getElementById('zone_alerte_grise_droite').style.width="510px";}
if(document.getElementById('zone_alerte_grise_bas')){document.getElementById('zone_alerte_grise_bas').style.display="block";document.getElementById('zone_alerte_grise_bas').style.left=String((screen.width-760)/2)+"px";document.getElementById('zone_alerte_grise_bas').style.top="560px";document.getElementById('zone_alerte_grise_bas').style.height="1440px";document.getElementById('zone_alerte_grise_bas').style.width="760px";}
if(document.getElementById('zone_alerte_grise_gauche')){document.getElementById('zone_alerte_grise_gauche').style.display="block";document.getElementById('zone_alerte_grise_gauche').style.left="0px";document.getElementById('zone_alerte_grise_gauche').style.top="0px";document.getElementById('zone_alerte_grise_gauche').style.height="2000px";document.getElementById('zone_alerte_grise_gauche').style.width=String((screen.width-760)/2)+"px";}
jQuery(document).ready(function(){jQuery('#select_popup').selectbox();jQuery('#select_popup').change(function(){Breves_liste_popup(niv1,this.options[this.selectedIndex].value,'');});});}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function popup_Breves_partie_droite(zoneTplId,ContentId){if(document.getElementById('Breve_Txt_Long_'+zoneTplId+'_'+ContentId)&&document.getElementById('content_breves_droit')){document.getElementById('content_breves_droit').innerHTML=document.getElementById('Breve_Txt_Long_'+zoneTplId+'_'+ContentId).innerHTML;}
if(document.getElementById('Breve_Titre_'+zoneTplId+'_'+ContentId)&&document.getElementById('breve_title_droit')){document.getElementById('breve_title_droit').innerHTML=document.getElementById('Breve_Titre_'+zoneTplId+'_'+ContentId).innerHTML;}
if(lastContentId!=ContentId){if(document.getElementById('Breve_Txt_Long_'+zoneTplId+'_'+ContentId)){document.getElementById('title_news_gauche_'+zoneTplId+'_'+ContentId).className="sport_gras";}
if(document.getElementById('Breve_Txt_Long_'+zoneTplId+'_'+lastContentId)){document.getElementById('title_news_gauche_'+zoneTplId+'_'+lastContentId).className="";}
lastContentId=ContentId;}
jQuery('#content_breves_droit').jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});omniBreves.setTags();}
function closePopupDiv(){if(document.getElementById('content_alerte')){document.getElementById('content_alerte').style.display="none";}
if(document.getElementById('zone_alerte_grise_haut')){document.getElementById('zone_alerte_grise_haut').style.display="none";}
if(document.getElementById('zone_alerte_grise_droite')){document.getElementById('zone_alerte_grise_droite').style.display="none";}
if(document.getElementById('zone_alerte_grise_bas')){document.getElementById('zone_alerte_grise_bas').style.display="none";}
if(document.getElementById('zone_alerte_grise_gauche')){document.getElementById('zone_alerte_grise_gauche').style.display="none";}
if(document.getElementById('video_flash')){document.getElementById('video_flash').style.display='block';}
if(document.getElementById('idpublicitemegabanner')){document.getElementById('idpublicitemegabanner').style.display='block';}
if(document.getElementById('idpublicitepave')){document.getElementById('idpublicitepave').style.display='block';}
if(document.getElementById('CanalPlayerEmbarque')){document.getElementById('CanalPlayerEmbarque').style.visibility='visible';document.getElementById('CanalPlayerEmbarque').playerPlay();}
if(typeof(showSelectTags)=='function'){showSelectTags();}}
function Change_Over_Breve(temp_breve,id_breve,etat){if(document.getElementById('Bloc_En_Cours_'+temp_breve).value==id_breve){document.getElementById('Breve_Bloc_'+temp_breve+'_'+id_breve).className="txt-noir9 gris_fonce_vs_sport";}
else{if(etat==1){document.getElementById('Breve_Bloc_'+temp_breve+'_'+id_breve).className="txt-noir9 gris_clair_vs_sport";}
else{document.getElementById('Breve_Bloc_'+temp_breve+'_'+id_breve).className="txt-noir9 gris_fonce_vs_sport";}}}
function Change_Live_Scoring(type_live,temp_live,pid){Live_Scoring_modif(type_live,temp_live,pid);Display_div('ls_lien_Live_'+temp_live,0);Display_div('ls_lien_Venir_'+temp_live,0);Display_div('ls_lien_'+type_live+'_'+temp_live,1);Display_div('ls_titre_Live_'+temp_live,0);Display_div('ls_titre_Venir_'+temp_live,0);Display_div('ls_titre_'+type_live+'_'+temp_live,1);}
function Live_Scoring_modif(type_live,temp_live,pid){if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Live_Scoring_modif(xmlDoc,temp_live);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Live_Scoring_modif(xmlDoc,temp_live);};}
sURL="/processus/page/sport/xt_live_scoring.php";sParams="type_live="+type_live+"&pid="+pid;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);}
function display_Live_Scoring_modif(xmlDoc,temp_live){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;document.getElementById('live_'+temp_live).innerHTML=resultat;id_scroll='#live_'+temp_live;jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function Change_Live_Scoring_v2(type_live,temp_live,pid){Live_Scoring_modif_v2(type_live,temp_live,pid);}
function Live_Scoring_modif_v2(type_live,temp_live,pid){if(typeof window.ActiveXObject!='undefined'){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=function(){display_Live_Scoring_modif_v2(xmlDoc,type_live,temp_live);};}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=function(){display_Live_Scoring_modif_v2(xmlDoc,type_live,temp_live);};}
sURL="/processus/page/sport_v2/xt_live_scoring_v2.php";sParams="type_live="+type_live+"&pid="+pid;sURL+="?"+sParams;xmlDoc.open("GET",sURL,false);xmlDoc.send(null);}
function display_Live_Scoring_modif_v2(xmlDoc,type_live,temp_live){if(xmlDoc.readyState==4){if(xmlDoc.status==200){var resultat=xmlDoc.responseText;if(type_live=='Venir'){document.getElementById('content_avenir_'+temp_live).innerHTML=resultat;id_scroll='#content_avenir_'+temp_live;}else if(type_live=='Live'){document.getElementById('content_live_'+temp_live).innerHTML=resultat;id_scroll='#content_live_'+temp_live;}
jQuery(id_scroll).jScrollPane({showArrows:true,scrollbarWidth:11,arrowSize:14});}else{alert("There was a problem retrieving the data:\n"+xmlDoc.statusText);}}}
function openLSWindowTandR(year,wkno,lang,tabno,eventid,ref_file,width,height,hasScrollBars){var theWidth=width;var theHeight=height;var scrollBars="scrollbars";if(hasScrollBars==false)scrollBars="scrollbars=0";if((theWidth=="")||(theWidth==null))theWidth=500;if((theHeight=="")||(theHeight==null))theHeight=668;var theLeft=(screen.availWidth-theWidth)/2;var theTop=(screen.availHeight-theHeight)/2;var strCheckRef=escape(ref_file);var lsURL="http://www.protennislive.com/frameset.asp?year="+year+"&wkno="+wkno+"&lang="+lang+"&tabno="+tabno+"&eventid="+eventid+"&ref="+strCheckRef;var popupWin=window.open(lsURL,'_'+Math.round(Math.random()*1000000),'top='+theTop+',left='+theLeft+',menubar=0,toolbar=0,location=0,directories=0,status=0,'+scrollBars+',width='+theWidth+', height='+theHeight);}
function putPhotoOffVS(genre,id){for(i=1;i<=6;i++){if(document.getElementById(genre+'_'+i)){if(id!=i){document.getElementById(genre+'_'+i).className="zoneContenus imgOff_VS_VE";}}}}
function putPhotoOnVS(genre,id){for(i=1;i<=6;i++){if(document.getElementById(genre+'_'+i)){if(id!=i){document.getElementById(genre+'_'+i).className="zoneContenus imgOn_VS_VE";}}}}
function popupLiveMultiplex(pid,pidparent,cidlive){var strUrl='/index.php?pid='+pid+'&pidparent='+pidparent+'&cidlive='+cidlive;var retour=window.open(strUrl,'Tous_les_lives','height=635,width=835,resizable=yes,scrollbars=Yes');};function RObj(ea){var LS="";var QS=new Object();var un="undefined";var f="function";var n="number";var r="string";var e1="ERROR:Index out of range in\r\nRequest.QueryString";var e2="ERROR:Wrong number of arguments or invalid property assignment\r\nRequest.QueryString";var e3="ERROR:Object doesn't support this property or method\r\nRequest.QueryString.Key";function Err(arg){if(ea)alert("Request Object:\r\n"+arg)};function URID(t){var d="";if(t){for(var i=0;i<t.length;++i){var c=t.charAt(i);d+=(c=="+"?" ":c);};};return unescape(d);};function OL(o){var l=0;for(var i in o){if(typeof(o[i])!=f)l++;};return l;};function AK(key){var auk=true;for(var u in QS){if(typeof(QS[u])!=f&&u.toString().toLowerCase()==key.toLowerCase()){auk=false;return u;}};if(auk){QS[key]=new Object();QS[key].toString=function(){return TS(QS[key])};QS[key].Count=function(){return OL(QS[key])};QS[key].Count.toString=function(){return OL(QS[key]).toString()};QS[key].Item=function(e){if(typeof(e)==un)return QS[key];else{if(typeof(e)==n){var a=QS[key][Math.ceil(e)];if(typeof(a)==un)Err(e1+"(\""+key+"\").Item("+e+")");return a;}else Err("ERROR:Expecting numeric input in\r\nRequest.QueryString(\""+key+"\").Item(\""+e+"\")");}};QS[key].Item.toString=function(e){if(typeof(e)==un)return QS[key].toString();else{var a=QS[key][e];if(typeof(a)==un)Err(e1+"(\""+key+"\").Item("+e+")");return a.toString();};};QS[key].Key=function(e){var t=typeof(e);if(t==r){var a=QS[key][e];return(typeof(a)!=un&&a&&a.toString()?e:"");}else Err(e3+"("+(e?e:"")+")");};QS[key].Key.toString=function(){return un};};return key};function AVTK(key,val){if(key!=""){var key=AK(key);var l=OL(QS[key]);QS[key][l+1]=val;}};function TS(o){var s="";for(var i in o){var ty=typeof(o[i]);if(ty=="object")s+=TS(o[i]);else if(ty!=f)s+=o[i]+", ";};var l=s.length;if(l>1)return(s.substring(0,l-2));return(s==""?un:s);};function KM(k,o){var k=k.toLowerCase();for(var u in o){if(typeof(o[u])!=f&&u.toString().toLowerCase()==k)return u;};}if(window.location&&window.location.search){LS=window.location.search;var l=LS.length;if(l>0){LS=LS.substring(1,l);var preAmpAt=0;var ampAt=-1;var eqAt=-1;var k=0;var skip=false;for(var i=0;i<l;++i){var c=LS.charAt(i);if(LS.charAt(preAmpAt)=="="||(preAmpAt==0&&i==0&&c=="="))skip=true;if(c=="="&&eqAt==-1&&!skip)eqAt=i;if(c=="&"&&ampAt==-1){if(eqAt!=-1)ampAt=i;if(skip)preAmpAt=i+1;skip=false;};if(ampAt>eqAt){AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,ampAt)));preAmpAt=ampAt+1;eqAt=ampAt=-1;++k;};};if(LS.charAt(preAmpAt)!="="&&(preAmpAt!=0||i!=0||c!="=")){if(preAmpAt!=l){if(eqAt!=-1)AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,l)));else if(preAmpAt!=l-1)AVTK(URID(LS.substring(preAmpAt,l)),"");};if(l==1)AVTK(LS.substring(0,1),"");};};};var TC=OL(QS);if(!TC)TC=0;QS.toString=function(){return LS.toString()};QS.Count=function(){return(TC?TC:0)};QS.Count.toString=function(){return(TC?TC.toString():"0")};QS.Item=function(e){if(typeof(e)==un)return LS;else{if(typeof(e)==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof(QS[i])!=f&&++c==e)return QS[i];};Err(e1+"().Item("+e+")");}else return QS[KM(e,QS)];};return un;};QS.Item.toString=function(){return LS.toString()};QS.Key=function(e){var t=typeof(e);if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof(QS[i])!=f&&++c==e)return i;}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof(a)!=un&&a&&a.toString()?e:"");}else Err(e2+"().Key("+(e?e:"")+")");Err(e1+"().Item("+e+")");};QS.Key.toString=function(){Err(e2+"().Key");};this.QueryString=function(k){if(typeof(k)==un)return QS;else{var k=KM(k,QS);if(typeof(QS[k])==un){t=new Object();t.Count=function(){return 0};t.Count.toString=function(){return"0"};t.toString=function(){return un};t.Item=function(e){return un};t.Item.toString=function(){return un};t.Key=function(e){Err(e3+"("+(e?e:"")+")");};t.Key.toString=function(){return un};return t;}if(typeof(k)==n)return QS.Item(k);else return QS[k];}};this.QueryString.toString=function(){return LS.toString();};this.QueryString.Count=function(){return(TC?TC:0)};this.QueryString.Count.toString=function(){return(TC?TC.toString():"0")};this.QueryString.Item=function(e){if(typeof(e)==un)return LS.toString();else{if(typeof(e)==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof(QS[i])!=f&&++c==e)return QS[i];};Err(e1+".Item("+e+")");}else return QS[KM(e,QS)];}if(typeof(e)==(n))Err(e1+".Item("+e+")");return un;};this.QueryString.Item.toString=function(){return LS.toString()};this.QueryString.Key=function(e){var t=typeof(e);if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof(QS[i])=="object"&&(++c==e)){return i;}}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof(a)!=un&&a&&a.toString()?e:"");}else Err(e2+".Key("+(e?e:"")+")");Err(e1+".Item("+e+")");};this.QueryString.Key.toString=function(){Err(e2+".Key");};this.Version=1.2;this.Author="Andrew Urquhart (www.andrewu.co.uk)";};var Request=new RObj(false);function Left(str,n){if(n<=0)
return"";else if(n>String(str).length)
return str;else
return String(str).substring(0,n);}
function tracking(){var nbs_t=" border='0' height='1' width='1' alt=''>";refer=escape(document.referrer.toLowerCase());if(refer.length!=0){var ComingFrom=Request.QueryString("ls");if(ComingFrom=='undefined')ComingFrom='';if((refer.indexOf("127.0.0.1")<0)&&(ComingFrom=='')){var testrefer=new Array(40);var lengthrefer=new Array(40);testrefer[0]='http://www.google';testrefer[1]='http://rds.yahoo.com';testrefer[2]='http://fr.wrs.yahoo.com';testrefer[3]='http://de.wrs.yahoo.com';testrefer[4]='http://it.wrs.yahoo.com';testrefer[5]='http://nl.wrs.yahoo.com';testrefer[6]='http://chfr.wrs.yahoo.com';testrefer[7]='http://es.wrs.yahoo.com';testrefer[8]='http://search.msn';testrefer[9]='http://vachercher.lycos.fr';testrefer[10]='http://cerca.lycos.it';testrefer[11]='http://zoek.lycos.nl';testrefer[12]='http://search.lycos.ch';testrefer[13]='http://buscador.lycos.es';testrefer[14]='http://suche.lycos.de';testrefer[15]='http://suche.web.de';testrefer[16]='http://suche.t-online.de';testrefer[17]='http://search-dyn.tiscali.it';testrefer[18]='http://search.alice.it';testrefer[19]='http://search.bluewin.ch';testrefer[20]='http://www.qualigo';testrefer[21]='http://suche.aol.de';testrefer[22]='http://www.recherche.aol.fr';testrefer[23]='http://www.compuserve.nl';testrefer[24]='http://dh.search.ke.voila.fr';testrefer[25]='http://av.rds.yahoo.com';testrefer[26]='http://recherche.club-internet.fr';testrefer[27]='http://www.exalead';testrefer[28]='http://fr.ask.com';testrefer[29]='http://de.ask.com';testrefer[30]='http://es.ask.com';testrefer[31]='http://it.ask.com';testrefer[32]='http://nl.ask.com';testrefer[33]='http://uk.ask.com';testrefer[34]='http://www.ask.com';testrefer[35]='http://www.mozbot';testrefer[36]='http://www.accoona';lengthrefer[0]='17';lengthrefer[1]='20';lengthrefer[2]='23';lengthrefer[3]='23';lengthrefer[4]='23';lengthrefer[5]='23';lengthrefer[6]='25';lengthrefer[7]='23';lengthrefer[8]='17';lengthrefer[9]='26';lengthrefer[10]='21';lengthrefer[11]='20';lengthrefer[12]='22';lengthrefer[13]='24';lengthrefer[14]='21';lengthrefer[15]='19';lengthrefer[16]='24';lengthrefer[17]='28';lengthrefer[18]='22';lengthrefer[19]='24';lengthrefer[20]='18';lengthrefer[21]='19';lengthrefer[22]='27';lengthrefer[23]='24';lengthrefer[24]='28';lengthrefer[25]='23';lengthrefer[26]='33';lengthrefer[27]='18';lengthrefer[28]='17';lengthrefer[29]='17';lengthrefer[30]='17';lengthrefer[31]='17';lengthrefer[32]='17';lengthrefer[33]='17';lengthrefer[34]='18';lengthrefer[35]='17';lengthrefer[36]='18';for(i=0;(i<testrefer.length)&&(testrefer[i]!=null);i++)
{if(Left(document.referrer,lengthrefer[i])==testrefer[i])
{var ima='http://stats.searchtrack.net/rec.aspx?PU=CLIC&CLI_ID=100762&SIT_ID=6382&ZONE_ID=&NREF='+refer;document.write('<IMG SRC='+ima+nbs_t);}}}}};eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){m e=$.1q.A,p=$.1q.p;$.1q.P({A:7(){3(!1[0])f();3(1[0]==l)3(($.8.W||$.8.G)&&$(5).p()>n.16)6 n.12-i();s 6 n.12||$.I&&5.Z.1D||5.k.1D;3(1[0]==5)6 1A.1v(5.k.1P,5.k.1a);6 e.1s(1,1K)},p:7(){3(!1[0])f();3(1[0]==l)3(($.8.W||$.8.G)&&$(5).A()>n.12)6 n.16-i();s 6 n.16||$.I&&5.Z.1J||5.k.1J;3(1[0]==5)3($.8.W){m a=n.1p;n.17(22,n.1o);m b=n.1p;n.17(a,n.1o);6 5.k.14+b}s 6 1A.1v(5.k.20,5.k.14);6 p.1s(1,1K)},12:7(){3(!1[0])f();6 1[0]==l||1[0]==5?1.A():1.S(\':M\')?1[0].1a-h(1,\'t\')-h(1,\'1F\'):1.A()+h(1,\'1h\')+h(1,\'1E\')},16:7(){3(!1[0])f();6 1[0]==l||1[0]==5?1.p():1.S(\':M\')?1[0].14-h(1,\'r\')-h(1,\'1C\'):1.p()+h(1,\'1d\')+h(1,\'1B\')},1U:7(){3(!1[0])f();6 1[0]==l||1[0]==5?1.A():1.S(\':M\')?1[0].1a:1.A()+h(1,\'t\')+h(1,\'1F\')+h(1,\'1h\')+h(1,\'1E\')},1R:7(){3(!1[0])f();6 1[0]==l||1[0]==5?1.p():1.S(\':M\')?1[0].14:1.p()+h(1,\'r\')+h(1,\'1C\')+h(1,\'1d\')+h(1,\'1B\')},o:7(a){3(!1[0])f();3(a!=1y)6 1.1u(7(){3(1==l||1==5)l.17(a,$(l).q());s 1.o=a});3(1[0]==l||1[0]==5)6 n.1p||$.I&&5.Z.o||5.k.o;6 1[0].o},q:7(a){3(!1[0])f();3(a!=1y)6 1.1u(7(){3(1==l||1==5)l.17($(l).o(),a);s 1.q=a});3(1[0]==l||1[0]==5)6 n.1o||$.I&&5.Z.q||5.k.q;6 1[0].q},J:7(a){6 1.1t({X:z,F:z,u:1.w()},a)},1t:7(b,c){3(!1[0])f();m x=0,y=0,E=0,D=0,9=1[0],4=1[0],H,15,T=$.v(9,\'J\'),C=$.8.W,L=$.8.21,1I=$.8.13,1n=$.8.G,1m=z,1l=z,b=$.P({X:K,11:z,1k:z,F:K,1H:z,u:5.k},b||{});3(b.1H)6 1.1G(b,c);3(b.u.1j)b.u=b.u[0];3(9.B==\'Q\'){x=9.N;y=9.O;3(C){x+=h(9,\'U\')+(h(9,\'r\')*2);y+=h(9,\'V\')+(h(9,\'t\')*2)}s 3(1n){x+=h(9,\'U\');y+=h(9,\'V\')}s 3(L&&1g.I){x+=h(9,\'r\');y+=h(9,\'t\')}}s{Y{15=$.v(4,\'J\');x+=4.N;y+=4.O;3(C||L){x+=h(4,\'r\');y+=h(4,\'t\');3(C&&15==\'1f\')1m=K;3(L&&15==\'1Z\')1l=K}H=4.w||5.k;3(b.F||C){Y{3(b.F){E+=4.o;D+=4.q}3(1n&&($.v(4,\'1Y\')||\'\').1X(/1W-1V|1S/)){E=E-((4.o==4.N)?4.o:0);D=D-((4.q==4.O)?4.q:0)}3(C&&4!=9&&$.v(4,\'1c\')!=\'M\'){x+=h(4,\'r\');y+=h(4,\'t\')}4=4.1z}R(4!=H)}4=H;3(4==b.u&&!(4.B==\'Q\'||4.B==\'1b\')){3(C&&4!=9&&$.v(4,\'1c\')!=\'M\'){x+=h(4,\'r\');y+=h(4,\'t\')}3(($.8.13||$.8.G)&&$.v(H,\'J\')!=\'1e\'){x-=h(H,\'r\');y-=h(H,\'t\')}1x}3(4.B==\'Q\'||4.B==\'1b\'){3((1I||(L&&$.I))&&T!=\'1f\'&&T!=\'1w\'){x+=h(4,\'U\');y+=h(4,\'V\')}3((C&&!1m&&T!=\'1w\')||(L&&T==\'1e\'&&!1l)){x+=h(4,\'r\');y+=h(4,\'t\')}1x}}R(4)}m a=j(9,b,x,y,E,D);3(c){$.P(c,a);6 1}s{6 a}},1G:7(b,c){3(!1[0])f();m x=0,y=0,E=0,D=0,4=1[0],w,b=$.P({X:K,11:z,1k:z,F:K,u:5.k},b||{});3(b.u.1j)b.u=b.u[0];Y{x+=4.N;y+=4.O;w=4.w||5.k;3(b.F){Y{E+=4.o;D+=4.q;4=4.1z}R(4!=w)}4=w}R(4&&4.B!=\'Q\'&&4.B!=\'1b\'&&4!=b.u);m a=j(1[0],b,x,y,E,D);3(c){$.P(c,a);6 1}s{6 a}},w:7(){3(!1[0])f();m a=1[0].w;R(a&&(a.B!=\'Q\'&&$.v(a,\'J\')==\'1e\'))a=a.w;6 $(a)}});m f=7(){1Q"1O: 1g 1N S 1M";};m h=7(a,b){6 1T($.v(a.1j?a[0]:a,b))||0};m j=7(a,b,x,y,d,c){3(!b.X){x-=h(a,\'U\');y-=h(a,\'V\')}3(b.11&&($.8.13||$.8.G)){x+=h(a,\'r\');y+=h(a,\'t\')}s 3(!b.11&&!($.8.13||$.8.G)){x-=h(a,\'r\');y-=h(a,\'t\')}3(b.1k){x+=h(a,\'1d\');y+=h(a,\'1h\')}3(b.F&&($.8.G&&a.N!=a.o&&a.O!=a.o)){d-=a.o;c-=a.q}6 b.F?{1i:y-c,19:x-d,q:c,o:d}:{1i:y,19:x}};m g=0;m i=7(){3(!g){m a=$(\'<18>\').v({p:10,A:10,1c:\'1L\',J:\'1f\',1i:-1r,19:-1r}).27(\'k\');g=10-a.26(\'<18>\').25(\'18\').v({p:\'10%\',A:24}).p();a.23()}6 g}})(1g);',62,132,'|this||if|parent|document|return|function|browser|elem|||||||||||body|window|var|self|scrollLeft|width|scrollTop|borderLeftWidth|else|borderTopWidth|relativeTo|css|offsetParent|||false|height|tagName|mo|st|sl|scroll|opera|op|boxModel|position|true|ie|visible|offsetLeft|offsetTop|extend|BODY|while|is|elemPos|marginLeft|marginTop|mozilla|margin|do|documentElement|100|border|innerHeight|safari|offsetWidth|parPos|innerWidth|scrollTo|div|left|offsetHeight|HTML|overflow|paddingLeft|static|absolute|jQuery|paddingTop|top|jquery|padding|relparent|absparent|oa|pageYOffset|pageXOffset|fn|1000|apply|offset|each|max|fixed|break|undefined|parentNode|Math|paddingRight|borderRightWidth|clientHeight|paddingBottom|borderBottomWidth|offsetLite|lite|sf|clientWidth|arguments|auto|empty|collection|Dimensions|scrollHeight|throw|outerWidth|inline|parseInt|outerHeight|row|table|match|display|relative|scrollWidth|msie|99999999|remove|200|find|append|appendTo'.split('|'),0,{}));eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.V.x({t:5(f){2(!f.d)f.d=$.7.d++;2(!$.7.l)$.7.l=[];j 1.A(5(){2(1.4)j 1.4.n(f);8 1.4=[];1.4.n(f);c s=1;1.6=5(e){e=$.7.R(e||o.7);$.x(e,1.p||{});c a=0,m=P;2(e.u)a=e.u/M;2(e.H)a=-e.H/3;2(o.I)a=-e.u;r(c i=0;i<s.4.q;i++)2(s.4[i])2(s.4[i].U(s,e,a)===9){m=9;e.T();e.S()}j m};2($.k.h&&!1.b){1.b=5(e){1.p={F:e.F,E:e.E,D:e.D,C:e.C}};$(1).Q(\'B\',1.b)}2(1.g)2($.k.h)1.g(\'z\',1.6,9);8 1.g(\'t\',1.6,9);8 1.y=1.6;$.7.l.n($(1))})},v:5(f){j 1.A(5(){2(f&&1.4){r(c i=0;i<1.4.q;i++)2(1.4[i]&&1.4[i].d==f.d)O 1.4[i]}8{2($.k.h&&!1.b)$(1).N(\'B\',1.b);2(1.g)2($.k.h)1.w(\'z\',1.6,9);8 1.w(\'t\',1.6,9);8 1.y=G;1.4=1.6=1.b=1.p=G}})}});$(o).L(\'K\',5(){c a=$.7.l||[];r(c i=0;i<a.q;i++)a[i].v()})})(J);',58,58,'|this|if||_mwHandlers|function|_mwHandler|event|else|false||_mwFixCursorPos|var|guid|||addEventListener|mozilla||return|browser|_mwCache|returnValue|push|window|_mwCursorPos|length|for||mousewheel|wheelDelta|unmousewheel|removeEventListener|extend|onmousewheel|DOMMouseScroll|each|mousemove|clientY|clientX|pageY|pageX|null|detail|opera|jQuery|unload|one|120|unbind|delete|true|bind|fix|stopPropagation|preventDefault|call|fn'.split('|'),0,{}));jQuery.jScrollPane={active:[]};jQuery.fn.jScrollPane=function(settings)
{settings=jQuery.extend({scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true},settings);return this.each(function()
{var $this=jQuery(this);if(jQuery(this).parent().is('.jScrollPaneContainer')){var currentScrollPosition=settings.maintainPosition?$this.offset({relativeTo:jQuery(this).parent()[0]}).top:0;var $c=jQuery(this).parent();var paneWidth=$c.innerWidth();var paneHeight=$c.outerHeight();var trackHeight=paneHeight;if($c.unmousewheel){$c.unmousewheel();}
jQuery('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown',$c).remove();$this.css({'top':0});}else{var currentScrollPosition=0;this.originalPadding=$this.css('paddingTop')+' '+$this.css('paddingRight')+' '+$this.css('paddingBottom')+' '+$this.css('paddingLeft');this.originalSidePaddingTotal=(parseInt($this.css('paddingLeft'))||0)+(parseInt($this.css('paddingRight'))||0);var paneWidth=$this.innerWidth();var paneHeight=$this.innerHeight();var trackHeight=paneHeight;$this.wrap(jQuery('<div>').attr({'className':'jScrollPaneContainer'}).css({'height':paneHeight+'px','width':paneWidth+'px'}));jQuery(document).bind('emchange',function(e,cur,prev)
{$this.jScrollPane(settings);});}
var p=this.originalSidePaddingTotal;$this.css({'height':'auto','width':paneWidth-settings.scrollbarWidth-settings.scrollbarMargin-p+'px','paddingRight':settings.scrollbarMargin+'px'});var contentHeight=$this.outerHeight();var percentInView=paneHeight/contentHeight;if(percentInView<.99){var $container=$this.parent();$container.append(jQuery('<div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(jQuery('<div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(jQuery('<div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),jQuery('<div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'}))));var $track=jQuery('>.jScrollPaneTrack',$container);var $drag=jQuery('>.jScrollPaneTrack .jScrollPaneDrag',$container);if(settings.showArrows){var currentArrowButton;var currentArrowDirection;var currentArrowInterval;var currentArrowInc;var whileArrowButtonDown=function()
{if(currentArrowInc>4||currentArrowInc%4==0){positionDrag(dragPosition+currentArrowDirection*mouseWheelMultiplier);}
currentArrowInc++;};var onArrowMouseUp=function(event)
{jQuery('body').unbind('mouseup',onArrowMouseUp);currentArrowButton.removeClass('jScrollActiveArrowButton');clearInterval(currentArrowInterval);};var onArrowMouseDown=function(){jQuery('body').bind('mouseup',onArrowMouseUp);currentArrowButton.addClass('jScrollActiveArrowButton');currentArrowInc=0;whileArrowButtonDown();currentArrowInterval=setInterval(whileArrowButtonDown,100);};$container.append(jQuery('<a>').attr({'href':'javascript:;','className':'jScrollArrowUp'}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll up').bind('mousedown',function()
{currentArrowButton=jQuery(this);currentArrowDirection=-1;onArrowMouseDown();this.blur();return false;}),jQuery('<a>').attr({'href':'javascript:;','className':'jScrollArrowDown'}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll down').bind('mousedown',function()
{currentArrowButton=jQuery(this);currentArrowDirection=1;onArrowMouseDown();this.blur();return false;}));if(settings.arrowSize){trackHeight=paneHeight-settings.arrowSize-settings.arrowSize;$track.css({'height':trackHeight+'px',top:settings.arrowSize+'px'})}else{var topArrowHeight=jQuery('>.jScrollArrowUp',$container).height();settings.arrowSize=topArrowHeight;trackHeight=paneHeight-topArrowHeight-jQuery('>.jScrollArrowDown',$container).height();$track.css({'height':trackHeight+'px',top:topArrowHeight+'px'})}}
var $pane=jQuery(this).css({'position':'absolute','overflow':'visible'});var currentOffset;var maxY;var mouseWheelMultiplier;var dragPosition=0;var dragMiddle=percentInView*paneHeight/2;var getPos=function(event,c){var p=c=='X'?'Left':'Top';return event['page'+c]||(event['client'+c]+(document.documentElement['scroll'+p]||document.body['scroll'+p]))||0;};var ignoreNativeDrag=function(){return false;};var initDrag=function()
{ceaseAnimation();currentOffset=$drag.offset(false);currentOffset.top-=dragPosition;maxY=trackHeight-$drag[0].offsetHeight;mouseWheelMultiplier=2*settings.wheelSpeed*maxY/contentHeight;};var onStartDrag=function(event)
{initDrag();dragMiddle=getPos(event,'Y')-dragPosition-currentOffset.top;jQuery('body').bind('mouseup',onStopDrag).bind('mousemove',updateScroll);if(jQuery.browser.msie){jQuery('body').bind('dragstart',ignoreNativeDrag).bind('selectstart',ignoreNativeDrag);}
return false;};var onStopDrag=function()
{jQuery('body').unbind('mouseup',onStopDrag).unbind('mousemove',updateScroll);dragMiddle=percentInView*paneHeight/2;if(jQuery.browser.msie){jQuery('body').unbind('dragstart',ignoreNativeDrag).unbind('selectstart',ignoreNativeDrag);}};var positionDrag=function(destY)
{destY=destY<0?0:(destY>maxY?maxY:destY);dragPosition=destY;$drag.css({'top':destY+'px'});var p=destY/maxY;$pane.css({'top':((paneHeight-contentHeight)*p)+'px'});$this.trigger('scroll');};var updateScroll=function(e)
{positionDrag(getPos(e,'Y')-currentOffset.top-dragMiddle);};var dragH=Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2),settings.dragMaxHeight),settings.dragMinHeight);$drag.css({'height':dragH+'px'}).bind('mousedown',onStartDrag);var trackScrollInterval;var trackScrollInc;var trackScrollMousePos;var doTrackScroll=function()
{if(trackScrollInc>8||trackScrollInc%4==0){positionDrag((dragPosition-((dragPosition-trackScrollMousePos)/2)));}
trackScrollInc++;};var onStopTrackClick=function()
{clearInterval(trackScrollInterval);jQuery('body').unbind('mouseup',onStopTrackClick).unbind('mousemove',onTrackMouseMove);};var onTrackMouseMove=function(event)
{trackScrollMousePos=getPos(event,'Y')-currentOffset.top-dragMiddle;};var onTrackClick=function(event)
{initDrag();onTrackMouseMove(event);trackScrollInc=0;jQuery('body').bind('mouseup',onStopTrackClick).bind('mousemove',onTrackMouseMove);trackScrollInterval=setInterval(doTrackScroll,100);doTrackScroll();};$track.bind('mousedown',onTrackClick);if($container.mousewheel){$container.mousewheel(function(event,delta){initDrag();ceaseAnimation();var d=dragPosition;positionDrag(dragPosition-delta*mouseWheelMultiplier);var dragOccured=d!=dragPosition;return!dragOccured;},false);}
var _animateToPosition;var _animateToInterval;function animateToPosition()
{var diff=(_animateToPosition-dragPosition)/settings.animateStep;if(diff>1||diff<-1){positionDrag(dragPosition+diff);}else{positionDrag(_animateToPosition);ceaseAnimation();}}
var ceaseAnimation=function()
{if(_animateToInterval){clearInterval(_animateToInterval);delete _animateToPosition;}};var scrollTo=function(pos,preventAni)
{if(typeof pos=="string"){$e=jQuery(pos,this);if(!$e.length)return;pos=$e.offset({relativeTo:this}).top;}
ceaseAnimation();var destDragPosition=-pos/(paneHeight-contentHeight)*maxY;if(!preventAni||settings.animateTo){_animateToPosition=destDragPosition;_animateToInterval=setInterval(animateToPosition,settings.animateInterval);}else{positionDrag(destDragPosition);}};$this[0].scrollTo=scrollTo;$this[0].scrollBy=function(delta)
{var currentPos=-parseInt($pane.css('top'))||0;scrollTo(currentPos+delta);};initDrag();scrollTo(-currentScrollPosition,true);jQuery.jScrollPane.active.push($this[0]);}else{$this.css({'height':paneHeight+'px','width':paneWidth-this.originalSidePaddingTotal+'px','padding':this.originalPadding});}})};jQuery(window).bind('unload',function(){var els=jQuery.jScrollPane.active;for(var i=0;i<els.length;i++){els[i].scrollTo=els[i].scrollBy=null;}});;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}}}}}();;function sendForm(param_action_str,param_value_str){document.forms["paymentForm"].action=param_action_str;document.forms["paymentForm"].elements["data"].value=param_value_str;document.forms["paymentForm"].submit();}
function showFooter(){document.getElementById("footer").style.visibility="visible";return false;}
function redirectAfterDetection(param_connectionType_str){var addr=window.location.href;if(addr.indexOf('#')>-1){var tmp_addr=addr.substr(0,(addr.length-1));}else{var tmp_addr=addr;}
if(window.location.search==""){window.location.href=tmp_addr+"?detection=false&connectionType="+param_connectionType_str;}else{window.location.href=tmp_addr+"&detection=false&connectionType="+param_connectionType_str;}}
function openFullScreen(window_param){var browser;var os;if(navigator.appName.indexOf('Microsoft')>-1){browser='IE';}
if(navigator.userAgent.indexOf('Win')==-1){os='Macintosh';}
if(os=='Macintosh'){if(browser=='IE'){var decalLargeur=0;var decalHauteur=0;var largeurEcran=screen.availWidth+decalLargeur;var hauteurEcran=screen.availHeight+decalHauteur;var oWindow=window.open(window_param,"homewindow");oWindow.resizeTo(largeurEcran,hauteurEcran);}
else{var decalLargeur=-10;var decalHauteur=-30;var largeurEcran=screen.availWidth+decalLargeur;var hauteurEcran=screen.availHeight+decalHauteur;var oWindow=window.open(window_param,"homewindow","top=0, left=0, width="+largeurEcran+",height="+hauteurEcran);}}
else{if((browser=='IE')&&(os!='Macintosh')){oWindow=window.open(window_param,'homewindow','top=0, left=0, width='+screen.width+',height='+screen.height+',scrollbar=no,resizable=no,status=no,fullscreen=yes,maximized=yes');oWindow.resizeTo(screen.availWidth,screen.availHeight);oWindow.moveTo(screen.width-screen.availWidth,screen.height-screen.availHeight);}
else{oWindow=window.open(window_param,'homewindow','top=0, left=0, width='+screen.width+',height='+screen.height+',scrollbar=no,resizable=no,status=no');}}
oWindow.focus();}
function closeWindow(){window.close();}
function goDownloadCatalog(){alert("goDownloadCatalog");}
function goDownloadRingSizeGuide(){alert("goDownloadRingSizeGuide");}
function goDownloadJewelryCareGuide(){alert("goDownloadJewelryCareGuide");};function showIndificationMessage(typemsg){alertMsg=document.getElementById('authmessage');if(typemsg=='lck'){alertMsg.innerHTML='Attention, vous avez dépassé le nombre de tentatives de connexions ';window.top.document.getElementById('topidentification').style.height="260px";window.top.document.getElementById('topidentification_bas').style.height="245px";window.top.document.getElementById('topidentification_iframe').style.height="100%"}else if(typemsg=='mesinc'){alertMsg.innerHTML=' Merci de vérifier votre adresse email et votre mot de passe. <br/>Attention, le nombre de tentatives de connexion est limité.<br/> Au-delà de trois, nous vous inviterons à renouveler votre visite ultérieurement. ';window.top.document.getElementById('topidentification').style.height="300px";window.top.document.getElementById('topidentification_bas').style.height="320px";window.top.document.getElementById('topidentification_iframe').style.height="100%"}
alertMsg.style.display='block';}
function CheckFormAuth(){obj=document.getElementById('authentification');checktest=true;strAlert="";if(isBlank(obj.SUBSCRIBER_EMAIL.value)||!isMail(obj.SUBSCRIBER_EMAIL.value)){strAlert=strAlert+"Merci de remplir le champ \"Email\" avec une adresse email valide<br\>";checktest=false;}
if(isBlank(obj.SUBSCRIBER_PASSWORD.value)){strAlert=strAlert+"Merci de remplir le champ \"mot de passe\"<br\>";checktest=false;}
if(checktest){obj.submit();}else{if(strAlert!=""){window.top.document.getElementById('topidentification').style.height="290px";window.top.document.getElementById('topidentification_bas').style.height="265px";window.top.document.getElementById('topidentification_iframe').style.height="100%"}
alertMsg=document.getElementById('authmessage');alertMsg.innerHTML=strAlert;alertMsg.style.display='block';return false;}};function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24;}
var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
function Get_Cookie(check_name){var a_all_cookies=document.cookie.split(';');var a_temp_cookie='';var cookie_name='';var cookie_value='';var b_cookie_found=false;for(i=0;i<a_all_cookies.length;i++)
{a_temp_cookie=a_all_cookies[i].split('=');cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');if(cookie_name==check_name)
{b_cookie_found=true;if(a_temp_cookie.length>1)
{cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));}
return cookie_value;break;}
a_temp_cookie=null;cookie_name='';}
if(!b_cookie_found)
{return null;}}
function Delete_Cookie(name,path,domain){if(Get_Cookie(name))document.cookie=name+"="+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";};