var WRWarn="Copyright 2006-2008 ClickTale Ltd., US Patent Pending",WRA,WRD=document,WRAS=location,WRA4=false,WRA5,WRv,WRL,WRE=".clicktale.net/",WRAP="http://s.clicktale.net/",WRn,WRB=new Array(),WRw,ClickTaleCookieDomain,ClickTaleUnloadPause=500,ClickTaleEventsMask=255-128,ClickTaleFetchFrom,ClickTaleCookieExpiryDays=365,WRAf,WRAT,WRAU,WRAV,WRAW;var t=WRD.domain;if(t.search(/www\.\w+\.\w+/i)==0){ClickTaleCookieDomain=t.substring(4,t.length)}WRA6();if(WRA4){WRA7("note1: entering debug mode, ClickTale script is installed")}if(typeof WRInitTime=="undefined"){var WRInitTime=(new Date()).getTime();if(WRA4){WRA7("warning1: top ClickTale script is missing in the page")}}if(WRD.addEventListener){WRD.addEventListener("DOMContentLoaded",WRondomload,false)}WRn=WRp();if(WRn&&WRn.substr(0,2)=="IE"){WRD.write('<script id="ClickTaleDefer" defer="defer" src=//:><\/script>');WRD.getElementById("ClickTaleDefer").onreadystatechange=function(){if(this.readyState=="complete"){WRondomload()}}}WRw=(WRD.compatMode=="BackCompat");WRv=(WRw?WRD.body:WRD.documentElement);WRo(window,"load",WRf);function ClickTale(H,G,F){if(WRAf){throw"CT: Monitoring has already started"}if(ClickTaleIsPlayback()){return }if(G==undefined){G=1}if(WRA4){WRA7("note2: preparing to record (ver "+11.2+") for project id "+H);if(G==1){WRA7("note3: recording all visitors to this page")}else{WRA7("note3: recording approximately 1 of every "+Math.ceil(1/G)+" visitors to this page")}}if(!WRn){if(WRA4){WRA7("warning2: the current browser is not supported")}return }if(WRAS.protocol=="file:"){if(WRA4){WRA7("warning3: the current protocol is not supported")}return }if(WRl("WRIgnore")){if(WRA4){WRA7("warning6: the current machine/user is temporarily disabled for recording")}return }WRL=WRl("WRUID");var I=false;if(WRL==null){I=true;if(Math.random()<G){WRL=WRAg()}else{WRL=0}}WRk("WRUID",WRL,ClickTaleCookieExpiryDays);if(WRL==0||(WRl("WRUID")==null&&G!=1)){if(WRA4){WRA7("warning4: the current machine/user is disabled for recording")}return }if(!F){F="www"}WRE="http://"+F+WRE;if(typeof ClickTaleSSL!="undefined"){if((ClickTaleSSL==1&&WRAS.protocol=="https:")||ClickTaleSSL==2){WRAP=WRE=WRE.replace(/^http/,"https")}}WRAf=true;WRC({a:"start",t:WRI()});WRA=H;var J=new Image();J.src=WRE+"i/"+WRA+".gif?r="+G+"&UID="+WRL+(I?"&new":"")+"&"+WRH();J.onerror=function(){J.onload=null;J.onerror=null;WRA8()};J.onload=function(){J.onload=null;J.onerror=null;WRG(J)}}function ClickTaleIsPlayback(){try{return parent&&parent.WebPlayer}catch(B){}return false}function WRG(F){var E=WRD.createElement("script");E.src=WRAP+"WRb2"+(F.width>1?"S"+F.width:"")+"b.js";var D=WRD.getElementById("ClickTaleDiv");if(!D){D=WRD.getElementById("ClickTale")}if(D){D.appendChild(E);if(WRA4){WRA7("note4: preparing for stage 2")}}else{if(WRA4){WRA7("error1: no 'ClickTale' DIV element found in this page")}}}function WRA8(){if(WRA4){WRA7("error2: unable to record because either there are no credits for project or communication may be down")}WRk("WRIgnore",true,ClickTaleCookieExpiryDays?0.007:false)}function WRH(){return Math.floor(Math.random()*2147483647)}function WRAg(){return WRH()+"."+(WRInitTime&2147483647)}function WRI(){return(new Date()).getTime()-WRInitTime}function WRC(B){if(typeof WRc=="function"){WRc(B)}else{if(WRB.push){WRB.push(B)}}}function WRf(){WRC({a:"load",w:WRs(),h:WRt(),sw:WRv.scrollWidth,sh:WRv.scrollHeight,cw:WRv.clientWidth,ch:WRv.clientHeight,t:WRI()})}function WRs(){return self.innerWidth||WRv.offsetWidth}function WRt(){return self.innerHeight||WRv.offsetHeight}function WRk(I,H,G){if(G){var J=new Date();J.setTime(J.getTime()+(G*86400000));var F="; expires="+J.toGMTString()}else{var F=""}WRD.cookie=I+"="+H+F+"; path=/;"+(ClickTaleCookieDomain?" domain="+ClickTaleCookieDomain+";":"")}function WRl(J){var H=J+"=";var F=WRD.cookie.split(";");for(var I=0;I<F.length;I++){var G=F[I];while(G.charAt(0)==" "){G=G.substring(1,G.length)}if(G.indexOf(H)==0){return G.substring(H.length,G.length)}}return null}function ClickTaleGetSID(){return typeof WRSID=="number"?WRSID:null}function ClickTaleGetUID(){var B=WRl("WRUID");return B>0?B:null}function ClickTaleTag(B){WRC({a:"tag",c:B,t:WRI()})}function ClickTaleNote(B){WRC({a:"note",c:B,t:WRI()})}function ClickTaleField(D,C){WRC({a:"field",f:D,v:C,t:WRI()})}function ClickTaleExec(B){WRC({a:"exec",c:B,t:WRI()})}function ClickTaleIgnore(B){WRk("WRUID",0,B)}function ClickTaleUploadPage(C,D){if(WRAf){throw"CTUP: Monitoring has already started"}WRAT=true;WRAV=C;WRAW=D;if(WRAU&&typeof WRAh=="function"){WRAh()}}function WRondomload(){if(ClickTaleIsPlayback()||WRAU){return }var D=WRD.getElementById("ClickTaleDefer");if(D){D.parentNode.removeChild(D)}var C=new RegExp('(<div id="?ClickTaleDiv"?[^>]+>)\\s*<script[^>]+><\/script>\\s*(</div>)',"i");WRAU=WRD.documentElement.innerHTML.replace(C,"$1$2");WRC({a:"domload",t:WRI()});if(typeof WRAX=="function"){WRAX()}if(WRAT&&typeof WRAh=="function"){WRAh()}}function WRA6(){if(ClickTaleIsPlayback()){return }WRA9(WRAS.hash.substr(1));WRA9(WRAS.search.substr(1))}function WRA9(H){var I=H.split("&");for(var J=0;J<I.length;J++){var G=I[J].split("=");var F=decodeURIComponent(G[0]).toLowerCase();if(G.length==2&&(F=="ct"||F=="clicktale")){WRBA(decodeURIComponent(G[1]))}}}function WRBA(F){var G=F.split(",");for(var H=0;H<G.length;H++){switch(G[H].toLowerCase()){case"debug":WRD.write('<textarea id="ClickTaleDebugDump" rows="5" cols="80" style="position: absolute; left:10px; top:10px; border: solid #6C358D;"></textarea>');WRA5=WRD.getElementById("ClickTaleDebugDump");if(WRA5){WRA5.value=""}WRA4=true;break;case"enable":WRk("WRIgnore",null,-1);var E=WRl("WRUID");if(E==null||E==0){WRk("WRUID",WRAg(),ClickTaleCookieExpiryDays)}break;case"disable":WRk("WRUID",0,ClickTaleCookieExpiryDays);break;case"reset":WRk("WRUID",null,-1);break;default:if(/^t\(.+\)$/i.test(G[H])){ClickTaleTag(G[H].substring(2,G[H].length-1))}else{if(WRA4){WRA7("warning5: unknown parameter in URL: "+G[H])}}break}}}function WRA7(B){if(WRA5){WRA5.value+=(B+"\n")}else{alert("CT: "+B)}}function WRp(){var B=navigator.userAgent;if(B.indexOf("Opera ")!=-1){return }if(B.indexOf("MSIE 6.0")!=-1){return"IE6"}if(B.indexOf("MSIE 7.0")!=-1){return"IE7"}if(B.indexOf("Firefox/1.5")!=-1){return"FF15"}if(B.indexOf("Firefox/2.0")!=-1){return"FF20"}if(B.indexOf("Firefox/3.0")!=-1){return"FF30"}}function WRo(E,D,F){if(E.addEventListener){E.addEventListener(D,F,false)}else{if(E.attachEvent){E.attachEvent("on"+D,F)}}}
