/*! ********************** LICENSE ******************************
 Matriceo Tracking by RESONEO
 Authors   :     http://www.resoneo.com/ , by TL & OV, tracking (chez) resoneo (point) com
 Version  :     2011/07/11 9:00 - v5.5
 License terms :   CC  Attribution-Noncommercial-Share Alike 3.0 Unported
 http://creativecommons.org/licenses/by-nc-sa/3.0/ */
/*! http://www.JSON.org/json2.js Public Domain. 2010-03-20 */
if(!this.GAJSON){this.GAJSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toGAJSON!=="function"){Date.prototype.toGAJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toGAJSON=Number.prototype.toGAJSON=Boolean.prototype.toGAJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toGAJSON==="function"){value=value.toGAJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}if(typeof GAJSON.stringify!=="function"){GAJSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("GAJSON.stringify");}return str("",{"":value});};}if(typeof GAJSON.parse!=="function"){GAJSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("GAJSON.parse");};}}());
/*!* GACT LIBRARY **/
function r_gact(){var f=[];var e={};var k=5;var j=2036;var i=null;var c=15768000;var h=86400;var a=Math.round((new Date()).getTime()/1000);var b=0;var g=0;var d=9;this.getAllSources=function(){return f;};this.getDomainName=function(){if(i!==null){return i;}else{var l=document.domain;if(l.indexOf("www.")===0){l=l.substring(4);}return"."+l;}};this.getNbSources=function(){return f.length;};this.getLastSource=function(){return f[f.length-1];};this.getTimeLastSource=function(){if(this.getNbSources()>0){return f[f.length-1].da;}else{return a;}};this.checkTimeLastSource=function(){if((this.getTimeLastSource()+h)>a){return this.getTimeLastSource();}else{return a;}};this.getLastDirectStatus=function(){if(this.getNbSources()>0){return f[this.getNbSources()-1].d;}else{return 0;}};this.getTopLevel=function(){if(this.getNbSources()>0){return f[this.getNbSources()-1].lv;}else{return 0;}};this.getUrlVariable=function(n){var o=location.href.substring(location.href.indexOf("?")+1,location.href.length)+"&";if(o.indexOf("#")!==-1){o=o.substring(0,o.indexOf("#"))+"&";}var m=null;n=n+"=";var l=n.length;if(o.indexOf(n)!==-1){m=o.substring(o.indexOf(n)+l,o.length).substring(0,o.substring(o.indexOf(n)+l,o.length).indexOf("&"));}return m;};this.getTarget=function(){var l=this.readCookie("__utmmatch");if(l!==null){return l;}else{return"";}};this.checkTargetUrl=function(){var l=this.getUrlVariable("utm_match");if(l!==null){var m=c/24/60/60;this.createCookie("__utmmatch",l,m);e.ta=this.getTarget();}else{if(this.isNewSource(e)||this.isNewVisit()){if(this.getNbSources()>0){if(this.checkIfDirectAcces()===false){this.eraseCookie("__utmmatch");e.ta="";}}}}};this.isNewSource=function(l){return(GAJSON.stringify(l)!==GAJSON.stringify(this.getLastSource()));};this.compareSource=function(m){var l=this.getLastSource();return(m.cn===l.cn&&m.ta===l.ta&&m.ct===l.ct&&m.d===l.d&&m.lv===l.lv&&m.md===l.md&&m.sr===l.sr&&m.tr===l.tr);};this.isNewVisit=function(){if(typeof(window._gat)!=="undefined"){var l=this.readCookie("__utmb").split(".");return(l[1]===1);}return false;};this.addSource=function(){e.lv+=1;e.da=a;f.push(e);this.createCookie("r_gact_session",a,null);};this.checkIfDirectAcces=function(){var l=document.referrer;if(this.readCookie("r_gact_session")===null&&(l===null||l===""||l.indexOf(this.getDomainName().substr(1,this.getDomainName().length))>=0)&&this.compareSource(e)){return true;}else{if(this.readCookie("r_gact_session")!==null&&(parseInt(this.readCookie("r_gact_session"),10)+h)<a&&(l===null||l===""||l.indexOf(this.getDomainName().substr(1,this.getDomainName().length))>=0)&&this.compareSource(e)){return true;}}return false;};this.updateSourcesLog=function(){var m=this.readCookie("__utma").split(".");var n={};n.id=m[0]+"."+m[1];n.vs=this.getAllSources();var l=GAJSON.stringify(n);this.createCookie("r_gact",l,730);};this.getDomainForCookie=function(){var l=this.getDomainName();if(l===window.location.hostname){return"";}else{return" domain="+l;}};this.createCookie=function(n,o,p){var l;if(p){var m=new Date();m.setTime(m.getTime()+(p*24*60*60*1000));l="; expires="+m.toGMTString();}else{l="";}document.cookie=n+"="+o+l+"; path=/"+";"+this.getDomainForCookie();};this.readCookie=function(q){var o=q+"=";var l=document.cookie.split(";");var m=0;for(m=0;m<l.length;m+=1){var p=l[m];while(p.charAt(0)===" "){p=p.substring(1,p.length);}if(p.indexOf(o)===0){return p.substring(o.length,p.length);}}return null;};this.eraseCookie=function(l){this.createCookie(l,"",-1);};this.getUtm=function(p){var r="";try{r=this.decodeValue(this.readCookie("__utmz"));try{r=this.decodeValue(r);}catch(u){}}catch(n){r=this.readCookie("__utmz");}var l=r.indexOf("utm");var m=r.substring(l);var s=m.split("|");var t="";var o=0;for(o;o<s.length;o+=1){if(s[o].indexOf("utm"+p)>=0){t=s[o];}}var q=t.indexOf("=");return this.encodeValue(t.substring(q+1));};this.encodeValue=function(l){if(typeof(encodeURIComponent)==="function"){return encodeURIComponent(l);}else{return escape(l);}};this.decodeValue=function(l){if(typeof(decodeURIComponent)==="function"){return decodeURIComponent(l.replace(/\+/," "));}else{return unescape(l);}};this.getUrlParam=function(m){m=m.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var l="[\\?&]"+m+"=([^&#]*)";var o=new RegExp(l);var n=o.exec(window.location.href);if(n===null){return null;}else{return this.decodeValue(n[1]);}};this.linkByPost=function(m,l){l.action=this.getLink(l.action);m._linkByPost(l);};this.getLink=function(m){var q=m.indexOf("?");var n=m.indexOf("#");var o="r_gact="+this.encodeValue(this.readCookie("r_gact")+"EOV");var l=m;if(q===-1&&n===-1){l=m+"?"+o;}else{if(n===-1){l=m+"&"+o;}else{if(q===-1){l=m.substring(0,n)+"?"+o+m.substring(n);}else{l=m.substring(0,n)+"&"+o+m.substring(n);}}}if(l.length<=this.max_get){return l;}else{return m;}};this.receiver=function(){var m=this.getUrlParam("r_gact");if(m!==null&&(m.match("EOV$")==="EOV")){var l=m.indexOf("EOV");m=m.substring(0,l);this.createCookie("r_gact",m,730);}};this.setVisitSessionTimeout=function(l){h=parseInt(l,10);};this.setCookieTimeout=function(l){c=parseInt(l,10);};this.setDomainName=function(l){i=l;};this.setMaxLevel=function(m){k=parseInt(m,10);};this.trackSource=function(){window.clearTimeout(b);if(this.readCookie("__utmb")===null||this.readCookie("__utmz")===null){b=window.setTimeout("this.trackSource()",75*g);g+=1;return;}if(g>d){return;}if(this.readCookie("r_gact")!==null){var n=this.readCookie("r_gact").indexOf("utmcmd");if(n===-1){var m=GAJSON.parse(this.readCookie("r_gact"));f=m.vs;}else{this.eraseCookie("r_gact");}}e.da=this.checkTimeLastSource();e.lv=this.getTopLevel();e.cn=this.getUtm("ccn");e.sr=this.getUtm("csr");e.tr=this.getUtm("ctr");e.md=this.getUtm("cmd");e.ct=this.getUtm("cct");e.ta=this.getTarget();e.d=this.getLastDirectStatus();e.ts=[];this.checkTargetUrl();if(this.getNbSources()>0){if(this.isNewSource(e)){if(this.checkIfDirectAcces()===true){e.d=1;}else{e.d=0;}this.addSource();}if(this.getNbSources()>k){var l=[];l.push(f[0]);var o=1;for(o;o<=k-1;o+=1){l[k-o]=f[this.getNbSources()-o];}f=l;}}else{this.addSource();}this.updateSourcesLog();};this.setMaxGET=function(l){var m=parseInt(l,10);if((m+1>1)&&!isNaN(m)){this.max_get=m;}};this.getSourcesLog=function(n,t,u,r,o){var m="";if(f.length>0){var q=f;if(u===true){m="1";}else{m="0";}var s={id:n.split(".").join("_"),tt:t.split(".").join(","),ty:r.split(".").join(","),cl:o.split(".").join(","),ok:m};q[f.length-1].ts.push(s);var l=this.readCookie("__utma").split(".");var p={};p.id=l[0]+"."+l[1];p.vs=q;return GAJSON.stringify(p);}else{if(g<=d){g+=1;this.trackSource();this.getSourcesLog(n,t,u,r,o);}}return"Erreur: impossible de trouver les sources de visite";};}function trackErrorThroughEvent(b,a){if(window._gaq&&window._gaq!==undefined){_gaq.push(["_trackEvent","Erreur JS "+(a||"native")+"#nav:"+navigator.userAgent+" Except: "+(b.name||"Error"),b.message||b," url: "+document.location.href+"#ref: "+document.referrer]);}}
