(function (widget,cId,vids){ var _ONND_URL_EMBED = "https://video.onnetwork.tv" ; var iid=Date.now(); var uid="id"+iid; 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; }' ; var nefrag = '
' + '
' + '
' + '' + '
' ; function insertWidget( container , ib ){ var nstyle = document.createElement( "style" ); nstyle.innerHTML = nstylet ; var tcontainer = document.createElement( "div" ); tcontainer.className = "totalcontainerexs" ; 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){ 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 ); } 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 ); } })(35,"","");