(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:70%;height:0;padding-bottom: 39.375% !important; display:block;flex:1 1 70%;}'+ ' div.widgetcontainerexs{ width:30%;height:auto;min-height:100%;display:block;flex:1 1 30%; }'+ ' 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 + "\n" + loadercss ; var nefrag = '
' + '
' + '
' + '' + '
' ; function insertWidget( container , ib ){ var nstyle = document.createElement( "style" ); nstyle.innerHTML = nstylet ; var tcontainer = document.createElement( "div" ); tcontainer.className = "totalcontainerexs wid494 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 ); } })(494,"","");