var _NB_MAX_CONTENU_=1,_TAILLE_MAX_CONTENU_=100,_TAILLE_MAX_CHAINE_=50,_TAILLE_MAX_ALPHANUM_=30,w_compteur,COOKIE_SEGMENTATION="wbo_segment_";function wreport_counter(f,e,d,g,c,b,a){this.site=d;this.section;this.subsection;this.channel="";this.content="";this.nb_content=0;this.url="";this.frame=g;this.segmentation=["","","","",""];this.profiles="";this.profiling_cookie_mode=1;this.cookie_segmentation=COOKIE_SEGMENTATION;this.domaine_segmentation="";this.counter=new Image(1,1);this.profiling_cookie_mode=profiling_cookie_mode;this.generate_url=generate_url;this.add_content=add_content;this.add_channel=add_channel;this.add_group=add_group;this.add_profile=add_profile;this.add_profiles=add_profiles;this.delete_profiles=delete_profiles;this.get_profiles=get_profiles;this.count=count;this.section=traite_chaine(f,_TAILLE_MAX_ALPHANUM_);this.subsection=traite_chaine(e,_TAILLE_MAX_ALPHANUM_);c!=null&&this.add_channel(c);b!=null&&a!=null&&this.add_group(b,a);this.cookie_segmentation+=d}function generate_url(){var c=new Date;this.date=parseInt(c.getTime()/1e3-60*c.getTimezoneOffset());this.ref=""+escape(document.referrer);this.ta="0x0";this.co=0;this.nav=navigator.appName;this.get_profiles();if(parseInt(navigator.appVersion)>=4){this.ta=screen.width+"x"+screen.height;this.co=this.nav!="Netscape"?screen.colorDepth:screen.pixelDepth}if(this.frame!=null&&this.nav!="Netscape"){var a="parent.document.referrer";if(this.frame<5&&this.frame>0)for(_k=this.frame;_k>1;_k--)a="parent."+a;var e=eval(a);if(document.referrer==parent.location||document.referrer=="")this.ref=""+escape(e)}if(location.protocol=="https:")this.url="https://netscope.secure.marktest.pt";else this.url="http://netscope.data.marktest.pt";this.url+="/fcgi-bin/comptage_wreport.fcgi?WRP_ID="+this.site;if(this.profiles!=null)this.url+="&WRP_PFL="+this.profiles;var f=wf_uaO("mac")!=-1,d=wf_uaO("opera")!=-1;if(!f&&!d){var b=navigator.userAgent.indexOf("MSIE");if(b>0)if(parseInt(navigator.userAgent.charAt(b+5))>=5){document.body.addBehavior("#default#clientCaps");this.cnx=document.body.connectionType=="modem"?"A":"B";document.body.addBehavior("#default#homePage");this.home=document.body.isHomePage(location.href)?"A":"B";this.url+="&CONN="+this.cnx+"&ISHOME="+this.home}}this.url+="&WRP_SECTION="+this.section+"&WRP_SUBSECTION="+this.subsection;if(this.site_grp!=null&&this.section_grp!=null&&this.subsection_grp!=null)this.url+="&WRP_ID_GRP="+this.site_grp+"&WRP_SECTION_GRP="+this.section_grp+"&WRP_SUBSECTION_GRP="+this.subsection_grp;if(this.content!=null)this.url+="&WRP_CONTENT="+this.content;if(this.channel!=null)this.url+="&WRP_CHANNEL="+this.channel;this.url+="&ver=2&da2="+this.date+"&ta="+this.ta+"&co="+this.co+"&ref="+this.ref}function count(){this.generate_url();this.counter.src=this.url;return 1}function add_channel(a){if(a==null)return 0;this.channel=traite_chaine(a,_TAILLE_MAX_CHAINE_);return 1}function add_group(b,a){this.site_grp=WEBO_ID_GROUPE;this.section_grp=traite_chaine(b,_TAILLE_MAX_ALPHANUM_);this.subsection_grp=traite_chaine(a,_TAILLE_MAX_ALPHANUM_)}function add_content(a){if(a==null)return 0;this.nb_content++;if(this.nb_content>_NB_MAX_CONTENU_)return 0;if(this.nb_content>1)this.content=this.content.concat("|");a=a.replace("|"," ");this.content=this.content.concat(traite_chaine(a,_TAILLE_MAX_CONTENU_));return 1}function profiling_cookie_mode(a){if(a=="on")this.profiling_cookie_mode=1;else this.profiling_cookie_mode=0}function add_profile(b,c){b=parseInt(b,10);if(b<1||b>5)return-2;if(this.profiling_cookie_mode==0){b--;this.segmentation[b]=c;return 1}if(parseInt(navigator.appVersion,10)<=3)return-1;nb_mois=12;var g=/^\d+$/;if(g.test(c))c=encode_en_lettre(c);var f=/^\w*$/;if(f.test(c)){var e=GetCookie(this.cookie_segmentation);tab_segment=["","","","",""];if(e!=null){tab_segment=e.split("|");if(tab_segment.length!=5)tab_segment=("","","","","");if(tab_segment[b-1]==c)return 1}if(this.domaine_segmentation==""){this.domaine_segmentation=window.location.host;tab_points=[];tab_points=window.location.host.split(".");if(tab_points.length>2)this.domaine_segmentation=this.domaine_segmentation.substring(this.domaine_segmentation.indexOf("."),this.domaine_segmentation.length);if(tab_points.length==2)this.domaine_segmentation="."+this.domaine_segmentation}for(var d="",a=1;a<=5;a++){if(a==b)tab_segment[a-1]=c;if(tab_segment[a-1]==""||tab_segment[a-1]==null)tab_segment[a-1]="";d+=tab_segment[a-1];if(a<5)d+="|"}expd=new Date;expd.setTime(expd.getTime()+nb_mois*30*24*3600*1e3);SetCookie(this.cookie_segmentation,d,expd,"/",this.domaine_segmentation);return 2}else return-3}function add_profiles(a,b,c,d,e){this.add_profile(1,a);this.add_profile(2,b);this.add_profile(3,c);this.add_profile(4,d);this.add_profile(5,e)}function delete_profiles(){if(this.profiling_cookie_mode==0)this.segmentation=Array("","","","","");else{expd=new Date;expd.setTime(expd.getTime()-24*3600*1e3);SetCookie(this.cookie_segmentation,"||||",expd,"/",this.domaine_segmentation)}}function get_profiles(){this.profiles=GetCookie(this.cookie_segmentation);if(this.profiles==null){this.profiles="";for(var b=/^\d+$/,a=1;a<=5;a++){if(b.test(this.segmentation[a-1]))this.segmentation[a-1]=encode_en_lettre(this.segmentation[a-1]);this.profiles+=this.segmentation[a-1];if(a<5)this.profiles+="|"}}this.profiles=escape(this.profiles)}function encode_en_lettre(a){a=parseInt(a,10);if(a>2500)return"";var b=parseInt(a/52,10),c=a%52;b+=65;if(b>90)b+=6;c+=65;if(c>90)c+=6;var d=String.fromCharCode(b)+String.fromCharCode(c);return d}function traite_chaine(a,e){var f="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-.,;:_ %",c,b="";if(a==null)return"";a=""+a;a=a.substr(0,e);for(c=0;c<a.length;c++){var d=a.charAt(c);if(f.indexOf(d)!=-1)b+=d}b=escape(b);return b}function wf_uaO(b){var a=navigator.userAgent.toLowerCase();return a.indexOf(b)}function getCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1)a=document.cookie.length;return unescape(document.cookie.substring(b,a))}function GetCookie(f){var b=f+"=",d=b.length,e=document.cookie.length,a=0;while(a<e){var c=a+d;if(document.cookie.substring(a,c)==b)return getCookieVal(c);a=document.cookie.indexOf(" ",a)+1;if(a==0)break}return null}function SetCookie(f,e,a,c,b,d){document.cookie=f+"="+escape(e)+(a?"; expires="+a.toGMTString():"")+(c?"; path="+c:"")+(b?"; domain="+b:"")+(d?"; secure":"")}function wreport(d,a,f,e,c,b){w_compteur=new wreport_counter(d,a,f,e,b);w_compteur.add_content(c);w_compteur.count()}function wreport_groupe(f,c,h,b,a,g,e,d){w_compteur=new wreport_counter(f,c,h,g,d,b,a);w_compteur.add_content(e);w_compteur.count()}function wreport_click(g,d,a,f,e,c,b){w_compteur=new wreport_counter(d,a,f,e,b);w_compteur.add_content(c);w_compteur.count();w_compteur.counter.onload=function(){document.location=g}}function wreport_click_groupe(i,f,c,h,b,a,g,e,d){w_compteur=new wreport_counter(f,c,h,g,d,b,a);w_compteur.add_content(e);w_compteur.count();w_compteur.counter.onload=function(){document.location=i}}wreport_ok=1;
