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