var detect=navigator.userAgent.toLowerCase();var OS,browser,version,total,thestring;function getBrowserInfo(){if(checkIt("konqueror")){browser="Konqueror";OS="Linux"}else{if(checkIt("safari")){browser="Safari"}else{if(checkIt("omniweb")){browser="OmniWeb"}else{if(checkIt("opera")){browser="Opera"}else{if(checkIt("webtv")){browser="WebTV"}else{if(checkIt("icab")){browser="iCab"}else{if(checkIt("msie")){browser="Internet Explorer"}else{if(!checkIt("compatible")){browser="Netscape Navigator";version=detect.charAt(8)}else{browser="An unknown browser"}}}}}}}}if(!version){version=detect.charAt(place+thestring.length)}if(!OS){if(checkIt("linux")){OS="Linux"}else{if(checkIt("x11")){OS="Unix"}else{if(checkIt("mac")){OS="Mac"}else{if(checkIt("win")){OS="Windows"}else{OS="an unknown operating system"}}}}}}function checkIt(a){place=detect.indexOf(a)+1;thestring=a;return place}function set_cookie(f,g,d,c,b){var a=f+"="+escape(g);if(d){var e=new Date(d,c,b);a+="; expires="+e.toGMTString()}a+="; path=/";a+="; domain="+cookieDomain;document.cookie=a}function get_cookie(a){var b=document.cookie.match(a+"=(.*?)(;|$)");if(b){return(unescape(b[1]))}else{return null}}Event.observe(window,"unload",Event.unloadCache,false);var surveyLightbox=Class.create();surveyLightbox.prototype={yPos:0,xPos:0,initialize:function(a){this.content=a.href;Event.observe(a,"click",this.activate.bindAsEventListener(this),false);a.onclick=function(){return false}},activate:function(){if(browser=="Internet Explorer"){this.getScroll();this.prepareIE("100%","hidden");this.setScroll(0,0);this.hideSelects("hidden")}this.displayLightbox("block")},prepareIE:function(a,b){bod=document.getElementsByTagName("body")[0];bod.style.height=a;bod.style.overflow=b;htm=document.getElementsByTagName("html")[0];htm.style.height=a;htm.style.overflow=b},hideSelects:function(a){selects=document.getElementsByTagName("select");for(i=0;i<selects.length;i++){selects[i].style.visibility=a}},getScroll:function(){if(self.pageYOffset){this.yPos=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){this.yPos=document.documentElement.scrollTop}else{if(document.body){this.yPos=document.body.scrollTop}}}},setScroll:function(a,b){window.scrollTo(a,b)},displayLightbox:function(d){var b='<div class="lbCloseBar"><a href="#" id="btnClose" rel="deactivate" ><img src="http://'+location.host+'/Assets/Images/close.gif" border="0"/></a></div><div><br/>LexisNexis Lawyers.com is looking for participants for a research study.<br/>You could earn $100 for your participation.<br/>Will you take our short survey to determine if you qualify for our study?<br/><br/><br/><a href="#" id="btnYes" class="lbAction" rel="activator"><img src="/Assets/images/btnYes.gif" alt="Yes" style="cursor:hand;" /></a>&nbsp;&nbsp;&nbsp;<a href="#" id="btnNo" class="lbAction" rel="deactivate"><img src="/Assets/images/btnNo.gif" alt="Yes" style="cursor:hand;" /></a></div>';info='<div id="lbContent">'+b+"</div>";$("lightbox").innerHTML=info;var h=YAHOO.util.Dom.getViewportWidth()/2;var e=h-180;var j=YAHOO.util.Dom.getViewportHeight()/2;var f=j-110;$("lightbox").style.top=f+"px";$("lightbox").style.left=e+"px";$("lightbox").style.display=d;Event.observe($("btnYes"),"click",this["activator"].bindAsEventListener(this),false);$("btnYes").onclick=function(){return false};Event.observe($("btnNo"),"click",this["deactivate"].bindAsEventListener(this),false);$("btnNo").onclick=function(){return false};Event.observe($("btnClose"),"click",this["deactivate"].bindAsEventListener(this),false);$("btnClose").onclick=function(){return false};if(browser=="Safari"){$("lightbox").style.width="360px";$("lightbox").style.height="220px";$("lightbox").className="done"}else{$("overlay").style.display=d;var a={opacity:{from:0,to:0.3}};var c=new YAHOO.util.Anim("overlay",a,0.3);c.animate();var k=new YAHOO.util.Anim("lightbox",{width:{to:360}},1,YAHOO.util.Easing.easeOut);var g=new YAHOO.util.Anim("lightbox",{height:{to:220}},1,YAHOO.util.Easing.easeOut);g.onComplete.subscribe(function(){$("lightbox").className="done"});k.onComplete.subscribe(function(){g.animate()});k.animate()}},deactivate:function(){Element.remove($("lbContent"));if(browser=="Internet Explorer"){this.setScroll(0,this.yPos);this.prepareIE("auto","auto");this.hideSelects("visible")}this.displayLightbox("none")},activator:function(){this.deactivate();var a=window.open(clSurveyURL,"","width=700,height=500,left=200,top=200,resizable=1,scrollbars=1");a.blur();a.focus()}};function initialize(){if(!document.getElementById("overlay")){addLightboxMarkup()}lbox=document.getElementsByClassName("lbOn");for(i=0;i<lbox.length;i++){valid=new surveyLightbox(lbox[i])}}function addLightboxMarkup(){bod=document.getElementsByTagName("body")[0];overlay=document.createElement("div");overlay.id="overlay";lb=document.createElement("div");lb.id="lightbox";lb.className="loading";lb.innerHTML='<div id="lbLoadMessage"><p>Loading</p></div>';bod.appendChild(overlay);bod.appendChild(lb)};
