// (c) 2007 screenwork

function Statistic_Log()
{this.client_id=1;this.googleAnalyticsId=null;}
Statistic_Log.prototype.getResolution=function()
{return window.screen.width+'x'+
window.screen.height+'x'+
window.screen.colorDepth+'bit';}
Statistic_Log.prototype.base64_encode=function(decStr)
{var base64s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';var bits;var dual;var i=0;var encOut='';while(decStr.length>=i+3){bits=(decStr.charCodeAt(i++)&0xff)<<16|(decStr.charCodeAt(i++)&0xff)<<8|decStr.charCodeAt(i++)&0xff;encOut+=base64s.charAt((bits&0x00fc0000)>>18)+
base64s.charAt((bits&0x0003f000)>>12)+
base64s.charAt((bits&0x00000fc0)>>6)+
base64s.charAt((bits&0x0000003f));}
if(decStr.length-i>0&&decStr.length-i<3){dual=Boolean(decStr.length-i-1);bits=((decStr.charCodeAt(i++)&0xff)<<16)|(dual?(decStr.charCodeAt(i)&0xff)<<8:0);encOut+=base64s.charAt((bits&0x00fc0000)>>18)+
base64s.charAt((bits&0x0003f000)>>12)+
(dual?base64s.charAt((bits&0x00000fc0)>>6):'=')+'=';}
return(encOut);}
Statistic_Log.prototype.doGoogleAnalytics=function()
{if(this.googleAnalyticsId){document.write('<script type="text/javascript">_uacct = "'+this.googleAnalyticsId+'";urchinTracker();</script>');}}
Statistic_Log.prototype.run=function()
{var url="/cms?module=Statistic.Log";if(url.substr(-1)!="?"&&url.substr(-1)!="&"){if(url.indexOf("?")==-1){url+="?";}else{url+="&";}}
document.write('<img src="'+url+'client_id='+this.client_id+'&'+'document_url='+this.base64_encode(document.URL)+'&'+'referer='+this.base64_encode(document.referrer)+'&'+'add_data[]=resolution::'+this.getResolution()+'" alt="" width="1" height="1" />');this.doGoogleAnalytics();}
var statistic_log=new Statistic_Log();