/* OnlineOpinion v5.4.1 Released: 7/25/2011. Compiled 07/25/2011 09:43:39 AM -0500 Branch: master 13508234a38e8ddc42d429426becdccee1b43b10 Components: Full The following code is Copyright 1998-2011 Opinionlab, Inc. All rights reserved. Unauthorized use is prohibited. This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. http://www.opinionlab.com */var OOo={Browser:(function(){var a=navigator.userAgent,b=Object.prototype.toString.call(window.opera)=='[object Opera]',c={IE:!!window.attachEvent&&!b,Opera:b,WebKit:a.indexOf('AppleWebKit/')>-1,Chrome:a.indexOf('Chrome')>-1,Gecko:a.indexOf('Gecko')>-1&&a.indexOf('KHTML')===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(a),PalmPre:a.indexOf('Pre/')>-1,BlackBerry:a.indexOf('BlackBerry')>-1,Fennec:a.indexOf('Fennec')>-1,IEMobile:a.indexOf('IEMobile')>-1,OperaMobile:a.search(/Opera (?:Mobi|Mini)/)>-1},d=0,f,g=false;if(c.IE){f=/msie.(\d\.\d+)/i;d=a.match(f)[1]}else if(c.Gecko){f=/gecko.(\d+)/i;d=a.match(f)[1]}else if(c.WebKit){f=/applewebkit\/(\d+)/i;d=a.match(f)[1]}else if(c.Opera){f=/opera.(\d\.\d+)/i;d=a.match(f)[1]}else{g=true}c.isMobile=(c.MobileSafari||c.PalmPre||c.BlackBerry||c.Fennec||c.IEMobile||c.OperaMobile);c.Version=parseFloat(d);c.isModern=(!(g||(c.IE&&c.Version<6)||(c.Opera&&c.Version<8)||(c.Gecko=='gecko'&&c.Version<20041107)));return c})()};OOo.Cache={};OOo.instanceCount=0;if(!OnlineOpinion)var OnlineOpinion=OOo;(function(){function g(a){return document.getElementById(a)}function h(a,b){for(var c in b)a[c]=b[c];return a}function j(a,b,c,d){if(a.addEventListener)a.addEventListener(b,c,d);else if(a.attachEvent)a.attachEvent('on'+b,c)}function i(a,b,c,d){if(a.removeEventListener)a.removeEventListener(b,c,d);else if(a.detachEvent)a.detachEvent('on'+b,c)};function k(a){var b=[];for(var c in a)b.push(c+'='+(encodeURIComponent(a[c])||''));return b.join('&')}function l(a){var b=k(a.metrics);b+='&custom_var='+a.tealeafId+'|'+a.clickTalePID+'/'+a.clickTaleUID+'/'+a.clickTaleSID;if(a.legacyVariables)b+="|"+encodeURIComponent(a.legacyVariables);if(a.metrics.type=='OnPage')b+='|iframe';if(a.asm)b+='&asm=1';b+='&_'+"rev=2";if(a.customVariables)b+='&customVars='+encodeURIComponent(OOo.serialize(a.customVariables));return b}function n(a,b){var c=document,d=c.createElement('form'),f=c.createElement('input');d.style.display='none';d.method='post';d.target=b||'OnlineOpinion';d.action=a.onPageCard?'https://secure.opinionlab.com/ccc01/comment_card_json_4_0_b.asp?r='+location.href:'https://secure.opinionlab.com/ccc01/comment_card_d.asp';if(a.commentCardUrl){d.action=a.commentCardUrl;if(a.onPageCard)d.action+='?r='+location.href}f.name='params';f.value=l(a);d.appendChild(f);c.body.appendChild(d);return d}function o(){return{width:screen.width,height:screen.height,referer:location.href,prev:document.referrer,time1:(new Date()).getTime(),time2:null,currentURL:location.href,ocodeVersion:'5.4.1'}}function s(a,b){a=a||{};return a.override?a.vars:b+(a.vars?'|'+a.vars:'')}h(OOo,{extend:h,toQueryString:k,addEventListener:j,$:g,appendOOForm:n,removeEventListener:i,createMetrics:o,createLegacyVars:s})})();(function(){function g(a){if(!a)return null;switch(typeof a){case'number':case'boolean':case'function':return a;break;case'string':return'\''+a+'\'';break;case'object':var b;if(a.constructor===Array||typeof a.callee!=='undefined'){b='[';var c,d=a.length;for(c=0;c<d-1;c++){b+=g(a[c])+','}b+=g(a[c])+']'}else{b='{';var f;for(f in a){b+=f+':'+g(a[f])+','}b=b.replace(/\,$/,'')+'}'}return b;break;default:return null}}OOo.extend(OOo,{serialize:g})})();(function(){function f(a,b,c){var d;if(a.search(b[0])!=-1){OOo.createCookie(c,0);return false}else if(OOo.readCookie(c)){d=parseInt(OOo.readCookie(c));if((a.search(b[d+1])!=-1)&&(d+1!=b.length-1)){OOo.createCookie(c,d+1);return false}else if(a.search(b[d])!=-1)return false;else if(d+1==b.length-1&&a.search(b.pop())!=-1){OOo.eraseCookie(c);return true}else{OOo.eraseCookie(c);return false}}else return false}OOo.extend(OOo,{checkTunnel:f})})();(function(){function t(a){var b="";for(var c=7;c>=0;c--)b+='0123456789abcdef'.charAt((a>>(c*4))&0x0F);return b}function v(a){var b=((a.length+8)>>6)+1,c=new Array(b*16);for(var d=0;d<b*16;d++)c[d]=0;for(var d=0;d<a.length;d++)c[d>>2]|=a.charCodeAt(d)<<(24-(d%4)*8);c[d>>2]|=0x80<<(24-(d%4)*8);c[b*16-1]=a.length*8;return c}function p(a,b){var c=(a&0xFFFF)+(b&0xFFFF),d=(a>>16)+(b>>16)+(c>>16);return(d<<16)|(c&0xFFFF)}function w(a,b){return(a<<b)|(a>>>(32-b))}function r(a,b,c,d){if(a<20)return(b&c)|((~b)&d);if(a<40)return b^c^d;if(a<60)return(b&c)|(b&d)|(c&d);return b^c^d}function x(a){return(a<20)?1518500249:(a<40)?1859775393:(a<60)?-1894007588:-899497514}function q(a){var b=v(a),c=new Array(80),d=1732584193,f=-271733879,g=-1732584194,h=271733878,j=-1009589776,i,k,l,n,o,s;for(var u=0;u<b.length;u+=16){i=d,k=f,l=g,n=h,o=j;for(var m=0;m<80;m++){if(m<16)c[m]=b[u+m];else c[m]=w(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);s=p(p(w(d,5),r(m,f,g,h)),p(p(j,c[m]),x(m)));j=h;h=g;g=w(f,30);f=d;d=s}d=p(d,i);f=p(f,k);g=p(g,l);h=p(h,n);j=p(j,o)}return t(d)+t(f)+t(g)+t(h)+t(j)}OOo.extend(OOo,{sha1:q})})();(function(){function h(a){var b=a.cookieName||'oo_abandon',c=OOo.readCookie(b),d=a.startPage,f=a.endPage,g=a.middle;if(!c){if(location.pathname.indexOf(d)!=-1)OOo.createCookie(b);return false}else if(location.pathname.indexOf(f)!=-1){OOo.eraseCookie(b);return false}else if(location.pathname.search(g)!=-1)return false;else{OOo.eraseCookie(b);return true}}OOo.extend(OOo,{checkAbandonment:h})})();(function(){function c(a){for(var b=a.length-1;b>=0;b--){if(a[b].read){if(!!(cookieValue=OOo.readCookie(a[b].name))&&cookieValue==a[b].value)return true;else if(typeof a[b].value=='undefined'&&!!OOo.readCookie(a[b].name))return true}}return false}function d(a){for(var b=a.length-1;b>=0;b--){if(a[b].set)OOo.createCookie(a[b].name,a[b].value,a[b].expiration)}}OOo.extend(OOo,{checkThirdPartyCookies:c,setThirdPartyCookies:d})})();OOo.extend(Function.prototype,(function(){if(typeof(Prototype)!="undefined")return;var f=Array.prototype.slice;function g(a,b){var c=a.length,d=b.length;while(d--)a[c+d]=b[d];return a}function h(a,b){a=f.call(a,0);return g(a,b)}function j(b){if(arguments.length<2&&typeof arguments[0]==="undefined")return this;var c=this,d=f.call(arguments,1);return function(){var a=h(d,arguments);return c.apply(b,a)}}return{bind:j}})());(function(){var g;if(location.host.search(/\d+\.\d+\.\d+\.\d+/)===0)g=location.host;else{g=location.host.split('.').reverse();g='.'+g[1]+'.'+g[0]}function h(a,b,c){var d='',f='';if(c){d=new Date();d.setTime(d.getTime()+(c*1000));f="; expires="+d.toGMTString()}document.cookie=a+"="+b+f+"; path=/; domain="+g+";"}function j(a){var b=a+"=",c=document.cookie.split(';'),d;for(var f=0;f<c.length;f++){d=c[f];while(d.charAt(0)==' ')d=d.substring(1,d.length);if(d.indexOf(b)===0)return d.substring(b.length,d.length)}return null}function i(a){h(a,"",-1)}OOo.extend(OOo,{createCookie:h,readCookie:j,eraseCookie:i})})();OOo.Ocode=function(a){var b=OOo.Browser;if(!b.isModern||(a.disableMobile&&b.isMobile))return;if(a.disableNoniOS&&(navigator.userAgent.search('Android')!=-1||b.PalmPre||b.IEMobile||b.OperaMobile||b.Fennec))return;OOo.instanceCount++;this.options={tealeafCookieName:'TLTSID'};OOo.extend(this.options,a);var c=this.options,d=c.referrerRewrite;c.metrics=OOo.createMetrics();this.frameName=c.onPageCard?'OnlineOpinion'+OOo.instanceCount:'OnlineOpinion';if(c.cookie&&OOo.Ocode.matchUrl(location,c.cookie))return;if(c.thirdPartyCookies&&OOo.checkThirdPartyCookies(c.thirdPartyCookies))return;if(c.abandonment&&!OOo.checkAbandonment(c.abandonment))return;if(c.tunnel&&!OOo.checkTunnel(location.pathname,c.tunnel.path,c.tunnel.cookieName))return;if(c.events&&c.events.onSingleClick)this.singProbability=Math.random()<1-c.events.onSingleClick/100;c.tealeafId=OOo.readCookie(c.tealeafCookieName)||OOo.readCookie(c.sessionCookieName);if(d)c.metrics.referer=d.searchPattern?window.location.href.replace(d.searchPattern,d.replacePattern):d.replacePattern;if(c.events){this.setupEvents();if(c.events.disableLinks||c.events.disableFormElements)this.setupDisableElements()}if(c.floating)this.floating();else if(c.bar)this.bar();else if(c.tab)this.tab()};OOo.Ocode.prototype={show:function(){if(this.onPageCardVisible)return;var a=this.options;if(this.interruptShow)return;if(!this.floatingLogo&&a.cookie&&OOo.Ocode.matchUrl(location,a.cookie))return;if(!a.floating&&a.events&&this.singProbability)return;if(a.events&&a.events.onSingleClick)this.singProbability=true;if(a.cookie)OOo.Ocode.tagUrl(location,a.cookie);if(a.thirdPartyCookies){if(OOo.checkThirdPartyCookies(a.thirdPartyCookies))return;OOo.setThirdPartyCookies(a.thirdPartyCookies)}if(this.floatingLogo)this.floatingLogo.children[0].blur();if(this.floatingLogo&&a.disappearOnClick)this.floatingLogo.style.display='none';if(typeof arguments[0]=='string')a.metrics.trigger=arguments[0];if(a.clickTalePID&&typeof ClickTale=='function'){a.clickTaleUID=ClickTaleGetUID();a.clickTaleSID=ClickTaleGetSID()}if(a.onPageCard)this.setupOnPageCC();else this.launchOOPopup();if(OOo.Browser.IE)return false}};OOo.extend(OOo.Ocode,{tagUrl:function(a,b){var c=b.name||'oo_r',d=b.type=='page'?a.href:a.hostname,f=OOo.readCookie(c)||'';if(OOo.Ocode.matchUrl(a,b))return;OOo.createCookie(c,f+OOo.sha1(d),b.expiration)},matchUrl:function(a,b){var c=OOo.readCookie(b.name||'oo_r');if(!c)return false;var d=b.type=='page'?a.href:a.hostname;return c.search(OOo.sha1(d))!=-1}});(function(){function h(){var a=this.options,b=a.newWindowSize||[545,325],c=[parseInt((a.metrics.height-b[1])/2),parseInt((a.metrics.width-b[0])/2)],a=this.options,d,f,g=OOo.Browser.IE&&OOo.Browser.Version==7;a.metrics.time2=(new Date()).getTime();a.metrics.type='Popup';d=OOo.appendOOForm(a);f=window.open(g?a.commentCardUrl||'https://secure.opinionlab.com/ccc01/comment_card_d.asp?'+d.children[0].value:'','OnlineOpinion','location=no,status=no,width='+b[0]+',height='+b[1]+',top='+c[0]+',left='+c[1]);if(f&&!g)d.submit()}OOo.extend(OOo.Ocode.prototype,{launchOOPopup:h})})();(function(){function k(){var a=this.options.events,b=[false,false],c=['onExit','onEntry'],d=OOo.Browser.Opera?'unload':'beforeunload',f,g;for(var h=c.length-1;h>=0;h--){f=c[h];if(a[f]instanceof Array){var j=a[f],i=j.length;while(i--&&!b[h]){if(window.location.href.search(j[i].url)!=-1&&Math.random()>=1-j[i].p/100)b[h]=true}}else if(a[f]&&Math.random()>=1-a[f]/100)b[h]=true}if(b[0])OOo.addEventListener(window,d,this.show.bind(this,'onExit'),false);if(b[1]){if(a.delayEntry){window.setTimeout(function(){this.show()}.bind(this,'onEntry'),a.delayEntry*1000)}else{this.show('onEntry')}}}function l(){OOo.addEventListener(document.body,'mousedown',n.bind(this));if(!this.options.events.disableFormElements)return;var a=document.getElementsByTagName('form');for(var b=a.length-1;b>=0;b--)OOo.addEventListener(a[b],'submit',o.bind(this))}function n(a){var b=a||window.event,c=a.target||a.srcElement,d=this.options.events,f=c.parentNode,g=5,h=0;while(f&&(c.nodeName!='A'||c.nodeName!='INPUT')&&h!=g){if(f.nodeName=='A')c=f;f=f.parentNode;h++}if(d.disableFormElements&&c.tagName=="INPUT"&&(c.type=='submit'||c.type=='image'))this.interruptShow=true;if(d.disableLinks&&c.nodeName=='A'&&c.href.substr(0,4)=='http'&&c.href.search(d.disableLinks)!=-1)this.interruptShow=true}function o(a){this.interruptShow=true}OOo.extend(OOo.Ocode.prototype,{setupEvents:k,setupDisableElements:l})})();OOo.extend(OOo.Ocode.prototype,{floating:function(){var d=document,f=this.floatingLogo=document.createElement('div'),g=d.createElement('div'),h=d.createElement('div'),j=d.createElement('div'),i=d.createElement('span'),k=this.options.floating,l=OOo.$(k.contentId),n='10px',o=false,s=k.id,u=d.createElement('span');u.innerHTML="Screen reader users: Please switch to forms mode for this link.";u.className="screenReader";if(s)f.id=s;f.className='oo_feedback_float';h.className='oo_transparent';g.className='olUp';j.className='olOver';g.tabIndex=0;g.onkeyup=function(a){var b=a||window.event;if(b.keyCode!=13)return;this.show()}.bind(this);g.innerHTML=k.caption||'Feedback';f.appendChild(u);f.appendChild(g);i.innerHTML=k.hoverCaption||'Click here to<br>rate this page';j.appendChild(i);f.appendChild(j);f.appendChild(h);if(OOo.Browser.IE&&(OOo.Browser.Version<7||d.compatMode==="BackCompat")){f.style.position='absolute';f.style.bottom='';OOo.addEventListener(window,'scroll',m,false);OOo.addEventListener(window,'resize',m,false);if(d.compatMode==="BackCompat")f.style.background="white";function m(a){if(OOo.Browser.Version<7&&d.compatMode!="BackCompat")f.style.top=(d.documentElement.scrollTop+document.documentElement.clientHeight-f.clientHeight)+'px';else f.style.top=(d.body.scrollTop+document.body.clientHeight-f.clientHeight)+'px'};o=true}else if(OOo.Browser.MobileSafari){var t=window.innerHeight,v;f.style.bottom=null;f.style.top=(pageYOffset+window.innerHeight-60)+'px';OOo.addEventListener(window,'scroll',function(a){v=pageYOffset-(t-window.innerHeight);f.style.webkitTransform='translateY('+v+'px)'},false)}if(k.position&&k.position.search(/Content/)&&l){var p=this.spacer=d.createElement('div'),w=OOo.Browser.WebKit?d.body:d.documentElement,r;p.id='oo_feedback_fl_spacer';p.style.left=q(l)+'px';d.body.appendChild(p);switch(k.position){case'rightOfContent':r=function(a){f.style.left=(q(l)-w.scrollLeft)+'px';if(o)r=null};break;case'fixedPreserveContent':r=function(a){var b=OOo.Browser.IE?d.body.clientWidth:window.innerWidth,c=!o?w.scrollLeft:0;if(b<=q(l)+f.offsetWidth+parseInt(n))f.style.left=(q(l)-c)+'px';else{f.style.left='';f.style.right=n}};break;case'fixedContentMax':r=function(a){var b=OOo.Browser.IE?d.body.clientWidth:window.innerWidth;if(b<=q(l)+f.offsetWidth+parseInt(n)){f.style.left='';f.style.right=n;if(a&&a.type=='scroll'&&o)f.style.left=(d.documentElement.clientWidth+w.scrollLeft-105)+'px'}else{f.style.left=(q(l)-w.scrollLeft)+'px';f.style.right=''}};break}r();OOo.addEventListener(window,'scroll',r,false);OOo.addEventListener(window,'resize',r,false);function x(a){p.style.left=q(l)+'px'};OOo.addEventListener(window,'resize',x,false)}else{f.style.right=n}OOo.addEventListener(f,'click',this.show.bind(this,'Floating'),false);OOo.addEventListener(f,'touchstart',this.show.bind(this,'Floating'),false);d.body.appendChild(f);if(OOo.Browser.IE&&OOo.Browser.Version<7){f.style.top=((d.documentElement.clientHeight||d.body.clientHeight)-f.clientHeight)+'px';h.style.height=f.clientHeight+'px'}if(o)setTimeout(m,100);function q(a){return a.offsetLeft+a.offsetWidth}},removeFloatingLogo:function(){document.body.removeChild(this.floatingLogo);if(this.spacer)document.body.removeChild(this.spacer)}});OOo.extend(OOo.Ocode.prototype,{bar:function(){var c=document,d=this.floatingLogo=c.createElement('div'),f=c.createElement('span');d.id='oo_bar';f.innerHTML=this.options.bar.caption||'Feedback';d.appendChild(f);d.tabIndex=0;d.onkeyup=function(a){var b=a||window.event;if(b.keyCode!=13)return;this.show()}.bind(this);OOo.addEventListener(d,'click',this.show.bind(this,'Bar'));document.body.className+=document.body.className<1?'oo_bar':' oo_bar';document.body.appendChild(d);if(OOo.Browser.IE){var g;if(c.compatMode=='CSS1Compat'){g=function(a){if(a&&a.type=='resize')setTimeout(g,50);d.style.top=(c.documentElement.scrollTop+document.documentElement.clientHeight-d.clientHeight-1)+'px';d.style.width=(Math.max(c.documentElement.clientWidth,c.body.offsetWidth))+'px'}}else{g=function(a){d.style.top=(c.body.scrollTop+document.body.clientHeight-d.clientHeight-1)+'px';d.style.width=(Math.max(c.documentElement.clientWidth,c.body.offsetWidth)-22)+'px'}}d.style.position='absolute';OOo.addEventListener(window,'scroll',g,false);OOo.addEventListener(window,'resize',g,false);g()}else if(OOo.Browser.MobileSafari){var h=window.innerHeight,j;d.style.bottom=null;d.style.top=(pageYOffset+window.innerHeight-22)+'px';OOo.addEventListener(window,'scroll',function(a){j=pageYOffset-(h-window.innerHeight);d.style.webkitTransform='translateY('+j+'px)'},false)}}});OOo.extend(OOo.Ocode.prototype,{tab:function(){var c=document,d=this.floatingLogo=c.createElement('div'),f=c.createElement('a'),g=c.createElement('span'),h=this.options.tab;d.id='oo_tab';d.className='oo_tab_'+(h.position||'right');if(OOo.Browser.IE&&OOo.Browser.Version<7){d.style.position='absolute';if(h.position=='right')d.className+=' oo_tab_ie_right'}else if(OOo.Browser.MobileSafari){d.style.top=(pageYOffset+window.innerHeight/2)+'px';OOo.addEventListener(window,'scroll',function(a){d.style.top=(pageYOffset+window.innerHeight/2)+'px'},false)}f.href=OOo.Browser.IE?"#":"javascript:void(0)";f.title=h.title||'Feedback';d.tabIndex=0;d.onkeyup=function(a){var b=a||window.event;if(b.keyCode!=13)return;this.show()}.bind(this);f.appendChild(g);d.appendChild(f);OOo.addEventListener(d,'click',this.show.bind(this,'Tab'),false);c.body.appendChild(d)}});OOo.extend(OOo.Ocode.prototype,{setupOnPageCC:function(){var i=document,k=OOo.Cache.overlay||i.createElement('div'),l=this.wrapper=i.createElement('div'),n=i.createElement('a'),o=i.createElement('div'),s=i.createElement('span'),u=this.frameName,m=i.createElement(OOo.Browser.IE&&OOo.Browser.Version<9?'<iframe name="'+u+'">':'iframe'),t=i.createDocumentFragment(),v=this.options,p=v.onPageCard,w='https://secure.opinionlab.com/ccc01/comment_card_json_4_0_b.asp',r,x,q,A=false,B=this;v.metrics.type='OnPage';OOo.Cache.overlay=k;k.id='oo_overlay';k.style.display='block';k.className='';o.className='iwrapper';l.className='oo_cc_wrapper';n.className='oo_cc_close';n.href=OOo.Browser.IE?"#":"javascript:void(0)";n.title=p.closeTitle||"Close Feedback Card";l.style.visibility='hidden';if(OOo.Browser.IE){if(!window.XMLHttpRequest||i.compatMode==="BackCompat"){var C=Math.max(i.documentElement.clientWidth,i.body.offsetWidth);k.style.position='absolute';k.style.width=i.compatMode==="BackCompat"?(C-21)+'px':C+'px';k.style.height=Math.max(i.documentElement.clientHeight,i.body.offsetHeight)+'px';l.style.position='absolute';OOo.addEventListener(window,'scroll',function(){k.style.top=(i.body.scrollTop+document.body.clientHeight-k.clientHeight)+'px';l.style.top=(i.body.scrollTop+25)+'px'})}else{var D=i.createElement("div"),E=i.createElement("div"),F=i.createElement("div"),y=i.createElement("div");y.className="oo_shadows";D.className='oo_body';E.className='oo_top';F.className='oo_bottom';y.appendChild(D);y.appendChild(E);y.appendChild(F);o.appendChild(y)}}OOo.addEventListener(n,'click',z);if(p.closeWithOverlay&&!OOo.Browser.isMobile){l.appendChild(s);s.onclick=z;k.onclick=z}m.name=u;o.appendChild(n);o.appendChild(m);l.appendChild(o);t.appendChild(l);t.appendChild(k);i.body.appendChild(t);q=G.bind(this);window.postMessage?OOo.addEventListener(window,"message",q):x=setInterval(G.bind(this),500);v.metrics.time2=(new Date()).getTime();r=OOo.appendOOForm(v,u);r.submit();function G(a){var b='https://secure.opinionlab.com',c=v.commentCardUrl;if(c)c=c.match(/(https?:\/\/.*?)\/|$/)[1];if((a&&!(a.origin==b||a.origin==c))||(!a&&location.hash.substr(1,3)!='OL='))return;var d=a?a.data:location.hash.slice(4),f=parseInt(d),g=document;if(!a)location.hash='';if(f>0){if(A)return;A=true;var h=window.innerHeight||g.documentElement.clientHeight||g.body.clientHeight,j=f;if(j>h){j=h-40;m.style.width='555px'}m.style.height=j+'px';if(OOo.Browser.IE&&OOo.Browser.Version<7)s.style.height=l.offsetHeight+'px';l.style.visibility='visible';k.className="no_loading";B.onPageCardVisible=true}else if(d=='submitted')z();if(OOo.Browser.IE&&g.compatMode==="BackCompat")window.scrollTo(0,0)}function z(){document.body.focus();m.tabIndex=-1;m.title="empty";m['aria-hidden']='true';k.style.display='none';k.className='';i.body.removeChild(l);window.postMessage?OOo.removeEventListener(window,'message',q):window.clearInterval(x);A=false;B.onPageCardVisible=false;return false}}});OOo.Invitation=function(a){this.options={tunnelCookie:'oo_inv_tunnel',repromptTime:604800,responseRate:50,repromptCookie:'oo_inv_reprompt',promptMarkup:'oo_inv_prompt.html',promptStyles:'oo_inverstitial_style.css',percentageCookie:'oo_inv_percent',pagesHitCookie:'oo_inv_hit',popupType:'popunder',promptDelay:0,neverShowAgainButton:false,loadPopupInBackground:false,tealeafCookieName:'TLTSID',monitorWindow:'oo_inv_monitor.html'};this.popupShown=false;OOo.extend(this.options,a);var b=this.options,c=parseInt(OOo.readCookie(b.pagesHitCookie))||0;OOo.Invitation.friendlyDomains=b.friendlyDomains||null;if(location.search.search('evs')!=-1){b.loadPopupInBackground=true;this.launchPopup();OOo.createCookie(b.repromptCookie,1,b.repromptTime==-1?0:b.repromptTime)}setTimeout(function(){if(!window.oo_inv_monitor)return;if(b.area&&location.href.search(b.area)==-1){this.options.popupType='popup';this.launchPopup()}else if(b.goal&&location.href.search(b.goal)!=-1){oo_inv_monitor.close()}}.bind(this),1000);if(OOo.readCookie(b.repromptCookie))return;if(b.thirdPartyCookies&&OOo.checkThirdPartyCookies(b.thirdPartyCookies))return;if(!OOo.readCookie(b.percentageCookie)){OOo.createCookie(b.percentageCookie,(Math.random()>1-(b.responseRate/100))?"1":"0")}if(typeof(b.promptTrigger)!='undefined'){if(b.promptTrigger instanceof RegExp){if(!window.location.href.match(b.promptTrigger))return}else if(b.promptTrigger instanceof Array){if(!OOo.checkTunnel(location.pathname,b.promptTrigger,b.tunnelCookie))return}}c++;OOo.createCookie(b.pagesHitCookie,c);if(b.pagesHit&&c<b.pagesHit)return;OOo.eraseCookie(b.tunnelCookie);if(OOo.readCookie(b.percentageCookie)=='1'){window.setTimeout(function(){OOo.createCookie(b.repromptCookie,1,b.repromptTime);this.getPrompt()}.bind(this),b.promptDelay*1000)}};OOo.Invitation.prototype={getPrompt:function(){var a=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP"),b=this,c=document.createElement('link'),d;a.onreadystatechange=function(){if(a.readyState!=4)return;b.showPrompt(a.responseText)};a.open("GET",this.options.pathToAssets+this.options.promptMarkup,true);a.send(null)},showPrompt:function(a){var b=document,c=b.createElement('div'),d=OOo.Cache.overlay||b.createElement('div'),f,g,h=this.options;d.id='oo_overlay';c.id='oo_container';c.style.visibility='hidden';c.innerHTML=a;c.appendChild(d);b.body.appendChild(c);if(h.companyLogo){f=new Image();f.src=h.companyLogo;OOo.$('oo_company_logo').appendChild(f)}OOo.addEventListener(OOo.$('oo_launch_prompt'),'click',this.launchPopup.bind(this),false);if(h.neverShowAgainButton){g=OOo.$('oo_never_show');g.style.visibility='visible';OOo.addEventListener(g,'click',this.killPrompt.bind(this),false)}if(OOo.Browser.IE&&!window.XMLHttpRequest){d.style.position='absolute';d.style.width=Math.max(document.documentElement.clientWidth,document.body.offsetWidth)+'px';d.style.height=Math.max(document.documentElement.clientHeight,document.body.offsetHeight)+'px';c.style.position='absolute'}c.style.visibility='visible';d.className='no_loading'},launchPopup:function(){if(this.popupShown)return;this.popupShown=true;var a=this.options,b=window.location.href,c=a.popupType=='popup'?'https://secure.opinionlab.com/ccc01/comment_card.asp?':a.pathToAssets+a.monitorWindow+'?'+(new Date()).getTime()+'&',d,f=[],g=a.asm?[555,500]:[545,200],h,j=OOo.createMetrics(),i=OOo.readCookie(a.teleafId);if(a.clickTalePID&&ClickTaleGetUID&&ClickTaleGetSID)i+='|'+[a.clickTalePID,ClickTaleGetUID(),ClickTaleGetSID()].join('/');g=a.newWindowSize||g;if(a.referrerRewrite){j.referer=a.referrerRewrite.searchPattern?window.location.href.replace(a.referrerRewrite.searchPattern,a.referrerRewrite.replacePattern):a.referrerRewrite.replacePattern}if(a.thirdPartyCookies)OOo.setThirdPartyCookies(a.thirdPartyCookies);d=OOo.toQueryString(j)+'&type=Invitation';if(a.customVariables)d+='&customVars='+encodeURIComponent(OOo.serialize(a.customVariables));d+='&custom_var='+OOo.createLegacyVars(a.legacyVariables,i);h=window.open(c+d,'OnlineOpinionInvitation','location=no,status=no,width='+g[0]+',height='+g[1]);if(!a.loadPopupInBackground&&OOo.$('oo_container'))OOo.Invitation.hidePrompt();if(a.popupType=='popunder'){if(!OOo.Browser.Chrome){h.blur();window.focus()}else{if(!a.loadPopupInBackground)alert(a.chromeMainWinPrompt||'Please fill out the form behind this window when you are finished.');if(a.chromeSurveyPrompt)setTimeout(function(e){h.postMessage(a.chromeSurveyPrompt,"*")},500)}}else if(window.oo_inv_monitor){window.blur();h.focus()}},killPrompt:function(){OOo.createCookie(this.options.repromptCookie,1,1825);OOo.Invitation.hidePrompt()}};OOo.extend(OOo.Invitation,{hidePrompt:function(){OOo.$('oo_container').style.display='none'},navigateToFriendlyDomain:function(a){location=a}});
