var CBSi=(typeof CBSi=="undefined"||!CBSi)?{}:CBSi;CBSi.app=(typeof CBSi.app=="undefined"||!CBSi.app)?{}:CBSi.app;CBSi.app.VideoPlayer=(typeof CBSi.app.VideoPlayer=="undefined"||!CBSi.app.VideoPlayer)?{}:CBSi.app.VideoPlayer;CBSi.app.VideoPlayer.UVP=(typeof CBSi.app.VideoPlayer.UVP=="undefined"||!CBSi.app.VideoPlayer.UVP)?{}:CBSi.app.VideoPlayer.UVP;CBSi.app.VideoPlayer.UVP=function(a){this.global=a;this.jsReady=false;this.objName=this.global.params.objName;this.logger=new CBSILogger(this.global.params.logTo,this.global.params.logging,this.global.params.objName);this.logger.log("CBSILogger","Logger started.");this.cookieJar=new CBSICookieJar();if(this.global.params.cookName&&this.global.params.cookName!=""){this.cookName=this.global.params.cookName}};CBSi.app.VideoPlayer.UVP.prototype.init=function(){this.load();this.draw()};CBSi.app.VideoPlayer.UVP.prototype.load=function(){this.jsReady=true;this.logger.log("init","jsReady = "+this.jsReady);var a=(this.global.params.defaults&&this.global.params.defaults.STIME)?this.global.params.defaults.STIME:(new Date().getTime())/1000;if(this.global.params.enableClock){this.initTime(a)}};CBSi.app.VideoPlayer.UVP.prototype.draw=function(){this.logger.log("draw");var b=this.global.swfobject;this.vContainerCache=document.getElementById(b.container).innerHTML;try{b.obj.embedSWF(b.url,b.container,b.width,b.height,b.minVersion,b.installSWF,b.flashVars,b.flashParams,b.flashAttribs,b.callback)}catch(a){this.logger.log("CBSi.app.VideoPlayer.UVP","Error creating flash embed: "+a)}};CBSi.app.VideoPlayer.UVP.prototype.erase=function(){this.logger.log("erase");var d=this.global.swfobject;var b=document.getElementById(d.flashAttribs.id).parentNode;try{d.obj.removeSWF(d.flashAttribs.id)}catch(c){this.logger.log("CBSi.app.VideoPlayer.UVP","Error removing flash embed: "+c)}var a=document.createElement("div");a.id=d.container;a.innerHTML=this.vContainerCache;b.appendChild(a)};CBSi.app.VideoPlayer.UVP.prototype.isJSReady=function(){this.logger.log("isJSReady",this.jsReady);return this.jsReady};CBSi.app.VideoPlayer.UVP.prototype.getUVPVersion=function(){var a=(this.global.params.uvpVersion)?this.global.params.uvpVersion:false;this.logger.log("getUVPVersion",a);return a};CBSi.app.VideoPlayer.UVP.prototype.getAdsVersion=function(){var a=(this.global.params.adsVersion)?this.global.params.adsVersion:false;this.logger.log("getAdsVersion",a);return a};CBSi.app.VideoPlayer.UVP.prototype.getShowAd=function(){var a=(typeof this.global.params.showAd=="boolean")?this.global.params.showAd:true;this.logger.log("getShowAd",a);return a};CBSi.app.VideoPlayer.UVP.prototype.setShowAd=function(a){this.global.params.showAd=a;this.logger.log("setShowAd",a)};CBSi.app.VideoPlayer.UVP.prototype.onCBSIPlayerReady=function(){this.logger.log("onCBSIPlayerReady");this.api=document.getElementById(this.global.swfobject.flashAttribs.id);this.cbsiAd=document.getElementById(this.global.params.adCnt);var h=[];for(var g in this.global.overlays){var c=this.global.overlays[g];var a=c[0];c[0]=g;if(!h[a]){h[a]=[]}h[a].push(c)}var b=[];for(var d=0;d<h.length;d++){b=b.concat(h[d])}for(var g=0;g<b.length;g++){var c=b[g];try{this.api.drawOverlay(c);this.logger.log("onCBSIPlayerReady","overlay "+c[0]+" added")}catch(f){this.logger.log("onCBSIPlayerReady","error adding overlay "+c[0]+": "+f)}}try{this.api.onExternalOverlaysAdded()}catch(f){this.logger.log("onCBSIPlayerReady","error firing onExternalOverlaysAdded: "+f)}this.setEventCallback("onAdResourcesBuilt_cbsi",this.objName+".onAdResourcesBuilt");this.setEventCallback("onPlayerDataLoaded_cbsi",this.objName+".onPlayerDataLoaded");this.setEventCallback("onAdEnd_cbsi",this.objName+".onAdEnd");this.setEventCallback("adLoadRequest",this.objName+".adLoadRequest");this.setEventCallback("onAdResourcesInfo",this.objName+".onAdResourcesInfo");this.setEventCallback("onAdResourcesLoaded",this.objName+".onAdResourcesLoaded");this.setEventCallback("onAdStart_cbsi",this.objName+".onAdStart");this.setEventCallback("adVideoRequest",this.objName+".adVideoRequest");this.setEventCallback("bitrateSwitchRequest",this.objName+".bitrateSwitchRequest");this.setEventCallback("cbsiEventsAvailable",this.objName+".cbsiEventsAvailable");this.setEventCallback("onContentEnd_cbsi",this.objName+".onContentEnd");this.setEventCallback("contentLoadRequest",this.objName+".contentLoadRequest");this.setEventCallback("onContentStart_cbsi",this.objName+".onContentStart");this.setEventCallback("maximumBitrateAllowed",this.objName+".maximumBitrateAllowed");this.setEventCallback("minimumBitrateAllowed",this.objName+".minimumBitrateAllowed");this.setEventCallback("onOverlayEnd_cbsi",this.objName+".onOverlayEnd");this.setEventCallback("onOverlayStart_cbsi",this.objName+".onOverlayStart");this.setEventCallback("playbackDurationPercent",this.objName+".playbackDurationPercent");this.setEventCallback("playbackDurationSeconds",this.objName+".playbackDurationSeconds");this.setEventCallback("onPlayerLoaded_cbsi",this.objName+".onPlayerLoaded");this.setEventCallback("onPlayListEnd_cbsi",this.objName+".onPlayListEnd");this.setEventCallback("onPlaylistStart_cbsi",this.objName+".onPlaylistStart");this.setEventCallback("pluginsAvailable",this.objName+".pluginsAvailable");this.setEventCallback("resize",this.objName+".resize");this.setEventCallback("surveyLoadRequest",this.objName+".surveyLoadRequest");this.setEventCallback("trackSubmit",this.objName+".trackSubmit");this.setEventCallback("useDynamicSwitching",this.objName+".useDynamicSwitching");this.setEventCallback("userClear",this.objName+".userClear");this.setEventCallback("userFullscreen",this.objName+".userFullscreen");this.setEventCallback("userGesture",this.objName+".userGesture");this.setEventCallback("userMute",this.objName+".userMute");this.setEventCallback("userPause",this.objName+".userPause");this.setEventCallback("userPlay",this.objName+".userPlay");this.setEventCallback("userSeek",this.objName+".userSeek");this.setEventCallback("userStop",this.objName+".userStop");this.setEventCallback("userUnmute",this.objName+".userUnmute");this.setEventCallback("userVolumeChange",this.objName+".userVolumeChange");this.setEventCallback("onVideoCuePoint",this.objName+".onVideoCuePoint");this.setEventCallback("onVideoDone",this.objName+".onVideoDone");this.setEventCallback("onVideoError",this.objName+".onVideoError");this.setEventCallback("onVideoProgress",this.objName+".onVideoProgress");this.setEventCallback("onStateChange_cbsi",this.objName+".onStateChange");this.setEventCallback("onVideoTransitionComplete",this.objName+".onVideoTransitionComplete");this.setEventCallback("onVideoTransitionStart",this.objName+".onVideoTransitionStart")};CBSi.app.VideoPlayer.UVP.prototype.cuePointHandler=function(g){this.logger.log("cuePointHandler",g);if(g&&g!=null&&g.parameters&&g.parameters.URL&&g.parameters.URL!="0"){var d=g.parameters.URL.split("=");if(d.length==2){g.parameters.URL={};g.parameters.URL[d[0]]=d[1]}var b=g.parameters.URL.AD_ID.split(":");var h=b[0];var a=(b[1])?b[1]:"";if(h){if(this.global.params.showCompAd&&g.name=="URL"){switch(h){case"start":break;case"end":break;case"pod_start":break;case"pod_end":break;case h:var e=this.api.getVar("_cuepointAdCall")||this.global.swfobject.flashVars.cuepointAdCall;var c={AD_ID:h,RANDOM:Math.floor(Math.random()*new Date().getTime()),PARTNER:this.global.swfobject.flashVars.partner,COMP_AD_W:this.global.swfobject.flashVars.compAdW,COMP_AD_H:this.global.swfobject.flashVars.compAdH};for(var j in c){try{e=e.replace(j,c[j]);this.logger.log("cuePointHandler: adCall updated: ",e)}catch(f){this.logger.log("cuePointHandler Error: ",f)}}var i=document.getElementById(this.global.params.adContainer);i.innerHTML='<iframe id="myIframe" class="adCnt" src="'+e+'" scrollbar="no" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe>';break}}}}};CBSi.app.VideoPlayer.UVP.prototype.onAdUrlData=function(a){this.logger.log("onAdUrlData",a)};CBSi.app.VideoPlayer.UVP.prototype.getAdInfo=function(a,c){this.logger.log("getAdInfo: ",a+" x "+c);var b=this.api.getCompanionAdInfoBySize(a,c);this.logger.log("getAdInfo: adInfo: ",b);return b};CBSi.app.VideoPlayer.UVP.prototype.playVideo=function(g,c,b,d,a){c=(typeof c=="undefined")?"cbssports":c;this.logger.log("playVideo: ",g+", "+c+", "+b);if(b=="prog"||b=="rtmp"){try{this.api.stopVideo();this.api.clearVideo();if(d){this.api.loadVideoByUrl(g,b,c,d,a)}else{this.api.loadVideoByUrl(g,b,c)}}catch(f){this.logger.log("playVideo: error playing by url: ",f)}}else{try{this.api.stopVideo();this.api.clearVideo();this.api.loadVideoById(g,c)}catch(f){this.logger.log("playVideo: error playing by id: ",f)}}};CBSi.app.VideoPlayer.UVP.prototype.stopVideo=function(){this.logger.log("stopVideo");this.api.stopVideo();this.api.clearVideo()};CBSi.app.VideoPlayer.UVP.prototype.hideAllOverlays=function(){for(var a in this.global.overlays){if(!this.global.overlays[a][14]){this.api.activateOverlay(a,"off")}}};CBSi.app.VideoPlayer.UVP.prototype.getData=function(url,callback,doEval,passObjName){this.logger.log("getData",url+","+callback);var objName=this.objName;var http=this.getHTTPObject();http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){data=http.responseText;data=data.replace(/<!--([\S\s]*?)-->/gim,"");if(doEval){data=eval("("+data+")")}if(passObjName){callback(data,objName)}else{callback(data)}}};http.open("GET",encodeURI(url),true);http.send(null)};CBSi.app.VideoPlayer.UVP.prototype.getXData=function(b){this.logger.log("getXData",b);var c=document.getElementsByTagName("head").item(0);var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src",b);a.id="cbsixdata";if(document.getElementById("cbsixdata")){c.removeChild(document.getElementById("cbsixdata"))}c.appendChild(a)};CBSi.app.VideoPlayer.UVP.prototype.fireBeacon=function(b){this.logger.log("fireBeacon",b);var a=new Image();a.src=b};CBSi.app.VideoPlayer.UVP.prototype.setEventCallback=function(b,a){try{this.api.addEventJSCallback(b,a);this.logger.log("onCanPlayerReady","event callback '"+a+"' added for '"+b+"' event")}catch(c){this.logger.log("onCanPlayerReady","error adding callback '"+a+"' for event '"+b+"': "+c)}};CBSi.app.VideoPlayer.UVP.prototype.initTime=function(a){this.clock={dayMap:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthMap:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLength:[31,(this.year-2000%4==0)?29:28,31,30,31,30,31,31,30,31,30,31],tzAbbrev:{GMT:"GMT","US/Eastern":"ET","US/Central":"CT","US/Mountain":"MT","US/Pacific":"PT"},time:a*1000,_syncCounter:0};this.timerID=null;this.updateTime()};CBSi.app.VideoPlayer.UVP.prototype.updateTime=function(){clearTimeout(this.timerID);this.clock.time+=1000;this.clock._syncCounter++;if(this.clock._syncCounter==60){if(this.global.params.isRemote){this.getXData("http://www.cbssports.com/data/video/player/get-stime?callback="+this.objName+".syncTime&r="+Math.floor(Math.random()*new Date().getTime()))}else{this.getData("/data/video/player/get-stime?r="+Math.floor(Math.random()*new Date().getTime()),this.syncTime,false,true)}this.clock._syncCounter=0}this.timerID=setTimeout(this.objName+".updateTime();",1000)};CBSi.app.VideoPlayer.UVP.prototype.syncTime=function(newTime,objName){if(objName!=""&&objName!=undefined){var obj=eval(objName);obj.clock.time=newTime*1000}else{this.clock.time=newTime*1000}};CBSi.app.VideoPlayer.UVP.prototype.hhmmTohhmmampm=function(b,c){var a;if(b>=12){if(b!=12){b-=12}a=" pm"}else{if(b<12){a=" am";if(b==0){b=12}}}c=(c<10&&c>0)?"0"+c:(c==0)?"00":c;return b+":"+c+a};CBSi.app.VideoPlayer.UVP.prototype.getArrayIndex=function(a,c){for(var b=0;b<a.length;b++){if(a[b]==c){return b}}return -1};CBSi.app.VideoPlayer.UVP.prototype.getHTTPObject=function(){try{return new XMLHttpRequest()}catch(a){this.logger.log("getHTTPObject error",a)}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){this.logger.log("getHTTPObject error",a)}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){this.logger.log("getHTTPObject error",a)}return false};CBSi.app.VideoPlayer.UVP.prototype.onAdResourcesBuilt=function(a){this.logger.log("onAdResourcesBuilt",a)};CBSi.app.VideoPlayer.UVP.prototype.onPlayerDataLoaded=function(a){this.logger.log("onPlayerDataLoaded",a)};CBSi.app.VideoPlayer.UVP.prototype.onAdEnd=function(a){this.logger.log("onAdEnd",a)};CBSi.app.VideoPlayer.UVP.prototype.adLoadRequest=function(a){this.logger.log("adLoadRequest",a)};CBSi.app.VideoPlayer.UVP.prototype.onAdResourcesInfo=function(f){this.logger.log("onAdResourcesInfo",f);if(this.global.params.showCompAd&&c[0][2]=="img"){var d=document.getElementById(this.global.params.adContainer);var a=(this.global.params.compAdWidth>0)?this.global.params.compAdWidth:300;var b=(this.global.params.compAdHeight>0)?this.global.params.compAdHeight:250;var c=this.getAdInfo(a,b);this.logger.log("onAdResourcesInfo: adInfo",c);d.innerHTML='<a href="'+c[0][1]+'" target="_blank"><img src="'+c[0][0]+'"></a>'}};CBSi.app.VideoPlayer.UVP.prototype.onAdResourcesLoaded=function(a){this.logger.log("onAdResourcesLoaded",a)};CBSi.app.VideoPlayer.UVP.prototype.onAdStart=function(a){this.logger.log("onAdStart",a)};CBSi.app.VideoPlayer.UVP.prototype.adVideoRequest=function(a){this.logger.log("adVideoRequest",a)};CBSi.app.VideoPlayer.UVP.prototype.bitrateSwitchRequest=function(a){this.logger.log("bitrateSwitchRequest",a)};CBSi.app.VideoPlayer.UVP.prototype.cbsiEventsAvailable=function(a){this.logger.log("cbsiEventsAvailable",a)};CBSi.app.VideoPlayer.UVP.prototype.onContentEnd=function(a){this.logger.log("onContentEnd",a)};CBSi.app.VideoPlayer.UVP.prototype.contentLoadRequest=function(a){this.logger.log("contentLoadRequest",a)};CBSi.app.VideoPlayer.UVP.prototype.onContentStart=function(a){this.logger.log("onContentStart",a)};CBSi.app.VideoPlayer.UVP.prototype.maximumBitrateAllowed=function(a){this.logger.log("maximumBitrateAllowed",a)};CBSi.app.VideoPlayer.UVP.prototype.minimumBitrateAllowed=function(a){this.logger.log("minimumBitrateAllowed",a)};CBSi.app.VideoPlayer.UVP.prototype.onOverlayEnd=function(a){this.logger.log("onOverlayEnd",a)};CBSi.app.VideoPlayer.UVP.prototype.onOverlayStart=function(a){this.logger.log("onOverlayStart",a)};CBSi.app.VideoPlayer.UVP.prototype.playbackDurationPercent=function(a){this.logger.log("playbackDurationPercent",a)};CBSi.app.VideoPlayer.UVP.prototype.playbackDurationSeconds=function(a){this.logger.log("playbackDurationSeconds",a)};CBSi.app.VideoPlayer.UVP.prototype.onPlayerLoaded=function(a){this.logger.log("onPlayerLoaded",a)};CBSi.app.VideoPlayer.UVP.prototype.onPlayListEnd=function(a){this.logger.log("onPlayListEnd",a)};CBSi.app.VideoPlayer.UVP.prototype.onPlaylistStart=function(a){this.logger.log("onPlaylistStart",a)};CBSi.app.VideoPlayer.UVP.prototype.pluginsAvailable=function(a){this.logger.log("pluginsAvailable",a)};CBSi.app.VideoPlayer.UVP.prototype.resize=function(a){this.logger.log("resize",a)};CBSi.app.VideoPlayer.UVP.prototype.surveyLoadRequest=function(a){this.logger.log("surveyLoadRequest",a)};CBSi.app.VideoPlayer.UVP.prototype.trackSubmit=function(a){this.logger.log("trackSubmit",a)};CBSi.app.VideoPlayer.UVP.prototype.useDynamicSwitching=function(a){this.logger.log("useDynamicSwitching",a)};CBSi.app.VideoPlayer.UVP.prototype.userClear=function(a){this.logger.log("userClear",a)};CBSi.app.VideoPlayer.UVP.prototype.userFullscreen=function(a){this.logger.log("userFullscreen",a)};CBSi.app.VideoPlayer.UVP.prototype.userGesture=function(a){this.logger.log("userGesture",a)};CBSi.app.VideoPlayer.UVP.prototype.userMute=function(a){this.logger.log("userMute",a)};CBSi.app.VideoPlayer.UVP.prototype.userPause=function(a){this.logger.log("userPause",a)};CBSi.app.VideoPlayer.UVP.prototype.userPlay=function(a){this.logger.log("userPlay",a)};CBSi.app.VideoPlayer.UVP.prototype.userSeek=function(a){this.logger.log("userSeek",a)};CBSi.app.VideoPlayer.UVP.prototype.userStop=function(a){this.logger.log("userStop",a)};CBSi.app.VideoPlayer.UVP.prototype.userUnmute=function(a){this.logger.log("userUnmute",a)};CBSi.app.VideoPlayer.UVP.prototype.userVolumeChange=function(a){this.logger.log("userVolumeChange",a)};CBSi.app.VideoPlayer.UVP.prototype.onVideoCuePoint=function(e){this.logger.log("onVideoCuePoint: e:",e);var cp=eval("("+e+")");this.cuePointHandler(cp)};CBSi.app.VideoPlayer.UVP.prototype.onVideoDone=function(a){this.logger.log("onVideoDone",a)};CBSi.app.VideoPlayer.UVP.prototype.onVideoError=function(a){this.logger.log("onVideoError",a)};CBSi.app.VideoPlayer.UVP.prototype.onVideoProgress=function(a){this.logger.log("onVideoProgress",a)};CBSi.app.VideoPlayer.UVP.prototype.onVideoTransitionComplete=function(a){this.logger.log("onVideoTransitionComplete",a)};CBSi.app.VideoPlayer.UVP.prototype.onVideoTransitionStart=function(a){this.logger.log("onVideoTransitionStart",a)};CBSi.app.VideoPlayer.UVP.prototype.onStateChange=function(b){var a={"-1":"unstarted","0":"stopped","1":"playing","2":"paused","3":"buffering","5":"thumbnail image cued","100":"domain blacklisted","110":"video not available","120":"video geo-blocked","130":"data load error","140":"ad blocked"};this.logger.log("onStateChange",b+": "+a[b])};CBSi.app.VideoPlayer.UVP.prototype.onPlatformDataLoaded=function(a){this.logger.log("onPlatformDataLoaded",a);this.currentVideoPlatformData=a};CBSi.app.VideoPlayer.UVP.prototype.unpack=function(e){this.logger.log("unpack",e);var b=e.split("&");var d={};for(var c=0;c<b.length;c++){var a=b[c].split("=");if(a.length==2&&a[0]!=""&&a[1]!=""){d[a[0]]=decodeURIComponent(a[1])}}return d};CBSi.app.VideoPlayer.UVP.prototype.pack=function(b){this.logger.log("pack",b);var a=[];for(o in b){if(o!=""&&b[o]!=""){a.push(o+"="+encodeURIComponent(b[o]))}}return a.join("&")};CBSi.app.VideoPlayer.UVP.prototype.setSessParam=function(b,c){this.logger.log("setSessParam",b+", "+c);this.deleteSessParam(b);var e=this.cookieJar.readCookie(this.cookName);var d=(e&&e!="")?this.unpack(e):{};d[b]=c;var a=this.pack(d);this.cookieJar.createCookie(this.cookName,a,null,"cbssports.com","/")};CBSi.app.VideoPlayer.UVP.prototype.getSessParam=function(a){this.logger.log("getSessParam",a);var c=this.cookieJar.readCookie(this.cookName);var b=(c&&c!="")?this.unpack(c):{};if(b[a]){return b[a]}};CBSi.app.VideoPlayer.UVP.prototype.deleteSessParam=function(b){this.logger.log("deleteSessParam",b);var d=this.cookieJar.readCookie(this.cookName);var c=(d&&d!="")?this.unpack(d):{};var e=delete c[b];var a=this.pack(c);this.cookieJar.createCookie(this.cookName,a,null,"cbssports.com","/");return e};CBSi.app.VideoPlayer.UVP.prototype.dwTrack=function(b){this.logger.log("dwTrack",b);var a=this.buildDWCall(b);this.fireBeacon(a)};CBSi.app.VideoPlayer.UVP.prototype.buildDWCall=function(a){this.logger.log("buildDWCall",a);var e=this.global.params.beaconData[a];var d=["_EVENT_","_SITEID_","_ONID_","_PTID_","_ASID_","_ASTID_","_MAPP_","_PAGEURL_","_COMPTYP_","_COMP_","_RIAEVENT_","_OBJTYPE_","_OBJNM_"];var c=(this.global.params.dwTpl!="")?this.global.params.dwTpl:"http://dw.com.com/levt/ria/e.gif?ts="+new Date().getTime()+"&event=_EVENT_&siteid=_SITEID_&onid=_ONID_&ptid=_PTID_&asid=_ASID_&astid=_ASTID_&mapp=_MAPP_&pageurl=_PAGEURL_&comptyp=_COMPTYP_&comp=_COMP_&riaevent=_RIAEVENT_&objtyp=_OBJTYPE_&objnm=_OBJNM_";for(var b=0;b<e;b++){c=c.replace(d[b],encodeURIComponent(e[b]))}return c};var CBSILogger=function(b,a,c){this.isEnabled=(a)?a:false;this.objName=c;this.disableScroll=false;this.logCnt=(document.getElementById(b+"Cnt"))?document.getElementById(b+"Cnt"):document.createElement("div");if(this.isEnabled){this.logCnt.style.display="block";this.logTo=(typeof b=="function")?b:(document.getElementById(b))?document.getElementById(b):null}};CBSILogger.prototype.log=function(a,b){if(!this.isEnabled){this.logCnt.style.display="none";return}if(b){b=this.toStringEnhanced(b);b+="";b=b.replace(/</gi,"&lt;");b=b.replace(/>/gi,"&gt;");b=b.replace(/\n/gi,"<br/>")}else{b=""}if(this.logTo){if(typeof this.logTo=="function"){this.logTo({objName:this.objName,time:this.niceTime(),type:a,message:b})}else{this.logTo.innerHTML+='<div class="logMessageHead"><i>'+this.objName+"</i>: "+this.niceTime()+" > "+a+'</div><div class="logMessage">'+b+'</div><div class="logMessageFoot"></div>';if(!this.disableScroll){this.logTo.scrollTop=this.logTo.scrollHeight}}}};CBSILogger.prototype.debugJS=function(jsVar){this.log("debugJS",eval(jsVar))};CBSILogger.prototype.niceTime=function(){var f=new Date();var e=f.getHours();var b=(e<12)?"am":"pm";e=(e==0)?12:(e>12)?e-12:e;e+="";var a=f.getMinutes()+"";var c=f.getSeconds()+"";e=(e.length==1)?"0"+e:e;a=(a.length==1)?"0"+a:a;c=(c.length==1)?"0"+c:c;return e+":"+a+":"+c+" "+b};CBSILogger.prototype.toStringEnhanced=function(d){if((typeof(d)).toLowerCase()=="string"){return d}if((typeof(d)).toLowerCase()=="boolean"){return d.toString()}var c="";for(properties in d){var a=d[properties];var b=(typeof(a)).toLowerCase();if(b=="function"){c+=" A function: "+a+"\n";continue}if(a){if(a.constructor==new Date().constructor){c+=properties+": A date: ";c+=a;c+="\n"}else{if(a.constructor==[].constructor){c+=properties+": An array:\n\n";c+=this.toStringEnhanced(a);c+="\n"}else{if(b=="object"){c+=properties+": ";c+=this.toStringEnhanced(a);c+="\n"}else{c+=properties+": ";c+=a;c+="\n"}}}}}return c};var CBSICookieJar=function(){};CBSICookieJar.prototype.createCookie=function(b,f,h,e,g){try{var d=b+"="+f;var a=(h)?"; expires="+new Date(new Date().getTime()+(h*24*60*60*1000)).toGMTString():"";g=(g)?"; path="+g:"";e=(e)?"; domain="+e:"";document.cookie=d+a+g+e}catch(c){return false}return true};CBSICookieJar.prototype.readCookie=function(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null};CBSICookieJar.prototype.eraseCookie=function(a){try{createCookie(a,"",-1)}catch(b){return false}return true};
