/* SWFObject v2.2 is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab'; document.write(code); ///Construct a new player after body load if(window.addEventListener) { window.addEventListener('load',function(){ref.constructContainer();},false); } else if( window.attachEvent) { window.attachEvent('onload',function(){ref.constructContainer();}); } } SekindoPlayer.prototype.segmentUser = function segmentUser(pixelId, isAdd) { (function () { var sNew = document.createElement("script"); sNew.async = true; var protocol = document.location.protocol; if (protocol.indexOf('http') != 0) {protocol = 'http:';} sNew.src = protocol + '//' + 'live.sekindo.com/live/livePixel.php?id=' + pixelId; if (!isAdd) {sNew.src += '&del=1';} var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(sNew, s0); })(); } SekindoPlayer.prototype.constructContainer = function constructContainer() { if (typeof(swfobject) != 'undefined' && !swfobject.hasFlashPlayerVersion("1")) { this.segmentUser('811', true); this.supportFlashPlayerVersion = false; } // this code is for avoiding some vpaid js errors on IE if (!window.console) { Window.prototype.console = {}; Window.prototype.console.error = function(msg) {}; Window.prototype.console.info = function(msg) {}; Window.prototype.console.log = function(msg) {}; Window.prototype.console.warn = function(msg) {}; } // reduce reported errors to console function silentErrorHandler() {return true;}; window.onerror = silentErrorHandler; console.error = silentErrorHandler; //Disable scroll to ad Element.prototype.scrollIntoView = function(){}; // Disable geo location navigator.geolocation.getCurrentPosition = function(success, error) { error({code:0}); }; navigator.geolocation.watchPosition= function(success, error) { error({code:0}); }; this.containerDiv = document.getElementById('SekiNdo-Div-'+this.uniqueID); ///only for debug services if(this.config.externalControl == 'true')this.buildDebugMenu(); this.constructPlayer(); } ///constucting the player from start - happens on first time or on reconstruction after destruction SekindoPlayer.prototype.constructPlayer = function constructPlayer() { var ref = this; //Create a video player div this.videoDiv = document.createElement("div"); this.videoDiv.style.width = this.config.width;//"320px"; this.videoDiv.style.height = this.config.height;//"240px"; this.videoDiv.style.background = "white"; this.videoDiv.style.marginLeft = 'auto';//Center div in explorer this.videoDiv.style.marginRight = 'auto';//Center div in explorer ///generate flash object var innetHTML = ''; if (navigator.appName == 'Microsoft Internet Explorer') { innetHTML = '' + '' + '' + '' + '' + '' + '' + '' } else { innetHTML = ' '+ ''+ '' + ''+ ''+ ''+ ''+ '' } ///Insert a flash object to the div this.containerDiv.appendChild(this.videoDiv); this.videoDiv.innerHTML = innetHTML; ////Set refference ot the object this.flashObj = document.getElementById("flashObj"+this.uniqueID); ///init comunication with the flash this.flashInit("start"); } ///killing the beast SekindoPlayer.prototype.destructPlayer = function destructPlayer() { this.videoDiv.removeChild(this.flashObj); this.containerDiv.removeChild(this.videoDiv); } SekindoPlayer.prototype.buildDebugMenu = function buildDebugMenu() { var ref = this; this.jenerateButton = function(name, callBackFunc, width, height ) { var btn = document.createElement("BUTTON"); btn.id = name; btn.innerHTML = ''+name+'';//name;// btn.style.width = width?width:'50px'; btn.style.height = height?height:'20px'; if(callBackFunc)btn.onclick = callBackFunc; this.containerDiv.appendChild(btn); } var title = document.createElement("DIV"); title.innerHTML = "["+this.uniqueID+"]"; this.containerDiv.appendChild(title); this.onButton = function(event) { switch(event.currentTarget.id) { case "Play": ref.requestsToFlash('play'); break; case "Pause": ref.requestsToFlash('pause'); break; case "Mute": ref.requestsToFlash('mute'); break; case "UnMute": ref.requestsToFlash('unmute'); break; case "SkipAd": ref.requestsToFlash('skipAd'); case "Reset": ref.destructPlayer(); ref.configJson = ref.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); ref.constructPlayer(); break; case "FS": ref.requestsToFlash('fullscreen'); break; case "NS": ref.requestsToFlash('normalscreen'); break; } } this.jenerateButton("Play", this.onButton); this.jenerateButton("Pause", this.onButton); this.jenerateButton("Mute", this.onButton); this.jenerateButton("UnMute", this.onButton); this.jenerateButton("SkipAd", this.onButton); this.jenerateButton("Reset", this.onButton); } ////Inishiating the comunication with the flash - looping requests to flash untill we get connection SekindoPlayer.prototype.flashInit = function flashInit(val) { var ref = this; if(val == "start") {/// first time request for connection this.initInterval = setInterval(function() { //Debugger("initing player "+ref.uniqueID); ref.requestsToFlash("init", ref.uniqueID); }, 100); ///just in case we fail for a long time - stop this proccesssss this.initTimeOut = setTimeout(function() { clearInterval(ref.initInterval); },60000); } else if(val == "complete") {///We have a connection clearInterval(this.initInterval); clearTimeout(this.initTimeOut); this.requestsToFlash("config", this.configJson); } } SekindoPlayer.prototype.requestsToFlash = function requestsToFlash(type, val) { try { this.flashObj.callFlash(type, val); } catch(e) { } } ////Receiving reports from flash player SekindoPlayer.prototype.flashReports = function flashReports(type, val) { var ref = this; switch(type) { case "onHeartBeat": if(this.heartBeatTimeout) { clearTimeout(this.heartBeatTimeout); } this.heartBeatTimeout = setTimeout(function(){ref.onHeartBeatTimeout();}, 30000); break; case "onStart": this.playerWdTimestamp = this.getTimeSeconds(); if(this.playerWdTimer == null) { this.playerWdTimer = setInterval(function(){ref.playerWd();}, 1000); } if (!this.supportFlashPlayerVersion) { this.segmentUser('811', false); } break; case "onPause": case "onComplete": if (this.playerWdTimer) { clearInterval(this.playerWdTimer); this.playerWdTimer = null; } break; case "onPlay": break; case "onMovieStart": break; case "onMovieComplete": var isAutoPlay = (this.configJson.indexOf('"isAutoPlay":"true"') != -1); if(this.config.MC == 'true' && isAutoPlay) { var plIndex = this.configJson.indexOf('"contentPlayList"'); var plIndex1 = this.configJson.indexOf('}],',plIndex+18); var contentPlayList = this.configJson.substring(plIndex+18,plIndex1+2); if(!this.contentLength) { var mpIndex = this.configJson.indexOf('"playlistMultiplier":"'); var mpIndex1 = this.configJson.indexOf('"',mpIndex+23); var playlistMultiplier = Number(this.configJson.substring(mpIndex+22,mpIndex1)); this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); this.configJson = this.configJson.replace('"isAutoPlay":"true"','"isAutoPlay":"true","avoidSplash":"true"'); this.configJson = this.configJson.replace(('"playlistMultiplier":"'+String(playlistMultiplier)),('"playlistMultiplier":"1')); this.contentLength = contentPlayList.split('},{').length; this.contentPlaydCount = this.contentLength*playlistMultiplier; } if(this.contentPlaydCount > 1) { this.destructPlayer(); var lcIndex = contentPlayList.indexOf('{'); var lcIndex1 = contentPlayList.indexOf('}',lcIndex+1); var firstContent = contentPlayList.substring(lcIndex ,lcIndex1+1); var contentPlayList1 = contentPlayList.replace(firstContent,''); var coma = ''; if(contentPlayList1.indexOf('[,') != -1) { contentPlayList1 = contentPlayList1.replace('[,','['); coma = ','; } if(this.contentLength < this.contentPlaydCount) { contentPlayList1 = contentPlayList1.replace(']',coma+firstContent+']'); } this.configJson = this.configJson.replace(contentPlayList,contentPlayList1); this.constructPlayer(); } else { this.destructPlayer(); this.configJson = this.configJsonOrigin; this.configJson = this.configJson.replace('"isAutoPlay":"true"','"isAutoPlay":"false"'); this.contentLength = null; this.constructPlayer(); } this.contentPlaydCount--; } break; case "onScrab": break; case "onMute": break; case "onUnmute": break; case "onUserUnmute": this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onUserUnmute"); break; case "on3SecUnmute": this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_on3SecUnmute"); break; case "onVolumeScrab": break; case "onFullscreen": break; case "onNormalscreen": break; case "onAdRequest": this.playerWdTimestamp = this.getTimeSeconds(); break; case "onAdStart": this.strugglePixelFired = false; this.playerWdTimestamp = this.getTimeSeconds(); break; case "onAdImpression": this.playerWdTimestamp = this.getTimeSeconds(); break; case "onAdComplete": this.playerWdTimestamp = this.getTimeSeconds(); break; case "onAdSkip": this.playerWdTimestamp = this.getTimeSeconds(); break; case "onError": break; case "onAdError": this.playerWdTimestamp = this.getTimeSeconds(); break; case "onBuffer": break; case "onBufferComplete": break; case "onSoundMixerUndefined": this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onSoundMixerUndefined"); this.destructPlayer(); this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); this.constructPlayer(); break; case "onMemoryOverload": break; case "onVolumeStruggle": this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onVolumeStruggle"); this.destructPlayer(); this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); this.constructPlayer(); break; case "onVolumeStruggleNoImpression": if (!this.strugglePixelFired) { this.strugglePixelFired = true; this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onVolumeStruggleNoImpression"); } break; default: } } SekindoPlayer.prototype.onHeartBeatTimeout = function onHeartBeatTimeout() { this.heartBeatTimeout = null; // player is stuck. release it this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onHeartBeatTimeout"); this.destructPlayer(); this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); this.constructPlayer(); } SekindoPlayer.prototype.playerWd = function playerWd() { var diff = this.getTimeSeconds() - this.playerWdTimestamp; if (diff > 3*60) // 3min { // player is stuck. release it clearInterval(this.playerWdTimer); this.playerWdTimer = null; this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onPlayerWd"); this.destructPlayer(); this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"'); this.constructPlayer(); } } SekindoPlayer.prototype.firePixel = function firePixel(url) { if (!url || url == '') return; url += '&cbuster=' + (new Date().getTime().toString()); var oImg = document.createElement("img"); oImg.setAttribute('src', url); oImg.setAttribute('height', '0px'); oImg.setAttribute('width', '0px'); oImg.style.display = "none"; document.body.appendChild(oImg); } SekindoPlayer.prototype.getTimeSeconds = function getTimeSeconds() { return new Date().getTime() / 1000; } var configPlayer = new Object(); configPlayer.width = 300; configPlayer.height = 250; configPlayer.videoPlayerURL = 'http://live.sekindo.com/content/video/vplayer/vPlayer_v1.0.7.swf'; configPlayer.externalControl = 'false'; configPlayer.MC = 'true'; var randName = ("SekindoVPlayer"+Math.floor( Math.random()*100000)).toString(); window[randName] = new SekindoPlayer('{"width":"300","height":"250","logoClickUrl":"http:\/\/www.sekindo.com","logoType":"sekindo","showLogo":"false","isAutoPlay":"true","volume":".5","mute":"true","isMuteLogicActive":"true","adsTimeGap":5,"adVast":"http:\/\/live.sekindo.com\/live\/liveView.php?s=58057&vid_debugInfo=5730835_20925597_talkingpointsmemo.com&vid_vastTimeout=-1&vid_content_url=https%3A%2F%2Fvideo.sekindo.com%2Fuploads%2Fvideo%2Fseasonal_depression_mini.mp4&vid_content_id=seasonal_depression&vid_content_desc=Life+Therapy+Series+-+Seasonal+Depression&vid_content_title=Health+-+Seasonal+Depression&vid_content_duration=80&vid_vastType=1&vid_waterfall=auto&x=300&y=250&ri=6C69766553746174737C317C323031352D30382D31395F32317C32343234337C353733303833357C55537C7C4D6A41354D6A55314F5464666447467361326C755A334276615735306332316C62573875593239747E317E31FEFE&pubUrl=http%3A%2F%2Ftalkingpointsmemo.com%2Fcafe%2Flet-s-be-real-online-harassment-isn-t-virtual-for-women&cbuster=${CBUSTER}","playlistMultiplier":"25","contentClickUrl":null,"contentCash":"true","contentPlayList":[{"url":"https:\/\/video.sekindo.com\/uploads\/video\/seasonal_depression_mini.mp4","title":"Health - Seasonal Depression"}],"videoPlayerURL":"http:\/\/live.sekindo.com\/content\/video\/vplayer\/vPlayer_v1.0.7.swf","debug":"false"}', configPlayer, randName);