function Def(B,A){if((B==null)||(B=="")){return A}else{return B}}function IsEmpty(A){return(A==null)||(A=="")||(A=="undefined")}function IsNotEmpty(A){return(IsEmpty(A)==false)}function IsNull(A){return(A==null)}function java_include(A){document.write('<script language="javascript" type="text/javascript" src="'+A+'"><\/script>')}function javascript_include(A,B){if(A!=null){A.write('<script language="javascript" type="text/javascript" src="'+B+'"><\/script>')}}function DynWrite(H,E){var D,C,B,A;var G="return false;";var F=(document.getElementById)?document.getElementById(H):null;if((F)&&(typeof F.innerHTML=="string")){A="tSt";while(document.getElementById(A)){A+=A}B=F.innerHTML;C=B+"<sTrOnG  Id='"+A+"'  >test</StRoNg    >";F.innerHTML=C;D=F.innerHTML;if((D!=C)&&(D!=B)&&(document.getElementById(A))){G="document.getElementById(id).innerHTML=S; return true"}}DynWrite=new Function("id","S",G);return DynWrite(H,E)}function ParamsToArray(B){var D=0;var A=B.split("&");var C=new Array();for(i=0;i<A.length;i++){data=A[i];D=data.indexOf("=");if(D>0){key=data.substr(0,D);val=data.substr(D+1,data.length);C[key]=unescape(val)}}return C}function ArrayToParams(B){var A="";for(param in B){if(A.length>0){A=A+"&"}A=A+param+"="+escape(B[param])}return A}function ParseQueryStr(){var A=window.location.search.substring(1);return ParamsToArray(A)}function setVisibility(A,B){layer=document.getElementById(A);if(layer!=null){if(B){layer.style.display=""}else{layer.style.display="none"}}}function Timer(){this.obj=(arguments.length)?arguments[0]:window;return this}Timer.prototype.setInterval=function(C,D){var B=Timer.getNew();var A=Timer.buildCall(this.obj,B,arguments);Timer.set[B].timer=window.setInterval(A,D);return B};Timer.prototype.setTimeout=function(B,C){var A=Timer.getNew();Timer.buildCall(this.obj,A,arguments);Timer.set[A].timer=window.setTimeout("Timer.callOnce("+A+");",C);return A};Timer.prototype.clearInterval=function(A){if(!Timer.set[A]){return }window.clearInterval(Timer.set[A].timer);Timer.set[A]=null};Timer.prototype.clearTimeout=function(A){if(!Timer.set[A]){return }window.clearTimeout(Timer.set[A].timer);Timer.set[A]=null};Timer.set=new Array();Timer.buildCall=function(E,D,B){var C="";Timer.set[D]=new Array();if(E!=window){Timer.set[D].obj=E;C="Timer.set["+D+"].obj."}C+=B[0]+"(";if(B.length>2){Timer.set[D][0]=B[2];C+="Timer.set["+D+"][0]";for(var A=1;(A+2)<B.length;A++){Timer.set[D][A]=B[A+2];C+=", Timer.set["+D+"]["+A+"]"}}C+=");";Timer.set[D].call=C;return C};Timer.callOnce=function(i){if(!Timer.set[i]){return }eval(Timer.set[i].call);Timer.set[i]=null};Timer.getNew=function(){var A=0;while(Timer.set[A]){A++}return A};TJSLoader=function(){this.useCacheBuster=true;this.LoadJS=function(D,C){if(D==null){return }if(this.useCacheBuster){var E=new Date();if(D.indexOf("?")==-1){D=D+"?"}D=D+"&buster="+E.getTime()}if((C!=null)&&(B[C]!=null)){document.body.removeChild(B[C])}A++;oScript=document.createElement("script");oScript.id="idJSLoader"+A;oScript.type="text/javascript";oScript.src=D;document.body.appendChild(oScript);if(C!=null){B[C]=oScript}};var B=Array();var A=0};var JSLoader=new TJSLoader();TDataPoller=function(){this.dataurl=null;this.poll_interval=20000;this.delay=0;this.onDataChanged=null;this.useCacheBuster=true;this.debugging=false;this.document=window.document;this.Start=function(I){if(this.document==null){this.DebugWrite("document not set.");return false}if(this.document.body==null){this.DebugWrite('document contains no "body" element.');return false}if(this.dataurl==null){this.DebugWrite("Warning: dataurl not set.")}if(this.poll_interval<H){this.DebugWrite("this.poll_interval is less than the minimum interval of "+H);this.poll_interval=H}if(C){this.Stop()}C=true;this.TimerStart(this.poll_interval);if(I){this.onTimer()}};this.Stop=function(){C=false;this.TimerStop()};this.getStarted=function(){return C};this.UpdateDataCallback=function(I){F=0;if((I!=null)&&(typeof (I)=="object")){if(D!=I.crc){D=I.crc;if(this.onDataChanged!=null){if(this.delay>0){G.setTimeout("onDataChanged",this.delay,I)}else{this.onDataChanged(I)}}}}else{this.DebugWrite("Unexpected data type: "+typeof (I))}};var B=0;var A=null;var C=false;var H=5000;var D=null;var G=new Timer(this);var F=0;var E=null;this.DebugWrite=function(I){if(this.debugging){alert(I)}};this.CheckForData=function(){if(this.dataurl==null){return }var I=this.dataurl;if(this.useCacheBuster){var J=new Date();if(I.indexOf("?")==-1){I=I+"?"}I=I+"&buster="+J.getTime()}if(E!=null){this.document.body.removeChild(E)}B++;E=this.document.createElement("script");E.id="idDataLoader"+B;E.type="text/javascript";E.src=I;this.document.body.appendChild(E);F++;if(F>5){this.Stop();this.DebugWrite("Stopped datapoller after "+F+" consecutive failures.")}};this.TimerStart=function(I){A=G.setInterval("onTimer",I)};this.TimerStop=function(){G.clearInterval(A);A=null};this.onTimer=function(){this.CheckForData()}};TMediaData=function(){this.history_max=20;this.coverpicture_url=null;this.onData=null;this.onMedia=null;this.onAds=null;this.onHistoryLoaded=null;this.getMediaHistory=function(D,C){return this.do_GetMediaHistory(D,C)};this.getCurrentAd=function(){return curAd};this.getLastAd=function(){return A};this.ProcessData=function(C){return this.do_handleDataEvent(C)};this.ProcessHistoryData=function(C){return this.do_handleHistoryDataEvent(C)};var B=new Array(0);var A=null;this.do_AddHistoryItem=function(C){B.unshift(C);if(B.length>this.history_max){B.pop()}};this.do_GetMediaHistory=function(D,C){if((typeof (D)=="undefined")||(D==null)||(D<=0)){D=this.history_max}if((typeof (C)=="undefined")||(C==null)||(C=="")){C="S,A"}var F=Array();for(var E=0;E<B.length;E++){if(C.indexOf(B[E]["mediatype"])!=-1){F.push(B[E])}if(F.length>=D){break}}return F};this.do_handleHistoryDataEvent=function(D){var E=null;for(var C=(D.length-1);C>=1;C--){E=this.do_buildsongdata(D[C]);this.do_AddHistoryItem(E)}if(this.onHistoryLoaded!=null){this.onHistoryLoaded()}};this.do_handleDataEvent=function(C){if(C==null){return false}var D=this.do_buildsongdata(C);this.do_AddHistoryItem(D);if(D.mediatype=="A"){this.do_handleAds(D)}else{if((D.mediatype=="S")||(D.mediatype=="")||(D.mediatype==null)){this.do_handleMedia(D)}}this.do_handleData(D);return true};this.do_handleMedia=function(C){if(this.onMedia!=null){this.onMedia(C)}};this.do_handleAds=function(C){A=C;curAd=A;if(this.onAds!=null){this.onAds(C)}};this.do_handleData=function(C){if(C.mediatype!="A"){curAd=null}if(this.onData!=null){this.onData(C)}};this.do_buildsongdata=function(E){if(E==null){return null}if((E.mediatype=="")||E.mediatype==null){E.mediatype=E.songtype}if((E.artist=="")||E.artist==null){E.combined=E.title}else{E.combined=E.artist+" - "+E.title}if((E.picture==null)||(E.picture=="")){E.picture="<none>"}else{if(E.picture.indexOf("http://")<0){if(IsNotEmpty(this.coverpicture_url)){E.picture=this.coverpicture_url+E.picture}}}if((E.buycd==null)||(E.buycd=="")){E.buycd="http://www.audiorealm.com/findcd.html?artist="+escape(Def(E.artist," "))+"&title="+escape(Def(E.title," "))+"&album="+escape(Def(E.album," "))}if((E.website==null)||(E.website=="")){E.website="http://www.google.com/search?hl=en&q="+escape(Def(E.artist,"")+" "+Def(E.title," ")+" "+Def(E.album," "))}if((E.duration>0)&&IsEmpty(E.mmss)){var D=E.duration;D=Math.round(D/1000);var C=(D%60);D-=C;var F=Math.round(D/60);if(C<10){C="0"+C}if(F<10){F="0"+F}E.mmss=F+":"+C}return E}};function TStreamAds(){this.template_providerurl="http://sa-mn.streamads.com/sa/mirror";this.template_clickurl="$url/adz_click.php?adzID=$adzID&publisherID=$publisherID&type=$adtype&log=yes";this.template_bannerurl="$url/adz_view.php?publisherID=$publisherID&adzID=$adzID&type=banner&target=_blank&log=yes";this.template_textadurl="$url/adz_view.php?publisherID=$publisherID&adzID=$adzID&type=text&target=_blank&log=yes";this.autocleandisplay=true;this.VisitAdvertiser=function(H,E,F,G){if(IsEmpty(H)){H=Def(H,this.template_providerurl)}url=this.Adz_BuildLink(this.template_clickurl,H,E,F,G);if(!IsEmpty(url)){window.open(url)}};this.RegisterSyncFrames=function(F,E,G){if((document!=null)&&(document.getElementById)){if(typeof (F)=="string"){F=document.getElementById(F)}if(typeof (E)=="string"){E=document.getElementById(E)}if(typeof (G)=="string"){G=document.getElementById(G)}}if(F!=null){D.cover=F}if(E!=null){D.banner=E}if(G!=null){D.text=G}};this.RegisterSyncIDs=function(F,E,G){if((document!=null)&&(document.getElementById)){if(typeof (F)=="string"){F=document.getElementById(F)}if(typeof (E)=="string"){E=document.getElementById(E)}if(typeof (G)=="string"){G=document.getElementById(G)}}if(F!=null){C.cover=F}if(E!=null){C.banner=E}if(G!=null){C.text=G}};this.RegisterVideoArea=function(E){if((typeof (E)=="string")&&(document!=null)&&(document.getElementById)){E=document.getElementById(E)}if(E!=null){C.video=E}};this.getVideoArea=function(){return C.video};this.SyncToFrames=function(E){if(D.cover!=null){if(E.coverID>0){this.DisplayInFrame(D.cover,E.provider,E.publisherID,E.coverID,"banner")}else{if(this.autocleandisplay){this.clearIFRAME(D.cover)}}}if(D.banner!=null){if(E.bannerID>0){this.DisplayInFrame(D.banner,E.provider,E.publisherID,E.bannerID,"banner")}else{if(this.autocleandisplay){this.clearIFRAME(D.banner)}}}if(D.text!=null){if(E.textID>0){this.DisplayInFrame(D.text,E.provider,E.publisherID,E.textID,"text")}else{if(this.autocleandisplay){this.clearIFRAME(D.text)}}}};this.SyncToIDs=function(E){if(this.autocleandisplay){this.clearIDInnerHTML(C.cover);this.clearIDInnerHTML(C.banner);this.clearIDInnerHTML(C.text)}if((C.cover!=null)&&(E.coverID>0)){this.DisplayInID(C.cover,E.provider,E.publisherID,E.coverID,"banner")}if((C.banner!=null)&&(E.bannerID>0)){this.DisplayInID(C.banner,E.provider,E.publisherID,E.bannerID,"banner")}if((C.text!=null)&&(E.textID>0)){this.DisplayInID(C.text,E.provider,E.publisherID,E.textID,"text")}};this.DisplayInID=function(I,K,F,G,H){if(IsEmpty(I)){return }var J=null;if(H=="banner"){J=this.template_bannerurl}else{J=this.template_textadurl}J=J+"&mime=innerhtml&innertag="+I.id;url=this.Adz_BuildLink(J,K,F,G,H);var E=this.getContentDocument(window);this.LoadJavaScript(E,url,I.id)};this.DisplayInFrame=function(I,J,E,F,G){if(IsEmpty(I)){return }J=this.template_providerurl;var H=null;if(G=="banner"){H=this.template_bannerurl}else{H=this.template_textadurl}H=H+"&mime=iframe";url=this.Adz_BuildLink(H,J,E,F,G);I.src=url};var A=0;var D=Array();var C=Array();var B=Array();this.clearIFRAME=function(E){if(!E){return }var F="http://media.streamads.com/syncmeta/blank.html";if(E.src!=F){E.src=F}};this.clearIDInnerHTML=function(E){if(!E){return }if(!E.innerHTML){return }E.innerHTML=""};this.getContentDocument=function(F){var E=null;if(F.contentDocument){E=F.contentDocument}else{if(F.contentWindow){E=F.contentWindow.document}else{if(F.document){E=F.document}}}return E};this.Adz_BuildLink=function(I,J,F,G,H,E){I.replace("http://","");if(J.indexOf("://")<=0){J="http://"+J}s=new String(I);s=s.replace("$url",J);s=s.replace("$publisherID",F);s=s.replace("$adzID",G);s=s.replace("$adtype",H);s=s.replace("$outputtype",E);return s};this.LoadJavaScript=function(E,F,G){if(E&&F){if(B[G]!=null){E.body.removeChild(B[G])}A++;var H=E.createElement("script");H.id="idAdLoader"+A;H.type="text/javascript";H.src=F;E.body.appendChild(H);B[G]=H}}}TWMPlayer=function(){this.caption_only=false;this.height=240;this.width=320;this.enableContextMenu=false;this.autostart=true;this.mediaurl=null;this.showcontrols="auto";this.onData=null;this.onCaption=null;this.onLiveStreamStarted=null;this.onScriptData=null;this.onBuffering=null;this.onPlayStateChange=null;this.onClick=null;this.getPlayer=function(){return G};this.getWMPInfo=function(){return A};this.attachPlayer=function(J){if(J!=null){if(typeof (J)=="string"){J=this.document.getElementById(J)}G=J;if(typeof (G.attachEvent)!="undefined"){if(globalWMPlayer!=null){alert("Only one global context allowed. Manually assign events to allow multiple context references")}globalWMPlayer=this;G.attachEvent("ScriptCommand",this.wmp_event_scriptcommand);G.attachEvent("mediaChange",this.wmp_event_mediachange);G.attachEvent("Buffering",this.wmp_event_buffering);G.attachEvent("playStateChange",this.wmp_event_playstatechange);G.attachEvent("Click",this.wmp_event_click);return true}}return false};this.createPlayer=function(K){K=this.getOwner(K);var M=this.height;var L=this.width;if((navigator.plugins&&navigator.plugins.length)){var J=this.document.createElement("object");J.id="syncPlayer";J.type="application/x-mplayer2";J.autostart=this.autostart;J.ShowPositionControls=false;J.ShowTracker=false;J.ShowStatusBar=false;if(this.showcontrols=="auto"){J.ShowControls=true;M+=50}else{J.ShowControls=this.showcontrols}J.width=L;J.height=M;J.enableContextMenu=this.enableContextMenu;if(this.mediaurl!=null){J.data=this.mediaurl}K.appendChild(J)}else{var N=this.document.createElement("object");N.id="syncPlayer";N.classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6";N.autostart=this.autostart;N.uimode="none";N.ShowPositionControls=false;N.ShowTracker=false;N.ShowStatusBar=false;if(this.showcontrols=="auto"){N.ShowControls=false}else{N.ShowControls=this.showcontrols}N.height=M;N.width=L;N.enableContextMenu=this.enableContextMenu;if(this.mediaurl!=null){N.url=this.mediaurl}K.appendChild(N);this.attachPlayer(N)}};this.isControlable=function(){return((G!=null)&&(G.controls!=null))};this.isBuffering=function(){return E};this.getPlayState=function(){if(G!=null){return G.playstate}else{return 0}};this.getStatusMessage=function(){if(G!=null){var J=this.getPlayState();if(J==1){return"Stopped."}if(J==2){return"Paused."}if(J==3){return"Playing..."}if(J==6){return"Buffering..."}if(J==9){return"Changing..."}if(J==10){return"Ready..."}if(J==11){return"Reconnecting..."}}return""};this.Open=function(J){this.mediaurl=J;if(G!=null){G.url=J}};this.Play=function(){if(!this.isControlable()){return false}G.controls.Play()};this.Stop=function(){if(!this.isControlable()){return false}G.controls.Stop()};this.setVolume=function(J){if(!this.isControlable()){return false}G.settings.volume=J};this.getVolume=function(){if(!this.isControlable()){return false}return G.settings.volume};this.toggleMute=function(){if(!this.isControlable()){return false}this.setMute(!this.getMute())};this.setMute=function(J){if(!this.isControlable()){return false}G.settings.mute=J};this.getMute=function(){if(!this.isControlable()){return false}return G.settings.mute};this.setMuted=function(J){return this.setMute(J)};this.getMuted=function(){return this.getMute()};this.Hide=function(){if(!D){return }if(G!=null){D=false;I=G.width;F=G.height;G.width=1;G.height=1}};this.Show=function(){if(D){return }if(G!=null){D=true;G.width=I;G.height=F}};var G=null;var A=new Array();var B="";var H="";var C="";var E=false;var D=true;var I=0;var F=0;this.document=document;this.context="TWMPlayer";this.getOwner=function(J){if(typeof (J)=="string"){J=this.document.getElementById(J)}if(IsEmpty(J)){J=this.document.body}return J};this.wmp_event_scriptcommand=function(K,J){if((typeof (this.context)=="undefined")||(this.context!="TWMPlayer")){return globalWMPlayer.wmp_event_scriptcommand(K,J)}if((K.toLowerCase()=="data")&&(this.caption_only==false)){this.wmp_DecodeData(J)}else{if(K.toLowerCase()=="syncinfo"){this.wmp_DecodeSyncInfo(J)}else{if(K.toLowerCase()=="caption"){this.wmp_HandleCaption(J)}}}if(this.onScriptData!=null){this.onScriptData(K,J)}};this.wmp_event_mediachange=function(J){if((typeof (this.context)=="undefined")||(this.context!="TWMPlayer")){return globalWMPlayer.wmp_event_mediachange(J)}this.wmp_DecodeASXData(J)};this.wmp_event_buffering=function(J){if((typeof (this.context)=="undefined")||(this.context!="TWMPlayer")){return globalWMPlayer.wmp_event_buffering(J)}E=J;if(this.onBuffering!=null){this.onBuffering(J)}};this.wmp_event_playstatechange=function(K){if((typeof (this.context)=="undefined")||(this.context!="TWMPlayer")){return globalWMPlayer.wmp_event_playstatechange(K)}var J="";switch(K){case 1:J="Stopped";break;case 2:J="Paused";break;case 3:J="";break;default:break}if(this.onPlayStateChange!=null){this.onPlayStateChange(K,J)}};this.wmp_event_click=function(M,K,L,J){if((typeof (this.context)=="undefined")||(this.context!="TWMPlayer")){return globalWMPlayer.wmp_event_click(M,K,L,J)}if(M==1){if(this.onClick!=null){this.onClick()}}};this.wmp_TriggerDataEvent=function(J){if(J==null){return }var K=J.title+J.artist+J.album;if(B==K){return false}else{B=K}if(this.onData!=null){this.onData(J)}};this.wmp_DecodeData=function(J){var K=new Array();K=ParamsToArray(J);K.datasource="scriptdata";this.wmp_TriggerDataEvent(K)};this.wmp_DecodeSyncInfo=function(J){var K=new Array();K=ParamsToArray(J);K.datasource="syncinfo";if((K.songtype==null)||(K.songtype=="")){K.songtype="A"}this.wmp_TriggerDataEvent(K)};this.wmp_HandleCaption=function(K){if(this.caption_only){var J=new Array();J.datasource="caption";J.caption=K;J.title=K;J.songtype="S";this.wmp_TriggerDataEvent(J)}if(this.onCaption!=null){this.onCaption(K)}};this.wmp_DecodeASXData=function(J){var K=new Array();var L=J.getItemInfo("title")+J.getItemInfo("author")+J.getItemInfo("album")+J.getItemInfo("livestream");if(H==L){return false}else{H=L}if(J.getItemInfo("livestream")=="yes"){if(C==L){return false}else{C=L;if(this.onLiveStreamStarted!=null){this.onLiveStreamStarted()}}return false}if((J.getItemInfo("songtype")==null)||(J.getItemInfo("songtype")=="")){return false}else{K.datasource="asx";K.title=J.getItemInfo("title");K.artist=J.getItemInfo("author");K.album=J.getItemInfo("album");K.duration=J.duration*1000;K.mmss=J.durationString;K.picture=J.getItemInfo("picture");K.buycd=J.getItemInfo("buycd");K.website=J.getItemInfo("website");K.songtype=J.getItemInfo("songtype");K.mediatype=J.getItemInfo("mediatype");K.provider=J.getItemInfo("provider");K.publisherID=J.getItemInfo("publisherID");K.adzID=J.getItemInfo("adzID");K.bannerID=J.getItemInfo("bannerID");K.textID=J.getItemInfo("textID");K.coverID=J.getItemInfo("coverID");K.hasvideo=J.getItemInfo("hasvideo");this.wmp_TriggerDataEvent(K);return true}}};globalWMPlayer=null;TDoItAll=function(){this.publisherID=0;this.stationID=0;this.preloadHistory=false;this.useDataPoller=false;this.useLocalAds=false;this.autoDisplayAds=true;this.mediadata=null;this.datapoller=null;this.streamads=null;this.wmplayer=null;this.localads=null;this.onAds=null;this.onMedia=null;this.onRestore=null;this.onVideoBegin=null;this.onVideoEnd=null;this.onHistoryLoaded=null;this.RegisterSyncFrames=function(F,E,G){this.streamads.RegisterSyncFrames(F,E,G)};this.RegisterSyncIDs=function(F,E,G){this.streamads.RegisterSyncIDs(F,E,G)};this.RegisterVideoArea=function(E){this.streamads.RegisterVideoArea(E)};this.Start=function(){this.do_Start()};this.context="TDoItAll";var A=25000;var C=30000;var D=new Timer(this);var B=null;this.do_Init=function(){this.mediadata=new TMediaData();this.datapoller=new TDataPoller();this.streamads=new TStreamAds();this.wmplayer=new TWMPlayer();this.wmplayer.onData=this.WMPDataEvent;this.datapoller.onDataChanged=this.DataPollerEvent;this.wmplayer.onClick=this.WMPClickEvent};this.do_Start=function(){if(this.mediadata.onAds==null){this.mediadata.onAds=this.AdsEvent}if(this.mediadata.onMedia==null){this.mediadata.onMedia=this.MediaEvent}if(this.mediadata.onHistoryLoaded==null){this.mediadata.onHistoryLoaded=this.HistoryLoadedEvent}if(this.useDataPoller){if((this.datapoller.dataurl==null)&&(this.publisherID>0)){this.datapoller.dataurl="http://media.streamads.com/syncmeta/syncdata/"+this.publisherID+".js"}this.datapoller.Start(false)}if(this.preloadHistory&&(this.stationID>0)){JSLoader.LoadJS("http://player.spacialnet.com/players/core/historydata.php?stationID="+this.stationID,"preloadHistory")}};this.HistoryLoadedEvent=function(){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.HistoryLoadedEvent()}if(this.onHistoryLoaded!=null){this.onHistoryLoaded()}};this.AdsEvent=function(F){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.AdsEvent(F)}if(this.autoDisplayAds){this.streamads.SyncToFrames(F);this.streamads.SyncToIDs(F)}var E=parseInt(F.duration);if(E>0){E+=A}else{E=C}D.clearTimeout(B);B=D.setTimeout("RestoreEvent",E);if(this.onAds!=null){this.onAds(F)}};this.MediaEvent=function(E){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.MediaEvent(E)}if(this.onMedia!=null){this.onMedia(E)}};this.RestoreEvent=function(){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.RestoreEvent()}if(this.onRestore!=null){this.onRestore()}};this.WMPClickEvent=function(){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.WMPClickEvent()}var F=this.mediadata.getLastAd();if(F==null){return }else{if((F.provider==null)||(F.provider=="")){return }if((F.publisherID==null)||(F.publisherID=="")){return }var G="banner";var E=0;if(F.textID>0){E=F.textID;G="text"}else{if(F.bannerID>0){E=F.bannerID}else{if(F.coverID>0){E=F.coverID}}}if(E>0){this.streamads.VisitAdvertiser(F.provider,F.publisherID,E,G)}}};this.DataPollerEvent=function(E){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.DataPollerEvent(E)}this.mediadata.ProcessData(E)};this.WMPDataEvent=function(E){if((typeof (this.context)=="undefined")||(this.context!="TDoItAll")){return doitall.WMPDataEvent(E)}if(E.datasource=="scriptdata"){this.datapoller.Stop()}if((this.publisherID==null)||(this.publisherID<=0)){if(E.publisherID>0){this.publisherID=E.publisherID}}this.mediadata.ProcessData(E)};this.do_Init()};var doitall=new TDoItAll();function dpCallback(A){doitall.datapoller.UpdateDataCallback(A)}function dpHistoryCallback(A){doitall.mediadata.ProcessHistoryData(A)};