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 vsnele883883 = document.scripts[document.scripts.length - 1]; var vsniframe883883 = document.createElement('iframe'); vsniframe883883.src = protocol + '://vsn1.phx.icastcenter.com/vsn-embed.cgi?protocol='+protocol+'&rand=883883&sid=icastondemand&trans=disabled&dvr=disabled&path=icastondemand/icastcenter-video-streaming-podcast-episode1.smil/playlist.m3u8&autostart=false&width=440&height=248&k=&coderequest=1&s=1&pid=&serverid=&poster=//icastcenter.com/images/icastcenter-video-streaming-podcast-episode1.jpg'; vsniframe883883.scrolling = 'no'; vsniframe883883.width = '440'; vsniframe883883.height = '248'; vsniframe883883.id = 'vsnicastiframeicastondemand883883'; vsniframe883883.setAttribute('frameborder', '0'); vsniframe883883.setAttribute('allowFullScreen', ''); vsnele883883.parentNode.insertBefore(vsniframe883883,vsnele883883); function resizeRoutine883883() { if (!ondemand) { console.log('resizing'); console.log('resize: ' + vsnele883883.parentNode.parentElement.clientWidth * .5625); vsniframe883883.style.width = vsnele883883.parentNode.clientWidth + "px"; vsniframe883883.style.height = (vsnele883883.parentNode.clientWidth * .5625) + "px"; } } resizeRoutine883883(); window.addEventListener('mousedown', function() { var f = document.getElementById('vsnicastiframeicastondemand883883'); f.contentWindow.postMessage("hideContext|", '*'); }, true); window.addEventListener('resize', function() { resizeRoutine883883(); }, true); vsn_r = '883883';