// Copyright & source: http://pdf.tchwork.com/fr/js/w?8454&src=1
(function(){var r=document,n=r.domain,i=window.opener||window.parent,t;while(1){try{t=i.document.domain;break}catch(e){};t=n.indexOf('.');if(t<0)break;n=n.substr(t+1);try{r.domain=n}catch(e){break}}})();var footerHtml=[],antiCSRF='';function t(t,e){return e?(typeof t==e):(typeof t!='undefined')};function str(n,e){return t(n)?''+n:(t(e)?''+e:'')};function num(e,n){return n?(t(e)?(t(e,'string')&&''+e/1==e?e/1:e):''):(parseFloat(e)||0)};function esc(e){return t(e,'string')?e.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;'):e};function unesc(e){return t(e,'string')&&0<=e.indexOf('&')?e.replace(/&#039;/g,'\'').replace(/&quot;/g,'"').replace(/&gt;/g,'>').replace(/&lt;/g,'<').replace(/&amp;/g,'&'):e};function setcookie(i,r,n,t,e){document.cookie=i+'='+eUC(r)+(n?'; expires='+n.toGMTString():'')+(t?'; path='+t:'')+(e?'; domain='+e:'')};function parseurl(r,t,i,n){var e;n=n||{};r=r.split(t);while(r.length){e=r.shift();if(i)e=e.replace(i,'');t=e.indexOf('=');if(t>0)n[dUC(e.substring(0,t))]=num(esc(dUC(e.substring(t+1))),1)};return n};function syncCSRF(e){var t,n=antiCSRF;if(!e){e=document.forms;e=e[e.length-1]};if(n&&'post'==e.method.toLowerCase()){if(t=e.action){t=t.match(/^https?:\/\/([^\/:]+)\.?(:[^\/]*)?(\/[^\?#]*)/);if(!t)return;t[2]='.'+location.hostname;if((t[1].length-t[2].length+1)!=('.'+t[1]).indexOf(t[2]))return};if(e.T$)e.T$.value=n;else if(e.firstChild){t=document.createElement('input');t.type='hidden';t.name='T$';t.value=n;e.T$=t;e.insertBefore(t,e.firstChild)}else e.innerHTML+='<input type="hidden" name="T$" value="'+n+'" />';if(!e.syncCSRF){t=e.onsubmit;e.syncCSRF=1;e.onsubmit=function(){this.T$.value=antiCSRF;return t&&t()}};e=0}};function resyncCSRF(){var t=resyncCSRF,n=document,r=n.forms,e=n.cookie.match(/(^|; )T\$=([-_0-9a-zA-Z]+)/);e=e&&e[2];if(antiCSRF=antiCSRF||e){if(antiCSRF!=e)t.t$=0,antiCSRF=e;while(t.t$<r.length)syncCSRF(r[t.t$++]);return e}};resyncCSRF.t$=0;onDOMLoaded=[];onDOMLoaded.go=function(){var e,t;resyncCSRF();if(window.scrollCntrl)scrollCntrl(),scrollCntrl=0;if(document.removeChild){t=document.getElementsByName('w$');e=t.length;while(e--)t[e].parentNode.removeChild(t[e])};t=onDOMLoaded;for(e=0;e<t.length;++e)t[e](),t[e]=0;onDOMLoaded=[];onDOMLoaded.go=function(){}};w=function(s,U,f,u,m){f/=1;var o=document,N=0,b='',B=0,T=0,A=0,S=[],h=0,F=[],E=0,n,l,a=[],p,C,i,e,d=f,k='',g={},y=/(^|; )JS=[01](; |$)/,v=esc('http://pdf.tchwork.com/fr/');m=!m?v+'js/x':'data:text/javascript,w.c()';try{o.execCommand('BackgroundImageCache',false,true)}catch(n){};if(!/MSIE [0-5]\./.test(navigator.userAgent)&&!y.test(o.cookie)){n=location.host.match(/[^.]+\.[^\.0-9]+$/);n=n?'.'+n[0]:0;setcookie('JS',1,new Date(86400000+new Date()/1),'/',n);y.test(o.cookie)||setcookie('JS',1,0,'/',n)};window.base=function(n,i,r){t(n)||(n='');if(!/^[a-z][-.+a-z0-9]*:/i.test(n)){r=r?v:e.__BASE__;i=!n||i;n=(0==n.indexOf('/')?r.substr(0,r.indexOf('/',8)):r)+n;if(!i&&'/'!=n.substr(-1))n+=(-1==n.indexOf('?')?'?':'&')+f};return n};function I(e){t(e)&&(E?F[E]:u).push(e)};function R(i,n,c,a,r,l,o){if(n){if(-1==i.indexOf('?'))i+='?';if(c){antiCSRF&&(n.T$=antiCSRF);if(n.e$)for(r in n)n[r]=num(str(n[r]),1);else for(r in n)n[r]=num(n[r],1);o=[];for(r=0;r<c.length;++r)if((l=c[r])&&t(n[l]))o.push('&amp;'+eUC(l)+'='+eUC(unesc(n[l])));o=o.join('');if(n.e$&&o)n.__URI__+='?'+o.substr(5);p=n;i+=o}else{w.k=function(a,t,o,i,l){t=esc(t);o=esc(o);i+='';n.__0__=i;i=i.split('/');for(r=0;r<i.length;++r)n['__'+(r+1)+'__']=i[r];if(t!=e.__BASE__){d=a/1;n.__DEBUG__=e.__DEBUG__;n.__LANG__=e.__LANG__;n.__BASE__=t;n.__HOST__=t.substr(0,t.indexOf('/',8)+1);n.__AGENT__=o?o+'/':'';n.__URI__=t+o;n.__REFERER__=e.__REFERER__;n.__LANG_ALT__=e.__LANG_ALT__;n.e$=1;e=n};R(t+o+'?p:=a',n,l,2)};i+='&amp;p:=k:'+e.__LANG__;a=0}};k=a?i:'';return a&&t(g[i])?w(g[i][0],g[i][1],a-1?0:h):(b=i,!w.w())};w=function(s,u,A){0&&c&&r&&x;u=u||[];A=A||0;var N,l=0,U=p,T=d,B=e,D=[function(i){var n=i[l++],r;if(n){i[l-1]=0;n=n.split('.');r=n.length;while(r--)n[r]=t(window['P$'+n[r]])?'':('.'+n[r]);n=n.join('');if(n)return R(e.__BASE__+'?p:=p:'+esc(n.substr(1)))}},function(s){var n=b(s),r=b(s),c=s[l++],o=s[l++],i,a,f;if(!t(n))return;if(t(n,'function')){n=n();while(f=n())i=f;n=i.a$;c=i.k$?i.k$.split(','):[];for(a in i)if(!/\$/.test(a))t(r[a])||(r[a]=i[a]);if(i.r$)o=[i.v$,i.r$]};n=esc(n);if(!o)n=e.__BASE__+n+'?p:=t';else{if(o>1){if(/^(\/|https?:\/\/)/.test(n)){if(2==o)return;c=0}}else if(1!=o){d=o[0]/1;r.__DEBUG__=e.__DEBUG__;r.__LANG__=e.__LANG__;r.__BASE__=esc(o[1]);r.__HOST__=r.__BASE__.substr(0,r.__BASE__.indexOf('/',8)+1);r.__AGENT__=n?n+'/':'';r.__URI__=r.__BASE__+n;r.__REFERER__=e.__REFERER__;r.__LANG_ALT__=e.__LANG_ALT__;r.e$=1;e=r};n=c?e.__BASE__+n+'?p:=a':base(n,1)};return R(n,r,c,1)?1:-1},function(e){I(e[l++])},function(e){I(b(e))},function(e){F[++E]=[]},function(r){var t=r[l++],n;if(1==t)t=e;else if(2==t)t=C;else if(t){n=t-2;t=i;while(--n)t=t.$}else t=p;t[r[l++]]=num(F[E--].join(''),1)},function(e){l+=e[l]},function(e){(b(e)&&++l)||(l+=e[l])},function(n){var e=b(n);(e&&(t(e,'function')||(e=O(e/1)))&&e()()&&++l)||(l+=n[l]);s=i},function(e){(a()&&(l-=e[l]))||++l;s=i;if(new Date-y>500)return R(m)}];if(!A){y=new Date;resyncCSRF();if(v==e.__BASE__&&(n=o.cookie.match(/(^|; )v\$=([0-9]+)(; |$)/))&&(n=n[2]/1)!=f)f=d=T=n,u=[],w.r()};if(k&&!g[k]){g[k]=[s,u];if(s)for(n in s)s[n]=esc(s[n])};if(s)s.$=i=s;else s=i;N=s;function b(n,t){t=n[l++];return'function'==typeof t||(t&&eval('t=n[l-1]=function(a,d,v,g,z,r){return '+t+'}'))?t(p,C,i,e,L,e.__BASE__):t;w};S[++h]=function(){var o=D,t=u,r=t.length,n;C=N;p=U;i=s;d=T;e=B;while(++l<=r)if(n=o[t[l-1]](t)){if(0<n)return 1;C=N;p=U;i=s;d=T;e=B};S[h]=0};do if(S[h]())return 1;while(--h>A);if(!h)return!w.w()};w.w=function(){var n=b,t=T?'':u.join(''),r=0,e=t.search(/<\/script\b/i);b='';w.c=w;u=[];while(e>=0){N=0;if('>'==t.charAt(r+e+8)&&r+e!=t.length-9){e+=9;b=n;w.c=w.w;n=m;break};r+=e+8;e=t.substr(r).search(/<\/script\b/i)};if(e>=0);else if(N)e=0;else{e=t.substr(r).search(/<script\b/i);if(e>=0)N=1};if(0<=e)e+=r,u=[t.substr(e)],t=t.substring(0,e);e=!!n;e||(n=m);if('http'==n.substring(0,4))n+=(0<=n.indexOf('?')?'&amp;':'?')+'v$='+d;n='<script name="w$" src="'+n+'"></script>';if(e){if(B||/(^|; )T\$=1/.test(o.cookie))B=1;else n='<script name="w$">document.cookie="R$="+eUC((""+location).replace(/#.*$/,""))+"; path=/"</script>'+n;o.write(t+n)}else{w=O=L=w.c=w.k=w.w=w.r=w.x=a=0;if(T){o.close();o=0;location.reload(A)}else{w={c:function(){e=(e=o.cookie.match(/(^|; )v\$=([0-9]+)(; |$)/))&&e[2]/1!=f;w=w.c=o=0;e?location.reload():onDOMLoaded.go()}};e=t.search(/<\/body\b/i);if(0<=e)n+=t.substr(e),t=t.substr(0,e);o.write(t+n);o.close()}}};w.r=function(n,t){if(v!=e.__BASE__)setcookie('cache_reset_id',f,0,'/');T=true;A=A||!!t;if(n)h=S.length=0};w.x=function(e){if(!e[0])return 0;var o,n,f,r,s,u,c=e[1][0]?function(l,d){r=e[o];n+=d=r[0];if(n+d>=r.length)return t(e[++o])?(n=0,c()):(i=i.$,a=s,0);i={};for(l=1;l<=d;++l)i[r[l]]=esc(r[l+n]);i.$=f;i.iteratorPosition=u++;return i}:function(){return 0};function l(){return f=i,s=a,u=n=0,o=1,a=c};l.toString=function(){return''+e[0]};return l};function O(t){t=parseInt(t);if(!(t>0))return 0;var e=new Array(t+2);e[0]=e[1]=1;e=[t,e];return w.x(e)};function L(r,l,o,i,n){n=o?e:p;if(!t(n[r]))n[r]=0;i=n[r]/1||0;n[r]+=l;return i};if(!resyncCSRF()){n='2';do n=(Math.random()+n).substr(2);while(n.length<33);n=n.substr(0,33);setcookie('T$',n,0,encodeURI('/'),encodeURI(''));antiCSRF=/(^|; )T\$=2/.test(o.cookie)?n:''};l=location;e=parseurl(l.search.replace(/\+/g,'%20').substring(1),'&',/^amp;/);l=(''+l).replace(/#.*$/,'');e.__DEBUG__=0;e.__HOST__='http://pdf.tchwork.com/';e.__LANG__='fr';e.__BASE__=v;e.__AGENT__=s?esc(s)+'/':'';e.__URI__=esc(l);e.__REFERER__=esc(o.referrer);e.__LANG_ALT__=u&&w.x(u);u=[];if(t(s)){l=esc(dUC(l).substr(26+s.length).split('?',1)[0]).split('/');for(n=0;n<l.length;++n)if(l[n])a[a.length]=e['__'+(a.length+1)+'__']=l[n];e.__0__=a.join('/');l=o.cookie.match(/(^|; )v\$=([0-9]+)(; |$)/);s='"'+s+'"';w(0,l&&l[2]/1!=f?[3,'w(w.r())']:(/Safari/.test(navigator.userAgent)?[4,1,s,'g',U,1,5,1,'b',3,'g.b']:[1,s,'g',U,1]))}};function loadW(e){e=window;if(e.encodeURI){e.dUC=decodeURIComponent;e.eUC=encodeURIComponent;(function(t){if(t=location.hash.match(/@([0-9]+),([0-9]+)$/)){(e.scrollCntrl=function(){var e=document.documentElement||document.body,r=Math.min(t[1],e.scrollWidth),n=Math.min(t[2],e.scrollHeight);e&&scrollTo(r,n);if(r!=e.scrollLeft||n!=e.scrollTop)setTimeout('scrollCntrl&&scrollCntrl()',100)})()}})();e.a?w(a[0],a[1],a[2],a[3],a[4]):w()}else document.write('<script src="http://pdf.tchwork.com/fr/js/compat"></script>')};function P$base(t,e){return base(str(t),e)};loadW();if(!window.valid){valid=function(t,i,e){if(t.disabled||t.readOnly)return 1;if(''==t.value)return'';e=[e];for(var n=3,r=valid.arguments;n<r.length;n++)e[e.length]=r[n];return window['valid_'+i]?window['valid_'+i](t.value,e):1};valid_int=function(e,n){e=e.replace(/[,\. ']+/g,'');if(!/^\s*[+-]?[0-9]+\s*$/.test(e))return false;e-=0;if(t(n[0])&&e<n[0])return false;if(t(n[1])&&e>n[1])return false;return true};valid_float=function(e,n){e=e.replace(/ '/g,'').replace(/,/g,'.');e=parseFloat(e);if(isNaN(e))return false;if(t(n[0])&&e<n[0])return false;if(t(n[1])&&e>n[1])return false;return true};valid_char=function(e,t){e=(' '+e+' ').replace(/[ \t\r\n]+/g,' ');e=e.substr(1,e.length-2);return valid_text(e,t)};valid_text=function(t,e){t=t.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]+/g,'');if(e[0]){e=(' '+e.join(':')).replace(/([^\\](\\\\)*)\./g,'$1[\\s\\S]');e=new RegExp('^('+e+')$');if(!e.test(' '+t))return false};return true};valid_email=function(e,t){if(/^\s*$/.test(e))return true;e=e.toLowerCase();return/^\s*[-!#-&*+\/-9=?A-Z^-~]+(\.[-!#-&*+\/-9=?A-Z^-~]+)*@[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)*\s*$/.test(e)?e:false};valid_phone=function(e,t){e=e.replace(/[^+0-9]+/g,'').replace(/^00/,'+');return/^\+?[0-9]{4,}$/.test(e)&&(!t[0]||e.indexOf('+')==0)};valid_date=function(e,n){var t=new Date();t=t.getFullYear();e=e.replace(/^[^0-9]+/,'');e=e.replace(/[^0-9]+$/,'');e=e.split(/[^0-9]+/);if(e.length==2)e[2]=t;else if(1==e.length){e=e[0];if(4==e.length||6==e.length||8==e.length){e=[e.substr(0,2),e.substr(2,2),(e.substr(4)-0)||t]}else e=''};if(e.length!=3)return'';e[2]-=0;if(e[2]<100){e[2]+=1900;if(t-e[2]>80)e[2]+=100};n=new Date(e[2],e[1]-1,e[0]);e[2]=n.getFullYear();e[1]=n.getMonth()+1;if(e[1]<10)e[1]='0'+e[1];e[0]=n.getDate();if(e[0]<10)e[0]='0'+e[0];return e.join('-')};function getCaret(r){var n,e=r.selectionStart;if(!t(e)&&document.selection){e=document.selection.createRange();try{n=e.duplicate();n.moveToElementText(r)}catch($e){n=r.createTextRange()};n.setEndPoint('EndToStart',e);e=n.text.length};return e>=''?e:r.value.length};function setSel(e,n,t){if(e.setSelectionRange)e.setSelectionRange(n,t);else if(e.createTextRange){e=e.createTextRange();e.collapse(true);e.moveEnd('character',t);e.moveStart('character',n);e.select()}else return 0;return 1};getCheckStatus=IgCS=function(){var e=this,n=0,r=0,t;if(e.disabled||this.readOnly||((''+e.value).length&&e.checked))return 1;for(;n<e.length;++n){t=e[n];if(t.disabled||t.readOnly)++r;else if((''+t.value).length&&t.checked)return 1};return(n&&r==e.length)?1:''};getSelectStatus=IgSS=function(){var e=this;return(e.disabled||e.readOnly||!e.options.length||(e.selectedIndex>=0&&(''+e.options[e.selectedIndex].value).length))?1:''};checkElementStatus=IcES=function(o,i,n){var r=1,e,t,a,l;while(r<o.length){e=i[''+o[r]];a=o[++r];l=o[++r];++r;if(!e)continue;if(!e.gS){switch(e.type||e[0].type){case'radio':case'checkbox':e.gS=IgCS;break;case'select':e.gS=IgSS;break;default:e.gS=function(){return 1}}};if(e.type=='text'&&e.placeholder&&/\splaceholder\b/.test(e.className)){e.value='';t=e.gS();e.value=e.placeholder}else t=e.gS();if(t)continue;t=''+t;t=t?l:a;if(t){alert(t);e=e.type?e:e[0];if(e.type!='hidden'){if(e.focus)e.focus();if(e.select)e.select()};return i=e=false}};if(n){n=document;n=n.documentElement||n.body;e=i.action;e=0>e.indexOf('#')?(e+='#'):e.replace(/@([0-9]+),([0-9]+)$/,'');e+='@'+n.scrollLeft+','+n.scrollTop;if('@0,0'!=e.substr(-4))i.action=e};return i=n=true};labelClick=IlC=function(e){e=document.getElementById(e.htmlFor);if(!e.type&&e[0]){var t=0;while(t+1<e.length&&(e[t].disabled||e[t].readOnly))++t;e=e[t]};e&&!e.disabled&&!e.readOnly&&e.focus();return false};lastCheckbox=0;checkboxClick=IcbC=function(l,e){l=l||event;if(e)e=e.form[e.htmlFor],e=e[0]||e;var r=lastCheckbox,t=e||this,o=t.form[t.name],a=0,i=0,n;if(t.readOnly||t.disabled)return;if(e){e.focus();if(e.type=='checkbox')e.click();else return e.click(),false};lastCheckbox=t;if(l.shiftKey&&o.length&&r&&r!=t){for(;a<o.length;++a){n=o[a];if(i&&!n.readOnly&&!n.disabled)n.checked=r.checked;if(n==t||n==r)i=i?0:1};setTimeout('lastCheckbox.checked='+(r.checked?1:0),0)};if(e)return false};formStack=[];function gLE(n,r,i){var e;if(n){if(t(lF[n]))e=lF[n];else{e=document.getElementsByName(n);if(e.length)e=e[e.length-1];lF[n]=e};if(r)lF[n.substr(0,n.length-2)]=e;if(i)formStack.push(e)};return e||false};function FeC(e){document.write('<input type="image" width="1" height="1" src="'+base('img/blank.gif',1,1)+'" alt="&nbsp;" style="position:absolute;top:0;left:0;border:0;" onclick="return '+(e==2?'enterControl(this.form)':'false')+'" />')};function enterControl(i){var e=0,t,n=document.getElementsByTagName('*'),r=n.length;while(++e<r&&n[e]!=i.v_lastFocusedElt);while(++e<r){t=n[e];if(t.form==i&&/^(submit|image)$/.test(t.type)){t.click();break}};return false};function maxlengthTextarea(){var e=this,n=e.getAttribute('maxlength'),t=e.value,r=/\stoomuch(\s|$)/;if(n){t=t.replace(/\r\n?/g,'\n').length;if(r.test(e.className))t>n||(e.className=e.className.replace(r,'$1'));else if(t>n)e.className+=' toomuch'}};function autofitTextarea(){var t=this,r=t.style,e,n;t.checkMaxlength();if(t.autofitEnabled&&'hidden'==t.style.overflow){e=document.createElement('textarea');n=e.style;e.value=t.value;n.visibility='hidden';n.position='absolute';n.top='0px';n.left='0px';n.height=t.v_offsetHeight+'px';n.width=t.v_offsetWidth+'px';t.parentNode.appendChild(e);r.height=e.offsetHeight<e.scrollHeight?e.scrollHeight+'px':n.height;r.width=e.offsetWidth<e.scrollWidth?e.scrollWidth+'px':n.width;t.parentNode.removeChild(e)}};onDOMLoaded.push(function(){var t=0,e,n=document.getElementsByTagName('textarea');for(;t<n.length;++t){e=n[t];e.checkMaxlength=maxlengthTextarea;e.autofit=autofitTextarea;if(!e.onkeyup){if(e.getAttribute('maxlength'))e.onkeyup=e.checkMaxlength;if('visible'==(window.getComputedStyle&&document.defaultView.getComputedStyle(e,null).getPropertyValue('overflow'))||(e.currentStyle&&e.currentStyle.overflow)||e.style.overflow){e.style.overflow='hidden';e.v_offsetHeight=e.offsetHeight;e.v_offsetWidth=e.offsetWidth;e.onkeyup=e.autofit;e.autofitEnabled=1};e.onkeyup&&e.onkeyup()}}});onDOMLoaded.push(function(){scrollCntrl=0;var o=0,n=window,i=document.forms,t,r,e;for(;o<i.length;++o){t=i[o];t.v_onsubmit=t.onsubmit;t.onsubmit=function(t){var e=this,r,n;if(e.precheck&&!e.precheck(t))return false;t=e.v_onsubmit&&e.v_onsubmit(t);if(!t&&'false'==''+t)return false;for(r=0;r<e.length;++r){n=e[r];if(n.type=='text'&&n.placeholder&&/\splaceholder\b/.test(n.className))n.value=''};if(e.UPLOAD_IDENTIFIER&&window.loadUpload)loadUpload(e)};n.v_onbeforeunload=n.onbeforeunload;n.onbeforeunload=function(o){var r=0,t,i=document.forms,e;for(;r<i.length;++r){for(t=0;t<i[r].length;++t){e=i[r][t];if(e.type=='text'&&e.placeholder&&/\splaceholder\b/.test(e.className)){e.value=''}}};if(n.v_onbeforeunload)return n.v_onbeforeunload(o)};for(r=0;r<t.length;++r){e=t[r];if(e.type=='checkbox')e.onclick=e.onclick||checkboxClick;if(e.type!='submit'&&e.type!='image'){e.v_onfocus=e.onfocus;if(e.type=='text'&&e.placeholder){e.onfocus=function(t){var e=this;e.form.v_lastFocusedElt=e;if(/\splaceholder\b/.test(e.className)){e.value='';e.className=e.className.replace(/\splaceholder\b/g,'')};t=e.v_onfocus&&e.v_onfocus(t);if(!t&&'false'==''+t)return false};e.v_onblur=e.onblur;e.onblur=function(t){var e=this;if(''==e.value){e.className+=' placeholder';e.value=e.placeholder}else{e.className=e.className.replace(/\splaceholder\b/g,'')};t=e.v_onblur&&e.v_onblur(t);if(!t&&'false'==''+t)return false};e.onblur()}else{e.onfocus=function(t){var e=this;e.form.v_lastFocusedElt=e;t=e.v_onfocus&&e.v_onfocus(t);if(!t&&'false'==''+t)return false}}}}};n=i=t=e=0})};