var lectureWindow;var lectureWindowUrl;var playerIntrvl;var URL;function lectureTrackingEventsOnReady(contentName,contentTitle,categoryName,fileCounter,lectureState,isLectureNeedToBeTracked){$.blockUI({message:'<table align="center"><tr><td><img src="'+$("#spinnerImageUrl").val()+'"  width="30" height="30"/></td><td style="font-size:17px;font-weight:bold;"> Please wait...</td></tr></table>'});if(!shouldLecturesBePlayedWithSilverLight()){playerIntrvl=window.setInterval("setPlayerUrl()",100);}
document.title='BARBRI Lectures';if(isUserInSession())
window.setInterval("keepSessionActive()",600000);LectureAccessListener.getWCMLectureUrl(contentName,contentTitle,function(url){formatURL(url);if(shouldLecturesBePlayedWithSilverLight()){var silverlightObjHtml="<object id='silverlightObj' style='vertical-align:bottom;text-align:center;width: 320px;"+" height: 320px;background-color: Maroon; border-color: Black; border-style:solid;' data='data:application/x-silverlight-2,' type='application/x-silverlight-2'"+" width='100%' height='100%'><param name='source' value='/wps/themes/html/akamai/OVP.xap'/><param name='initparams' value='mediasource="+URL+" showstats=false, autoplay=true, muted=false, playlistoverlay=true, linkurl=, embedtag=, stretchmode=Fit'/><param name='onerror' value='onSilverlightError'/>"+" <param name='background' value='white'/><param name='minRuntimeVersion' value='2.0.31005.0'/><param name='autoUpgrade' value='true'/><param name='onload' value='onSilverlightLoaded'/>"+"<a href='http://go.microsoft.com/fwlink/?LinkID=124807' style='text-decoration: none;'><img src='http://go.microsoft.com/fwlink/?LinkId=108181' alt='Get Microsoft Silverlight' style='border-style: none'/></a>"+"</object>'";$("#silverlightControlHost").html(silverlightObjHtml);$.unblockUI();document.getElementById('silverlightControlHost').style.display='block';}
LectureAccessListener.insertLectureTrackingRecord(contentName,categoryName,fileCounter,lectureState,isLectureNeedToBeTracked);});}
function keepSessionActive(){window.opener.keepSessionAlive();}
function keepSessionAlive(){LectureAccessListener.keepSessionAlive();}
function toggleMsg(supportLink,window){var supportMsg=supportLink.document.getElementById('supportMsg');if(supportMsg.style.display=='none'){supportMsg.style.display='block';}else{supportMsg.style.display='none';}}
function setPlayerUrl(){var embdPlayer=document.getElementById('embdPlayer');var NSPlay=document.getElementById('NSPlay');if(URL!=undefined&&(embdPlayer!=undefined||NSPlay!=undefined)){if(embdPlayer!=undefined)
embdPlayer.src=URL;else
NSPlay.fileName=URL;$.unblockUI();window.clearInterval(playerIntrvl);document.getElementById('barbriWMPlayer').style.display='block';}}
function formatURL(url){URL=url.replace('/wcm/myconnect/','/wcm/connect/');URL="http://"+getServerNameWithPort()+URL;}
function getURL(){return URL;}
function shouldLecturesBePlayedWithSilverLight(){if(navigator.platform.indexOf('Mac')!=-1&&navigator.platform.indexOf('PPC')==-1)
return true;return false;}
function displayLectureTrackingAlertMessage(categoryName){var msg='';var barbriSupportMsg='<b>Email BARBRI Technical Support</b><br/><br/>'+'To enable the BARBRI technical support staff to resolve your problem quickly, '+'please provide the following information in your e-mail:'+'<ul>'+'<li>Your name, phone number and username</li>'+"<li>Your computer's operating system (e.g., Windows XP, MAC OS X, etc.)</li>"+'<li>The web browser that you are using (e.g., Internet Explorer 7.0, Mozilla Firefox 3.0, etc.)</li>'+'<li>The specific problem you encountered and the error message you received, if any</li>'+'<li>Any other information that might help the technical support staff assist you</li>'+'</ul><br/>'+'Email <a href="mailto:barbri.support@thomson.com">barbri.support@thomson.com</a>';if(categoryName=='lecture.barreview.makeup'){msg="<center><b>We're sorry you have exceeded the maximum access limit. <br/>"+"If you need additional assistance please contact your BARBRI office.</b></center>";}else{msg="<center><b>We're sorry you have already accessed this lecture the maximum number of times.</b><br/><br/>"+'If you need to listen to it again, please contact <br/>BARBRI Technical Support at 877-385-6238 or <a id='+'"supportLink" href="javascript:window.opener.toggleMsg(this,window);">Email</a>.</center><br/>'+'<div id="supportMsg" style="padding:10px 5px;border:1px solid #000;display:none;">'+barbriSupportMsg+'</div>';}
return msg;}
function activateLectureTracking(contentName,fileCounter,categoryTitle,lectureState,shouldLecturesBeTracked,isCategoryNameFromWCMRequired,lectureWindowURL,ctx){var width=650;var height=475;var _x=((window.screen.availWidth/2)-(width/2));var _y=((window.screen.availHeight/2)-(height/2));if(lectureWindow!=undefined&&!lectureWindow.closed)
lectureWindow.close();lectureWindow=window.open('','BarbriLectures','left='+_x+',top='+_y+',width='+width+',height='+height+',resizable=1');lectureWindow.document.write('<html><head><title>BARBRI Lectures</title>');lectureWindow.document.write('</head><body style="background-color:#6E6E6E;" id="lectureWinBodyId">');lectureWindow.document.write('<div>');lectureWindow.document.write('<div id="errorMsgId" style="display:none;font-size:12;font-family:verdana;"></div>');lectureWindow.document.write('<div style="height:185px;">&nbsp;</div>');lectureWindow.document.write('<div id="waitMsgId" style="display:block;background-color:#FFFFFF;border:3px solid #BDBDBD;margin:0 220;">');lectureWindow.document.write('<table  align="center"><tr><td><img src="');lectureWindow.document.write(ctx);lectureWindow.document.write('/images/loadingImage.gif" alt="spinner" width="30" height="30"/></td>');lectureWindow.document.write('<td style="font-size:17px;font-weight:bold;"> Please wait...</td></tr></table>');lectureWindow.document.write('</div>');lectureWindow.document.write('</div></body></html>');lectureWindowUrl=lectureWindowURL;playLecture(contentName,fileCounter,categoryTitle,lectureState,shouldLecturesBeTracked,isCategoryNameFromWCMRequired);}
function playLecture(contentName,fileCounter,category,lectureState,shouldLecturesBeTracked,isCategoryNameFromWCMRequired){LectureAccessListener.setLectureTrackingParamsInSession(contentName,fileCounter,category,lectureState,shouldLecturesBePlayedWithSilverLight(),shouldLecturesBeTracked,isCategoryNameFromWCMRequired,function(){lectureWindow.location=lectureWindowUrl;});}