
if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept.util=="undefined")deconcept.util=new Object();if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return;}
this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf){this.setAttribute('swf',swf);}
if(id){this.setAttribute('id',id);}
if(w){this.setAttribute('width',w);}
if(h){this.setAttribute('height',h);}
if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(!deconcept.prepUnloadSet){deconcept.prepUnloadSet=true;window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);}}
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}
if(c){this.addParam('bgcolor',c);}
var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl);}}
deconcept.SWFObject.prototype={useExpressInstall:function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true);},setAttribute:function(name,value){this.attributes[name]=value;},getAttribute:function(name){return this.attributes[name]||"";},addParam:function(name,value){this.params[name]=value;},getParams:function(){return this.params;},addVariable:function(name,value){this.variables[name]=value;},getVariable:function(name){return this.variables[name]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs[variablePairs.length]=encodeURIComponent(key)+"="+encodeURIComponent(variables[key]);}
return variablePairs;},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" ';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"';}
swfNode+='/>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />';}
swfNode+="</object>";}
return swfNode;},write:function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}
return false;}}
deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(PlayerVersion.major==6){return PlayerVersion;}}
try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}
if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return PlayerVersion;}
deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0;}
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true;}
deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(param==null){return q;}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
return"";}}
deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for(var i=objects.length-1;i>=0;i--){objects[i].style.display='none';for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){};}}
objects[i].removeNode(true);}}
if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];}}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function tpResize(divID,height,width)
{var element=document.getElementById(divID);element.style.height=height+"px";element.style.width=width+"px";}
function tpGetTop(obj)
{result=0;while(obj)
{result+=obj.offsetTop;obj=obj.offsetParent;}
return result;}
function tpGetLeft(obj)
{result=0;while(obj)
{result+=obj.offsetLeft;obj=obj.offsetParent;}
return result;}
tpThisMovie=function(movieName)
{var oDoc
if(window.frame)
{oDoc=frame.contentWindow.document||frame.contentDocument.document;}
else
{oDoc=document}
return oDoc.getElementById(movieName);}
function tpDebug(str)
{if(document.getElementById("debugDiv"))
{document.getElementById("debugDiv").innerHTML+=str+"<br>";}}
function tpOpenNewWindow(URLtoOpen,windowName,windowFeatures)
{var newWindow=window.open(URLtoOpen,windowName,windowFeatures);}
var tpTrackingImage=new Image();function tpCallTrackingUrl(url)
{url=unescape(url);tpTrackingImage.src=url;for(i=0;((!tpTrackingImage.complete)&&(i<100000));i++)
{}}
function tpGetUseJS(){return"true"}
function tpGetInstanceID(){return tpInstanceID;}
function tpGetCommManagerID(){return tpCommID;}
tpLogLevel="warn";function tpSetLogLevel(level){tpLogLevel=level};function tpGetLogLevel(){return tpLogLevel}
function tpGetProperties()
{var props=new Object();props.commManagerId=tpGetCommManagerID();props.instanceId=tpGetInstanceID();props.useJS=tpGetUseJS();props.registeredComponents=tpGetRegisteredIDs();props.logLevel=tpGetLogLevel();return props;}
var registeredIDs=new Array();function tpRegisterID(swfName)
{for(var i=0;i<registeredIDs.length;i++)
{if(registeredIDs[i]==swfName)return;}
registeredIDs.push(swfName);}
function tpGetRegisteredIDs()
{return registeredIDs;}
var tpController;var tpCommID;var tpBridgeID;var tpExternalController;function tpSetCommManagerID(commID,embed,commManagerUrl,beforeThisDiv)
{tpInstanceID=(new Date()).getTime()+"|"+Math.round(Math.random()*100000000000000000);if(commID&&embed)
{var divEl=window.document.getElementById("commManagerDiv");if(divEl)
{divEl.parentNode.removeChild(divEl);divEl=null;}
divEl=window.document.createElement('div');divEl.id="commManagerDiv";divEl.style.position="absolute";divEl.style.top="0";divEl.style.left="0";if(beforeThisDiv){var divTag=window.document.getElementById(beforeThisDiv);divTag.parentNode.insertBefore(divEl,divTag);}else{var bodyTag=window.document.getElementsByTagName('body')[0];bodyTag.insertBefore(divEl,bodyTag.firstChild);}
var url=commManagerUrl?commManagerUrl:"swf/commManager.swf"
var so=new SWFObject(url,commID,"1","1","9.0.0.0");so.addParam("allowScriptAccess","always");so.addParam("wmode","transparent");so.write("commManagerDiv");}
tpController=new tpControllerClass();tpCommID=commID;tpBridgeID=commID?commID:"unknown";}
function tpControllerClass()
{this.sendMessage=function(destination,message,skipBus)
{var sendObj=new Object();sendObj.message=message;sendObj.destination=destination;if(this.isLoading&&!skipBus)
{this.messageQueue.push(sendObj);}
else if(!this.canMessage)
{this.priorityQueue.push(sendObj);}
else
{this.doSendMessage(sendObj);}}
this.doSendMessage=function(sendObj)
{if(this.isShutDown)return;var obj=tpThisMovie(sendObj.destination);obj.executeMessage(sendObj.message);}
this.checkMessageQueue=function()
{var len=this.messageQueue.length
while(this.messageQueue.length>0)
{this.doSendMessage(this.messageQueue.shift());}}
this.checkPriorityQueue=function()
{while(this.priorityQueue.length>0)
{var sendObj=this.priorityQueue.shift();if(sendObj.destination=="unknown")sendObj.destination=tpBridgeID;this.doSendMessage(sendObj);}}
this.wrapMessage=function(messageName,payload)
{var comm={globalDataType:this.getDataTypeName("CommInfo"),id:"javascript"}
var message={globalDataType:this.getDataTypeName("MessageInfo"),name:messageName,payload:payload,comm:comm};return message;}
this.getDataTypeName=function(shortType)
{switch(shortType)
{case"AdPattern":return"com.theplatform.pdk.data::AdPattern";case"Banner":return"com.theplatform.pdk.data::Banner";case"BaseClip":return"com.theplatform.pdk.data::BaseClip";case"CallInfo":return"com.theplatform.pdk.communication::CallInfo";case"CategoryInfo":return"com.theplatform.pdk.data::CategoryInfo";case"Clip":return"com.theplatform.pdk.data::Clip";case"CommInfo":return"com.theplatform.pdk.communication::CommInfo";case"CustomData":return"com.theplatform.pdk.data::CustomData";case"CustomValue":return"com.theplatform.pdk.data::CustomValue";case"DispatchInfo":return"com.theplatform.pdk.communication::DispatchInfo";case"FunctionInfo":return"com.theplatform.pdk.communication::FunctionInfo";case"HandlerInfo":return"com.theplatform.pdk.communication::HandlerInfo";case"HyperLink":return"com.theplatform.pdk.data::HyperLink";case"MediaClick":return"com.theplatform.pdk.data::MediaClick";case"MediaFile":return"com.theplatform.pdk.data::MediaFile";case"MessageInfo":return"com.theplatform.pdk.communication::MessageInfo";case"MetricInfo":return"com.theplatform.pdk.data::MetricInfo";case"Overlay":return"com.theplatform.pdk.data::Overlay";case"PdkEvent":return"com.theplatform.pdk.events::PdkEvent";case"ProviderInfo":return"com.theplatform.pdk.data::ProviderInfo";case"Range":return"com.theplatform.pdk.data::Range";case"Rating":return"com.theplatform.pdk.data::Rating";case"Release":return"com.theplatform.pdk.data::Release";case"ReleaseInfo":return"com.theplatform.pdk.data::ReleaseInfo";case"ScopeInfo":return"com.theplatform.pdk.communication::ScopeInfo";case"Sort":return"com.theplatform.pdk.data::Sort";case"Subtitles":return"com.theplatform.pdk.data::Subtitles";case"TrackingUrl":return"com.theplatform.pdk.data::TrackingUrl";}}
this.createScope=function(scope)
{if(scope==undefined)return this.defaultScope;else
{scope.push("javascript");tpDebug("creating scopes: "+scope.toString());return{globalDataType:this.getDataTypeName("ScopeInfo"),controlId:"javascript",isGlobal:true,isAny:false,isEmpty:false,scopeIds:scope};}}
this.registerFunction=function(funcName,callback,scopes)
{var scopeObj=this.createScope(scopes);var informComm=false;if(this.functions[funcName]==undefined)
{this.functions[funcName]=new Object();informComm=true;}
for(var i=0;i<scopeObj.scopeIds.length;i++)
{var s=scopeObj.scopeIds[i];if(s=="*")return;this.functions[funcName][s]=callback;}
if(informComm)
{var func={globalDataType:this.getDataTypeName("FunctionInfo"),name:funcName,scope:scopeObj};var message=this.wrapMessage("registerFunction",func);this.sendMessage(tpBridgeID,message,true);}}
this.unregisterFunction=function(funcName,scope)
{var scopeObj=this.createScope(scopes);if(this.functions[funcName]!=undefined)
{var funcs=this.functions[funcName];for(var i=0;i<scopeObj.scopeIds.length;i++)
{var s=scopeObj.scopeIds[i];if(s=="*")
{delete funcs;break;}
if(funcs[s]!=undefined)delete funcs[s];}
var funcsLeft=false;if(funcs!=undefined)
{for(var sc in funcs)
{funcsLeft=true;break;}
if(!funcsLeft)delete this.functions[funcName];}}
if(!funcsLeft)
{var func={globalDataType:this.getDataTypeName("FunctionInfo"),name:funcName,scope:scopeObj};var message=this.wrapMessage("unregisterFunction",func);this.sendMessage(tpBridgeID,message,true);}}
this.addEventListener=function(eventName,callback,scope)
{tpDebug("adding event listener: "+eventName+" callback:"+callback);var scopeObj=this.createScope(scope);var handler={globalDataType:this.getDataTypeName("HandlerInfo"),name:eventName,handler:callback,scope:scopeObj}
var informComm=false;if(this.events[eventName]==undefined)
{this.events[eventName]=new Array();informComm=true;}
var evts=this.events[eventName];var repeat=false;for(var i=0;i<evts.length;i++)
{if(evts[i].handler==callback)
{evts[i]=handler;repeat=true;break;}}
if(!repeat)evts.push(handler);tpDebug("how many listeners? "+evts.length);if(informComm)
{tpDebug("informing comm of event listener");var message=this.wrapMessage("addEventListener",handler);this.sendMessage(tpBridgeID,message,true);}}
this.removeEventListener=function(eventName,callback,scope)
{if(this.events[eventName]!=undefined)
{var scopeObj=this.createScope(scope);var handler={globalDataType:this.getDataTypeName("HandlerInfo"),name:eventName,handler:callback,scope:scopeObj}
var eventArray=this.events[eventName];for(var i=0;i<eventArray.length;i++)
{var h=eventArray[i];if(h.handler==handler.handler)
{eventArray=eventArray.splice(i,1);break;}}
if(eventArray.length==0)
{delete this.events[eventName];var message=this.wrapMessage("removeEventListener",handler);this.sendMessage(tpBridgeID,message,true)}}}
this.dispatchEvent=function(eventName,value,scope)
{var scopeObj=this.createScope(scope);var evt={globalDataType:this.getDataTypeName("PdkEvent"),type:eventName,data:value};var dispatch={globalDataType:this.getDataTypeName("DispatchInfo"),evt:evt,scope:scopeObj};this.doDispatchEvent(dispatch);var message=this.wrapMessage("dispatchEvent",dispatch);this.sendMessage(tpBridgeID,message,true);}
this.callFunction=function(funcName,args,scope)
{var scopeObj=this.createScope(scope);var call={globalDataType:this.getDataTypeName("CallInfo"),name:funcName,args:args,scope:scopeObj};this.doCallFunction(call);var message=this.wrapMessage("callFunction",call);this.sendMessage(tpBridgeID,message,true);}
this.doDispatchEvent=function(dispatch)
{tpDebug("do dispatching event: "+dispatch.evt.type);if(this.events[dispatch.evt.type]!=undefined)
{var handlers=this.events[dispatch.evt.type]
for(var i=0;i<handlers.length;i++)
{var handler=handlers[i];tpDebug("checking handler? "+handler.handler)
if(dispatch.scope.isAny)
{eval(handler.handler)(dispatch.evt);continue;}
for(var j=0;j<handler.scope.scopeIds.length;j++)
{var s=handler.scope.scopeIds[j];var fired=false;if(s=="*")
{eval(handler.handler)(dispatch.evt);break;}
for(var k=0;k<dispatch.scope.scopeIds.length;k++)
{tpDebug("running through scopes handler: "+s+" dispatch: "+dispatch.scope.scopeIds[k]);if(s==dispatch.scope.scopeIds[k])
{fired=true;tpDebug("firing");eval(handler.handler)(dispatch.evt);break;}}
if(fired)break;}}}}
this.doCallFunction=function(call)
{if(this.functions[call.name]!=undefined)
{var funcsToCall=new Object();for(var i=0;i<call.scope.scopeIds.length;i++)
{var s=call.scope.scopeIds[i];if(this.functions[call.name][s]!=undefined)
{funcsToCall[this.functions[call.name][s]]="f";}}
for(var f in funcsToCall)
{eval(f)(call.args);}}}
this.receiveMessage=function(destination,message)
{if(destination=="javascript")
{var messStr=message.name;switch(messStr)
{case"commReady":tpBridgeID=tpCommID;this.canMessage=true;this.checkPriorityQueue();break;case"bridgeReady":tpBridgeID=message.comm.id;this.canMessage=true;this.checkPriorityQueue();break;case"dispatchEvent":var dispatch=message.payload;this.receiveEvent(dispatch);break;case"callFunction":var call=message.payload;this.doCallFunction(call);break;default:break;}}
else
{this.sendMessage(destination,message,true);}}
this.receiveEvent=function(dispatch)
{if(dispatch.evt.type=="OnPlayerLoaded")
{this.isLoading=false;this.checkMessageQueue();}
this.doDispatchEvent(dispatch);}
this.setRelease=function(release,replaceDefault,scope)
{release=this.modRelease(release);var args=[release,replaceDefault];this.callFunction("setRelease",args,scope);}
this.loadRelease=function(release,replaceDefault,scope)
{release=this.modRelease(release);var args=[release,replaceDefault];this.callFunction("loadRelease",args,scope);}
this.loadReleaseURL=function(releaseURL,replaceDefault,scope)
{var args=[releaseURL,replaceDefault];this.callFunction("loadReleaseURL",args,scope);}
this.setReleaseURL=function(url,replaceDefault,scope)
{var args=[url,replaceDefault];this.callFunction("setReleaseURL",args,scope);}
this.loadSmil=function(smil,replaceDefault,scope)
{if(replaceDefault==undefined)replaceDefault=true;this.callFunction("loadSmil",[smil,replaceDefault],scope);}
this.setSmil=function(smil,scope)
{this.callFunction("setSmil",[smil],scope);}
this.resetPlayer=function(scope)
{this.callFunction("resetPlayer",[],scope);}
this.setPlayerMessage=function(message,showDuration,scope)
{if(showDuration==undefined)showDuration=5000;this.callFunction("setPlayerMessage",[message,showDuration],scope);}
this.clearPlayerMessage=function(scope)
{this.callFunction("clearPlayerMessage",[],scope);}
this.setCurrentReleaseList=function(id,scope)
{var args=[id];this.callFunction("setCurrentReleaseList",args,scope);}
this.seekToPosition=function(position,scope)
{var args=[position];this.callFunction("seekToPosition",args,scope);}
this.seekToPercentage=function(percent,scope)
{var args=[percent];this.callFunction("seekToPercentage",args,scope);}
this.nextClip=function(scope)
{var args=[];this.callFunction("nextClip",args,scope);}
this.previousClip=function(scope)
{var args=[];this.callFunction("previousClip",args,scope);}
this.mute=function(muted,scope)
{var args=[muted];this.callFunction("mute",args,scope);}
this.pause=function(paused,scope)
{var args=[paused];this.callFunction("pause",args,scope);}
this.setPreviewImageUrl=function(url,scope)
{var args=[url];this.callFunction("setPreviewImageUrl",args,scope);}
this.showFullScreen=function(isFullScreen,scope)
{var args=[isFullScreen];this.callFunction("showFullScreen",args,scope);}
this.showEmailForm=function(visible,scope)
{var args=[visible];this.callFunction("showEmailForm",args,scope);}
this.showLinkForm=function(visible,scope)
{var args=[visible];this.callFunction("showLinkForm",args,scope);}
this.trace=function(str,className,level)
{var args=[str,className,level];this.callFunction("trace",args,null);}
this.useDefaultPlayOverlay=function(useDefault,scope)
{var args=[useDefault];this.callFunction("useDefaultPlayOverlay",args,scope);}
this.getUseDefaultPlayOverlay=function(scope)
{var args=[];this.callFunction("getUseDefaultPlayOverlay",args,scope);}
this.useDefaultLinkForm=function(useDefault,scope)
{var args=[useDefault];this.callFunction("useDefaultLinkForm",args,scope);}
this.useDefaultEmailForm=function(useDefault,scope)
{var args=[useDefault];this.callFunction("useDefaultEmailForm",args,scope);}
this.getSubtitleLanguage=function(requestor,scope)
{var args=[requestor];this.callFunction("getSubtitleLanguage",args,scope);}
this.clickPlayButton=function(scope)
{var args=[];this.callFunction("clickPlayButton",args,scope);}
this.disablePlayerControls=function(disable,exceptions,scope)
{var args=[disable,exceptions];this.callFunction("disablePlayerControls",args,scope);}
this.setSubtitleLanguage=function(language,scope)
{var args=[language];this.callFunction("setSubtitleLanguage",args,scope);}
this.getPlayerVariables=function(names,scope)
{var args=[names];this.callFunction("getPlayerVariables",args,scope);}
this.setVolume=function(volume,scope)
{var args=[volume];this.callFunction("setVolume",args,scope);}
this.clearAdCookie=function(scope)
{var args=[];this.callFunction("clearAdCookie",args,scope);}
this.refreshReleaseModel=function(category,search,sort,range,params,secondaryParams,scope)
{if(sort)sort.globalDataType=this.getDataTypeName("Sort");if(range)range.globalDataType=this.getDataTypeName("Range");var args=[category,search,sort,range,params,secondaryParams];this.callFunction("refreshReleaseModel",args,scope);}
this.refreshCategoryModel=function(params,scope)
{var args=[params];this.callFunction("refreshCategoryModel",args,scope);}
this.nextRange=function(scope)
{var args=[];this.callFunction("nextRange",args,scope);}
this.previousRange=function(scope)
{var args=[];this.callFunction("previousRange",args,scope);}
this.setClipInfo=function(clip,isDefault,scope)
{clip=this.modClip(clip);var args=[clip,isDefault];this.callFunction("setClipInfo",args,scope);}
this.clearCategorySelection=function(scope)
{var args=[];this.callFunction("clearCategorySelection",args,scope);}
this.suspendPlayAll=function(suspend,scope)
{var args=[suspend];this.callFunction("suspendPlayAll",args,scope);}
this.playNext=function(wrapAround,naturalEnd,scope)
{var args=[wrapAround,naturalEnd];this.callFunction("playNext",args,scope);}
this.playPrevious=function(wrapAround,scope)
{var args=[wrapAround];this.callFunction("playPrevious",args,scope);}
this.modRelease=function(release)
{if(release)
{release.globalDataType=this.getDataTypeName("Release");if(release.categories)release.categories=this.modCategories(release.categories);if(release.thumbnails)
{for(var i=0;i<release.thumbnails.length;i++)
{release.thumbnails[i].globalDataType=this.getDataTypeName("MediaFile");if(release.thumbnails[i].customValues)release.thumbnails[i].customValues=this.modCustomValues(release.thumbnails[i].customValues);}}
if(release.customValues)release.customValues=this.modCustomValues(release.customValues);if(release.metrics)
{for(var i=0;i<release.metrics.length;i++)
{release.metrics[i].globalDataType=this.getDataTypeName("MetricInfo");}}
if(release.provider)
{release.provider.globalDataType=this.getDataTypeName("ProviderInfo");if(release.provider.customValues)release.provider.customValues=this.modCustomValues(release.provider.customValues);}
if(release.ratings)
{for(var i=0;i<release.ratings.length;i++)
{release.ratings[i].globalDataType=this.getDataTypeName("Rating");}}
if(release.URL)
{release.url=release.URL;}}
return release;}
this.modCustomValues=function(customValues)
{for(var i=0;i<customValues.length;i++)
{customValues[i].globalDataType=this.getDataTypeName("CustomValue");}
return customValues;}
this.modCategories=function(categories)
{for(var i=0;i<categories.length;i++)
{categories[i].globalDataType=this.getDataTypeName("CategoryInfo");}
return categories;}
this.modClip=function(clip)
{if(clip)
{clip.globalDataType=this.getDataTypeName("Clip");var baseClip=clip.baseClip;if(!baseClip)baseClip=new Object();if(clip.banners)baseClip.banners=clip.banners;if(clip.overlays)baseClip.overlays=clip.overlays;clip.baseClip=this.modBaseClip(baseClip);if(clip.chapter)clip.chapter.globalDataType=this.getDataTypeName("Chapter");}
return clip;}
this.modBaseClip=function(baseClip)
{if(!baseClip)baseClip=new Object();baseClip.globalDataType=this.getDataTypeName("BaseClip");if(baseClip.moreInfo)
{baseClip.moreInfo.globalDataType=this.getDataTypeName("HyperLink");if(baseClip.moreInfo.clickTrackingUrls)baseClip.moreInfo.clickTrackingUrls=this.modTracking(baseClip.moreInfo.clickTrackingUrls);}
if(baseClip.banners)
{for(var i=0;i<baseClip.banners.length;i++)
{baseClip.banners[i].globalDataType=this.getDataTypeName("Banner");if(baseClip.banners[i].clickTrackingUrls)baseClip.banners[i].clickTrackingUrls=this.modTracking(baseClip.banners[i].clickTrackingUrls)}}
if(baseClip.overlays)
{for(var i=0;i<baseClip.overlays.length;i++)
{baseClip.overlays[i].globalDataType=this.getDataTypeName("Overlay");if(baseClip.overlays[i].clickTrackingUrls)baseClip.overlays[i].clickTrackingUrls=this.modTracking(baseClip.overlays[i].clickTrackingUrls)}}
if(baseClip.availableSubtitles)
{for(var i=0;i<baseClip.availableSubtitles;i++)
{baseClip.availableSubtitles[i].globalDataType=this.getDataTypeName("Subtitles");}}
if(baseClip.categories)baseClip.categories=this.modCategories(baseClip.categories);if(baseClip.adPattern)baseClip.adPattern.globalDataType=this.getDataTypeName("AdPattern");if(baseClip.trackingURLs)baseClip.trackingURLs=this.modTracking(baseClip.trackingURLs);if(baseClip.contentCustomData)baseClip.contentCustomData.globalDataType=this.getDataTypeName("CustomData");if(baseClip.ownerCustomData)baseClip.ownerCustomData.globalDataType=this.getDataTypeName("CustomData");if(baseClip.outletCustomData)baseClip.outletCustomData.globalDataType=this.getDataTypeName("CustomData");return baseClip;}
this.modTracking=function(trackingUrls)
{for(var i=0;i<trackingUrls.length;i++)
{trackingUrls.globalDataType=this.getDataTypeName("TrackingUrl")}
return trackingUrls}
this.shutDown=function()
{var args=[];this.callFunction("shutDown",args,["*"]);this.isShutDown=true;}
this.events=new Object();this.functions=new Object();this.isLoading=true;this.canMessage=false;this.messageQueue=new Array();this.priorityQueue=new Array();this.sendQueue=new Array();this.isSending=false;this.sendInterval;this.shutdownIDs;this.isShutDown=false;this.blankString="__blank_string__";this.defaultScope={globalDataType:this.getDataTypeName("ScopeInfo"),controlId:"javascript",isGlobal:true,isAny:false,isEmpty:false,scopeIds:["javascript","default"]};}
function tpReceiveMessage(destination,message)
{tpController.receiveMessage(destination,message);}
var tpHolderName="pdkHolder";var tpExternalJS;function tpSetPlayerIDForExternal(playerName){};function tpSetHolderIDForExternal(holderName)
{tpHolderName=holderName;}
function tpLoadExternalMediaJS()
{tpExternalJS=tpLoadExternalMediaJS.arguments;for(var i=0;i<tpExternalJS.length;i++)
{tpLoadScript(tpExternalJS[i]);}}
function tpCleanupExternal()
{if(tpExternalJS)
{var scripts=window.document.getElementsByTagName('head')[0].getElementsByTagName('script');for(var i=0;i<scripts.length;i++)
{for(var j=0;j<tpExternalJS.length;j++)
{if(scripts[i].src==tpExternalJS[j])
{window.document.getElementsByTagName('head')[0].removeChild(scripts[i]);break;}}}
tpExternalJS.length=0;}
if(tpExternalController)
{tpExternalController.cleanup();}}
tpScriptLoader=new ScriptLoader();function tpLoadJScript(scriptFile,callback,id,atts)
{tpScriptLoader.addScript(scriptFile,callback,id,atts);}
function callbackDispatcher(loadObj){tpScriptLoader.callbackDispatcher(loadObj)}
function invokeCallbacks(loadObj){tpScriptLoader.invokeCallbacks()}
function LoadObj(scriptFile,callback,id,atts)
{this.script=scriptFile;this.callback=callback;this.id=id;this.atts=atts;}
function ScriptLoader()
{this.scriptQueue=new Array();this.callbackQueue=new Array();}
ScriptLoader.prototype.addScript=function(scriptFile,callback,id,atts)
{var loadObj=new LoadObj(scriptFile,callback,id,atts);this.scriptQueue.push(loadObj);if(this.scriptQueue.length==1)
this.checkScriptQueue();}
ScriptLoader.prototype.checkScriptQueue=function()
{if(this.scriptQueue.length)
{var loadObj=this.scriptQueue.shift();this.loadScript(loadObj);}
else
{interval_id=setInterval("invokeCallbacks()",100)}}
ScriptLoader.prototype.callbackDispatcher=function(loadObj)
{for(var i in this.callbackQueue)
{if(this.callbackQueue[i]==loadObj)
{this.checkScriptQueue();return;}}
this.callbackQueue.push(loadObj);this.checkScriptQueue();}
ScriptLoader.prototype.invokeCallbacks=function()
{clearInterval(interval_id);while(this.callbackQueue.length)
{var loadObj=this.callbackQueue.shift();eval(loadObj.callback)(loadObj.script);}}
ScriptLoader.prototype.loadScript=function(loadObj)
{var scriptFilename=loadObj.script;var callbackFunction=loadObj.callback;var id=loadObj.id;var atts=loadObj.atts;var scriptEl=window.document.createElement('script');scriptEl.charset="utf-8";if(id)scriptEl.id=id;scriptEl.type="text/javascript";if(atts)
{for(var i=0;i<atts.length;i++)
scriptEl.setAttribute(atts[i].att,atts[i].value);}
scriptEl.src=scriptFilename;if(callbackFunction)
{var _onFinished=function(_loadObj,_callback)
{_callback(_loadObj)
this.onreadystatechange=null;this.onload=null;this.onerror=null;};scriptEl.onreadystatechange=function()
{_onFinished(loadObj,callbackDispatcher);};scriptEl.onload=function()
{_onFinished(loadObj,callbackDispatcher);};scriptEl.onerror=function()
{_onFinished(loadObj,callbackDispatcher);};}
window.document.getElementsByTagName('head')[0].appendChild(scriptEl);}
function tpLoadScript(scriptFilename,callbackFunction,id,atts)
{var scriptEl=window.document.createElement('script');scriptEl.charset="utf-8";if(id)scriptEl.id=id;scriptEl.type="text/javascript";if(atts)
{for(var i=0;i<atts.length;i++)
{scriptEl.setAttribute(atts[i].att,atts[i].value);}}
scriptEl.src=scriptFilename;if(callbackFunction)
{var _onFinished=function(_callbackFunction,_scriptFilename)
{_callbackFunction(_scriptFilename);this.onreadystatechange=null;this.onload=null;this.onerror=null;};scriptEl.onreadystatechange=function()
{_onFinished(callbackFunction,scriptFilename);};scriptEl.onload=function()
{_onFinished(callbackFunction,scriptFilename);};scriptEl.onerror=function()
{_onFinished(callbackFunction,scriptFilename);};}
window.document.getElementsByTagName('head')[0].appendChild(scriptEl);}
function tpExternalControllerClass()
{this.playerTypes=new Object();this.extPlayers=new Object();this.registerExternalPlayer=function(type,playerClass)
{this.playerTypes[type]=playerClass;}
this.routeMessage=function(swfId,controllerId,streamType,funcName,args)
{var curController=this.extPlayers[controllerId];if(!curController)curController=this.extPlayers[controllerId]={};var curPlayer=curController[streamType];if(!curPlayer)
{var playerClass=this.playerTypes[streamType];if(!playerClass)return;curPlayer=eval("new "+playerClass+"('"+swfId+"', '"+controllerId+"');");if(!curPlayer)return;curController[streamType]=curPlayer;}
curPlayer[funcName](args);}
this.returnMessage=function(swfId,controllerId,funcName,args)
{var obj=tpThisMovie(swfId);obj.receiveJSMessage(controllerId,funcName,args);}
this.cleanup=function()
{for(var controllerId in this.extPlayers)
{var players=this.extPlayers[controllerId];for(var player in players)
{players[player].cleanup();delete players[player];}
delete this.extPlayers[controllerId];}}}
function tpExternalMessage(swfId,controllerId,streamType,funcName,args)
{tpExternalController.routeMessage(swfId,controllerId,streamType,funcName,args);}
tpExternalController=new tpExternalControllerClass();function tpShowAlert(alertCode)
{switch(alertCode)
{case"FULLSCREEN_DISABLED":alert("Full screen is only available with Flash 9 or later")
break;}}

