document.write('<div id="message_box"><span id="close_message">X</span><h1>GATC Debug</h1><p id="pd">This floating&draggable window allows you to debug tracked pageviews on this page to Google Analytics.</p> <p><strong>Tracked pageviews:</strong></p> <ul id="gatcpv"></ul></div>');function getURL(uri){uri.dir=location.href.substring(0,location.href.lastIndexOf('\/'));uri.dom=uri.dir;if(uri.dom.substr(0,7)=='http:\/\/')uri.dom=uri.dom.substr(7);uri.path='';var pos=uri.dom.indexOf('\/');if(pos>-1){uri.path=uri.dom.substr(pos+1);uri.dom=uri.dom.substr(0,pos);}
uri.page=location.href.substring(uri.dir.length+1,location.href.length+1);pos=uri.page.indexOf('?');if(pos>-1){uri.page=uri.page.substring(0,pos);}
pos=uri.page.indexOf('#');if(pos>-1){uri.page=uri.page.substring(0,pos);}
uri.ext='';pos=uri.page.indexOf('.');if(pos>-1){uri.ext=uri.page.substring(pos+1);uri.page=uri.page.substr(0,pos);}
uri.file=uri.page;if(uri.ext!='')uri.file+='.'+uri.ext;if(uri.file=='')uri.page='index';uri.args=location.search.substr(1).split("?");return uri;}
var uri=new Object();getURL(uri);$(document).ready(function()
{$('#message_box').animate({top:$(window).scrollTop()+"px",opacity:0.9},{queue:false,duration:350});$("#message_box").draggable();$(window).scroll(function()
{$('#message_box').animate({top:$(window).scrollTop()+"px"},{queue:false,duration:350});});$('#close_message').click(function()
{$('#message_box').animate({top:"+=15px",opacity:0},"slow");});});$('#message_box').append('<p id="joaocorreia">GATC Debug V1.0  - <a href="http://joaocorreia.pt/tools">joaocorreia.pt</a></p>');function GATCD(ua)
{pt='';this.ua=ua;}
GATCD.prototype._getTracker=function(ua){return new GATCD(ua);}
GATCD.prototype._trackPageview=function(pv)
{if(pv==null){pv=uri.path+"/"+uri.file;}
$('#gatcpv').append("<li>"+pv+"</li>");}
GATCD.prototype._setDomainName=function(dn)
{$('#pd').after("<p>setDomainName:"+dn+"</p>");}
_gat=new GATCD;
