var _gaq=_gaq||[];stat_condition={_undef:"undefined",_func:"function",_done:false,_prepared:false,_excluded:false,_gaOn:false,_gaSrc:"",_defpage:"",_objURL:null,_path:window.location.pathname,_preview:false,_async:true,_checked:false,_error:false,_isPageSet:false,_method:{async:true,preview:false},_xitisrc:{sync:"",async:"",clicks:""},_pathRemover:{common:"",next:false,enabled:false},Checked:function(){if(!stat_condition._checked){xtnv=document;xw=window;if(typeof xtdmc==stat_condition._undef){xtdmc=""}if(typeof xtprm==stat_condition._undef){xtprm=""}if(typeof xtclzone==stat_condition._undef){xtclzone=(xw.scriptOnClickZone!=null)?xw.scriptOnClickZone:0}if(typeof xtsd==stat_condition._undef){xtsd=""}if(typeof xtsite==stat_condition._undef){xtsite=""}if(typeof xnt2==stat_condition._undef){xnt2=""}if(typeof xtpage==stat_condition._undef){xtpage=""}if(typeof xtdi==stat_condition._undef){xtdi=0}if(typeof gasiteID==stat_condition._undef){gasiteID=""}stat_condition._checked=true;if(typeof STAT_Method=="object"&&typeof STAT_XitiSrc=="object"&&typeof STAT_PathRemover=="object"){stat_condition._method.async=STAT_Method.Async;stat_condition._xitisrc.sync=STAT_XitiSrc.Sync;stat_condition._xitisrc.async=STAT_XitiSrc.Async;stat_condition._xitisrc.clicks=STAT_XitiSrc.Clicks;stat_condition._pathRemover.common=STAT_PathRemover.Common;stat_condition._pathRemover.next=STAT_PathRemover.Next;if(typeof isCustomPreview==stat_condition._func){stat_condition._method.preview=isCustomPreview()}else{stat_condition._method.preview=STAT_Method.Preview}if(typeof doCustomCheck==stat_condition._func){stat_condition._error=!doCustomCheck()}}else{if(typeof _STAT=="object"&&typeof _GA=="object"&&typeof _XITISRC=="object"){stat_condition._method.async=_STAT.Async;gasiteID=_GA.SiteID;stat_condition._xitisrc.sync=_XITISRC.Sync;stat_condition._xitisrc.async=_XITISRC.Async;stat_condition._xitisrc.clicks=_XITISRC.Clicks;if(typeof STAT_PathRemover=="object"){stat_condition._pathRemover.common=STAT_PathRemover.Common;stat_condition._pathRemover.next=STAT_PathRemover.Next}if(typeof isCustomPreview==stat_condition._func){stat_condition._method.preview=isCustomPreview()}}else{if(typeof doCustomAlert==stat_condition._func){doCustomAlert("configuration-stat.js")}stat_condition._error=true}}}return !stat_condition._error}};stat_settings={_xtsd:"",_xtsite:"",_xtn2:"",_xtpage:"",_gasiteID:"",Collect:function(c,s,h){if(!stat_condition.Checked()){return}var d=c;var p=false;var a=false;stat_condition._isPageSet=false;stat_settings._xtpage="";for(var o=0;o<h.length;o++){if(c.substring(0,h[o][0].length)==h[o][0]||(o==(h.length-1)&&h[o][0]=="*")){if(c.length==h[o][0].length){p=true}else{if(h[o][0]!="*"){d=c.substring(h[o][0].length)}}var k=h[o].length;if(k>1){if(h[o][1].length>0){stat_settings._gasiteID=h[o][1]}if(k>2){if(h[o][2].length>0){stat_settings._xtsd=h[o][2]}if(k>3){if(h[o][3].length>0){stat_settings._xtsite=h[o][3];a=true}if(k>4){if(h[o][4].length>0){stat_settings._xtn2=h[o][4]}if(k>5){if(h[o][5].length>0){stat_settings._xtpage=h[o][5];stat_condition._isPageSet=(stat_settings._xtpage.length>0)}}}}}}break}}if(stat_settings._xtn2.length==0){stat_settings._xtn2="0"}if(stat_settings._xtn2=="0"){d=c}if(d.length>0||p){if(p){var b=c.split("/");d=""+b[b.length-1]}if(d.charAt(0)==="/"){d=d.substr(1)}var n=(stat_settings._xtpage.length>2&&stat_settings._xtpage.substr(stat_settings._xtpage.length-2,2)=="::");if(n&&p){stat_settings._xtpage=stat_settings._xtpage.substr(0,stat_settings._xtpage.length-2)}else{if(stat_settings._xtpage.length==0||n){stat_settings._xtpage+=trimString(d.split("/").join("::"))}}}if(stat_condition._defpage.length>0){stat_settings._xtpage=updateXtPageName(stat_settings._xtpage,stat_condition._defpage)}if(s!==undefined&&s!==null&&s.length>0){stat_settings._xtpage=s}else{if(stat_settings._xtpage.length==0||(!stat_condition._isPageSet&&xtpage.length>0)){stat_settings._xtpage=xtpage}}stat_settings._xtpage=filterXtPageName(stat_settings._xtpage);if(a&&stat_condition._method.preview&&stat_settings._xtsite.length>0){var g=getStatPreviewMap();var e=false,r=false,f=false;for(var m=0;m<g.length;m++){if(g[m][0]==stat_settings._xtsite||(m==(g.length-1)&&g[m][0]=="*")){var q=g[m].length;if(q>1&&g[m][1].length>0&&!e){stat_settings._xtsite=g[m][1];e=true}if(q>2&&g[m][2].length>0&&!r){stat_settings._xtsd=g[m][2];r=true}if(q>3&&!f){gasiteID=g[m][3];f=true}if((!e||!r||!f)&&(m<(g.length-2))){m=g.length-2}break}}}if("https:"==document.location.protocol&&stat_settings._xtsd.indexOf(document.location.protocol)<0){var g=getStatSecuredServerMap();var r=false;for(var m=0;m<g.length;m++){if(g[m][0]==stat_settings._xtsd||(m==(g.length-1)&&g[m][0]=="*")){if(g[m].length>1&&g[m][1].length>0&&!r){stat_settings._xtsd=g[m][1];r=true}if(!r&&(m<(g.length-2))){m=g.length-2}break}}}},Prepare:function(b){if(!stat_condition.Checked()){return}var a=getPageStatPath(stat_condition._path);stat_settings.Collect(a,b,getStatGlobalMap());if(stat_settings._xtsd.length>0){xtsd=stat_settings._xtsd}if(stat_settings._xtsite.length>0){xtsite=stat_settings._xtsite}if(stat_settings._gasiteID.length>0){gasiteID=stat_settings._gasiteID}if(typeof getCustomPath==stat_condition._func){a=getCustomPath(a,false)}stat_settings._xtn2=xtn2;stat_settings._xtpage=xtpage;stat_settings.Collect(a,b,getStatSettingsMap());if(stat_settings._xtsd.length>0){xtsd=stat_settings._xtsd}if(stat_settings._xtsite.length>0){xtsite=stat_settings._xtsite}if(stat_settings._gasiteID.length>0){gasiteID=stat_settings._gasiteID}xtn2=stat_settings._xtn2;xtpage=stat_settings._xtpage;stat_condition._excluded=(xtsd==""||xtsd=="!"||xtsite==""||xtsite=="!"||xtpage=="!");if(!stat_condition._excluded&&typeof isCustomExcluded==stat_condition._func){stat_condition._excluded=isCustomExcluded(a)}if(typeof setCustomXt==stat_condition._func){setCustomXt(a)}stat_condition._gaOn=(!stat_condition._excluded&&gasiteID.length>1);if(stat_condition._gaOn){stat_condition._gaSrc=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";if(stat_condition._method.async){_gaq.push(["_setAccount",gasiteID]);_gaq.push(["_setDomainName",getDomainCookie()]);if(typeof setCustomGA==stat_condition._func){setCustomGA(_gaq)}_gaq.push(["_trackPageview"])}}stat_condition._prepared=true}};function addPageEvent(d,c,b,a){if(d.addEventListener){d.addEventListener(c,function(){b(this)},false)}else{if(d.attachEvent){d.attachEvent("on"+c,function(){var e=window.event.srcElement;if(a!=undefined&&e.tagName!=a){e=e.parentNode}b(e)})}}}function addPageEventLink(b,a){addPageEvent(b,"click",a,"A")}function addPageEventLoad(b,a){addPageEvent(b,"load",a)}stat_link={_aExt:[],getLinkName:function(d){var b=xtpage;if(typeof getCustomLinkName==stat_condition._func){b=getCustomLinkName(d)}else{var c=d;var a=d.split("/");if(a.length>0){c=a[a.length-1]}b=(b!=="")?(b+"::"+c):c}return b},getLinkNodeName:function(a){return(typeof getCustomLinkNodeName==stat_condition._func)?getCustomLinkNodeName(a):stat_link.getLinkName(a.href)},getParentNodes:function(a){var c=[];if(a==null||a.length==0){c.push(document)}else{var f=a.split(":");if(f.length>0){if(f.length==1){var e=document.getElementById(f[0]);if(e){c.push(e)}}else{var b=document.getElementsByTagName(f[0]);for(var d=0;d<b.length;d++){if(b[d].className==f[1]){c.push(b[d])}}}}}return c},modifySelection:function(d,g,f,a){for(var h=0;h<d.length;h++){var c=d[h].getElementsByTagName("A");for(var e=0;e<c.length;e++){if(c[e].href.indexOf("javascript:")<0){if(g==null||g.length==0){f(c[e],a)}else{for(var b=0;b<g.length;b++){if(c[e].href.indexOf(g[b])>0){f(c[e],a);break}}}}}}},addMapEvent:function(c,d,e){if(!e||!e._aExt){e=stat_link}for(var b=0;b<c.length;b++){if(comparePath(stat_condition._path,c[b][0])||(b==(c.length-1)&&c[b][0]=="*")){if(c[b].length>1){var a=stat_link.getParentNodes(c[b][1]);if(c[b].length>2&&c[b][2].length>0){e._aExt=c[b][2].split("|")}stat_link.modifySelection(a,e._aExt,addPageEventLink,d)}break}}}};stat_download={_aExt:[],raiseDownloadClickTag:function(a){xt_med("C",xtn2,a,"T")},relayDownloadClickTag:function(a){stat_download.raiseDownloadClickTag(stat_link.getLinkNodeName(a))},addDownloadClickTags:function(){if((typeof getStatDownloadMap==stat_condition._func)){stat_link.addMapEvent(getStatDownloadMap(),stat_download.relayDownloadClickTag,stat_download)}},hookDownloadLink:function(){if(typeof setCustomDownloadHook==stat_condition._func){setCustomDownloadHook()}if(typeof STAT_windowOpen!=stat_condition._func){STAT_windowOpen=window.open}window.open=function(c,e,a,d){if(e=="_blank"){for(var b=0;b<stat_download._aExt.length;b++){if(c.indexOf(stat_download._aExt[b])>0){stat_download.raiseDownloadClickTag(stat_link.getLinkName(c));break}}}STAT_windowOpen(c,e,a,d)}},activate:function(){stat_download.addDownloadClickTags();addPageEventLoad(window,stat_download.hookDownloadLink)}};if(typeof getDomainCookie!=stat_condition._func){window.getDomainCookie=function(){return window.location.host.replace(/^[a-z-A-Z]+[0-9]*/,"").replace(/:[0-9]*/,"")}}function comparePath(a,e){var h=""+e;var i=""+a;var f=h.split("/");var c=i.split("/");var g=0;var d=0;if(f[0]===""){d++}if(c[0]===""){g++}while(g<c.length){if(d>=f.length){return false}if(c[g]!=f[d]){if(f[d]=="*"){while(f[d]=="*"&&d<f.length){d++}if(d>=f.length){return true}var b=true;while(g<c.length-1&&b){if(c[g]==f[d]&&c[g+1]!=f[d]){b=false}else{g++}}}else{return false}}else{g++;d++}}return true}function getUrlParser(b){var a=new Object();b.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(e,f,g,h){a[f]=h});return a}function getPageParam(a){if(stat_condition._objURL===null){stat_condition._objURL=getUrlParser(window.location.search)}return stat_condition._objURL[a]}function getPageStatPath(c){var b=c;if(stat_condition._pathRemover.enabled&&stat_condition._pathRemover.common.length>0){b=b.replace(new RegExp(stat_condition._pathRemover.common+"?","g"),"");if(stat_condition._pathRemover.next){b=b.replace(new RegExp("^/[^/]+/","g"),"")}}b=b.replace(/\/$/,"");var a=/\.(\w+($|\b\?))/.exec(b);if(a!=null){b=b.replace(a[0],"")}if(typeof getCustomPath==stat_condition._func){b=getCustomPath(b,true)}return b}function getPageMetaContent(c){var a=document.getElementsByTagName("meta");for(var b=0;b<a.length;b++){if(a[b].name==c){return a[b].content}}}function getPageLastTag(a){var b=document.getElementsByTagName(a);return(b!==undefined&&b.length>0)?b[b.length-1].innerHTML:""}function trimString(b){return(b.replace(/(^\s*)/g,"").replace(/(\s*$)/g,""))}function getXtPageName(b){var a=unescape(b);var c=a.lastIndexOf("::");return(c>=0)?a.substr(c+2):a}function updateXtPageName(b,a){return b.replace(getXtPageName(b),a)}function filterXtPageName(c){c=trimString(c);c=encodeURIComponent(c);var a=getXtPageName(c);var b=/!|=|,|;|:|§|!|µ|%|@|£|²|°|'|<|>|\"|&|#|{|}|\$|\[|\]|\*|\?|\+|\~|}|{|\^|\\|\|/g;return updateXtPageName(c,a.replace(b,"-").replace(/\s/g,"_"))}function getPageDomain(){return window.location.host.replace(/^[a-z-A-Z]+[0-9]*/,"").replace(/:[0-9]*/,"")}if(typeof getDomainCookie!=stat_condition._func){window.getDomainCookie=function(){return getPageDomain()}}function getXtdomain(){return(xtsd==""?xtsd:(xtsd+".xiti.com"))}function clickStat(g,a,b,j){var c=false;if(xtsite!==""){var d=new Image();var i=new Date();var h=getXtdomain()+"/hit.xiti?s="+xtsite+"&s2="+xtn2+"&p="+g+"&clic="+a+"&hl="+i.getHours()+"x"+i.getMinutes()+"x"+i.getSeconds();if(parseFloat(navigator.appVersion)>=4){h+="&r="+screen.width+"x"+screen.height+"x"+screen.pixelDepth+"x"+screen.colorDepth}c=true;d.src=h;d.onload=function(){d.onload=null}}if((b!==null)&&(b!==undefined)&&b!==""){if((j=="")||(j==null)||(j==undefined)){document.location=b}else{var e=window.open(b,"xfen","");e.focus()}}else{return c}}function xt_med(b,e,c,d,f,a){if(b==="C"){xtn2=e;clickStat(c,d,f,a)}}function linkStat(g,f,e,b,c){if(e.indexOf("javascript:")===0||f===undefined||f===""){return}var i=xtn2;var d="";if(e.indexOf("://")>=0&&e.indexOf(getPageDomain())===-1){d=e.substr(e.indexOf("://")+3)}else{i=xtn2;d=xtpage;var h=e;var a=e.split("/");if(a.length>0){h=a[a.length-1]}d=(d!=="")?(d+"::"+h):h}xt_med("C",i,d,b)}function setSyncScript(a){document.write(unescape("%3Cscript src='"+a+"' type='text/javascript'%3E%3C/script%3E"))}function setAsyncScript(a){var c=document.createElement("script");var b=document.getElementsByTagName("script")[0];c.type="text/javascript";c.async=true;c.src=a;b.parentNode.insertBefore(c,b)}function raiseAsyncMarkerGA(){setAsyncScript(stat_condition._gaSrc)}function raiseSyncMarkerGA(){setSyncScript(stat_condition._gaSrc);try{var a=_gat._getTracker(gasiteID);a._setDomainName(getDomainCookie());if(typeof setCustomGA==stat_condition._func){setCustomGA(a)}a._trackPageview()}catch(b){}}function raiseAsyncMarker(){if(stat_condition.Checked()){setAsyncScript(stat_condition._xitisrc.async);if(stat_condition._gaOn){raiseAsyncMarkerGA()}}}function raiseSyncMarker(){if(stat_condition.Checked()){setSyncScript(stat_condition._xitisrc.sync);if(stat_condition._gaOn){raiseSyncMarkerGA()}}}function pageStatPrepare(a){if(!stat_condition._prepared){stat_settings.Prepare(a)}return !stat_condition._excluded}function pageStatAsync(b){var a=pageStatPrepare(b);if(a){raiseAsyncMarker()}return a}function pageStatSync(b){var a=pageStatPrepare(b);if(a){raiseSyncMarker()}return a}function pageStatSub(a){stat_condition._defpage=a}function pageStat(c,b,d){var a=false;if(!stat_condition._done&&stat_condition.Checked()){stat_condition._path=c;stat_condition._preview=b;stat_condition._done=a=(stat_condition._method.async&&xtclzone===0)?pageStatAsync(d):pageStatSync(d)}if(typeof doCustomMarker==stat_condition._func){doCustomMarker()}return a}function pageStatInjection(a){stat_condition._pathRemover.enabled=true;pageStat(stat_condition._path,stat_condition._preview,a)};
