
if(typeof(admtv_urlAdmotiontv)=="undefined")var admtv_urlAdmotiontv="http:\/\/iq.dmmotion.com\/";if(typeof(admtv_urlPlatform)=="undefined")var admtv_urlPlatform="http:\/\/fs.dmmotion.com\/";var $a=admtv_urlAdmotiontv+"PlayerConfig.aspx";if(typeof(admtv)=="undefined"){function addToConfigObj($b){var $c=admtv.Players[$b];admtv.addToObject(cfg,$c,false);if($c.goStandBy)$c.goStandBy=false;else $c.Initialize();};function getPlayerVars($b){return admtv.Players[$b].getPlayerVars();};function addPlayerPlatform($b,$d){var p=admtv.Players[$b];p.Content=$d;p.Index=$b;try{onPlayerInit($b);}catch(e){};};function createNewPlayer($e){var $f=new admPlayer(parseInt($e["id"],10),$e["width"],$e["height"],(typeof($e["fileServer"])=="undefined")?"":$e["fileServer"],(typeof($e["wmode"])=="undefined")?"window":$e["wmode"]);var $g=admtv.queryToObj(location.search.substring(1));if(typeof($g.v)!="undefined"){$f.setStartByFromPermalink($g.v.toString());$e["rotateItems"]=null;$e["autoInit"]=1;};admtv.addToObject($e,$f,true);if(admtv.Players.length!=0)$f.autoInit=0;if(typeof($f.div_id)=="undefined"||admtv.getObj($f.div_id)==null){$f.div_id="atvD_"+$f.unique_id;document.write('<div id="'+$f.div_id+'" width="'+$f.width+'" height="'+$f.height+'"><\/div>');};$f.Index=admtv.Players.push($f)-1;return $f;};var $h=$i=$j=false;if(window.createPopup)$h=true;var admtv={Players:new Array(),getPlayerById:function($k){var $l;try{$l=admtv.Players[admtv.getIndexByParam(admtv.Players,"Id",$k)];}catch(e){};return $l;},getPlayerByPlatformId:function($m){var $l;try{var i=admtv.Players.length;while(i--&&(admtv.Players[i].Content.Id!=$m)){};if(i!=admtv.Players.length)$l=admtv.Players[i];}catch(e){};return $l;},getPlayerIndexById:function($k){var $l;try{$l=admtv.getIndexByParam(admtv.Players,"id",$k);}catch(e){};return $l;},addToObject:function($n,$o,$p){if(typeof($p)=="undefined")$p=false;for(var i in $n){if(typeof($o[i])=="undefined"||$p)$o[i]=$n[i];}},alertObj:function($d){var d="";for(var i in $d)d+=i+" : "+$d[i]+": "+typeof($d[i])+"\n";alert(d);},fireEvent:function($k,ev,eo){var po=admtv.getPlayerById($k);if(typeof(po.Content.Channels)!="undefined"){try{eval("po."+ev+"(eo)");}catch(e){};}else{try{onError(eo);}catch(e){};}},getIndexByParam:function($q,$r,$s){var $l;try{var i=$q.length;while(i--&&($q[i][$r]!=$s)){};if(i!=$q.length)$l=i;}catch(e){};return $l;},getObj:function(id){return document.getElementById(id);},getItemRange:function($t,$u){var $v=($t.RangeVoting.Votes>0)?$t.RangeVoting.Total/$t.RangeVoting.Votes:0;return($u*$v)/10;},getItemTags:function($t){var $l=new Array();try{for(var i in $t.Assets)$l=$l.concat($t.Assets[i].Tags);var r=new Array();o:for(var i=0,n=$l.length;i<n;i++){for(var x=i+1;x<n;x++)if($l[x]==$l[i])continue o;r[r.length]=$l[i];};$l=r;}catch(e){};return $l;},getImageHost:function($m){var h=this.getPlayerByPlatformId($m).getFileServer();var sh=h+$m+"\/";return sh;},getImageURL:function($w,id,$x){$x=$x.toLowerCase();if(($x!="l")&&($x!="m")&&($x!="s"))$x="l";return($w+$x+"\/"+id+".jpg");},getThumbnailURL:function($m,$t,$x){var $y=$t.Assets[admtv.getIndexByParam($t.Assets,"Type",1)];var $z;if($t.thumbnailHost!=undefined)$z=$t.thumbnailHost;else{$z=this.getImageHost($m);$t.thumbnailHost=$z;};return admtv.getImageURL($z+"t\/",$y.Id,$x);},getPlaylistThumbnailURL:function($m,$A,$x){return admtv.getImageURL(this.getImageHost($m)+"p\/",$A,$x);},getChannelThumbnailURL:function($m,$B,$x){return admtv.getImageURL(this.getImageHost($m)+"c\/",$B,"l");},getValidationImg:function(){return admtv_urlAdmotiontv+"tv_get_validation_keyword.aspx?r="+Math.floor(Math.random()*9999);},generateSWF:function($C,$D,$E){var $F='';$F+='<object ';for(var i in $C)$F+=i+'="'+$C[i]+'" ';$F+='>';for(var i in $D)$F+='<param name="'+i+'" value="'+$D[i]+'" \/> ';$F+='<embed ';for(var i in $E)$F+=i+'="'+$E[i]+'" ';$F+='><\/embed>';$F+='<\/object>';return $F;},queryToObj:function($G){var $g=new Object(),$H=$G.split("&");var i=$H.length;while(i--){var $I=$H[i].indexOf("=");if($I==-1)continue;var $J=$H[i].substring(0,$I),$v=$H[i].substring($I+1);$g[$J]=unescape($v);};return $g;}};function admPlayer(Id,$K,$L,fs,$M){var ap=this;ap.autoInit;ap.urlPlayer;ap.Content=new Object();ap.fileServer=fs;ap.wmode=$M;if(typeof($K)!="undefined")ap.width=$K;if(typeof($L)!="undefined")ap.height=$L;ap.Id=Id;ap.Index;ap.unique_id=new Date().getTime();ap.searchingFor="";if(eval("typeof(admtv_goStandBy_"+Id+")")=="undefined")ap.goStandBy=false;else ap.goStandBy=eval("admtv_goStandBy_"+Id);ap.Continue=function(){if(this.goStandBy)this.goStandBy=false;else this.Initialize();};ap.getFileServer=function(){return(this.fileServer!="")?this.fileServer:admtv_urlPlatform;};ap.setStartByFromPermalink=function($N){if($N!=""){this.startBy=$N.split("z");var i=this.startBy.length;while(i--)this.startBy[i]=parseInt(this.startBy[i],35);}};ap.getRSSFeed=function(){return admtv_urlAdmotiontv+"newitems.aspx?py="+this.Id;};ap.addRSSFeed=function(){var $O=document.createElement("link");$O.rel="alternate";$O.type="application\/rss+xml";$O.href=this.getRSSFeed();$O.title="Video Platform "+this.Id;var $P=document.documentElement.childNodes;for(var i in $P){try{if($P[i].nodeName.toLowerCase()=="head"){$P[i].insertBefore($O,null);break;}}catch(e){};}};ap.getRotateAllowed=function(){return this.getSwf().getRotateAllowed();};ap.setRotateAllowed=function(v){this.getSwf().setRotateAllowed(v);};ap.Initialize=function(){if(typeof(this.urlPlayer)!="undefined"){if(typeof(this.width)=="undefined")this.width=400;if(typeof(this.height)=="undefined")this.height=342;this.addRSSFeed();this.insertPlayer();}};ap.getPlayerVars=function(){var r=new Object();for(var i in this){if(typeof(this[i])!="function"&&typeof(this[i])!="null"&&typeof(this[i])!="undefined"){r[i]=this[i];}};return r;};ap.insertPlayer=function(){var fv="";fv+="urlAdmotiontv="+admtv_urlAdmotiontv+"&";if(typeof(admtv_urlAdserver)!="undefined")fv+="urlAdserver="+admtv_urlAdserver+"&";fv+="urlPermalink="+((typeof(admtv_urlPermalink)!="undefined")?admtv_urlPermalink:document.URL.split("?")[0]);fv+="&fv_Index="+this.Index;var id="atvO_"+this.unique_id;var $Q=this.getFileServer()+((typeof(admtv_corePlayer)!="undefined")?admtv_corePlayer:this.urlPlayer);var $C=new Object();$C.width=this.width;$C.height=this.height;$C.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";$C.codebase="http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0";$C.id=id;var $D=new Object();$D.movie=$Q;$D.menu="false";$D.allowfullscreen="true";$D.allowscriptaccess="always";$D.flashvars=fv;$D.wmode=this.wmode;$D.bgcolor="#000000";var $E=new Object();$E.width=this.width;$E.height=this.height;$E.src=$Q;$E.pluginspage="http:\/\/www.macromedia.com\/go\/getflashplayer";$E.name=id;$E.type="application\/x-shockwave-flash";$E.bgcolor=$D.bgcolor;$E.flashvars=$D.flashvars;$E.menu=$D.menu;$E.allowfullscreen=$D.allowfullscreen;$E.allowscriptaccess=$D.allowscriptaccess;$E.wmode=$D.wmode;admtv_corePlayer=undefined;var $R=admtv.getObj(this.div_id);var $S=admtv.generateSWF($C,$D,$E);$R.innerHTML=$S;};ap.getSwf=function(){var $T="atvO_"+this.unique_id;return(navigator.appName.indexOf("Microsoft")!=-1)?window[$T]:document[$T];};ap.userCheck=function($U){return this.getSwf().userCheck($U);};ap.userRegister=function($V,$W,$X){return this.getSwf().userRegister($V,$W,$X);};ap.userLogin=function($V,$W){try{return this.getSwf().userLogin($V,$W);}catch(e){return false;}};ap.userLogout=function(){return this.getSwf().userLogout();};ap.userGetUploadData=function($Y){return this.getSwf().userGetUploadData($Y);};ap.userIsLogged=function(){return this.getSwf().userIsLogged();};ap.userConfirmWebcam=function($Z,$00){return this.getSwf().userConfirmWebcam($Z,$00);};ap.userGetInfo=function(){return this.getSwf().userGetInfo();};ap.userGetItems=function($01,$02){return this.getSwf().userGetItems($01,$02);};ap.userUpdate=function($V,$03,$04){return this.getSwf().userUpdate($V,$03,$04);};ap.userUpdateItem=function($05){return this.getSwf().userUpdateItem($05);};ap.getCustomlist=function(){return this.getSwf().getCustomlist();};ap.playCustomVideo=function($06){return this.getSwf().playCustomVideo($06);};ap.removeFromCustomlist=function($07){return this.getSwf().removeFromCustomlist($07);};ap.addToCustomlist=function($02,$08){return this.getSwf().addToCustomlist($02,$08);};ap.cleanCustomlist=function(){this.getSwf().cleanCustomlist();};ap.reorderCustomlistItems=function(a,b){return this.getSwf().reorderCustomlistItems(a,b);};ap.generatePermalink=function($02){return this.getSwf().generatePermalink($02);};ap.getCurrentItemInfo=function(){try{return this.getSwf().getCurrentItemInfo();}catch(e){return[0,0,0];}};ap.getCurrentItemData=function(){try{return this.getSwf().getCurrentItemData();}catch(e){return{$09:0,$0a:0,Id:0,$0b:{$0c:false}};}};ap.playVideo=function($02){return this.getSwf().playVideo($02);};ap.playingItem=function(){return this.getSwf().playingItem();};ap.setRepeatMode=function(b){this.getSwf().setRepeatMode(b);};ap.setVolume=function($0d){this.getSwf().setVolume($0d);};ap.pause=function(fl){this.getSwf().pauseItem(fl);};ap.getTopRated=function($01,$0e,$02){return this.getSwf().getTopRated($01,$0e,$02);};ap.getMostVoted=function($01,$0e,$02){return this.getSwf().getMostVoted($01,$0e,$02);};ap.getItemRange=function($02,$u){return admtv.getItemRange(this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id),$u);};ap.getItemTags=function($02){return admtv.getItemTags(this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id));};ap.voteAllowed=function($02){var $t=this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id);return(typeof($t.RangeVoting.User)=="undefined"&&($t.RangeVoting.Model==2||($t.RangeVoting.Model==3&&this.userIsLogged())));};ap.vote=function($02,$v,$u,$0f){try{var $t=this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id);if(this.voteAllowed($02)&&typeof($t)!="undefined"){$t.RangeVoting.User=(10*$v)/$u;$t.RangeVoting.Total+=$t.RangeVoting.User;$t.RangeVoting.Votes++;this.getSwf().vote($t.Id,$v,$u,$0f);};return this.getItemRange($02,$u);}catch(e){return -1;}};ap.search=function(t,$02){this.searchingFor=t;return this.getSwf().search(t,$02);};ap.tagSearch=function($0g,$01,$02){return this.getSwf().tagSearch($0g,$01,$02);};ap.getHighlights=function(){return this.Content.Highlights;};ap.getMostViewed=function($01,$0e,$02){return this.getSwf().getMostViewed($01,$0e,$02);};ap.getMostSent=function($01,$0e,$02){return this.getSwf().getMostSent($01,$0e,$02);};ap.getMostRecent=function($01,$02){return this.getSwf().getMostRecent($01,$02);};ap.getMostCommented=function($01,$0e,$02){return this.getSwf().getMostCommented($01,$0e,$02);};ap.getComments=function($02){return this.getSwf().getComments($02);};ap.postCommentAllowed=function($02){var $t=this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id);return($t.Comments==2||($t.Comments==3&&this.userIsLogged()));};ap.postComment=function($02,kw,co,un,um,uu){if(this.postCommentAllowed($02))return this.getSwf().postComment($02,kw,co,un,um,uu);};ap.sendToFriend=function($02,$0h,$0i,$0j){return this.getSwf().sendToFriend($02,$0h,$0i,$0j);};ap.getChannelIndexById=function($B){var $l;if(typeof(this.Content.Channels)!="undefined"){try{$l=admtv.getIndexByParam(this.Content.Channels,"Id",$B);}catch(e){}};return $l;};ap.getPlaylistIndexById=function($B,$A){var $0k=this.getChannelById($B);var $l;if($0k!=undefined){try{$l=admtv.getIndexByParam($0k.Playlists,"Id",$A);}catch(e){}};return $l;};ap.getItemIndexById=function($B,$A,$0l){var $0m=this.getPlaylistById($B,$A);var $l;if($0m!=undefined){try{$l=admtv.getIndexByParam($0m.Items,"Id",$0l);}catch(e){}};return $l;};ap.getAssetIndexById=function($B,$A,$0l,$0n){var $0o=this.getItemById($B,$A,$0l);return admtv.getIndexByParam($0o.Assets,"Id",$0n);};ap.getChannelsByCategoryId=function($0p){var a=new Array();var i=this.Content.Channels.length;while(i--){var j=this.Content.Channels[i].Categories.length;while(j--){if(this.Content.Channels[i].Categories[j].Id==$0p){a.push(this.Content.Channels[i]);break;}}};return(a.length>0)?a.reverse():undefined;};ap.getChannelById=function($B){var $l;try{$l=this.Content.Channels[admtv.getIndexByParam(this.Content.Channels,"Id",$B)];}catch(e){};return $l;};ap.getPlaylistById=function($B,$A){var $0q;var $l;try{$0q=this.getChannelById($B).Playlists;$l=$0q[admtv.getIndexByParam($0q,"Id",$A)];}catch(e){};return $l;};ap.getItemById=function($B,$A,$0l){var $0q;var $l;try{$0q=this.getPlaylistById($B,$A).Items;$l=$0q[admtv.getIndexByParam($0q,"Id",$0l)];}catch(e){};return $l;};ap.getAssetById=function($B,$A,$0l,$0n){var $0q;var $l;try{$0q=this.getItemById($B,$A,$0l).Assets;$l=$0q[admtv.getIndexByParam($0q,"Id",$0n)];}catch(e){};return $l;};ap.getAssetByType=function($B,$A,$0l,$0r){var $l;try{var $0s=this.getItemById($B,$A,$0l).Assets;$l=$0s[admtv.getIndexByParam($0s,"Type",$0r)];}catch(e){};return $l;};ap.getItemThumbnail=function($02,$x){var $l;try{var $t=this.getItemById($02.ChannelId,$02.PlaylistId,$02.Id);$l=admtv.getThumbnailURL(this.Content.Id,$t,$x);}catch(e){};return $l;};ap.getPlaylistThumbnail=function($A,$x){var $l;try{$l=admtv.getPlaylistThumbnailURL(this.Content.Id,$A,$x);}catch(e){};return $l;};ap.getChannelThumbnail=function($B,$x){var $l;try{$l=admtv.getChannelThumbnailURL(this.Content.Id,$B,$x);}catch(e){};return $l;};ap.enableDoubleClick=function($s){this.getSwf().enableDoubleClick($s);};ap.skip=function(){return this.getSwf().skip();};ap.skipBack=function(){return this.getSwf().skipBack();};ap.hideSkin=function(){return this.getSwf().hideSkin();};ap.showSkin=function(){return this.getSwf().showSkin();};ap.flag=function($02,$0t,$0u){return this.getSwf().flag($02,$0t,$0u);};ap.getEmbedTag=function(){return this.getSwf().getEmbedTag();};}};if(typeof(admtv_cfg)!="undefined"){if(typeof(admtv_cfg["id"])!="undefined"){var $f=createNewPlayer(admtv_cfg);var cfg=new Array();var $0v=(typeof(admtv_cfg["debug"])!="undefined")?'&debug='+admtv_cfg["debug"]:'';var $0w='<scr'+'ipt language="JavaScr'+'ipt" src="'+$a+'?py='+$f.Id+'&index='+$f.Index+$0v+'" type="text/javascr'+'ipt"><\/scr'+'ipt>';document.write($0w);}}

