var ondemand = 0; window.addEventListener('message', function(event) { if (~event.origin.indexOf('icastcenter.com')) { var returnData = event.data.split('|'); if (returnData[0] == "setsize") { //alert('setsize: ' + returnData[1] + ': ' + returnData[2]); document.getElementById(returnData[1]).style.width = returnData[2] + "px"; } } else { console.log("Not authorized"); return; } }); var protocol = 'http'; if (location.protocol === 'https:') { protocol = 'https'; } var vsnele370531 = document.scripts[document.scripts.length - 1]; var vsniframe370531 = document.createElement('iframe'); vsniframe370531.src = protocol + '://vsn1.phx.icastcenter.com/vsn-embed.cgi?protocol='+protocol+'&rand=370531&sid=icastondemand&trans=disabled&dvr=disabled&path=icastondemand/smil:videostreamingpromo.smil/playlist.m3u8&autostart=false&width=440&height=248&k=&coderequest=1&s=1&pid=&serverid=&poster=//www.icastcenter.com/files/videos/promo/videostreamingpromo_screenshot.jpg'; vsniframe370531.scrolling = 'no'; vsniframe370531.width = '440'; vsniframe370531.height = '248'; vsniframe370531.id = 'vsnicastiframeicastondemand370531'; vsniframe370531.setAttribute('frameborder', '0'); vsniframe370531.setAttribute('allowFullScreen', ''); vsnele370531.parentNode.insertBefore(vsniframe370531,vsnele370531); function resizeRoutine370531() { if (!ondemand) { console.log('resizing'); console.log('resize: ' + vsnele370531.parentNode.parentElement.clientWidth * .5625); vsniframe370531.style.width = vsnele370531.parentNode.clientWidth + "px"; vsniframe370531.style.height = (vsnele370531.parentNode.clientWidth * .5625) + "px"; } } resizeRoutine370531(); window.addEventListener('mousedown', function() { var f = document.getElementById('vsnicastiframeicastondemand370531'); f.contentWindow.postMessage("hideContext|", '*'); }, true); window.addEventListener('resize', function() { resizeRoutine370531(); }, true); vsn_r = '370531';