iad={version:'1.5.8'};iad.apply=function(o,c,defaults){if(defaults){iad.apply(o,defaults)}if(o&&c&&typeof c=='object'){for(var p in c){o[p]=c[p]}}return o};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0,isIPad=navigator.userAgent.match(/iPad/i)!=null,isIPhone=(navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null);if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}iad.apply(iad,{isStrict:isStrict,isSecure:isSecure,isReady:false,isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,isIPad:isIPad,isIPhone:isIPhone,isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function'},isDate:function(v){return v&&typeof v.getFullYear=='function'},emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){iad.override(sb,o)};sbp.override=io;iad.override(sb,overrides);sb.extend=function(o){iad.extend(sb,o)};return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}if(iad.isIE&&overrides.toString!=origclass.toString){p.toString=overrides.toString}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}}});iad.ns=iad.namespace})();iad.ns("iad","iad.util");iad.util.JSON=new(function(){var useHasOwn=!!{}.hasOwnProperty;var pad=function(n){return n<10?"0"+n:n};var m={"\b":'\\b',"\t":'\\t',"\n":'\\n',"\f":'\\f',"\r":'\\r','"':'\\"',"\\":'\\\\'};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(',')}a.push(v===null?"null":iad.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"}else if(iad.isArray(o)){return encodeArray(o)}else if(iad.isDate(o)){return iad.util.JSON.encodeDate(o)}else if(typeof o=="string"){return encodeString(o)}else if(typeof o=="number"){return isFinite(o)?String(o):"null"}else if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(',')}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}};this.decode=function(json){return eval("("+json+')')}})();iad.encode=iad.util.JSON.encode;iad.decode=iad.util.JSON.decode;var randId;var rand=123;var timeout;var hostDomain;var hostLocation;var os;var vms=true;var environment="bigpondvideo";var container="flash";var misc;var playSchedule;var liveAsset;var iadWidgetInstance;var iadPlayerInstance;var iadChannelInstance;var iadCarouselInstance;var iadCarouselExtInstance;var iadLbInstance={};var iadLbExtInstance={};var iadHtmlInstance;var iadHtml5Instance;var flashCom;var widgetApiDiv;var targetDiv;var targetExtDiv=[];var targetExtDiv1=null;var targetExtDiv2=null;var targetCarouselDiv;var targetLbDiv;var containerDiv;var containerExtDiv=[];var containerExtDiv1=null;var containerExtDiv2=null;var containerCarouselDiv;var containerLbDiv;var playerDiv;var channelDiv;var carouselDiv;var carouselExtDiv;var lbDiv;var lbExtDiv;var htmlDiv;var hideDiv;var totalModuleAssetCount;var loadedModuleAssetCount;var widgetParams;var initContentObj;var lightBoxInt;var carousel;function iadOnLoad(){}iadOnLoad.widget=function(){iadWidgetInstance.init()};iadOnLoad.player=function(){iadPlayerInstance.init()};iadOnLoad.carousel=function(){iadCarouselInstance.init();if(iadCarouselExtInstance)iadCarouselExtInstance.init()};iadOnLoad.lb=function(){iadLbInstance.init();if(iadLbExtInstance)iadLbExtInstance.init()};iadOnLoad.html=function(){iadHtmlInstance.init()};if(!window.iad)window.iad={};function getStyle(el,cssprop){}var IadWidgetObject=function(widgetId,initOnLoad,metaData){iadWidgetInstance=this;if(widgetId==undefined||widgetId==-1){return}else{this.widgetId=widgetId;this.metaData=metaData;if(typeof(iadEnvironment)=="string"){environment=iadEnvironment}else if(typeof(iVideoEnvironment)=="string"){environment=iVideoEnvironment}timeout=(typeof(iadTimeout)=="number")?iadTimeout*1000:10000;var urlEnvironment=checkEnvironment();var urlWidgetId=checkWidgetId();if(urlEnvironment!=""&&urlWidgetId!=-1){environment=urlEnvironment;this.widgetId=urlWidgetId}if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.widget,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.widget);else window.onload=iadOnLoad.widget}else{this.init(widgetId,metaData)}}};IadWidgetObject.prototype={init:function(){vms=false;if(this.metaData==undefined)this.metaData={};hostDomain=location.hostname;hostLocation=encodeURIComponent(location.toString().split("?")[0],"UTF-8");this.metaData['location']=hostLocation;this.metaData['widgetId']=this.widgetId;this.metaData['debug']=checkDebug();this.metaData['randId']=randId=Math.ceil(Math.random()*1000);this.metaData['domain']=getDomain();if(FlashInstalled()&&!checkContainer()){this.createFlashCom(true)}else{if(iadHtml5Instance){misc=new nv.player.ClassInterface('Miscellaneous');misc.doCall('getWidgetParams',this.metaData,{onFinish:iadWidgetInstance.handlerOnSuccess,scope:iadWidgetInstance})}else{addJavascript(getDomain()+"App/InfinityPlayer/Js/html5_player.js?rand="+randId,'head')}}},handlerOnSuccess:function(params){if(params==null&&widgetParams==null)return;else if(params!=null&&widgetParams==null)widgetParams=clone(params);else params=clone(widgetParams);this.params=params;if(iad.isIPad||iad.isIPhone||checkContainer())container=params['widget']['container']['type']="html5";totalModuleAssetCount=0;if(typeof(params['widget'])=='object'){if(params['widget']['player']!=null){totalModuleAssetCount++;if(params['widget']['player']['showTitle']=='1'||params['widget']['player']['showUnmetered']=='1')totalModuleAssetCount+=1;if(params['widget']['player']['showDescription']=='1')totalModuleAssetCount+=1}if(params['widget']['channel']!=null){totalModuleAssetCount++}if(params['widget']['carousel']!=null){totalModuleAssetCount++}if(params['widget']['leavebehind']!=null){totalModuleAssetCount++}}if(typeof(params['external'])=='object'){for(var i=0;i<params['external'].length;i++)totalModuleAssetCount++}if(typeof(params['widget'])=='object')this.createWidget(params['widget']);if(typeof(params['external'])=='object'){if(this.widgetId==315){if(params['external'][0])params['external'][0]['leavebehind']['targetArea']="AdArea04";if(params['external'][1])params['external'][1]['leavebehind']['targetArea']="AdArea05"}for(var i=0;i<params['external'].length;i++){this.createExternal(params['external'][i],i)}}},clearWidget:function(){var moduleDiv;if(targetDiv){if(containerDiv){for(var i=containerDiv.childNodes.length-1;i>=0;i--){moduleDiv=containerDiv.childNodes[i];for(var j=moduleDiv.childNodes.length-1;j>=0;j--){moduleDiv.removeChild(moduleDiv.childNodes[j])}containerDiv.removeChild(moduleDiv)}targetDiv.removeChild(containerDiv);containerDiv=null}targetDiv=null}if(targetExtDiv.length!=0){for(var j=containerExtDiv.length-1;j>=0;j--){for(i=containerExtDiv[j].childNodes.length-1;i>=0;i--){moduleDiv=containerExtDiv[j].childNodes[i];for(var h=moduleDiv.childNodes.length-1;h>=0;h--){moduleDiv.removeChild(moduleDiv.childNodes[h])}containerExtDiv[j].removeChild(containerExtDiv[j].childNodes[i])}}containerExtDiv=[];for(var j=targetExtDiv.length-1;j>=0;j--){for(i=targetExtDiv[j].childNodes.length-1;i>=0;i--){targetExtDiv[j].removeChild(targetExtDiv[j].childNodes[i])}}targetExtDiv=[]}if(FlashInstalled()&&!checkContainer()){if(widgetApiDiv){document.body.removeChild(widgetApiDiv);if(flashCom)flashCom=null}}randId=Math.ceil(Math.random()*1000);if(this.metaData)this.metaData['randId']=randId},createFlashCom:function(init){widgetApiDiv=document.createElement("DIV");widgetApiDiv.id="widgetApiDiv";setCssStyle(widgetApiDiv,"position","absolute");setCssStyle(widgetApiDiv,"display","block");setCssStyle(widgetApiDiv,"left","0");setCssStyle(widgetApiDiv,"zIndex","2000");setCssStyle(widgetApiDiv,"width","100");setCssStyle(widgetApiDiv,"height","100");document.body.appendChild(widgetApiDiv);if(this.metaData==null)this.metaData={};var swfWidth="\"0\"";var swfHeight="\"0\"";if(this.metaData['debug']=='1'){swfWidth="\"75\"";swfHeight="\"75\""}else{setVisibility("widgetApiDiv",false)}this.metaData['initWidget']=(init)?'1':'0';var flashVars='';for(var i in this.metaData){if(flashVars!='')flashVars+='&';flashVars+=i+'='+this.metaData[i]}var swfUrl=getDomain()+"App/InfinityPlayer/Flash/flashCom.swf?rand="+rand;flashCom=createSwf(widgetApiDiv,swfUrl,swfWidth,swfHeight,'000000','flashObjCr4',flashVars,false)},createWidget:function(params){if(params['container']==null){return}if(typeof(iadEnvironment)=="string"){if(environment!=iadEnvironment)environment=iadEnvironment}if(randId==undefined)randId=Math.ceil(Math.random()*1000);if(targetDiv==null)targetDiv=document.getElementById(params['container']['targetDiv']);if(!vms&&params['container']['allowDomain']!=null&&params['container']['allowDomain']!=undefined&&params['container']['allowDomain']!=''){if(!checkDomain(eval(params['container']['allowDomain']))){p=document.createElement("P");text=document.createTextNode("Sorry, your domain is NOT valid");p.appendChild(text);targetDiv.appendChild(p);return}}if(this.widgetId==4){params['player']['muted']='1'}if(this.widgetId==12){params['leavebehind']['floating']='1'}if(this.widgetId==19){params['container']['windowless']='0';params['container']['lightBox']='1';params['container']['allowOverlays']='0'}if(this.widgetId==21){if(params['player'])params['player']['allowScrubbing']='1'}if(params['player'])if(params['player']['live']=='1')params['player']['showBw']='1';if(params['player']){if(params['player']['controls']=='none'||params['player']['controls']=='external')params['player']['cStyle']='1'}if(params['player']){if(params['player']['cStyle']=='7'||params['player']['cStyle']=='8'){params['player']['wmv']='0';params['player']['flv']='1'}}for(var i in params){if(i!='serviceName'){for(var j in params[i]){if(params[i][j]==""||params[i][j]==null)delete params[i][j]}}}if(params['container'])this.lightBoxLoaded=(params['container']['lightBox']!=''&&params['container']['lightBox']!='0'&&params['container']['lightBox']!=null)?true:false;if(this.lightBoxLoaded)this.lightBoxWidgetId=(params['container']['lightBox']!='1')?params['container']['lightBox']:20;if(params['container'])params['container']['allowOverlays']=(params['container']['allowOverlays'])?params['container']['allowOverlays']:'1';this.createDivs(params,targetDiv);loadedModuleAssetCount=0;widgetLoaded=false;if(params['container']['siteId']==null)params['container']['siteId']=1;if(params['player']!=null){params['player']['targetDiv']=playerDiv;params['player']['platformId']=params['container']['platformId'];params['player']['propertyId']=params['container']['propertyId'];params['player']['siteId']=params['container']['siteId'];params['player']['environment']=environment;params['player']['urlRedirectPrefix']=params['container']['urlRedirectPrefix'];params['player']['allowOverlays']=params['player']['windowless']=params['container']['allowOverlays'];params['player']['isSecure']=(iad.isSecure)?'1':'0';new IadPlayerObject(params['player'],false)}if(params['channel']!=null){params['channel']['targetDiv']=channelDiv;params['channel']['platformId']=params['container']['platformId'];params['channel']['siteId']=params['container']['siteId'];params['channel']['environment']=environment;params['channel']['allowOverlays']=params['container']['allowOverlays'];params['channel']['isSecure']=(iad.isSecure)?'1':'0';new IadChannelObject(params['channel'],false)}if(params['carousel']!=null){params['carousel']['external']='0';params['carousel']['targetDiv']=carouselDiv;params['carousel']['platformId']=params['container']['platformId'];params['carousel']['propertyId']=params['container']['propertyId'];params['carousel']['siteId']=params['container']['siteId'];params['carousel']['environment']=environment;params['carousel']['urlRedirectPrefix']=params['container']['urlRedirectPrefix'];params['carousel']['allowOverlays']=params['container']['allowOverlays'];params['carousel']['isSecure']=(iad.isSecure)?'1':'0';if(params['carousel']['bgColor']==null||params['carousel']['bgColor']==undefined)params['carousel']['bgColor']=params['container']['bgColor'];new IadCarouselObject(params['carousel'],false)}if(params['leavebehind']!=null){params['leavebehind']['allowOverlays']=params['container']['allowOverlays'];if(params['leavebehind']['targetDiv']==undefined)params['leavebehind']['targetDiv']=lbDiv;new IadLeavebehindObject(params['leavebehind'],false)}if(params['html']!=null){params['html']['targetDiv']=htmlDiv;new IadHtmlObject(params['html'],false)}try{cr4ApiSuccess()}catch(e){}setTimeout(this.widgetTimeout,timeout)},createExternal:function(params,i){if(params['container']==null){return}params['container']['allowOverlays']='1';if(randId==undefined)randId=Math.ceil(Math.random()*1000);var curTargetDiv;var curContainerDiv;curTargetDiv=document.getElementById(params['container']['targetDiv']);targetExtDiv.push(curTargetDiv);var extDiv;var containerParams=params['container'];if(containerParams!=null){curContainerDiv=document.createElement("DIV");containerExtDiv.push(curContainerDiv);setCssStyle(curContainerDiv,'width',containerParams['width']);setCssStyle(curContainerDiv,'height',containerParams['height']);if(containerParams['bgImg']!=null)setCssStyle(curContainerDiv,'backgroundImage',containerParams['bgImg']);if(containerParams['bgColor']!=null)setCssStyle(curContainerDiv,'backgroundColor',"#"+containerParams['bgColor']);curTargetDiv.appendChild(curContainerDiv)}else{return}if(params['carousel']!=null){var carouselParams=params['carousel'];if(carouselParams!=null){extDiv=document.createElement("DIV");setCssStyle(extDiv,"position","absolute");setCssStyle(extDiv,"marginLeft",carouselParams['xPos']);setCssStyle(extDiv,"marginTop",carouselParams['yPos']);setCssStyle(extDiv,'width',carouselParams['width']);setCssStyle(extDiv,'height',carouselParams['height']);curContainerDiv.appendChild(extDiv)}else{return}params['carousel']['external']='1';params['carousel']['instance']=i;params['carousel']['targetDiv']=extDiv;params['carousel']['platformId']=params['container']['platformId'];params['carousel']['propertyId']=params['container']['propertyId'];params['carousel']['siteId']=params['container']['siteId'];params['carousel']['environment']=environment;params['carousel']['urlRedirectPrefix']=params['container']['urlRedirectPrefix'];params['carousel']['allowOverlays']=params['container']['allowOverlays'];params['carousel']['isSecure']=(iad.isSecure)?'1':'0';if(params['carousel']['bgColor']==null||params['carousel']['bgColor']==undefined)params['carousel']['bgColor']=params['container']['bgColor'];new IadCarouselObject(params['carousel'],false)}if(params['leavebehind']!=null){var lbParams=params['leavebehind'];if(lbParams!=null){extDiv=document.createElement("DIV");setCssStyle(extDiv,"position","absolute");setCssStyle(extDiv,"marginLeft",lbParams['xPos']);setCssStyle(extDiv,"marginTop",lbParams['yPos']);setCssStyle(extDiv,'width',lbParams['width']);setCssStyle(extDiv,'height',lbParams['height']);curContainerDiv.appendChild(extDiv)}else{return}params['leavebehind']['external']='1';params['leavebehind']['targetDiv']=extDiv;params['leavebehind']['allowOverlays']=params['container']['allowOverlays'];new IadLeavebehindObject(params['leavebehind'],false)}},createDivs:function(params,targetDiv){var containerParams=params['container'];if(containerParams!=null){if(containerDiv)this.clearWidget();containerDiv=document.createElement("DIV");containerDiv.id="containerDiv";setCssStyle(containerDiv,'width',containerParams['width']);setCssStyle(containerDiv,'height',containerParams['height']);if(containerParams['bgImg']!=null)setCssStyle(containerDiv,'backgroundImage',containerParams['bgImg']);if(containerParams['bgColor']!=null)setCssStyle(containerDiv,'backgroundColor',"#"+containerParams['bgColor']);targetDiv.appendChild(containerDiv)}else{return}var htmlParams=params['html'];if(htmlParams!=null){htmlDiv=document.createElement("DIV");htmlDiv.id="htmlDiv";setCssStyle(htmlDiv,"position","absolute");setCssStyle(htmlDiv,"marginLeft",htmlParams['xPos']);setCssStyle(htmlDiv,"marginTop",htmlParams['yPos']);setCssStyle(htmlDiv,'width',htmlParams['width']);setCssStyle(htmlDiv,'height',htmlParams['height']);containerDiv.appendChild(htmlDiv)}var playerParams=params['player'];if(playerParams!=null){playerDiv=document.createElement("DIV");playerDiv.id="playerDiv";setCssStyle(playerDiv,"position","absolute");setCssStyle(playerDiv,"marginLeft",playerParams['xPos']);setCssStyle(playerDiv,"marginTop",playerParams['yPos']);setCssStyle(playerDiv,'width',playerParams['width']);setCssStyle(playerDiv,'height',getHeight(playerParams,false));containerDiv.appendChild(playerDiv)}var channelParams=params['channel'];if(channelParams!=null){channelDiv=document.createElement("DIV");channelDiv.id="channelDiv";setCssStyle(channelDiv,"position","absolute");setCssStyle(channelDiv,"marginLeft",channelParams['xPos']);setCssStyle(channelDiv,"marginTop",channelParams['yPos']);setCssStyle(channelDiv,'width',channelParams['width']);setCssStyle(channelDiv,'height',channelParams['height']);containerDiv.appendChild(channelDiv)}var carouselParams=params['carousel'];if(carouselParams!=null){carouselDiv=document.createElement("DIV");carouselDiv.id="carouselDiv";setCssStyle(carouselDiv,"position","absolute");setCssStyle(carouselDiv,"marginLeft",carouselParams['xPos']);setCssStyle(carouselDiv,"marginTop",carouselParams['yPos']);setCssStyle(carouselDiv,'width',carouselParams['width']);setCssStyle(carouselDiv,'height',carouselParams['height']);containerDiv.appendChild(carouselDiv)}var lbParams=params['leavebehind'];if(lbParams!=null){if(params['leavebehind']['targetDiv']==undefined){lbDiv=document.createElement("DIV");lbDiv.id="lbDiv"}else{lbDiv=document.getElementById(params['leavebehind']['targetDiv'])}setCssStyle(lbDiv,"position","absolute");setCssStyle(lbDiv,"marginLeft",lbParams['xPos']);setCssStyle(lbDiv,"marginTop",lbParams['yPos']);setCssStyle(lbDiv,'width',lbParams['width']);setCssStyle(lbDiv,'height',lbParams['height']);if(params['leavebehind']['targetDiv']==undefined)containerDiv.appendChild(lbDiv)}},checkLightBoxLoaded:function(){var result=false;if(typeof jQuery!=='undefined'){if(typeof jQuery().colorbox!=='undefined'){var test=document.createElement("div");test.id="test";document.body.appendChild(test);$('#test').addClass("_css_loaded_test");if($('#test').css('display')==="none")result=true}}if(result){clearInterval(lightBoxInt);this.lightBoxLoaded=true}},widgetTimeout:function(){if(loadedModuleAssetCount<totalModuleAssetCount){try{cr4AssetTimeout("timeout","javascript-flash")}catch(e){}}},setModuleAssetLoaded:function(module){if(widgetLoaded)return;loadedModuleAssetCount++;if(loadedModuleAssetCount==totalModuleAssetCount){widgetLoaded=true;var objFlash=getObject("flashObjCr4");if(objFlash){if(typeof(objFlash.setAssetLoaded)=='function')objFlash.setAssetLoaded()}}},playerInit:function(){iadDebug("playerInit");if(typeof(initContentObj)=='object'){iadCarouselInstance.callCarousel({'asFunction':'playFromCarousel','contentId':initContentObj['data']['contentId']});initContentObj=null}try{cr4LoadSuccess()}catch(e){}},cr4PlayContent:function(params){if(params['autoStart']==undefined)params['autoStart']='1';if(this.lightBoxLoaded){this.cr4InitLightBox({'iadFunction':'cr4PlayContent','contentId':params['contentId']})}else{if(iadPlayerInstance)iadPlayerInstance.cr4PlayContent(params)}},cr4InitCarousel:function(){if(this.lightBoxLoaded){this.cr4InitLightBox({'iadFunction':'cr4InitCarousel'})}else{if(iadCarouselInstance)iadCarouselInstance.callCarousel({'asFunction':'initCarousel'})}},cr4PlayFromCarousel:function(params){if(this.lightBoxLoaded){this.cr4InitLightBox({'iadFunction':'cr4PlayFromCarousel','contentId':params['contentId']})}else{if(iadCarouselInstance)iadCarouselInstance.callCarousel({'asFunction':'playFromCarousel','contentId':params['contentId']})}},cr4iVideo:function(params){iadPlayerInstance.cr4iVideo(params)},cr4Stop:function(){if(iadPlayerInstance)iadPlayerInstance.cr4Stop()},cr4CallFunction:function(obj){if(iadPlayerInstance){var cr4Obj={'status':obj['call']};if(obj['callback'])cr4Obj['callback']=obj['callback'];if(obj['value'])cr4Obj['value']=obj['value'];iadPlayerInstance.sendCommand(cr4Obj)}},callLb:function(obj){if(iadLbInstance[obj['id']]){iadLbInstance[obj['id']].callLb(obj)}else if(iadLbExtInstance[obj['id']]){iadLbExtInstance[obj['id']].callLb(obj)}},setLbVisibility:function(obj){if(iadLbInstance){iadLbInstance[obj['targetArea']].setVisibility(obj['val'])}},cr4InitLightBox:function(params){if(this.lightBoxLoaded){var string="?iadFunction="+params['iadFunction']+"&contentId="+params['contentId']+"&widgetId="+this.lightBoxWidgetId;if(checkDebug()==1)string+="&debugNv=1";$.colorbox({innerWidth:widgetParams['widget']['container']['width'],innerHeight:widgetParams['widget']['container']['height'],initialWidth:widgetParams['widget']['container']['width'],initialHeight:widgetParams['widget']['container']['height'],inline:true,iframe:true,scrolling:false,href:getDomain()+'/App/InfinityPlayer/Html/LightBox/index.php'+string,onOpen:function(){},onLoad:function(){},onCleanup:function(){}})}}};var IadPlayerObject=function(params,initOnLoad){if(params==null){return}else{iadPlayerInstance=this;this.params=params;if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.player,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.player);else window.onload=iadOnLoad.player}else{this.init()}}};IadPlayerObject.prototype={init:function(){if(typeof(this.params['targetDiv'])=='string'){this.targetDiv=document.getElementById(this.params['targetDiv'])}else{this.targetDiv=this.params['targetDiv']}if(randId==undefined)randId=Math.ceil(Math.random()*1000);for(var i in this.params){if(this.params[i]==""||this.params[i]==null)delete this.params[i]}this.params['debug']=checkDebug();var invokeObj=checkInvoke();if(invokeObj['doInvoke']){delete this.params['url'];this.params['contentId']=invokeObj['contentId'];this.params['autoStart']='1'}if(hostDomain==undefined){this.params['domain']=location.hostname;this.params['location']=encodeURIComponent(location.toString().split("?")[0],"UTF-8")}else{this.params['domain']=hostDomain;this.params['location']=hostLocation}if(this.params['targetLevel']){this.params['targetLevel']=this.params['targetLevel'].toUpperCase();if(this.params['targetLevel'].indexOf('&')!=-1){this.params['targetLevel']=this.params['targetLevel'].replace("&","_amp_")}}if(this.params['stfUrl']){if(this.params['stfUrl'].indexOf('&')!=-1)this.params['stfUrl']=this.params['stfUrl'].replace("&","_amp_")}if(this.params['feedbackurl']){this.params['feedbackUrl']=this.params['feedbackurl'];delete this.params['feedbackurl']}if(this.params['feedbackUrl']){if(this.params['feedbackUrl'].indexOf('&')!=-1)this.params['feedbackUrl']=this.params['feedbackUrl'].replace("&","_amp_")}if(this.params['stfUrl'])this.params['stfUrl']=encodeURIComponent(this.params['stfUrl'],"UTF-8");if(this.params['bgColor']){if(this.params['bgColor'].indexOf("#")!=-1){this.params['bgColor']=this.params['bgColor'].replace("#","")}}if(this.params['siteId']=='1')if(typeof(s)=='object')if(s.un)this.params['omnitureEnv']=s.un;if(this.params['showTitle']=='1'||this.params['showUnmetered']=='1')this.createTitle();if(container=='html5'){if(iadHtml5Instance!=null)iadHtml5Instance.createPlayer(this.params);return}if(flashCom==null)iadWidgetInstance.createFlashCom(false);var url=getDomain()+"indexInfinityPlayer.php"+this.getParamStr();var iFrameWidth=this.params['width'];var iFrameHeight=getHeight(this.params,true);if(this.params['debug']=='1')iFrameWidth=2*Number(this.params['width']);var iframeDiv=document.createElement("DIV");iframeDiv.id="iframe";setCssStyle(iframeDiv,"width",this.params['width']);setCssStyle(iframeDiv,"height",iFrameHeight);this.targetDiv.appendChild(iframeDiv);var date=new Date();var iframe=document.createElement("iframe");iframe.setAttribute("name","iframe_"+date.getTime());iframe.setAttribute("id","iframe_"+date.getTime());iframe.setAttribute("src",url);iframe.setAttribute("scrolling","no");iframe.setAttribute("allowTransparency","true");iframe.setAttribute("frameBorder","0");setCssStyle(iframe,"align","center");setCssStyle(iframe,"margin",0);setCssStyle(iframe,"width",iFrameWidth);setCssStyle(iframe,"height",iFrameHeight);setCssStyle(iframe,"border",0);iframeDiv.appendChild(iframe);if(this.params['showDescription']=='1')this.createDescription();this.vol=80;this.curTime=0;this.totTime=0;this.dProgress=0},createTitle:function(){var titleDiv=document.createElement("DIV");titleDiv.id="titleDiv";setCssStyle(titleDiv,"width",this.params['width']);setCssStyle(titleDiv,"height",this.params['titleHeight']);this.targetDiv.appendChild(titleDiv);var flashVars="randId="+randId+"&debug="+this.params['debug']+"&cStyle="+this.params['cStyle']+"&fontSize="+this.params['fontSize']+"&fontColor="+this.params['fontColor']+"&titleHeight="+this.params['titleHeight']+"&titleWidth="+this.params['width']+"&showUnmetered="+this.params['showUnmetered']+"&showTitle="+this.params['showTitle'];var swfUrl=getDomain()+"App/InfinityPlayer/Flash/title.swf?rand="+rand;createSwf(titleDiv,swfUrl,this.params['width'],this.params['titleHeight'],'000000','flashTitle',flashVars,(this.params['allowOverlays']=='1'))},createDescription:function(){var descriptionDiv=document.createElement("DIV");descriptionDiv.id="descriptionDiv";setCssStyle(descriptionDiv,"width",this.params['width']);setCssStyle(descriptionDiv,"height",this.params['descriptionHeight']);this.targetDiv.appendChild(descriptionDiv);var flashVars="randId="+randId+"&debug="+this.params['debug']+"&cStyle="+this.params['cStyle']+"&fontSize="+this.params['dFontSize']+"&fontColor="+this.params['dFontColor']+"&descriptionHeight="+this.params['descriptionHeight']+"&descriptionWidth="+this.params['width']+"&showDescription="+this.params['showDescription'];var swfUrl=getDomain()+"App/InfinityPlayer/Flash/description.swf?rand="+rand;createSwf(descriptionDiv,swfUrl,this.params['width'],this.params['descriptionHeight'],'000000','flashDescription',flashVars,(this.params['allowOverlays']=='1'))},getParamStr:function(){this.params['randId']=randId;this.params['os']=getOs();if(this.params['silverlight']=='1'||iad.isSafari){this.params['os']='MacOs'}if((this.params['wmv']==undefined||this.params['wmv']==0)&&(this.params['flv']==undefined||this.params['flv']==0)){this.params['wmv']='1';this.params['flv']='0'}else if(this.params['wmv']==undefined&&this.params['flv']==1){this.params['wmv']='0'}if(this.params['wmv']=='0')this.params['os']='Windows';os=this.params['os'];if(this.params['bDuration']){if(this.params['bDuration']=='0'&&this.params['wmv']=='1'&&!iad.isIE)delete this.params['bDuration']}if(iad.isGecko&&this.params['windowless']=='1'&&this.params['wmv']=='1'&&this.params['os']!='MacOs'){os=this.params['os']='MacOs'}if(this.params['os']!='MacOs'&&(this.params['flv']=='0'||this.params['flv']==undefined)){}if(this.params['bClickThrough']!=undefined){this.params['bClickThrough']=encodeURIComponent(this.params['bClickThrough'],"UTF-8")}delete this.params['xPos'];delete this.params['yPos'];delete this.params['silverlight'];var paramStr="";for(var obj in this.params){param=this.params[obj];if(param!=""&&param!=null){if(obj=="url"){param=escape(param)}if(obj!='metaData'&&obj!='targetDiv'){if(paramStr==''){paramStr="?"+obj+"="+param}else{paramStr+="&"+obj+"="+param}}}}for(obj in this.params){if(obj=='metaData'){param=this.params[obj];for(var i in param){paramStr+="&"+i+"="+param[i]}}}return paramStr},callTitle:function(params){var objFlash=getObject("flashTitle");if(objFlash){if(typeof(objFlash.callTitle)=='function')objFlash.callTitle(params)}},callDescription:function(params){var objFlash=getObject("flashDescription");if(objFlash){if(typeof(objFlash.callDescription)=='function')objFlash.callDescription(params)}},callFlashCom:function(func,params){var objFlash=getObject("flashObjCr4");if(objFlash){if(typeof(objFlash[func])=='function')objFlash[func](params)}},cr4PlayContent:function(params){if(params['targetLevel'])params['targetLevel']=params['targetLevel'].toUpperCase();if(params['bDuration']){if(params['bDuration']=='0'&&!iad.isIE)delete params['bDuration']}params['holdingImgDefault']='0';if(container!="html5"){this.callFlashCom("playContent",params)}else{if(iadHtml5Instance)iadHtml5Instance.cr4PlayContent(params)}this.curTime=0;this.totTime=0;this.dProgress=0},cr4iVideo:function(params){this.callFlashCom("cr4iVideo",params)},sendCommand:function(params){this.callFlashCom("sendCommand",params);if(params['status']=='volume')this.vol=params['value']},playCompletedApi:function(status,url){if(status=='Content'){try{cr4ContentCompleted(url)}catch(e){}}if(status=='Ad'){try{cr4AdCompleted(url)}catch(e){}}if(status=='All'){this.curTime=0;this.totTime=0}},playStartedApi:function(status){if(status=='Content'){try{cr4ContentStarted()}catch(e){}}if(status=='Ad'){try{cr4AdStarted()}catch(e){}}},setError:function(error){try{cr4ErrorOccured(error)}catch(e){}},getDownloadProgressReturn:function(value){try{cr4GetDownloadProgressReturn(value)}catch(e){}},cr4CheckTime:function(){this.sendCommand({'status':'time'})},cr4GetCurTime:function(){return this.curTime},cr4GetDuration:function(){return this.totTime},cr4GetDownloadProgress:function(){return this.dProgress},cr4GetVolume:function(){return this.vol},cr4GetOs:function(){return os},cr4Play:function(){this.sendCommand({'status':'play'})},cr4Pause:function(){this.sendCommand({'status':'pause'})},cr4Stop:function(){this.sendCommand({'status':'stop'});this.curTime=0;this.totTime=0},cr4FastForward:function(){this.sendCommand({'status':'fastForward'})},cr4FastReverse:function(){this.sendCommand({'status':'fastReverse'})},cr4SetVolume:function(value){this.sendCommand({'status':'volume','value':Number(value)})},cr4SetCurrentPos:function(value){this.sendCommand({'status':'setCurrentPos','value':Number(value)})},cr4FullScreen:function(){this.sendCommand({'status':'fullScreen'})},cr4SendToFriend:function(){this.sendCommand({'status':'stf'})}};var IadChannelObject=function(params,initOnLoad){if(params==null){return}else{iadChannelInstance=this;this.params=params;if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.channel,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.channel);else window.onload=iadOnLoad.channel}else{this.init()}}};IadChannelObject.prototype={init:function(){var parentDiv;if(typeof(this.params['targetDiv'])=='string'){parentDiv=document.getElementById(this.params['targetDiv']);var channelDiv=document.createElement("DIV");channelDiv.id="channelDiv";channelDiv.style.width=this.params['width'];channelDiv.style.height=this.params['height'];channelDiv.style.margin=0;channelDiv.style.padding=0;parentDiv.appendChild(channelDiv)}else{channelDiv=this.params['targetDiv']}for(var i in this.params){if(this.params[i]==""||this.params[i]==null)delete this.params[i]}this.params['debug']=checkDebug();this.params['domain']=getDomain();if(this.params['style']!=undefined){var swfUrl=getDomain()+"App/InfinityPlayer/Flash/channel_iad_"+this.params['style']+".swf?rand="+rand}else{alert('Please specify a style');return}if(this.params['bg']!=undefined){try{this.params['bg']=iad.decode(this.params['bg'])}catch(e){alert(e);delete this.params['bg']}if(this.params['bg']){for(i in this.params['bg']){this.params["bg_"+i]=this.params['bg'][i]}}}if(this.params['targetLevel']==undefined){this.params['targetLevel']='VIDEOS'}if(this.params['activeColor'].indexOf(",")!=1){this.params['activeColor']=this.params['activeColor'].split(",").join("_sep_")}var flashVars='randFlashId='+randId;for(i in this.params){if(this.params[i]!=""&&this.params[i]!=null)flashVars+='&'+i+'='+this.params[i]}createSwf(channelDiv,swfUrl,this.params['width'],this.params['height'],'000000','flashChannel',flashVars,(this.params['allowOverlays']=='1'))}};var IadCarouselObject=function(params,initOnLoad){if(params==null){return}else{if(params['external']=='1'){iadCarouselExtInstance=this;this.instance='iadCarouselExtInstance_'+params['instance']}else{iadCarouselInstance=this;this.instance='iadCarouselInstance'}this.params=params;if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.carousel,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.carousel);else window.onload=iadOnLoad.carousel}else{this.init()}}};IadCarouselObject.prototype={init:function(){var parentDiv;if(typeof(this.params['targetDiv'])=='string'){parentDiv=document.getElementById(this.params['targetDiv']);var carouselDiv=document.createElement("DIV");carouselDiv.id="carouselDiv";setCssStyle(carouselDiv,"width",this.params['width']);setCssStyle(carouselDiv,"height",this.params['height']);setCssStyle(carouselDiv,"margin",0);setCssStyle(carouselDiv,"padding",0);parentDiv.appendChild(carouselDiv)}else{carouselDiv=this.params['targetDiv']}this.params['expandClip']='1';for(var i in this.params){if(this.params[i]==""||this.params[i]==null)delete this.params[i]}this.xPos=this.params['xPos'];if(this.params['paginationStyle']==undefined)this.params['paginationStyle']='1';if(this.params['playlistUser']=='0')delete this.params['playlistUser'];if(this.params['style']=='2'){if(this.params['expandClip']=='1'){this.params['clipWidth']=Number(this.params['imageWidth'])+2;this.params['clipHeight']=Number(this.params['imageHeight'])+2}if(this.params['playlistUser']=='1')this.params['clipHeight']=Number(this.params['clipHeight'])+9}if(this.params['playlistUser']=='1'&&this.params['tabs']==undefined){var title=(this.params['title']!=undefined)?this.params['title']:"";delete this.params['title'];this.params['tabs']='[{"tabTitle":"'+title+'","tabTargetLevel":"'+this.params['targetLevel']+'","tabTarget":"widget","tabContentSearch":{"searchBy":"","startDate":"","endDate":""}}]'}if(this.params['style']!=undefined){var swfUrl=getDomain()+"App/InfinityPlayer/Flash/carousel_iad_"+this.params['style']+".swf?rand="+rand}else{alert('Please specify a style');return}if(this.params['targetLevel']!=undefined){this.params['targetLevel']=this.params['targetLevel'].toUpperCase();if(this.params['targetLevel'].indexOf('&')!=-1){this.params['targetLevel']=this.params['targetLevel'].replace("&","_amp_")}}if(this.params['linkUrl']!=undefined){this.params['linkUrl']=encodeURIComponent(this.params['linkUrl'],"UTF-8")}var tabString="";this.contentSearchArray=new Array();if(this.params['tabs']){try{this.params['tabs']=eval(this.params['tabs'])}catch(e){alert(e);this.params['tabs']=[]}if(this.params['tabs'].length!=0){var tabTitleStr="";var tabTargetLevelStr="";var tabLiveChannelIdsStr="";var tabTargetStr="";var tabContentSearchStr="";for(i=0;i<this.params['tabs'].length;i++){tabTitleStr+="_sep_"+this.params['tabs'][i]['tabTitle'];tabTargetLevelStr+="_sep_"+this.params['tabs'][i]['tabTargetLevel'];tabLiveChannelIdsStr+=(this.params['tabs'][i]['tabLiveChannelIds']!=undefined)?"_sep_"+this.params['tabs'][i]['tabLiveChannelIds']:"_sep_";tabTargetStr+="_sep_"+this.params['tabs'][i]['tabTarget'];var tabContentSearchObj={};if(this.params['tabs'][i]['tabContentSearch']['searchBy']!=""||this.params['tabs'][i]['tabContentSearch']['startDate']!=""||this.params['tabs'][i]['tabContentSearch']['endDate']!=""){tabContentSearchStr+="_sep_1";for(var j in this.params['tabs'][i]['tabContentSearch']){tabContentSearchObj[j]=this.params['tabs'][i]['tabContentSearch'][j]}}else{tabContentSearchStr+="_sep_0"}this.contentSearchArray[i]=tabContentSearchObj}if(this.params['playlistUser']=='1'){tabTitleStr+="_sep_My Playlist";tabTargetLevelStr+="_sep_PLAYLIST";tabTargetStr+="_sep_widget";tabContentSearchStr+="_sep_0"}tabString="&"+"tabTitle="+tabTitleStr.substring(5)+"&"+"tabTargetLevel="+tabTargetLevelStr.substring(5)+"&"+"tabLiveChannelIds="+tabLiveChannelIdsStr.substring(5)+"&"+"tabTarget="+tabTargetStr.substring(5)+"&"+"tabContentSearch="+tabContentSearchStr.substring(5);if(this.params['title'])delete this.params['title']}else{delete this.params['tabs']}}if(this.params['contentSearch']){try{this.params['contentSearch']=iad.decode(this.params['contentSearch'])}catch(e){delete this.params['contentSearch']}if(this.params['contentSearch']){this.contentSearchArray[0]=this.params['contentSearch'];this.params['contentSearch']='1'}}this.params['debug']=checkDebug();this.params['carouselInstance']=this.instance;var invokeObj=checkInvoke();if(invokeObj['doInvoke']&&this.params['autoStart'])this.params['autoStart']='0';delete this.params['targetDiv'];delete this.params['xPos'];delete this.params['yPos'];if(container=='html5'){if(iadHtml5Instance!=null){iadHtml5Instance.createCarousel(this.params)}return}var flashVars='randFlashId='+randId;for(i in this.params){if(this.params[i]!=""&&this.params[i]!=null)flashVars+='&'+i+'='+this.params[i]}flashVars+=tabString;createSwf(carouselDiv,swfUrl,this.params['width'],this.params['height'],'000000',this.instance,flashVars,(this.params['allowOverlays']=='1'))},serverTimeout:function(){try{cr4AssetTimeout("timeout","carousel")}catch(e){}},getContentSearchArray:function(id){return this.contentSearchArray[id]},callCarousel:function(obj){var objFlash=getObject(this.instance);if(objFlash){if(typeof(objFlash.callCarousel)=='function'){objFlash.callCarousel(obj)}}}};var IadLeavebehindObject=function(params,initOnLoad){if(params==null){return}else{if(params['targetArea']=="AdAreaSml")params['targetArea']="AdArea01";if(params['targetArea']=="AdAreaLrg")params['targetArea']="AdArea02";this.instance=params['targetArea'];if(params['external']=='1'){iadLbExtInstance[this.instance]=this}else{iadLbInstance[this.instance]=this}this.targetArea=params['targetArea'];this.params=params;if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.lb,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.lb);else window.onload=iadOnLoad.lb}else{this.init()}}};IadLeavebehindObject.prototype={init:function(){if(typeof(this.params['targetDiv'])=='string'){this.parentDiv=document.getElementById(this.params['targetDiv']);this.lbDiv=document.createElement("DIV");this.lbDiv.id="lbDiv";setCssStyle(this.lbDiv,"width",this.params['width']);setCssStyle(this.lbDiv,"height",this.params['height']);setCssStyle(this.lbDiv,"marginLeft",this.params['xPos']);setCssStyle(this.lbDiv,"marginTop",this.params['yPos']);this.parentDiv.appendChild(this.lbDiv)}else{this.lbDiv=this.params['targetDiv']}if(this.params['targetArea']=='AdArea03'){setCssStyle(this.parentDiv,"position","absolute");setCssStyle(this.parentDiv,"display","block");setCssStyle(this.parentDiv,"zIndex","1000");setCssStyle(this.parentDiv,"width",this.params['width']);setCssStyle(this.parentDiv,"height",this.params['height'])}var swfUrl=getDomain()+"App/InfinityPlayer/Flash/leaveBehindHolder.swf?rand="+rand;this.params['debug']=checkDebug();this.params['lbInstance']=this.instance;for(var i in this.params){if(this.params[i]==""||this.params[i]==null)delete this.params[i]}if(this.params['bg']!=undefined){try{this.params['bg']=iad.decode(this.params['bg'])}catch(e){alert(e);delete this.params['bg']}if(this.params['bg']){for(i in this.params['bg']){this.params["bg_"+i]=this.params['bg'][i]}}}var flashVars='randFlashId='+randId;for(i in this.params){flashVars+='&'+i+'='+this.params[i]}createSwf(this.lbDiv,swfUrl,this.params['width'],this.params['height'],'000000',this.instance,flashVars,(this.params['allowOverlays']=='1'))},setVisibility:function(val){setVisibility(this.lbDiv,val)},callLb:function(obj){var objFlash=getObject(this.instance);if(objFlash){if(typeof(objFlash.callLb)=='function')objFlash.callLb(obj)}}};var IadHtmlObject=function(params,initOnLoad){if(params==null){return}else{iadHtmlInstance=this;this.params=params;if(initOnLoad){if(window.addEventListener)window.addEventListener("load",iadOnLoad.html,false);else if(window.attachEvent)window.attachEvent("onload",iadOnLoad.html);else window.onload=iadOnLoad.html}else{this.init()}}};IadHtmlObject.prototype={init:function(){var parentDiv;if(typeof(this.params['targetDiv'])=='string'){parentDiv=document.getElementById(this.params['targetDiv']);var htmlDiv=document.createElement("DIV");htmlDiv.id="htmlDiv";htmlDiv.style.width=this.params['width'];htmlDiv.style.height=this.params['height'];parentDiv.appendChild(htmlDiv)}else{htmlDiv=this.params['targetDiv']}if(this.params['type']=="html"){htmlDiv.innerHTML=this.params['value']}else if(this.params['type']=="image"){var img=document.createElement("IMG");img.src=this.params['value'];htmlDiv.appendChild(img)}else{htmlDiv.innerHTML="no type is defined"}}};function checkDomain(domainArray){var val=false;Array.prototype.inArray=function(oObject){for(var i in this){if(oObject.indexOf(this[i])!=-1)return true}return false};val=domainArray.inArray(location.hostname);if(!val)val=(location.hostname.indexOf("bigpondvideo.com")!=-1)?true:false;if(location.hostname=='iad')val=true;return val}function getDomain(){var domain=null;if(location.hostname=='vms'){domain=getProtocol()+'iad/'}else if(location.hostname=='vms-demo.iad.tv'){domain=getProtocol()+'demo.iad.tv/'}else if(location.hostname=='vms-testing.netventures.com.au'){domain=getProtocol()+'testing.netventures.com.au/'}else if(location.hostname=='vms-testing01.netventures.com.au'){domain=getProtocol()+'testing01.netventures.com.au/'}else if(location.hostname=='vms-sit.bigpondvideo.com'){domain=getProtocol()+'sit.bigpondvideo.com/'}else if(location.hostname=='vms-staging.iad.netventures.com.au'){domain=getProtocol()+'staging.bigpondvideo.com/'}else if(location.hostname=='vms.bigpondguide.info'){domain=getProtocol()+'embed.bigpondvideo.com/'}else if(location.hostname=='vms.netventures.tv/'){domain=getProtocol()+'infinity.netventures.tv/'}else if(location.hostname=='vms-staging.netventures.tv'){domain=getProtocol()+'infinity-staging.netventures.tv/'}if(domain!=null)return domain;switch(environment){case"local":domain=getProtocol()+'iad/';break;case"testing":domain=getProtocol()+'testing.netventures.com.au/';break;case"testing01":domain=getProtocol()+'testing01.iad.netventures.com.au/';break;case"demoIAd":domain=getProtocol()+'demo.iad.tv/';break;case"sit":domain=getProtocol()+'sit.bigpondvideo.com/';break;case"staging":domain=getProtocol()+'staging.bigpondvideo.com/';break;case"embed":domain=getProtocol()+'embed.bigpondvideo.com/';break;case"getstreamd-testing":domain=getProtocol()+'iad-testing.getstreamd.netventures.com.au/';break;case"getstreamd":domain=getProtocol()+'player.getstreamd.com/';break;case"bigpondvideo":domain=getProtocol()+'bigpondvideo.com/';break;case"production-staging":domain=getProtocol()+'infinity-staging.netventures.tv/';break;case"production":case"productionAU":case"productionUS":domain=getProtocol()+'infinity.netventures.tv/';break;default:if(environment!=undefined){domain=getProtocol()+environment+'.bigpondvideo.com/'}else{domain=getProtocol()+'bigpondvideo.com/'}}return domain}function getProtocol(){return(!iad.isSecure)?"http://":"https://"}function checkDebug(){var debug=0;var searchUrl=location.search;if(searchUrl!=""){searchUrl=searchUrl.slice(1);param_ar=searchUrl.split("&");for(i=0;i<param_ar.length;i++){param=param_ar[i].split("=");if(param[0]=='debugNv'&&param[1]=='1'){debug=1}}}return debug}function checkEnvironment(){var urlEnvironment="";var searchUrl=location.search;if(searchUrl!=""){searchUrl=searchUrl.slice(1);param_ar=searchUrl.split("&");for(i=0;i<param_ar.length;i++){param=param_ar[i].split("=");if(param[0]=='environment'){urlEnvironment=param[1]}}}return urlEnvironment}function checkWidgetId(){var urlWidgetId=-1;var searchUrl=location.search;if(searchUrl!=""){searchUrl=searchUrl.slice(1);param_ar=searchUrl.split("&");for(i=0;i<param_ar.length;i++){param=param_ar[i].split("=");if(param[0]=='widgetId'){urlWidgetId=param[1]}}}return urlWidgetId}function checkContainer(){var isHtml5=false;var searchUrl=location.search;if(searchUrl!=""){searchUrl=searchUrl.slice(1);param_ar=searchUrl.split("&");for(i=0;i<param_ar.length;i++){param=param_ar[i].split("=");if(param[0]=='container'&&param[1]=='html5'){isHtml5=true}}}return isHtml5}function checkInvoke(){var invokeObj={};invokeObj['doInvoke']=false;var searchUrl=location.search;if(searchUrl!=""){searchUrl=searchUrl.slice(1);param_ar=searchUrl.split("&");for(i=0;i<param_ar.length;i++){param=param_ar[i].split("=");if(param[0]=='cid'){invokeObj['doInvoke']=true;invokeObj['contentId']=param[1]}}}return invokeObj}function getHeight(params,iframe){var playerHeight=0;var controlHeight=0;if(params['controls']=='internal')controlHeight=25;playerHeight=Number(params['height'])+controlHeight;if(!iframe&&(params['showUnmetered']=='1'||params['showTitle']=='1'))playerHeight+=Number(params['titleHeight']);return playerHeight}function getOs(){var OSName="Unknown OS";if(iad.isWindows)OSName="Windows";if(iad.isMac)OSName="MacOs";if(iad.isAir)OSName="Air";if(iad.isLinux)OSName="Linux";return OSName}var IVideoObject=iad.extend(IadWidgetObject,{getMatch:function(iYear,iSeason,iRound,iTeam){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,quarter:0};params['searchMethod']='getMatch';this.cr4iVideo(params)},getQuarter:function(iYear,iSeason,iRound,iQuarter,iTeam){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,'quarter':iQuarter};params['searchMethod']='getQuarter';this.cr4iVideo(params)},getActivityByPlayer:function(iTeam,iPlayer,iActivity,iMaxVideos,iSortOrder){var params={'team':iTeam,'player':iPlayer,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getActivityByPlayer';this.cr4iVideo(params)},getActivityByTeam:function(iTeam,iActivity,iMaxVideos,iSortOrder){var params={'team':iTeam,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getActivityByTeam';this.cr4iVideo(params)},getActivityBySeason:function(iYear,iSeason,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getActivityBySeason';this.cr4iVideo(params)},getActivityByRound:function(iYear,iSeason,iRound,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'round':iRound,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getActivityByRound';this.cr4iVideo(params)},getPlayerBySeason:function(iYear,iSeason,iTeam,iPlayer,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'team':iTeam,'player':iPlayer,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getPlayerBySeason';this.cr4iVideo(params)},getPlayerByRound:function(iYear,iSeason,iRound,iTeam,iPlayer,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,'player':iPlayer,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getPlayerByRound';this.cr4iVideo(params)},getTeamBySeason:function(iYear,iSeason,iTeam,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'team':iTeam,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getTeamBySeason';this.cr4iVideo(params)},getTeamByRound:function(iYear,iSeason,iRound,iTeam,iActivity,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,'activityType':iActivity,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getTeamByRound';this.cr4iVideo(params)},getMatchData:function(iYear,iSeason,iRound,iTeam,iPlayer,iActivity,iActivityPosition,iMaxVideos,iSortOrder){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,'player':iPlayer,'activityType':iActivity,'activityPosition':iActivityPosition,'maxVideos':iMaxVideos,'sortOrder':iSortOrder};params['searchMethod']='getMatchData';this.cr4iVideo(params)},getMatchDataByScore:function(iYear,iSeason,iRound,iTeam,iTeamAScore,iTeamBScore){var params={'year':iYear,'season':iSeason,'round':iRound,'team':iTeam,'teamAScore':iTeamAScore,'teamBScore':iTeamBScore};params['searchMethod']='getMatchDataByScore';this.cr4iVideo(params)}});function FlashInstalled(){result=false;if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]){result=navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin}else if(document.all&&(navigator.appVersion.indexOf("Mac")==-1)){eval('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj) result = true; xObj = null; } catch (e) {}')}return result}function setCssStyle(target,property,value){switch(property){case'width':case'height':case'left':case'top':case'marginLeft':case'marginTop':if(iad.isIE)target.style[property]=value;else target.style[property]=value+"px";break;case'backgroundImage':target.style.backgroundImage="url("+value+")";break;default:target.style[property]=value}}function createSwf(div,url,width,height,bgcolor,id,flashVars,transparentFlash){if(iad.isIE){var flash='';flash+='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+getProtocol()+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ';flash+='WIDTH='+width+' HEIGHT='+height+' id='+id+'>';flash+='<PARAM NAME=movie VALUE='+url+'>';flash+='<PARAM NAME=quality VALUE=high>';flash+='<PARAM NAME=bgcolor VALUE=#000000>';flash+='<PARAM NAME=AllowScriptAccess VALUE="always">';flash+='<PARAM NAME=flashvars VALUE="'+flashVars+'">';if(transparentFlash)flash+='<PARAM NAME=wmode VALUE="transparent">';flash+='<EMBED href='+url+' quality=high bgcolor=#000000 WIDTH='+width+' HEIGHT='+height+' NAME='+id+' AllowScriptAccess="always" ';if(transparentFlash)flash+='wmode="transparent" ';flash+='TYPE="application/x-shockwave-flash" PLUGINSPAGE="'+getProtocol()+'www.macromedia.com/go/getflashplayer" flashvars='+flashVars+'></EMBED></OBJECT>';div.innerHTML=flash}else{var em=document.createElement("object");em.setAttribute("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");em.setAttribute("codebase","' + getProtocol() + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0");em.setAttribute("width",width);em.setAttribute("height",height);em.setAttribute("movie",url);em.setAttribute("flashVars",flashVars);em.setAttribute("allowScriptAccess","always");if(iad.isIE){em.id=id;em.setAttribute("name",id)}if(transparentFlash)em.setAttribute("wmode","transparent");if(bgcolor!="")em.setAttribute("bgcolor",("#"+bgcolor));var pr3=document.createElement("param");pr3.setAttribute("name","allowScriptAccess");pr3.setAttribute("value","always");em.appendChild(pr3);if(!window.ActiveXObject){var embed=document.createElement("embed");embed.setAttribute("src",url);embed.setAttribute("id",id);embed.setAttribute("name",id);embed.setAttribute("qality","high");embed.setAttribute("width",width);embed.setAttribute("height",height);embed.setAttribute("allowScriptAccess","always");embed.setAttribute("flashVars",flashVars);if(transparentFlash)embed.setAttribute("wmode","transparent");if(bgcolor!="")embed.setAttribute("bgcolor",("#"+bgcolor));embed.setAttribute("type","application/x-shockwave-flash");em.appendChild(embed)}div.appendChild(em)}return document.getElementById(id)}function getObject(movieName){var obj;obj=document.getElementById(movieName);if(obj==undefined){if(iad.isIE){obj=window[movieName]}else{obj=document[movieName]}}return obj}function setVisibility(div,status){if(typeof(div)=='string')div=document.getElementById(div);if(iad.isIE){if(status){div.style.margin=0}else{div.style.margin=-2000}}else{if(status){div.style.margin="0px"}else{div.style.margin="-2000px"}}}function clickThrough(url,target,depth,width,height,acl){var newWindow=false;if(url=='null'||url==null){return newWindow}leftVal=(screen.width-width)/2;topVal=(screen.height-height)/2;if(acl=='1'){tools="location=yes,scrollbars=yes,resizable=yes,width="+width+",height="+height+",left="+leftVal+",top="+topVal}else{tools="location=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+",left="+leftVal+",top="+topVal}if(target=="Same"){location.href=url;return true}else{if(window.open(url,'newWin',tools)){return true}else{return false}}}function dump(arr,level){var dumped_text="";if(!level)level=0;var level_padding="";for(var j=0;j<level+1;j++)level_padding+="    ";if(typeof(arr)=='object'){for(var item in arr){var value=arr[item];if(typeof(value)=='object'){dumped_text+=level_padding+"'"+item+"' ...\n";dumped_text+=dump(value,level+1)}else{dumped_text+=level_padding+"'"+item+"' => \""+value+"\"\n"}}}else{dumped_text="===>"+arr+"<===("+typeof(arr)+")"}return dumped_text}function clone(obj){if(obj==null||typeof(obj)!='object')return obj;var temp=obj.constructor();for(var key in obj)temp[key]=clone(obj[key]);return temp}function addJavascript(uri,pos){var th=document.getElementsByTagName(pos)[0];var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src',uri);th.appendChild(s)}function addCss(uri,pos){var th=document.getElementsByTagName(pos)[0];var css=document.createElement("link");css.setAttribute("href",uri);css.setAttribute("media","screen");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");th.appendChild(css)}function isCSSLoaded(uri){var links=document.getElementsByTagName("link");for(var i=0,len=links.length;i<len;++i){if(links[i].getAttribute("src")===uri)return true}return false}function iadDebug(str){try{debug(str)}catch(e){}}