(function (widget,cId,vids){ var _ONND_URL_EMBED = "https://video.onnetwork.tv" ; var iid=Date.now() * Math.floor( 1 + Math.random() * 100 ); var uid="id"+iid; var widgetAdded=false ; var mobile = 0 ; var loadercss = null ; var nstylet = ' div.totalcontainerexs{ display:flex;width:100%;margin:0px;height:auto;box-sizing:border-box;align-items:stretch; background-color:transparent ;}'+ ' div.playercontainerexs{ width:60%;height:0;padding-bottom: 33.75% !important; display:block;flex:1 1 60%;}'+ ' div.widgetcontainerexs{ width:40%;height:auto;min-height:100%;display:block;flex:1 1 40%; }'+ ' div.widgetcontainerexs>div{ position:relative;display:block;width:100%;height:100%;min-height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden; }'+ ' div.widgetcontainerexs>div>iframe{ position:absolute;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden; }' ; nstylet = nstylet + 'div.totalcontainerexs{background-color:#193441;z-index:2147483647 !important;} div.playercontainerexs{padding:10px 0px 10px 10px;z-index:2147483647 !important;margin-bottom:7px;} ' + 'div.playercontainerexs>div{position:relative;left:-20px;width:calc( 100% + 20px );z-index:2147483647 !important;}div.widgetcontainerexs{margin-left:-10px;}' ; nstylet = nstylet + "\n" + loadercss ; var nefrag = '
' + ' ' ; function insertWidget( container , ib ){ var nstyle = document.createElement( "style" ); nstyle.innerHTML = nstylet ; var tcontainer = document.createElement( "div" ); tcontainer.className = "totalcontainerexs wid375 desktop "+(mobile?"mobile":"desktop") ; tcontainer.innerHTML = nefrag ; document.body.appendChild( nstyle ); if (ib){ container.parentElement.insertBefore( tcontainer , document.currentScript ); } else{ container.appendChild( tcontainer ); } } window.addEventListener("message",(e)=>{ try{ if (!e.data.indexOf || (e.data.indexOf("onntv://")!=0)){ return ; } var com = {} ; try{ com = JSON.parse( e.data.substr( 8 ) ); }catch(e){ com = {} ; } switch (com.comm){ case "widgetloaded": if(parseInt(com.iid)==iid && !widgetAdded){ var pscript = document.createElement( "script" ); pscript.src = _ONND_URL_EMBED + '/embed.php?mid='+com.subject+'&iid='+iid+'&cId=p'+uid+'&widget='+widget+vids ; pscript.async = true ; document.body.appendChild( pscript ); widgetAdded = true ; } break ; } }catch(e){} },false); if ((cId!="") && document.getElementById( cId )){ insertWidget( document.getElementById( cId ) , false ); }else if (document.currentScript && document.currentScript.parentElement){ insertWidget( document.currentScript , true ); } })(375,"","");