/* OnlineOpinion v5.0.5.3 BETA Released: 8/31/2010 Components: serialize tunnel md4 abandonment interstitial The following code is Copyright 1998-2010 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.indexOf('Opera Mobi')>-1},d=0,e,f=false;if(c.IE){e=/msie.(\d\.\d+)/i;d=a.match(e)[1]}else if(c.Gecko){e=/gecko.(\d+)/i;d=a.match(e)[1]}else if(c.WebKit){e=/applewebkit\/(\d+)/i;d=a.match(e)[1]}else if(c.Opera){e=/opera.(\d\.\d+)/i;d=a.match(e)[1]}else{f=true}c.isMobile=(c.MobileSafari||c.PalmPre||c.BlackBerry||c.Fennec||c.IEMobile||c.OperaMobile);c.Version=parseFloat(d);c.isModern=(!(f||(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 f(a){return document.getElementById(a)}function g(a,b){for(var c in b)a[c]=b[c];return a}if(typeof(Prototype)=='undefined'){g(Object,{extend:g})}function h(a,b,c,d){if(a.addEventListener)a.addEventListener(b,c,d);else if(a.attachEvent)a.attachEvent('on'+b,c)}function k(a,b,c,d){if(a.removeEventListener)a.removeEventListener(b,c,d);else if(a.detachEvent)a.detachEvent('on'+b,c)};function l(a){var b=[];for(prop in a)b.push(prop+'='+(a[prop]||''));return b.join('&')}function n(a){var b=l(a.metrics);if(a.tealeafId)b+='&custom_var='+a.tealeafId;if(a.customVariables)b+='&customVars='+OOo.serialize(a.customVariables);return b}function o(a,b){var c=document,d=c.createElement('form'),e=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';e.name='params';e.value=n(a);d.appendChild(e);c.body.appendChild(d);return d}g(OOo,{toQueryString:l,addEventListener:h,$:f,appendOOForm:o,removeEventListener:k})})();(function(){function f(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+=f(a[c])+','}b+=f(a[c])+']'}else{b='{';var e;for(e in a){b+=e+':'+f(a[e])+','}b=b.replace(/\,$/,'')+'}'}return b;break;default:return null}}Object.extend(OOo,{serialize:f})})();(function(){function e(a,b){var c=location.pathname,d;if(c.search(a[0])!=-1){OOo.createCookie(b,0);return false}else if(OOo.readCookie(b)){d=parseInt(OOo.readCookie(b));if((c.search(a[d+1])!=-1)&&(d+1!=a.length-1)){OOo.createCookie(b,d+1);return false}else if(c.search(a[d])!=-1)return false;else if(d+1==a.length-1)return true;else{OOo.eraseCookie(b);return false}}else return false}Object.extend(OOo,{checkTunnel:e})})();(function(){function m(a){var b="";for(var c=7;c>=0;c--)b+='0123456789abcdef'.charAt((a>>(c*4))&0x0F);return b}function t(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 j(a,b){var c=(a&0xFFFF)+(b&0xFFFF),d=(a>>16)+(b>>16)+(c>>16);return(d<<16)|(c&0xFFFF)}function p(a,b){return(a<<b)|(a>>>(32-b))}function u(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 v(a){return(a<20)?1518500249:(a<40)?1859775393:(a<60)?-1894007588:-899497514}function w(a){var b=t(a),c=new Array(80),d=1732584193,e=-271733879,f=-1732584194,g=271733878,h=-1009589776,k,l,n,o,r,s;for(var q=0;q<b.length;q+=16){k=d,l=e,n=f,o=g,r=h;for(var i=0;i<80;i++){if(i<16)c[i]=b[q+i];else c[i]=p(c[i-3]^c[i-8]^c[i-14]^c[i-16],1);s=j(j(p(d,5),u(i,e,f,g)),j(j(h,c[i]),v(i)));h=g;g=f;f=p(e,30);e=d;d=s}d=j(d,k);e=j(e,l);f=j(f,n);g=j(g,o);h=j(h,r)}return m(d)+m(e)+m(f)+m(g)+m(h)}Object.extend(OOo,{sha1:w})})();(function(){function g(a){var b=a.cookieName||'oo_abandon',c=OOo.readCookie(b),d=a.startPage,e=a.endPage,f=a.middle;if(!c){if(location.pathname.indexOf(d)!=-1)OOo.createCookie(b);return false}else if(location.pathname.indexOf(e)!=-1){OOo.eraseCookie(b);return false}else if(location.pathname.search(f)!=-1)return false;else{OOo.eraseCookie(b);return true}}Object.extend(OOo,{checkAbandonment:g})})();(function(){function c(a){for(var b=a.length-1;b>=0;b--){if(a[b].read&&OOo.readCookie(a[b].name)==a[b].value)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)}}Object.extend(OOo,{checkThirdPartyCookies:c,setThirdPartyCookies:d})})();Object.extend(Function.prototype,(function(){if(typeof(Prototype)!="undefined")return;var e=Array.prototype.slice;function f(a,b){var c=a.length,d=b.length;while(d--)a[c+d]=b[d];return a}function g(a,b){a=e.call(a,0);return f(a,b)}function h(b){if(arguments.length<2&&typeof arguments[0]==="undefined")return this;var c=this,d=e.call(arguments,1);return function(){var a=g(d,arguments);return c.apply(b,a)}}return{bind:h}})());(function(){var f=location.host.split('.').reverse();f='.'+f[1]+'.'+f[0];function g(a,b,c){var d='',e='';if(c){d=new Date();d.setTime(d.getTime()+(c*1000));e="; expires="+d.toGMTString()}document.cookie=a+"="+b+e+"; path=/; domain="+f+";"}function h(a){var b=a+"=",c=document.cookie.split(';'),d;for(var e=0;e<c.length;e++){d=c[e];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 k(a){g(a,"",-1)}Object.extend(OOo,{createCookie:g,readCookie:h,eraseCookie:k})})();OOo.Interstitial=function(a){this.options={tunnelCookie:'oo_int_tunnel',repromptTime:604800,responseRate:50,repromptCookie:'oo_int_reprompt',promptMarkup:'oo_int_prompt.html',promptStyles:'oo_interstitial_style.css',percentageCookie:'oo_int_percent',pagesHitCookie:'oo_int_hit',popupType:'popunder',promptDelay:0,neverShowAgainButton:false,loadPopupInBackground:false,tealeafCookieName:'TLTSID'};Object.extend(this.options,a);var b=this.options,c=parseInt(OOo.readCookie(b.pagesHitCookie))||0;OOo.Interstitial.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)}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.pathname.match(b.promptTrigger))return}else if(b.promptTrigger instanceof Array){if(!OOo.checkTunnel(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.Interstitial.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'),e,f,g=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(g.companyLogo){e=new Image();e.src=g.companyLogo;OOo.$('oo_company_logo').appendChild(e)}OOo.addEventListener(OOo.$('oo_launch_prompt'),'click',this.launchPopup.bind(this),false);if(g.neverShowAgainButton){f=OOo.$('oo_never_show');f.style.visibility='visible';OOo.addEventListener(f,'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(){var a=this.options,b=window.location.href,c=a.popupType=='popup'?'https://secure.opinionlab.com/ccc01/comment_card.asp?':a.pathToAssets+'oo_int_monitor.html?',d,e=[],f=a.asm?[555,500]:[545,200],g,h=OOo.readCookie(a.teleafId);f=a.newWindowSize||f;if(a.referrerRewrite){b=a.referrerRewrite.searchPattern?window.location.href.replace(a.referrerRewrite.searchPattern,a.referrerRewrite.replacePattern):a.referrerRewrite.replacePattern}if(a.thirdPartyCookies)OOo.setThirdPartyCookies(a.thirdPartyCookies);d='width='+screen.width+'&height='+screen.height+'&referer='+escape(b)+'&prev='+escape(document.referrer)+'&time1='+(new Date()).getTime()+'&type=Interstitial';if(a.customVariables)d+='&customVars='+encodeURIComponent(OOo.serialize(a.customVariables));if(h)d+='&custom_var='+h;g=window.open(c+d,'OnlineOpinion','location=no,status=no,width='+f[0]+',height='+f[1]);if(!a.loadPopupInBackground)OOo.Interstitial.hidePrompt();if(a.popupType=='popunder'){if(!OOo.Browser.Chrome){g.blur();window.focus()}else{alert('Please fill out the form behind this window when you are finished.')}}},killPrompt:function(){OOo.createCookie(this.options.repromptCookie,1,1825);OOo.Interstitial.hidePrompt()}};Object.extend(OOo.Interstitial,{hidePrompt:function(){OOo.$('oo_container').style.display='none'}});
